[x264-devel] Fix linker test for -Bsymbolic

Sean McGovern git at videolan.org
Sat Oct 22 02:30:24 CEST 2011


x264 | branch: master | Sean McGovern <gseanmcg at gmail.com> | Mon Oct 17 12:44:03 2011 -0700| [a0ce295b33a1ba87f732e661e22dba1a307e3405] | committer: Jason Garrett-Glaser

Fix linker test for -Bsymbolic
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'.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=a0ce295b33a1ba87f732e661e22dba1a307e3405
---

 configure |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index 711ed49..2b228f2 100755
--- 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



More information about the x264-devel mailing list