[x264-devel] [PATCH 2/4] Fix linker test for -Bsymbolic

Sean McGovern gseanmcg at gmail.com
Thu Sep 29 20:00:07 CEST 2011


the Solaris linker only accepts -Bsymbolic for objects compiled
in dynamic mode (ie. 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 |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index f4b8012..0ade26c 100755
--- a/configure
+++ b/configure
@@ -858,7 +858,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
-- 
1.7.6



More information about the x264-devel mailing list