[x264-devel] [PATCH] Fix linker test for -Bsymbolic

Sean McGovern gseanmcg at gmail.com
Tue Apr 19 00:28:37 CEST 2011


the Solaris linker only accepts -Bsymbolic for objects compiled
in dynamic mode (ie. shared objects), so pass -shared to gcc.

Additionally, move the test lower in configure so as to not require
adding -shared to every compilation test.
---
 configure |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 1a7cb33..6ef10b9 100755
--- a/configure
+++ b/configure
@@ -817,8 +817,6 @@ cc_check "stdint.h" "" "uint32_t test_vec __attribute__ ((vector_size (16))) = {
 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"
 fi
 
 if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then
@@ -860,6 +858,11 @@ if cc_check '' -Wshadow ; then
     CFLAGS="-Wshadow $CFLAGS"
 fi
 
+if [ "$pic" = "yes" ]; then
+    # resolve textrels in the x86 asm
+    cc_check stdio.h '-shared -Wl,-Bsymbolic' && LDFLAGS="$LDFLAGS -Wl,-Bsymbolic"
+fi
+
 if [ "$bit_depth" -gt "8" ]; then
     define HIGH_BIT_DEPTH
     ASFLAGS="$ASFLAGS -DHIGH_BIT_DEPTH"
-- 
1.7.4



More information about the x264-devel mailing list