FreeBSD Bugzilla – Attachment 225091 Details for
Bug 256007
lang/spidermonkey185: Fix build with clang 12
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix www/spidermonkey185 build with clang 12
www__spidermonkey185-fix-clang12-build-1.diff (text/plain), 4.79 KB, created by
Dimitry Andric
on 2021-05-19 17:38:10 UTC
(
hide
)
Description:
Fix www/spidermonkey185 build with clang 12
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2021-05-19 17:38:10 UTC
Size:
4.79 KB
patch
obsolete
>commit a98fff692ee7059573f5086cc68303d107c34612 >Author: Dimitry Andric <dim@FreeBSD.org> >Date: Wed May 19 15:28:24 2021 +0200 > > www/spidermonkey185: fix bad return values and global asm volatiles > >diff --git a/lang/spidermonkey185/files/patch-c++11 b/lang/spidermonkey185/files/patch-c++11 >index 95a68426f5de..525c295b3332 100644 >--- a/lang/spidermonkey185/files/patch-c++11 >+++ b/lang/spidermonkey185/files/patch-c++11 >@@ -123,6 +123,15 @@ jsxml.cpp:434:20: error: cannot initialize return object of type 'JSString *' wi > JS_ASSERT(!shape->configurable()); > --- jsiter.cpp.orig 2011-03-31 19:08:36 UTC > +++ jsiter.cpp >+@@ -267,7 +267,7 @@ Snapshot(JSContext *cx, JSObject *obj, uintN flags, Au >+ */ >+ IdSet ht(cx); >+ if (!ht.init(32)) >+- return NULL; >++ return false; >+ >+ JSObject *pobj = obj; >+ do { > @@ -425,7 +425,7 @@ NewIteratorObject(JSContext *cx, uintN flags) > */ > JSObject *obj = js_NewGCObject(cx, FINALIZE_OBJECT0); >@@ -134,6 +143,23 @@ jsxml.cpp:434:20: error: cannot initialize return object of type 'JSString *' wi > return obj; > --- jsparse.cpp.orig 2011-03-31 19:08:36 UTC > +++ jsparse.cpp >+@@ -1821,14 +1821,14 @@ Compiler::compileFunctionBody(JSContext *cx, JSFunctio >+ >+ JSCodeGenerator funcg(&parser, &codePool, ¬ePool, tokenStream.getLineno()); >+ if (!funcg.init()) >+- return NULL; >++ return false; >+ >+ funcg.flags |= TCF_IN_FUNCTION; >+ funcg.setFunction(fun); >+ funcg.bindings.transfer(cx, bindings); >+ fun->setArgCount(funcg.bindings.countArgs()); >+ if (!GenerateBlockId(&funcg, funcg.bodyid)) >+- return NULL; >++ return false; >+ >+ /* FIXME: make Function format the source for a function definition. */ >+ tokenStream.mungeCurrentToken(TOK_NAME); > @@ -3352,7 +3352,7 @@ Parser::functionDef(JSAtom *funAtom, FunctionType type > if (!outertc->inFunction() && bodyLevel && funAtom && !lambda && outertc->compiling()) { > JS_ASSERT(pn->pn_cookie.isFree()); >@@ -143,6 +169,15 @@ jsxml.cpp:434:20: error: cannot initialize return object of type 'JSString *' wi > } > > pn->pn_blockid = outertc->blockid(); >+@@ -5058,7 +5058,7 @@ RebindLets(JSParseNode *pn, JSTreeContext *tc) >+ if (!ale) { >+ ale = MakePlaceholder(pn, tc); >+ if (!ale) >+- return NULL; >++ return false; >+ } >+ LinkUseToDef(pn, ALE_DEFN(ale), tc); >+ } > --- jsstr.cpp.orig 2011-03-31 19:08:36 UTC > +++ jsstr.cpp > @@ -1734,7 +1734,7 @@ class RegExpGuard >@@ -154,6 +189,15 @@ jsxml.cpp:434:20: error: cannot initialize return object of type 'JSString *' wi > } else { > patstr = fm.patstr; > } >+@@ -2276,7 +2276,7 @@ BuildDollarReplacement(JSContext *cx, JSString *textst >+ { >+ JSLinearString *textstr = textstrArg->ensureLinear(cx); >+ if (!textstr) >+- return NULL; >++ return false; >+ >+ JS_ASSERT(repstr->chars() <= firstDollar && firstDollar < repstr->chars() + repstr->length()); >+ size_t matchStart = fm.match(); > @@ -3400,7 +3400,7 @@ js_InitStringClass(JSContext *cx, JSObject *obj) > UndefinedValue(), NULL, NULL, > JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_SHARED, 0, 0, >diff --git a/lang/spidermonkey185/files/patch-methodjit_MethodJIT.cpp b/lang/spidermonkey185/files/patch-methodjit_MethodJIT.cpp >new file mode 100644 >index 000000000000..b886520e9bd8 >--- /dev/null >+++ b/lang/spidermonkey185/files/patch-methodjit_MethodJIT.cpp >@@ -0,0 +1,38 @@ >+--- methodjit/MethodJIT.cpp.orig 2011-03-31 19:08:36 UTC >++++ methodjit/MethodJIT.cpp >+@@ -189,7 +189,7 @@ JS_STATIC_ASSERT(offsetof(VMFrame, regs.fp) == 0x38); >+ JS_STATIC_ASSERT(JSVAL_TAG_MASK == 0xFFFF800000000000LL); >+ JS_STATIC_ASSERT(JSVAL_PAYLOAD_MASK == 0x00007FFFFFFFFFFFLL); >+ >+-asm volatile ( >++asm ( >+ ".text\n" >+ ".globl " SYMBOL_STRING(JaegerTrampoline) "\n" >+ SYMBOL_STRING(JaegerTrampoline) ":" "\n" >+@@ -236,7 +236,7 @@ SYMBOL_STRING(JaegerTrampoline) ":" "\n" >+ "jmp *0(%rsp)" "\n" >+ ); >+ >+-asm volatile ( >++asm ( >+ ".text\n" >+ ".globl " SYMBOL_STRING(JaegerTrampolineReturn) "\n" >+ SYMBOL_STRING(JaegerTrampolineReturn) ":" "\n" >+@@ -256,7 +256,7 @@ SYMBOL_STRING(JaegerTrampolineReturn) ":" "\n" >+ "ret" "\n" >+ ); >+ >+-asm volatile ( >++asm ( >+ ".text\n" >+ ".globl " SYMBOL_STRING(JaegerThrowpoline) "\n" >+ SYMBOL_STRING(JaegerThrowpoline) ":" "\n" >+@@ -281,7 +281,7 @@ SYMBOL_STRING(JaegerThrowpoline) ":" "\n" >+ >+ JS_STATIC_ASSERT(offsetof(VMFrame, regs.fp) == 0x38); >+ >+-asm volatile ( >++asm ( >+ ".text\n" >+ ".globl " SYMBOL_STRING(InjectJaegerReturn) "\n" >+ SYMBOL_STRING(InjectJaegerReturn) ":" "\n"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
koobs
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 256007
: 225091