This is my attempt to finally clean up the mess of compiler options
for suncc. I think almost all of them where wrong -- the -s in -shared
was stripping the resulting binary, and -mimpure-text was being fed
verbatim to the linker, causing at least the following:

$ objdump -x libavcodec/libavcodec.so | grep AUDIT
  DEPAUDIT             ure-text
  AUDIT                ure-text


...which is not what we intended at all.

I'm working on enabling symbol versioning for the Solaris shared libs,
but this needs to be fixed first.

Sean McG.
---8<---

Several of the options were incorrect for suncc.
---
 configure | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index f409888..f86bd95 100755
--- a/configure
+++ b/configure
@@ -2748,8 +2748,16 @@ case $target_os in
         ;;
     sunos)
         AVSERVERLDFLAGS=""
-        SHFLAGS='-shared -Wl,-h,$$(@F)'
-        enabled x86 && SHFLAGS="-mimpure-text $SHFLAGS"
+        SHFLAGS='-Wl,-h,$$(@F)'
+        case $ld_type in
+          gcc)
+              append SHFLAGS -shared
+              enabled x86 && append SHFLAGS -mimpure-text
+              ;;
+          suncc)
+              append SHFLAGS -G
+              ;;
+        esac
         network_extralibs="-lsocket -lnsl"
         add_cppflags -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
         # When using suncc to build, the Solaris linker will mark
-- 
1.7.12

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to