diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-03-24 22:00:54 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-03-24 22:00:54 +0000 |
commit | 1c3faa045f6dd93d8764f6e9482e8bd725fe388b (patch) | |
tree | c9b0373cc2ab5b044ef55bd386cdb5baf627c6aa /user | |
parent | d066f50d95b96ea36bd163db3ddea496824df7e1 (diff) | |
download | packages-1c3faa045f6dd93d8764f6e9482e8bd725fe388b.tar.gz packages-1c3faa045f6dd93d8764f6e9482e8bd725fe388b.tar.bz2 packages-1c3faa045f6dd93d8764f6e9482e8bd725fe388b.tar.xz packages-1c3faa045f6dd93d8764f6e9482e8bd725fe388b.zip |
user/mozjs: fix build on 64-bit ARM
Diffstat (limited to 'user')
-rw-r--r-- | user/mozjs/APKBUILD | 4 | ||||
-rw-r--r-- | user/mozjs/arm64.patch | 60 |
2 files changed, 63 insertions, 1 deletions
diff --git a/user/mozjs/APKBUILD b/user/mozjs/APKBUILD index 7760654b5..e9b3958ac 100644 --- a/user/mozjs/APKBUILD +++ b/user/mozjs/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=mozjs pkgver=52.4.0 -pkgrel=1 +pkgrel=2 pkgdesc="Standalone JavaScript interpreter from Mozilla" url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey" arch="all" @@ -18,6 +18,7 @@ source="https://distfiles.adelielinux.org/source/mozilla/mozjs-$pkgver.tar.bz2 0006-Disable-MOZ_GLUE_IN_PROGRAM-in-stand-alone-builds-on.patch 0008-tests-Skip-on-all-64-bit-archs.patch 0009-build-Include-configure-script-be-nicer-about-option.patch + arm64.patch baseconfig.patch dont-fail-tests-without-ion.patch python3.patch @@ -68,6 +69,7 @@ edbec26bff4fb91911b1dafc566d4cf37635e9039a1cbd527543d74765d1c96bcfae71fe4f9a66c6 d9acf4570a073a2151e19ad854e72ff927d050b532f04367bf49fb0c98f8eb544e9f6c455b1411d09a8a3034a2be62e23b7f9080fac9249e4132e85f2245d474 0006-Disable-MOZ_GLUE_IN_PROGRAM-in-stand-alone-builds-on.patch a95e91ffa3693ac2ac81eddee2e490b4acfb5ae0381a291b1916afc0d91fb00b95457fde0efe62905025fe425c18d5363c5e6ad1bb121645b29a14f6c76c0489 0008-tests-Skip-on-all-64-bit-archs.patch 2556f3322c5bc39c1efbbbd19b6843cf69b63a0255e8e3617f58b229e75ac221b6cb57fce15452cd1f25498c66f29f588f38c10c175b82c6fe163faaa7e3e2b0 0009-build-Include-configure-script-be-nicer-about-option.patch +63806e54fe7530703420fd070a8ef38b46cd185991a6d66dc2c1ec588f2b271883120b8e16d1a898eb6ddb41569d719f857e71f9e16e839962527cee1f47c41e arm64.patch 22870d6ee8a0a0b4359d78173aef0ade49063bfad495fd40815852684a1cdf17f9f50585e0d693eb712c2a2225ea43c4387cf454f3b9bd39e01899f3936775f1 baseconfig.patch 6ebaf6fd24f1987020ad0da82cd2ff878e5c27997ac45a571899f492b435d12e32274eac35e2d571775b6f6bdce24f8e7a968088da61329e2cd36dfc762a0156 dont-fail-tests-without-ion.patch 66a894b4878797438ac1361b892df4df45fe0c990e9540235336116a2dbfcc5d787a3076dca323b8252fb8cb6e39a61819fc0d4ce1491fb9e4d07c912fdf9e4d python3.patch" diff --git a/user/mozjs/arm64.patch b/user/mozjs/arm64.patch new file mode 100644 index 000000000..df1c8cc7e --- /dev/null +++ b/user/mozjs/arm64.patch @@ -0,0 +1,60 @@ + +# HG changeset patch +# User Jim Chen <nchen@mozilla.com> +# Date 1493664360 14400 +# Node ID 042d975f9355f711b058152691a44e458ba252b3 +# Parent fa7165dda22460795afe4ed27ecc57f454a3dfaa +Bug 1357874 - Add more AArch64 support to JS code; r=luke + +* Fix a parentheses warning when compiling testGCAllocator.cpp. + +* Define GETRANDOM_NR macro for AArch64. + +* Disable Android workarounds in jsnativestack.cpp and + WasmSignalHandlers.cpp for AArch64, because AArch64 is only supported + on API 21+, in which case those workarounds don't apply. + +* Enable trace logging in TraceLogging.cpp. + +diff --git a/js/src/jsapi-tests/testGCAllocator.cpp b/js/src/jsapi-tests/testGCAllocator.cpp +--- a/js/src/jsapi-tests/testGCAllocator.cpp ++++ b/js/src/jsapi-tests/testGCAllocator.cpp +@@ -310,15 +310,15 @@ void unmapPages(void* p, size_t size) { + #elif defined(XP_UNIX) + + void* + mapMemoryAt(void* desired, size_t length) + { + #if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__)) || defined(__aarch64__) +- MOZ_RELEASE_ASSERT(0xffff800000000000ULL & (uintptr_t(desired) + length - 1) == 0); ++ MOZ_RELEASE_ASSERT((0xffff800000000000ULL & (uintptr_t(desired) + length - 1)) == 0); + #endif + void* region = mmap(desired, length, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); + if (region == MAP_FAILED) + return nullptr; + if (region != desired) { + if (munmap(region, length)) + MOZ_RELEASE_ASSERT(errno == ENOMEM); + return nullptr; +diff --git a/js/src/vm/TraceLogging.cpp b/js/src/vm/TraceLogging.cpp +--- a/js/src/vm/TraceLogging.cpp ++++ b/js/src/vm/TraceLogging.cpp +@@ -56,17 +56,17 @@ rdtsc(void) + ); + result = upper; + result = result<<32; + result = result|lower; + + return result; + + } +-#elif defined(__arm__) ++#elif defined(__arm__) || defined(__aarch64__) + + #include <sys/time.h> + + static __inline__ uint64_t + rdtsc(void) + { + struct timeval tv; + gettimeofday(&tv, NULL); |