pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/spidermonkey185 spidermonkey185: Fix...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/430e4b4e907e
branches:  trunk
changeset: 306773:430e4b4e907e
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Thu Apr 26 09:39:18 2018 +0000
description:
spidermonkey185: Fix build on SunOS 64-bit.

SpiderMonkey makes assumptions about memory layout that break in a 64-bit SunOS
environment, so limit mmap() to the lower 32-bit address space.  Provides a
workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=577056

diffstat:

 lang/spidermonkey185/Makefile                    |   6 +-----
 lang/spidermonkey185/distinfo                    |   3 ++-
 lang/spidermonkey185/patches/patch-jsgcchunk.cpp |  16 ++++++++++++++++
 3 files changed, 19 insertions(+), 6 deletions(-)

diffs (57 lines):

diff -r ddc37a622e43 -r 430e4b4e907e lang/spidermonkey185/Makefile
--- a/lang/spidermonkey185/Makefile     Thu Apr 26 07:57:40 2018 +0000
+++ b/lang/spidermonkey185/Makefile     Thu Apr 26 09:39:18 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2018/03/21 12:02:54 fhajny Exp $
+# $NetBSD: Makefile,v 1.4 2018/04/26 09:39:18 jperkin Exp $
 #
 
 DISTNAME=      js185-1.0.0
@@ -11,10 +11,6 @@
 COMMENT=       Standalone JavaScript implementation in C
 LICENSE=       mpl-1.1
 
-# Spidermonkey 1.8.5 never worked here and unlikely will
-# https://bugzilla.mozilla.org/show_bug.cgi?id=577056
-BROKEN_ON_PLATFORM=    SunOS-*-x86_64
-
 WRKSRC=                ${WRKDIR}/js-1.8.5/js/src
 
 USE_TOOLS+=    gmake pkg-config perl:build zip:build
diff -r ddc37a622e43 -r 430e4b4e907e lang/spidermonkey185/distinfo
--- a/lang/spidermonkey185/distinfo     Thu Apr 26 07:57:40 2018 +0000
+++ b/lang/spidermonkey185/distinfo     Thu Apr 26 09:39:18 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2017/03/23 17:06:54 joerg Exp $
+$NetBSD: distinfo,v 1.4 2018/04/26 09:39:18 jperkin Exp $
 
 SHA1 (js185-1.0.0.tar.gz) = 52a01449c48d7a117b35f213d3e4263578d846d6
 RMD160 (js185-1.0.0.tar.gz) = 23e6ddc81d5b63e015aecc1a104b2d3d3ced5005
@@ -7,6 +7,7 @@
 SHA1 (patch-configure) = 77366fff7e8b766b5691d0432b8740d4c8c362a6
 SHA1 (patch-jscell.h) = e2c90041b9b526d1f07e4905d0c684afe96992a9
 SHA1 (patch-jsgc.h) = 8e8a31e9284ce8fe0b92f36c2732722d720b9101
+SHA1 (patch-jsgcchunk.cpp) = ecc221e0e96db4083dc9cdf97848e001c091ec2c
 SHA1 (patch-jsobj.h) = 2da40bf90fd2d856bf61658964b49e8b12ac7809
 SHA1 (patch-jspubtd.h) = 6219e5ce98885b72e62978a33ee2b5367c3406b3
 SHA1 (patch-v8-dtoa_platform.cc) = 24670e996fcc7ca0d1e7b1b3765a67ac05e9a661
diff -r ddc37a622e43 -r 430e4b4e907e lang/spidermonkey185/patches/patch-jsgcchunk.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/spidermonkey185/patches/patch-jsgcchunk.cpp  Thu Apr 26 09:39:18 2018 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-jsgcchunk.cpp,v 1.1 2018/04/26 09:39:18 jperkin Exp $
+
+Limit mmap() to the lower 32 bits of address space on SunOS, as SpiderMonkey
+makes assumptions: https://bugzilla.mozilla.org/show_bug.cgi?id=577056
+
+--- jsgcchunk.cpp.orig 2011-03-31 19:08:36.000000000 +0000
++++ jsgcchunk.cpp
+@@ -303,7 +303,7 @@ MapAlignedPages(size_t size, size_t alig
+      */
+ #ifdef SOLARIS
+     void *p = mmap((caddr_t) alignment, size, PROT_READ | PROT_WRITE,
+-                     MAP_PRIVATE | MAP_NOSYNC | MAP_ALIGN | MAP_ANON, -1, 0);
++                     MAP_PRIVATE | MAP_NOSYNC | MAP_ALIGN | MAP_ANON | MAP_32BIT, -1, 0);
+ #else
+     void *p = mmap((void *) alignment, size, PROT_READ | PROT_WRITE,
+                      MAP_PRIVATE | MAP_NOSYNC | MAP_ALIGN | MAP_ANON, -1, 0);



Home | Main Index | Thread Index | Old Index