pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/spidermonkey52 spidermonkey52: Add s...
details: https://anonhg.NetBSD.org/pkgsrc/rev/9e3f4fca60a6
branches: trunk
changeset: 307677:9e3f4fca60a6
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Fri May 11 19:18:35 2018 +0000
description:
spidermonkey52: Add support for SunOS.
Works well enough to only produce 7 minor failures out of 6679
regression tests.
diffstat:
lang/spidermonkey52/Makefile | 12 +++-
lang/spidermonkey52/PLIST | 8 +-
lang/spidermonkey52/distinfo | 13 +++-
lang/spidermonkey52/patches/patch-build_moz.configure_init.configure | 15 ++++
lang/spidermonkey52/patches/patch-js_src_gc_Memory.cpp | 36 ++++++++++
lang/spidermonkey52/patches/patch-js_src_jsnativestack.cpp | 23 ++++++
lang/spidermonkey52/patches/patch-js_src_old-configure | 17 ++++
lang/spidermonkey52/patches/patch-js_src_threading_posix_Thread.cpp | 15 ++++
lang/spidermonkey52/patches/patch-js_src_wasm_WasmSignalHandlers.cpp | 20 +++++
lang/spidermonkey52/patches/patch-memory_mozalloc_mozalloc__abort.cpp | 18 +++++
lang/spidermonkey52/patches/patch-mfbt_Poison.cpp | 18 +++++
lang/spidermonkey52/patches/patch-mfbt_tests_TestPoisonArea.cpp | 18 +++++
lang/spidermonkey52/patches/patch-modules_fdlibm_src_math__private.h | 15 ++++
lang/spidermonkey52/patches/patch-python_mozbuild_mozbuild_configure_constants.py | 30 ++++++++
14 files changed, 252 insertions(+), 6 deletions(-)
diffs (truncated from 344 to 300 lines):
diff -r 1c757b6a6e7e -r 9e3f4fca60a6 lang/spidermonkey52/Makefile
--- a/lang/spidermonkey52/Makefile Fri May 11 15:10:38 2018 +0000
+++ b/lang/spidermonkey52/Makefile Fri May 11 19:18:35 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2018/04/29 05:11:20 wiz Exp $
+# $NetBSD: Makefile,v 1.3 2018/05/11 19:18:35 jperkin Exp $
DISTNAME= mozjs-52.7.4
PKGNAME= ${DISTNAME:S/mozjs/spidermonkey52/}
@@ -22,6 +22,16 @@
CONFIGURE_ARGS+= --with-system-zlib
CONFIGURE_ARGS+= --with-pthreads
+PLIST_VARS+= jemalloc
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "SunOS"
+CONFIGURE_ARGS+= --disable-jemalloc
+.else
+PLIST.jemalloc= yes
+.endif
+
CONFIGURE_DIRS= js/src
PKGCONFIG_OVERRIDE+= js/src/ctypes/libffi/libffi.pc.in
diff -r 1c757b6a6e7e -r 9e3f4fca60a6 lang/spidermonkey52/PLIST
--- a/lang/spidermonkey52/PLIST Fri May 11 15:10:38 2018 +0000
+++ b/lang/spidermonkey52/PLIST Fri May 11 19:18:35 2018 +0000
@@ -1,8 +1,8 @@
-@comment $NetBSD: PLIST,v 1.1 2018/04/29 05:11:00 wiz Exp $
+@comment $NetBSD: PLIST,v 1.2 2018/05/11 19:18:35 jperkin Exp $
bin/js52
bin/js52-config
include/mozjs-52/fdlibm.h
-include/mozjs-52/jemalloc_types.h
+${PLIST.jemalloc}include/mozjs-52/jemalloc_types.h
include/mozjs-52/js-config.h
include/mozjs-52/js.msg
include/mozjs-52/js/CallArgs.h
@@ -155,8 +155,8 @@
include/mozjs-52/mozilla/mozalloc_abort.h
include/mozjs-52/mozilla/mozalloc_oom.h
include/mozjs-52/mozilla/utils.h
-include/mozjs-52/mozmemory.h
-include/mozjs-52/mozmemory_wrap.h
+${PLIST.jemalloc}include/mozjs-52/mozmemory.h
+${PLIST.jemalloc}include/mozjs-52/mozmemory_wrap.h
lib/libjs_static.ajs
lib/libmozjs-52.so
lib/pkgconfig/mozjs-52.pc
diff -r 1c757b6a6e7e -r 9e3f4fca60a6 lang/spidermonkey52/distinfo
--- a/lang/spidermonkey52/distinfo Fri May 11 15:10:38 2018 +0000
+++ b/lang/spidermonkey52/distinfo Fri May 11 19:18:35 2018 +0000
@@ -1,8 +1,19 @@
-$NetBSD: distinfo,v 1.1 2018/04/29 05:11:00 wiz Exp $
+$NetBSD: distinfo,v 1.2 2018/05/11 19:18:35 jperkin Exp $
SHA1 (mozjs-52.7.4.tar.bz2) = ff009853040bb46017204fda4ed69a79484fd321
RMD160 (mozjs-52.7.4.tar.bz2) = 71ee71c2444d8b6a1b2b3c744c9f52a2b7129879
SHA512 (mozjs-52.7.4.tar.bz2) = 7381f251ca9a4983d181eee2198f89b30505a0de636020e52c0c5b174f4d5cd19ca851222b6d8013bb657f2f1ce1ffcb54816eb928e481be2c9242f918d0125e
Size (mozjs-52.7.4.tar.bz2) = 30494311 bytes
+SHA1 (patch-build_moz.configure_init.configure) = 63ed71d4269e8fbf990f44eecadca796991d5c1f
SHA1 (patch-intl_icu_source_configure) = 1ff1be8ca68566e153219e15b8db696afd08b746
+SHA1 (patch-js_src_gc_Memory.cpp) = b1bb0c3045163d586c0b4d731d0ed7c23f339f3c
+SHA1 (patch-js_src_jsnativestack.cpp) = 3d0b06ccc3e24b408b97d01faa7758353f2edc85
+SHA1 (patch-js_src_old-configure) = f9a32ee234f7962c038a10f2b085c0a6fcbcfd8a
SHA1 (patch-js_src_tests_update-test262.sh) = 10d73d95f4b849090bccb8fe656df79cbcea89f3
+SHA1 (patch-js_src_threading_posix_Thread.cpp) = e490d04ed28ffd8b2e9901a24739ad19fe6759e0
+SHA1 (patch-js_src_wasm_WasmSignalHandlers.cpp) = fd9b836d35d71103c3d8b628a6fe7c446bd4c7da
+SHA1 (patch-memory_mozalloc_mozalloc__abort.cpp) = 610f7457f6a1993d26fcccd5730113bb48926d99
+SHA1 (patch-mfbt_Poison.cpp) = f4560e4552beeb70d0564e3fdfd908c5e0bd94c4
+SHA1 (patch-mfbt_tests_TestPoisonArea.cpp) = 054441d4618bf630be6d6e71babdcdaa884f533a
+SHA1 (patch-modules_fdlibm_src_math__private.h) = afa40802bfdb917d7906de486eb8882da426c9cf
+SHA1 (patch-python_mozbuild_mozbuild_configure_constants.py) = aed1c08cecc29e29edc8ccee98d032546814d6e4
diff -r 1c757b6a6e7e -r 9e3f4fca60a6 lang/spidermonkey52/patches/patch-build_moz.configure_init.configure
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/spidermonkey52/patches/patch-build_moz.configure_init.configure Fri May 11 19:18:35 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-build_moz.configure_init.configure,v 1.1 2018/05/11 19:18:35 jperkin Exp $
+
+Support SunOS.
+
+--- build/moz.configure/init.configure.orig 2018-04-28 01:04:01.000000000 +0000
++++ build/moz.configure/init.configure
+@@ -336,6 +336,8 @@ def split_triplet(triplet):
+ canonical_os = canonical_kernel = 'NetBSD'
+ elif os.startswith('openbsd'):
+ canonical_os = canonical_kernel = 'OpenBSD'
++ elif os.startswith('solaris'):
++ canonical_os = canonical_kernel = 'SunOS'
+ else:
+ die('Unknown OS: %s' % os)
+
diff -r 1c757b6a6e7e -r 9e3f4fca60a6 lang/spidermonkey52/patches/patch-js_src_gc_Memory.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/spidermonkey52/patches/patch-js_src_gc_Memory.cpp Fri May 11 19:18:35 2018 +0000
@@ -0,0 +1,36 @@
+$NetBSD: patch-js_src_gc_Memory.cpp,v 1.1 2018/05/11 19:18:35 jperkin Exp $
+
+Support SunOS/x86_64.
+
+--- js/src/gc/Memory.cpp.orig 2018-04-28 01:04:03.000000000 +0000
++++ js/src/gc/Memory.cpp
+@@ -501,7 +501,7 @@ static inline void*
+ MapMemoryAt(void* desired, size_t length, int prot = PROT_READ | PROT_WRITE,
+ int flags = MAP_PRIVATE | MAP_ANON, int fd = -1, off_t offset = 0)
+ {
+-#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__)) || defined(__aarch64__)
++#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__)) || defined(__aarch64__) || (defined(__sun) && defined(__x86_64__))
+ MOZ_ASSERT((0xffff800000000000ULL & (uintptr_t(desired) + length - 1)) == 0);
+ #endif
+ void* region = mmap(desired, length, prot, flags, fd, offset);
+@@ -551,7 +551,7 @@ MapMemory(size_t length, int prot = PROT
+ return nullptr;
+ }
+ return region;
+-#elif defined(__aarch64__)
++#elif defined(__aarch64__) || (defined(__sun) && defined(__x86_64__))
+ /*
+ * There might be similar virtual address issue on arm64 which depends on
+ * hardware and kernel configurations. But the work around is slightly
+@@ -763,7 +763,11 @@ MarkPagesUnused(void* p, size_t size)
+ return false;
+
+ MOZ_ASSERT(OffsetFromAligned(p, pageSize) == 0);
++#ifdef __sun
++ int result = posix_madvise(p, size, MADV_DONTNEED);
++#else
+ int result = madvise(p, size, MADV_DONTNEED);
++#endif
+ return result != -1;
+ }
+
diff -r 1c757b6a6e7e -r 9e3f4fca60a6 lang/spidermonkey52/patches/patch-js_src_jsnativestack.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/spidermonkey52/patches/patch-js_src_jsnativestack.cpp Fri May 11 19:18:35 2018 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-js_src_jsnativestack.cpp,v 1.1 2018/05/11 19:18:35 jperkin Exp $
+
+Support SunOS.
+
+--- js/src/jsnativestack.cpp.orig 2018-04-28 01:04:03.000000000 +0000
++++ js/src/jsnativestack.cpp
+@@ -59,7 +59,7 @@ js::GetNativeStackBaseImpl()
+ # endif
+ }
+
+-#elif defined(SOLARIS)
++#elif defined(__sun)
+
+ #include <ucontext.h>
+
+@@ -105,6 +105,7 @@ js::GetNativeStackBaseImpl()
+ # elif defined(PTHREAD_NP_H) || defined(_PTHREAD_NP_H_) || defined(NETBSD)
+ /* e.g. on FreeBSD 4.8 or newer, neundorf%kde.org@localhost */
+ pthread_attr_get_np(thread, &sattr);
++# elif defined(__sun)
+ # else
+ /*
+ * FIXME: this function is non-portable;
diff -r 1c757b6a6e7e -r 9e3f4fca60a6 lang/spidermonkey52/patches/patch-js_src_old-configure
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/spidermonkey52/patches/patch-js_src_old-configure Fri May 11 19:18:35 2018 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-js_src_old-configure,v 1.1 2018/05/11 19:18:35 jperkin Exp $
+
+Support SunOS.
+
+--- js/src/old-configure.orig 2018-04-28 01:04:49.000000000 +0000
++++ js/src/old-configure
+@@ -5445,6 +5445,10 @@ EOF
+ fi
+ ;;
+
++*-solaris*)
++ MOZ_FIX_LINK_PATHS=
++ ;;
++
+ esac
+
+ cat >> confdefs.pytmp <<EOF
diff -r 1c757b6a6e7e -r 9e3f4fca60a6 lang/spidermonkey52/patches/patch-js_src_threading_posix_Thread.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/spidermonkey52/patches/patch-js_src_threading_posix_Thread.cpp Fri May 11 19:18:35 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-js_src_threading_posix_Thread.cpp,v 1.1 2018/05/11 19:18:35 jperkin Exp $
+
+Support SunOS.
+
+--- js/src/threading/posix/Thread.cpp.orig 2018-04-28 01:04:03.000000000 +0000
++++ js/src/threading/posix/Thread.cpp
+@@ -159,6 +159,8 @@ js::ThisThread::SetName(const char* name
+ rv = 0;
+ #elif defined(__NetBSD__)
+ rv = pthread_setname_np(pthread_self(), "%s", (void*)name);
++#elif defined(__sun)
++ rv = 0;
+ #else
+ rv = pthread_setname_np(pthread_self(), name);
+ #endif
diff -r 1c757b6a6e7e -r 9e3f4fca60a6 lang/spidermonkey52/patches/patch-js_src_wasm_WasmSignalHandlers.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/spidermonkey52/patches/patch-js_src_wasm_WasmSignalHandlers.cpp Fri May 11 19:18:35 2018 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-js_src_wasm_WasmSignalHandlers.cpp,v 1.1 2018/05/11 19:18:35 jperkin Exp $
+
+Support SunOS.
+
+--- js/src/wasm/WasmSignalHandlers.cpp.orig 2018-04-28 01:04:03.000000000 +0000
++++ js/src/wasm/WasmSignalHandlers.cpp
+@@ -130,11 +130,12 @@ class AutoSetHandlingSegFault
+ # define EPC_sig(p) ((p)->sc_pc)
+ # define RFP_sig(p) ((p)->sc_regs[30])
+ # endif
+-#elif defined(__linux__) || defined(SOLARIS)
++#elif defined(__linux__) || defined(__sun)
+ # if defined(__linux__)
+ # define XMM_sig(p,i) ((p)->uc_mcontext.fpregs->_xmm[i])
+ # define EIP_sig(p) ((p)->uc_mcontext.gregs[REG_EIP])
+ # else
++# include <sys/regset.h>
+ # define XMM_sig(p,i) ((p)->uc_mcontext.fpregs.fp_reg_set.fpchip_state.xmm[i])
+ # define EIP_sig(p) ((p)->uc_mcontext.gregs[REG_PC])
+ # endif
diff -r 1c757b6a6e7e -r 9e3f4fca60a6 lang/spidermonkey52/patches/patch-memory_mozalloc_mozalloc__abort.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/spidermonkey52/patches/patch-memory_mozalloc_mozalloc__abort.cpp Fri May 11 19:18:35 2018 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-memory_mozalloc_mozalloc__abort.cpp,v 1.1 2018/05/11 19:18:35 jperkin Exp $
+
+Support SunOS.
+
+--- memory/mozalloc/mozalloc_abort.cpp.orig 2018-04-28 01:04:04.000000000 +0000
++++ memory/mozalloc/mozalloc_abort.cpp
+@@ -68,7 +68,11 @@ void fillAbortMessage(char (&msg)[N], ui
+ //
+ // That segmentation fault will be interpreted as another bug by ASan and as a
+ // result, ASan will just exit(1) instead of aborting.
++#ifdef __sun
++void std::abort(void)
++#else
+ void abort(void)
++#endif
+ {
+ #ifdef MOZ_WIDGET_ANDROID
+ char msg[64] = {};
diff -r 1c757b6a6e7e -r 9e3f4fca60a6 lang/spidermonkey52/patches/patch-mfbt_Poison.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/spidermonkey52/patches/patch-mfbt_Poison.cpp Fri May 11 19:18:35 2018 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-mfbt_Poison.cpp,v 1.1 2018/05/11 19:18:35 jperkin Exp $
+
+Support SunOS.
+
+--- mfbt/Poison.cpp.orig 2018-04-28 01:04:05.000000000 +0000
++++ mfbt/Poison.cpp
+@@ -129,7 +129,11 @@ ReleaseRegion(void* aRegion, uintptr_t a
+ static bool
+ ProbeRegion(uintptr_t aRegion, uintptr_t aSize)
+ {
++#ifdef __sun
++ if (posix_madvise(reinterpret_cast<void*>(aRegion), aSize, MADV_NORMAL)) {
++#else
+ if (madvise(reinterpret_cast<void*>(aRegion), aSize, MADV_NORMAL)) {
++#endif
+ return true;
+ } else {
+ return false;
diff -r 1c757b6a6e7e -r 9e3f4fca60a6 lang/spidermonkey52/patches/patch-mfbt_tests_TestPoisonArea.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/spidermonkey52/patches/patch-mfbt_tests_TestPoisonArea.cpp Fri May 11 19:18:35 2018 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-mfbt_tests_TestPoisonArea.cpp,v 1.1 2018/05/11 19:18:35 jperkin Exp $
+
+Support SunOS.
+
+--- mfbt/tests/TestPoisonArea.cpp.orig 2018-04-28 01:04:05.000000000 +0000
++++ mfbt/tests/TestPoisonArea.cpp
+@@ -266,7 +266,11 @@ ReleaseRegion(void* aPage)
+ static bool
+ ProbeRegion(uintptr_t aPage)
+ {
++#ifdef __sun
++ return !!posix_madvise(reinterpret_cast<void*>(aPage), PageSize(), MADV_NORMAL);
++#else
+ return !!madvise(reinterpret_cast<void*>(aPage), PageSize(), MADV_NORMAL);
++#endif
+ }
+
+ static int
diff -r 1c757b6a6e7e -r 9e3f4fca60a6 lang/spidermonkey52/patches/patch-modules_fdlibm_src_math__private.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/spidermonkey52/patches/patch-modules_fdlibm_src_math__private.h Fri May 11 19:18:35 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-modules_fdlibm_src_math__private.h,v 1.1 2018/05/11 19:18:35 jperkin Exp $
+
+Support SunOS.
+
+--- modules/fdlibm/src/math_private.h.orig 2018-04-28 01:04:05.000000000 +0000
Home |
Main Index |
Thread Index |
Old Index