pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/spidermonkey52
Module Name: pkgsrc
Committed By: jperkin
Date: Fri May 11 19:18:35 UTC 2018
Modified Files:
pkgsrc/lang/spidermonkey52: Makefile PLIST distinfo
Added Files:
pkgsrc/lang/spidermonkey52/patches:
patch-build_moz.configure_init.configure patch-js_src_gc_Memory.cpp
patch-js_src_jsnativestack.cpp patch-js_src_old-configure
patch-js_src_threading_posix_Thread.cpp
patch-js_src_wasm_WasmSignalHandlers.cpp
patch-memory_mozalloc_mozalloc__abort.cpp patch-mfbt_Poison.cpp
patch-mfbt_tests_TestPoisonArea.cpp
patch-modules_fdlibm_src_math__private.h
patch-python_mozbuild_mozbuild_configure_constants.py
Log Message:
spidermonkey52: Add support for SunOS.
Works well enough to only produce 7 minor failures out of 6679
regression tests.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/spidermonkey52/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/spidermonkey52/PLIST \
pkgsrc/lang/spidermonkey52/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/lang/spidermonkey52/patches/patch-build_moz.configure_init.configure \
pkgsrc/lang/spidermonkey52/patches/patch-js_src_gc_Memory.cpp \
pkgsrc/lang/spidermonkey52/patches/patch-js_src_jsnativestack.cpp \
pkgsrc/lang/spidermonkey52/patches/patch-js_src_old-configure \
pkgsrc/lang/spidermonkey52/patches/patch-js_src_threading_posix_Thread.cpp \
pkgsrc/lang/spidermonkey52/patches/patch-js_src_wasm_WasmSignalHandlers.cpp \
pkgsrc/lang/spidermonkey52/patches/patch-memory_mozalloc_mozalloc__abort.cpp \
pkgsrc/lang/spidermonkey52/patches/patch-mfbt_Poison.cpp \
pkgsrc/lang/spidermonkey52/patches/patch-mfbt_tests_TestPoisonArea.cpp \
pkgsrc/lang/spidermonkey52/patches/patch-modules_fdlibm_src_math__private.h \
pkgsrc/lang/spidermonkey52/patches/patch-python_mozbuild_mozbuild_configure_constants.py
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/spidermonkey52/Makefile
diff -u pkgsrc/lang/spidermonkey52/Makefile:1.2 pkgsrc/lang/spidermonkey52/Makefile:1.3
--- pkgsrc/lang/spidermonkey52/Makefile:1.2 Sun Apr 29 05:11:20 2018
+++ pkgsrc/lang/spidermonkey52/Makefile Fri May 11 19:18:35 2018
@@ -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-nspr
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
Index: pkgsrc/lang/spidermonkey52/PLIST
diff -u pkgsrc/lang/spidermonkey52/PLIST:1.1 pkgsrc/lang/spidermonkey52/PLIST:1.2
--- pkgsrc/lang/spidermonkey52/PLIST:1.1 Sun Apr 29 05:11:00 2018
+++ pkgsrc/lang/spidermonkey52/PLIST Fri May 11 19:18:35 2018
@@ -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.h
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
Index: pkgsrc/lang/spidermonkey52/distinfo
diff -u pkgsrc/lang/spidermonkey52/distinfo:1.1 pkgsrc/lang/spidermonkey52/distinfo:1.2
--- pkgsrc/lang/spidermonkey52/distinfo:1.1 Sun Apr 29 05:11:00 2018
+++ pkgsrc/lang/spidermonkey52/distinfo Fri May 11 19:18:35 2018
@@ -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
Added files:
Index: pkgsrc/lang/spidermonkey52/patches/patch-build_moz.configure_init.configure
diff -u /dev/null pkgsrc/lang/spidermonkey52/patches/patch-build_moz.configure_init.configure:1.1
--- /dev/null Fri May 11 19:18:35 2018
+++ pkgsrc/lang/spidermonkey52/patches/patch-build_moz.configure_init.configure Fri May 11 19:18:35 2018
@@ -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)
+
Index: pkgsrc/lang/spidermonkey52/patches/patch-js_src_gc_Memory.cpp
diff -u /dev/null pkgsrc/lang/spidermonkey52/patches/patch-js_src_gc_Memory.cpp:1.1
--- /dev/null Fri May 11 19:18:35 2018
+++ pkgsrc/lang/spidermonkey52/patches/patch-js_src_gc_Memory.cpp Fri May 11 19:18:35 2018
@@ -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;
+ }
+
Index: pkgsrc/lang/spidermonkey52/patches/patch-js_src_jsnativestack.cpp
diff -u /dev/null pkgsrc/lang/spidermonkey52/patches/patch-js_src_jsnativestack.cpp:1.1
--- /dev/null Fri May 11 19:18:35 2018
+++ pkgsrc/lang/spidermonkey52/patches/patch-js_src_jsnativestack.cpp Fri May 11 19:18:35 2018
@@ -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;
Index: pkgsrc/lang/spidermonkey52/patches/patch-js_src_old-configure
diff -u /dev/null pkgsrc/lang/spidermonkey52/patches/patch-js_src_old-configure:1.1
--- /dev/null Fri May 11 19:18:35 2018
+++ pkgsrc/lang/spidermonkey52/patches/patch-js_src_old-configure Fri May 11 19:18:35 2018
@@ -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
Index: pkgsrc/lang/spidermonkey52/patches/patch-js_src_threading_posix_Thread.cpp
diff -u /dev/null pkgsrc/lang/spidermonkey52/patches/patch-js_src_threading_posix_Thread.cpp:1.1
--- /dev/null Fri May 11 19:18:35 2018
+++ pkgsrc/lang/spidermonkey52/patches/patch-js_src_threading_posix_Thread.cpp Fri May 11 19:18:35 2018
@@ -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
Index: pkgsrc/lang/spidermonkey52/patches/patch-js_src_wasm_WasmSignalHandlers.cpp
diff -u /dev/null pkgsrc/lang/spidermonkey52/patches/patch-js_src_wasm_WasmSignalHandlers.cpp:1.1
--- /dev/null Fri May 11 19:18:35 2018
+++ pkgsrc/lang/spidermonkey52/patches/patch-js_src_wasm_WasmSignalHandlers.cpp Fri May 11 19:18:35 2018
@@ -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
Index: pkgsrc/lang/spidermonkey52/patches/patch-memory_mozalloc_mozalloc__abort.cpp
diff -u /dev/null pkgsrc/lang/spidermonkey52/patches/patch-memory_mozalloc_mozalloc__abort.cpp:1.1
--- /dev/null Fri May 11 19:18:35 2018
+++ pkgsrc/lang/spidermonkey52/patches/patch-memory_mozalloc_mozalloc__abort.cpp Fri May 11 19:18:35 2018
@@ -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] = {};
Index: pkgsrc/lang/spidermonkey52/patches/patch-mfbt_Poison.cpp
diff -u /dev/null pkgsrc/lang/spidermonkey52/patches/patch-mfbt_Poison.cpp:1.1
--- /dev/null Fri May 11 19:18:35 2018
+++ pkgsrc/lang/spidermonkey52/patches/patch-mfbt_Poison.cpp Fri May 11 19:18:35 2018
@@ -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;
Index: pkgsrc/lang/spidermonkey52/patches/patch-mfbt_tests_TestPoisonArea.cpp
diff -u /dev/null pkgsrc/lang/spidermonkey52/patches/patch-mfbt_tests_TestPoisonArea.cpp:1.1
--- /dev/null Fri May 11 19:18:35 2018
+++ pkgsrc/lang/spidermonkey52/patches/patch-mfbt_tests_TestPoisonArea.cpp Fri May 11 19:18:35 2018
@@ -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
Index: pkgsrc/lang/spidermonkey52/patches/patch-modules_fdlibm_src_math__private.h
diff -u /dev/null pkgsrc/lang/spidermonkey52/patches/patch-modules_fdlibm_src_math__private.h:1.1
--- /dev/null Fri May 11 19:18:35 2018
+++ pkgsrc/lang/spidermonkey52/patches/patch-modules_fdlibm_src_math__private.h Fri May 11 19:18:35 2018
@@ -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
++++ modules/fdlibm/src/math_private.h
+@@ -38,7 +38,7 @@
+ * endianness at run time.
+ */
+
+-#ifdef WIN32
++#if defined(WIN32) || defined(__sun)
+ #define u_int32_t uint32_t
+ #define u_int64_t uint64_t
+ #endif
Index: pkgsrc/lang/spidermonkey52/patches/patch-python_mozbuild_mozbuild_configure_constants.py
diff -u /dev/null pkgsrc/lang/spidermonkey52/patches/patch-python_mozbuild_mozbuild_configure_constants.py:1.1
--- /dev/null Fri May 11 19:18:35 2018
+++ pkgsrc/lang/spidermonkey52/patches/patch-python_mozbuild_mozbuild_configure_constants.py Fri May 11 19:18:35 2018
@@ -0,0 +1,30 @@
+$NetBSD: patch-python_mozbuild_mozbuild_configure_constants.py,v 1.1 2018/05/11 19:18:35 jperkin Exp $
+
+Support SunOS.
+
+--- python/mozbuild/mozbuild/configure/constants.py.orig 2018-04-28 01:04:05.000000000 +0000
++++ python/mozbuild/mozbuild/configure/constants.py
+@@ -24,6 +24,7 @@ OS = EnumString.subclass(
+ 'NetBSD',
+ 'OpenBSD',
+ 'OSX',
++ 'SunOS',
+ 'WINNT',
+ )
+
+@@ -35,6 +36,7 @@ Kernel = EnumString.subclass(
+ 'Linux',
+ 'NetBSD',
+ 'OpenBSD',
++ 'SunOS',
+ 'WINNT',
+ )
+
+@@ -97,6 +99,7 @@ kernel_preprocessor_checks = {
+ 'Linux': '__linux__',
+ 'NetBSD': '__NetBSD__',
+ 'OpenBSD': '__OpenBSD__',
++ 'SunOS': '__sun',
+ 'WINNT': '_WIN32 || __CYGWIN__',
+ }
+
Home |
Main Index |
Thread Index |
Old Index