JeagerTrampoline is referenced from C code where it is considered to
be hidden and therefore local.  But the inline assembly doesn't
declare it as such.  This results in an X86_64_PC32 relocation, which
binutils 2.17 complains about.  This is probably a bug in our GCC, but
it's a bit of a corner case and easy to hack around in the port.

ok?


Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/mozjs17/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- Makefile    3 Apr 2015 17:54:42 -0000       1.5
+++ Makefile    19 May 2015 07:25:16 -0000
@@ -15,7 +15,7 @@ COMMENT =     Mozilla C implementation of Ja
 MOZILLA_VERSION =      17.0
 DISTNAME =             mozjs17.0.0
 PKGNAME =              mozjs17-${MOZILLA_VERSION}
-REVISION =             1
+REVISION =             2
 
 SO_VERSION =   0.0
 SHARED_LIBS =  mozjs-17.0 ${SO_VERSION}
Index: patches/patch-methodjit_MethodJIT_cpp
===================================================================
RCS file: patches/patch-methodjit_MethodJIT_cpp
diff -N patches/patch-methodjit_MethodJIT_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-methodjit_MethodJIT_cpp       19 May 2015 07:25:16 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- methodjit/MethodJIT.cpp.orig       Mon Feb 11 23:33:23 2013
++++ methodjit/MethodJIT.cpp    Thu May 14 22:10:23 2015
+@@ -244,6 +244,7 @@ JS_STATIC_ASSERT(JSVAL_PAYLOAD_MASK == 0x00007FFFFFFFF
+ asm (
+ ".text\n"
+ ".globl " SYMBOL_STRING(JaegerTrampoline) "\n"
++".hidden " SYMBOL_STRING(JaegerTrampoline) "\n"
+ SYMBOL_STRING(JaegerTrampoline) ":"       "\n"
+     /* Prologue. */
+     CFI(".cfi_startproc"                 "\n")

Reply via email to