libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

5-gary-solaris-no-undefined.patch


From: Gary V. Vaughan
Subject: 5-gary-solaris-no-undefined.patch
Date: Tue, 4 Sep 2001 00:43:11 +0100
User-agent: Mutt/1.3.21i

Yuck!  This patch sucks... but it seems to work.  Alexandre, did you
have a good reason for your 04-11 patch?  If so we need to apply this
ugly patch, otherwise it might be better to revert to -z text?

Cheers,
        Gary.

Index: ChangeLog
from  Gary V. Vaughan  <address@hidden>
        * libtool.m4 (archive_cmds, archive_expsym_cmds) [solaris*]: Changing
        no_undefined_flag from `-z text' to `-z defs' (see entry below at
        2001-04-11  Alexandre Oliva  <address@hidden>) has a problem.
        when linking a shared library with gcc calling /usr/ccs/bin/ld (eg.
        the gcc supplied with Solaris 8 companion CD), using the flag
        -no-undefined, shared library linking will always fail because of
        the unresolved symbols from libgcc.a.  Consequently we have to
        provide a path to libgcc.a when linking shared libraries in
        conjunction with -no-undefined!

Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.166.2.20
diff -u -r1.166.2.20 libtool.m4
--- libtool.m4 2001/09/02 23:31:08 1.166.2.20
+++ libtool.m4 2001/09/03 23:36:12
@@ -1712,9 +1712,9 @@
     no_undefined_flag=' -z defs'
     # $CC -shared without GNU ld will not create a library from C++
     # object files and a static libstdc++, better avoid it by now
-    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs 
$deplibs $linker_flags'
+    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs 
$deplibs $linker_flags `test "x$allow_undefined_flag" = "x$no_undefined_flag" 
&& $CC --print-libgcc-file-name`'
     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | 
sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-               $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib 
$libobjs $deplibs $linker_flags~$rm $lib.exp'
+               $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib 
$libobjs $deplibs $linker_flags `test "x$allow_undefined_flag" = 
"x$no_undefined_flag" && $CC --print-libgcc-file-name`~$rm $lib.exp'
     hardcode_libdir_flag_spec='-R$libdir'
     hardcode_shlibpath_var=no
     case $host_os in

-- 
  ())_. Gary V. Vaughan     gary@(oranda.demon.co.uk|gnu.org)
  ( '/  Research Scientist  http://www.oranda.demon.co.uk       ,_())____
  / )=  GNU Hacker          http://www.gnu.org/software/libtool  \'      `&
`(_~)_  Tech' Author        http://sources.redhat.com/autobook   =`---d__/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]