ports/opt (3.3): spidermonkey: fix build with gcc-6
commit f201b9412f1cff936904d913b778070dd6a66fff Author: Alan Mizrahi <alan+crux@mizrahi.com.ve> Date: Mon Dec 26 18:29:19 2016 +0900 spidermonkey: fix build with gcc-6 diff --git a/spidermonkey/.md5sum b/spidermonkey/.md5sum index 6c52a08..eb9c6ce 100644 --- a/spidermonkey/.md5sum +++ b/spidermonkey/.md5sum @@ -1 +1,2 @@ +f1b1605353778a8eb323b240ca93d84a js-1.8.5-c++11.patch a4574365938222adca0a6bd33329cb32 js185-1.0.0.tar.gz diff --git a/spidermonkey/.signature b/spidermonkey/.signature index dc435b0..e627672 100644 --- a/spidermonkey/.signature +++ b/spidermonkey/.signature @@ -1,5 +1,6 @@ untrusted comment: verify with /etc/ports/opt.pub -RWSE3ohX2g5d/amTIdLEWvY1AZLCjRPayDlY8OU51yLS1bkxqC5tTTQDWhc5a4v6nuSPie/Aa7AAE3eIb7oQP/dQp6JQttFUOA0= -SHA256 (Pkgfile) = 1da718c5680e567451258b8fa3a22157fa1acbf6a18f8e9e22af5301dc80b9ed +RWSE3ohX2g5d/VWNN3ctG9XarkZop60Emn8bbUrAUzZylSWogOSP4qk1EwUO4A0NvJKeEPl6Lv4wG6C7IR9GfTQcO+dMCSNxiwE= +SHA256 (Pkgfile) = 00a142348c1fce203f378a23a71290fa723e6e130635c4debe5a1e8250167302 SHA256 (.footprint) = b68c816911c310f182d6937c905632381ef8d676f58f9a3ab9e8e28d4cbd3013 SHA256 (js185-1.0.0.tar.gz) = 5d12f7e1f5b4a99436685d97b9b7b75f094d33580227aa998c406bbae6f2a687 +SHA256 (js-1.8.5-c++11.patch) = 443c79e62de0b539dd17b3de1b90e9db15a876d08fad499d459d63df4f90aa15 diff --git a/spidermonkey/Pkgfile b/spidermonkey/Pkgfile index 5e6fe18..55e2fa8 100644 --- a/spidermonkey/Pkgfile +++ b/spidermonkey/Pkgfile @@ -6,11 +6,15 @@ name=spidermonkey version=1.8.5 release=2 -source=(http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz) +source=(http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz js-1.8.5-c++11.patch) build() { cd js-$version/js/src + # Fix build with gcc-6 + # https://bugs.gentoo.org/show_bug.cgi?id=582478 + patch -p3 -i $SRC/js-1.8.5-c++11.patch + ./configure \ --prefix=/usr diff --git a/spidermonkey/js-1.8.5-c++11.patch b/spidermonkey/js-1.8.5-c++11.patch new file mode 100644 index 0000000..ab2181f --- /dev/null +++ b/spidermonkey/js-1.8.5-c++11.patch @@ -0,0 +1,144 @@ +diff -upr a/js/src/jsapi.cpp b/js/src/jsapi.cpp +--- a/js/src/jsapi.cpp 2011-03-31 14:08:36.000000000 -0500 ++++ b/js/src/jsapi.cpp 2016-02-29 18:10:49.302307353 -0600 +@@ -3985,7 +3985,7 @@ JS_Enumerate(JSContext *cx, JSObject *ob + AutoIdVector props(cx); + JSIdArray *ida; + if (!GetPropertyNames(cx, obj, JSITER_OWNONLY, &props) || !VectorToIdArray(cx, props, &ida)) +- return false; ++ return NULL; + for (size_t n = 0; n < size_t(ida->length); ++n) + JS_ASSERT(js_CheckForStringIndex(ida->vector[n]) == ida->vector[n]); + return ida; +diff -upr a/js/src/jsfun.cpp b/js/src/jsfun.cpp +--- a/js/src/jsfun.cpp 2011-03-31 14:08:36.000000000 -0500 ++++ b/js/src/jsfun.cpp 2016-02-29 18:21:45.249674890 -0600 +@@ -2051,7 +2051,7 @@ fun_toStringHelper(JSContext *cx, JSObje + + JSString *str = JS_DecompileFunction(cx, fun, indent); + if (!str) +- return false; ++ return NULL; + + if (!indent) + cx->compartment->toSourceCache.put(fun, str); +@@ -2657,7 +2657,7 @@ LookupInterpretedFunctionPrototype(JSCon + const Shape *shape = funobj->nativeLookup(id); + if (!shape) { + if (!ResolveInterpretedFunctionPrototype(cx, funobj)) +- return false; ++ return NULL; + shape = funobj->nativeLookup(id); + } + JS_ASSERT(!shape->configurable()); +diff -upr a/js/src/jsiter.cpp b/js/src/jsiter.cpp +--- a/js/src/jsiter.cpp 2011-03-31 14:08:36.000000000 -0500 ++++ b/js/src/jsiter.cpp 2016-02-29 18:24:22.494659919 -0600 +@@ -425,7 +425,7 @@ NewIteratorObject(JSContext *cx, uintN f + */ + JSObject *obj = js_NewGCObject(cx, FINALIZE_OBJECT0); + if (!obj) +- return false; ++ return NULL; + obj->init(cx, &js_IteratorClass, NULL, NULL, NULL, false); + obj->setMap(cx->compartment->emptyEnumeratorShape); + return obj; +diff -upr a/js/src/jsparse.cpp b/js/src/jsparse.cpp +--- a/js/src/jsparse.cpp 2011-03-31 14:08:36.000000000 -0500 ++++ b/js/src/jsparse.cpp 2016-02-29 18:29:03.997437475 -0600 +@@ -3352,7 +3352,7 @@ Parser::functionDef(JSAtom *funAtom, Fun + if (!outertc->inFunction() && bodyLevel && funAtom && !lambda && outertc->compiling()) { + JS_ASSERT(pn->pn_cookie.isFree()); + if (!DefineGlobal(pn, outertc->asCodeGenerator(), funAtom)) +- return false; ++ return NULL; + } + + pn->pn_blockid = outertc->blockid(); +diff -upr a/js/src/jsstr.cpp b/js/src/jsstr.cpp +--- a/js/src/jsstr.cpp 2011-03-31 14:08:36.000000000 -0500 ++++ b/js/src/jsstr.cpp 2016-02-29 19:01:45.857779836 -0600 +@@ -1734,7 +1734,7 @@ class RegExpGuard + if (flat) { + patstr = flattenPattern(cx, fm.patstr); + if (!patstr) +- return false; ++ return NULL; + } else { + patstr = fm.patstr; + } +@@ -3400,7 +3400,7 @@ js_InitStringClass(JSContext *cx, JSObje + UndefinedValue(), NULL, NULL, + JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_SHARED, 0, 0, + NULL)) { +- return JS_FALSE; ++ return NULL; + } + + return proto; +diff -upr a/js/src/jstypedarray.cpp b/js/src/jstypedarray.cpp +--- a/js/src/jstypedarray.cpp 2011-03-31 14:08:36.000000000 -0500 ++++ b/js/src/jstypedarray.cpp 2016-02-29 19:08:53.541136191 -0600 +@@ -1334,7 +1334,7 @@ class TypedArrayTemplate + if (size != 0 && count >= INT32_MAX / size) { + JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, + JSMSG_NEED_DIET, "size and count"); +- return false; ++ return NULL; + } + + int32 bytelen = size * count; +@@ -1668,7 +1668,7 @@ TypedArrayConstruct(JSContext *cx, jsint + + default: + JS_NOT_REACHED("shouldn't have gotten here"); +- return false; ++ return NULL; + } + } + +diff -upr a/js/src/jsxml.cpp b/js/src/jsxml.cpp +--- a/js/src/jsxml.cpp 2011-03-31 14:08:36.000000000 -0500 ++++ b/js/src/jsxml.cpp 2016-02-29 19:17:10.363279731 -0600 +@@ -282,7 +282,7 @@ NewXMLNamespace(JSContext *cx, JSLinearS + + obj = NewBuiltinClassInstanceXML(cx, &js_NamespaceClass); + if (!obj) +- return JS_FALSE; ++ return NULL; + JS_ASSERT(JSVAL_IS_VOID(obj->getNamePrefixVal())); + JS_ASSERT(JSVAL_IS_VOID(obj->getNameURIVal())); + JS_ASSERT(JSVAL_IS_VOID(obj->getNamespaceDeclared())); +@@ -431,7 +431,7 @@ ConvertQNameToString(JSContext *cx, JSOb + size_t length = str->length(); + jschar *chars = (jschar *) cx->malloc((length + 2) * sizeof(jschar)); + if (!chars) +- return JS_FALSE; ++ return NULL; + *chars = '@'; + const jschar *strChars = str->getChars(cx); + if (!strChars) { +diff -upr a/js/src/methodjit/InvokeHelpers.cpp b/js/src/methodjit/InvokeHelpers.cpp +--- a/js/src/methodjit/InvokeHelpers.cpp 2011-03-31 14:08:36.000000000 -0500 ++++ b/js/src/methodjit/InvokeHelpers.cpp 2016-02-29 20:34:14.496983346 -0600 +@@ -728,7 +728,7 @@ AtSafePoint(JSContext *cx) + { + JSStackFrame *fp = cx->fp(); + if (fp->hasImacropc()) +- return false; ++ return NULL; + + JSScript *script = fp->script(); + return script->maybeNativeCodeForPC(fp->isConstructing(), cx->regs->pc); +diff -upr a/js/src/nanojit/NativeX64.cpp b/js/src/nanojit/NativeX64.cpp +--- a/js/src/nanojit/NativeX64.cpp 2011-03-31 14:08:36.000000000 -0500 ++++ b/js/src/nanojit/NativeX64.cpp 2016-02-29 20:19:56.487934808 -0600 +@@ -1899,7 +1899,7 @@ namespace nanojit + } + } + +- static const AVMPLUS_ALIGN16(int64_t) negateMask[] = {0x8000000000000000LL,0}; ++ static const AVMPLUS_ALIGN16(int64_t) negateMask[] = {int64_t(0x8000000000000000LL),0}; + + void Assembler::asm_fneg(LIns *ins) { + Register rr, ra;
participants (1)
-
crux@crux.nu