]> git.sesse.net Git - x264/commitdiff
Fix linker test for -Bsymbolic
authorSean McGovern <gseanmcg@gmail.com>
Mon, 17 Oct 2011 19:44:03 +0000 (12:44 -0700)
committerFiona Glaser <fiona@x264.com>
Sat, 22 Oct 2011 00:22:21 +0000 (17:22 -0700)
The Solaris linker only accepts -Bsymbolic for objects compiled in dynamic mode (i.e. shared objects), so pass -shared to gcc.
Additionally, for x86_32 unresolved textrels cause a linker error so mark the .text section as 'impure'.

configure

index 711ed49c60918626a6c1cd468b81b2f925da0204..2b228f2db6f115082b7facd4dd8f241647bf889b 100755 (executable)
--- a/configure
+++ b/configure
@@ -870,7 +870,8 @@ if [ "$pic" = "yes" ] ; then
     CFLAGS="$CFLAGS -fPIC"
     ASFLAGS="$ASFLAGS -DPIC"
     # resolve textrels in the x86 asm
-    cc_check stdio.h -Wl,-Bsymbolic && LDFLAGS="$LDFLAGS -Wl,-Bsymbolic"
+    cc_check stdio.h "-shared -Wl,-Bsymbolic" && SOFLAGS="$SOFLAGS -Wl,-Bsymbolic"
+    [ $SYS = SunOS -a "$ARCH" = "X86" ] && SOFLAGS="$SOFLAGS -mimpure-text"
 fi
 
 if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then