mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-28 05:29:48 +00:00
lang/spidermonkey185: Fix clang build, cherrypick upstream clang fixes
- patch: -fvisibility=hidden to fix clang build - patch: Remove shell workers [1] - patch: Silence clang alignment warnings jsscript.h [2] - patch: Silence clang alignment warnings in jsstr.cpp [3] - Fix pkg-plist - remove pkgconfig dirrm entry - Tweak regression-test: target [1] https://bugzilla.mozilla.org/show_bug.cgi?id=771281 [2] https://bugzilla.mozilla.org/show_bug.cgi?id=662962 [3] https://bugzilla.mozilla.org/show_bug.cgi?id=662961 Thanks to Guido Falsi (madpilot) for the visibility patch, kwm and miwi for additional testing and the constant reminders.
This commit is contained in:
parent
60feaac2a9
commit
59a275ca57
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=320274
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= spidermonkey185
|
||||
PORTVERSION= 1.8.5
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= lang
|
||||
MASTER_SITES= ${MASTER_SITE_MOZILLA}
|
||||
MASTER_SITE_SUBDIR= js
|
||||
@ -17,6 +17,8 @@ LIB_DEPENDS= nspr4:${PORTSDIR}/devel/nspr
|
||||
|
||||
CONFLICTS= njs-[0-9]*
|
||||
|
||||
#USES= pkgconfig:build
|
||||
USE_AUTOTOOLS= autoconf213:env
|
||||
GNU_CONFIGURE= yes
|
||||
USE_GMAKE= yes
|
||||
USE_GNOME= gnomehack
|
||||
@ -151,10 +153,13 @@ PLIST_SUB+= SPARC=""
|
||||
PLIST_SUB+= SPARC="@comment "
|
||||
.endif
|
||||
|
||||
pre-configure:
|
||||
(cd ${WRKSRC} && ${AUTOCONF})
|
||||
|
||||
regression-test: build
|
||||
@${ECHO_MSG} -n "===> Running jstests.py: "
|
||||
@cd ${WRKSRC} && ${SETENV} TZ=PST8PDT ${PYTHON_CMD} tests/jstests.py \
|
||||
--no-progress ./js
|
||||
--no-progress --worker-count=${MAKE_JOBS_NUMBER} ./js
|
||||
.if ${PORT_OPTIONS:MMETHODJIT} || ${PORT_OPTIONS:MTRACEJIT}
|
||||
@${ECHO_MSG} -n "===> Running jit_test.py: "
|
||||
@cd ${WRKSRC} && ${SETENV} TZ=PST8PDT ${PYTHON_CMD} jit-test/jit_test.py \
|
||||
|
1839
lang/spidermonkey185/files/patch-bug771281
Normal file
1839
lang/spidermonkey185/files/patch-bug771281
Normal file
File diff suppressed because it is too large
Load Diff
12
lang/spidermonkey185/files/patch-configure.in
Normal file
12
lang/spidermonkey185/files/patch-configure.in
Normal file
@ -0,0 +1,12 @@
|
||||
--- ./configure.in.orig 2011-04-01 06:08:36.000000000 +1100
|
||||
+++ ./configure.in 2013-05-26 00:19:28.032315432 +1000
|
||||
@@ -3378,7 +3378,8 @@
|
||||
rm -f conftest.{c,S}
|
||||
])
|
||||
if test "$ac_cv_have_visibility_builtin_bug" = "no" -a \
|
||||
- "$ac_cv_have_visibility_class_bug" = "no"; then
|
||||
+ "$ac_cv_have_visibility_class_bug" = "no" -a \
|
||||
+ "$OS_ARCH" != "FreeBSD" ; then
|
||||
VISIBILITY_FLAGS='-I$(DIST)/system_wrappers_js -include $(topsrcdir)/config/gcc_hidden.h'
|
||||
WRAP_SYSTEM_INCLUDES=1
|
||||
STL_FLAGS='-I$(DIST)/stl_wrappers'
|
48
lang/spidermonkey185/files/patch-jsscript.h
Normal file
48
lang/spidermonkey185/files/patch-jsscript.h
Normal file
@ -0,0 +1,48 @@
|
||||
# HG changeset patch
|
||||
# User Ehsan Akhgari <ehsan@mozilla.com>
|
||||
# Date 1308340787 14400
|
||||
# Node ID c0e8643e8e60d1c98bff30c78e034f991f75c191
|
||||
# Parent 284ebc48b2cb8e35dc04482ede700e717d8d214f
|
||||
Bug 662962 - Silence the clang warnings issued because of alignment requirements increase when compiling jsscript.h; r=Waldo
|
||||
|
||||
--- ./jsscript.h.orig 2011-04-01 06:08:36.000000000 +1100
|
||||
+++ ./jsscript.h 2013-05-26 00:23:16.202260566 +1000
|
||||
@@ -496,32 +496,32 @@
|
||||
|
||||
JSObjectArray *objects() {
|
||||
JS_ASSERT(isValidOffset(objectsOffset));
|
||||
- return (JSObjectArray *)((uint8 *) (this + 1) + objectsOffset);
|
||||
+ return reinterpret_cast<JSObjectArray *>(uintptr_t(this + 1) + objectsOffset);
|
||||
}
|
||||
|
||||
JSUpvarArray *upvars() {
|
||||
JS_ASSERT(isValidOffset(upvarsOffset));
|
||||
- return (JSUpvarArray *) ((uint8 *) (this + 1) + upvarsOffset);
|
||||
+ return reinterpret_cast<JSUpvarArray *>(uintptr_t(this + 1) + upvarsOffset);
|
||||
}
|
||||
|
||||
JSObjectArray *regexps() {
|
||||
JS_ASSERT(isValidOffset(regexpsOffset));
|
||||
- return (JSObjectArray *) ((uint8 *) (this + 1) + regexpsOffset);
|
||||
+ return reinterpret_cast<JSObjectArray *>(uintptr_t(this + 1) + regexpsOffset);
|
||||
}
|
||||
|
||||
JSTryNoteArray *trynotes() {
|
||||
JS_ASSERT(isValidOffset(trynotesOffset));
|
||||
- return (JSTryNoteArray *) ((uint8 *) (this + 1) + trynotesOffset);
|
||||
+ return reinterpret_cast<JSTryNoteArray *>(uintptr_t(this + 1) + trynotesOffset);
|
||||
}
|
||||
|
||||
js::GlobalSlotArray *globals() {
|
||||
JS_ASSERT(isValidOffset(globalsOffset));
|
||||
- return (js::GlobalSlotArray *) ((uint8 *) (this + 1) + globalsOffset);
|
||||
+ return reinterpret_cast<js::GlobalSlotArray *>(uintptr_t(this + 1) + globalsOffset);
|
||||
}
|
||||
|
||||
JSConstArray *consts() {
|
||||
JS_ASSERT(isValidOffset(constOffset));
|
||||
- return (JSConstArray *) ((uint8 *) (this + 1) + constOffset);
|
||||
+ return reinterpret_cast<JSConstArray *>(uintptr_t(this + 1) + constOffset);
|
||||
}
|
||||
|
||||
JSAtom *getAtom(size_t index) {
|
36
lang/spidermonkey185/files/patch-jsstr.cpp
Normal file
36
lang/spidermonkey185/files/patch-jsstr.cpp
Normal file
@ -0,0 +1,36 @@
|
||||
# HG changeset patch
|
||||
# User Ehsan Akhgari <ehsan@mozilla.com>
|
||||
# Date 1308517488 14400
|
||||
# Node ID 284ebc48b2cb8e35dc04482ede700e717d8d214f
|
||||
# Parent cecc5adfc44068fb6f11b9baa78cb5fddc100b27
|
||||
Bug 662961 - Silence the clang warnings issued because of alignment requirements increase when compiling jsstr.cpp; r=Waldo
|
||||
|
||||
--- ./jsstr.cpp.orig 2013-05-26 00:44:33.383765764 +1000
|
||||
+++ ./jsstr.cpp 2013-05-26 00:46:35.842211859 +1000
|
||||
@@ -3147,7 +3147,7 @@
|
||||
*/
|
||||
#define R(c) { \
|
||||
BUILD_LENGTH_AND_FLAGS(1, JSString::FLAT | JSString::ATOMIZED), \
|
||||
- { (jschar *)(((char *)(unitStringTable + (c))) + \
|
||||
+ { (jschar *)(uintptr_t(unitStringTable + (c)) + \
|
||||
offsetof(JSString, inlineStorage)) }, \
|
||||
{ {(c), 0x00} } }
|
||||
|
||||
@@ -3207,7 +3207,7 @@
|
||||
*/
|
||||
#define R(c) { \
|
||||
BUILD_LENGTH_AND_FLAGS(2, JSString::FLAT | JSString::ATOMIZED), \
|
||||
- { (jschar *)(((char *)(length2StringTable + (c))) + \
|
||||
+ { (jschar *)(uintptr_t(length2StringTable + (c)) + \
|
||||
offsetof(JSString, inlineStorage)) }, \
|
||||
{ {FROM_SMALL_CHAR((c) >> 6), FROM_SMALL_CHAR((c) & 0x3F), 0x00} } }
|
||||
|
||||
@@ -3240,7 +3240,7 @@
|
||||
*/
|
||||
#define R(c) { \
|
||||
BUILD_LENGTH_AND_FLAGS(3, JSString::FLAT | JSString::ATOMIZED), \
|
||||
- { (jschar *)(((char *)(hundredStringTable + ((c) - 100))) + \
|
||||
+ { (jschar *)(uintptr_t(hundredStringTable + ((c) - 100)) + \
|
||||
offsetof(JSString, inlineStorage)) }, \
|
||||
{ {((c) / 100) + '0', ((c) / 10 % 10) + '0', ((c) % 10) + '0', 0x00} } }
|
||||
|
@ -104,5 +104,4 @@ lib/libmozjs185.so.1.0.0
|
||||
lib/libmozjs185.so.1.0
|
||||
lib/libmozjs185.so.1
|
||||
libdata/pkgconfig/mozjs185.pc
|
||||
@dirrmtry libdata/pkgconfig
|
||||
@dirrm include/js
|
||||
|
Loading…
Reference in New Issue
Block a user