]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4 (archive_cmds, archive_expsym_cmds) [solaris*]: Changing
authorGary V. Vaughan <gary@gnu.org>
Thu, 6 Sep 2001 21:54:16 +0000 (21:54 +0000)
committerGary V. Vaughan <gary@gnu.org>
Thu, 6 Sep 2001 21:54:16 +0000 (21:54 +0000)
no_undefined_flag from `-z text' to `-z defs' (see entry below at
2001-04-11  Alexandre Oliva  <aoliva@redhat.com>) 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!

ChangeLog
libtool.m4

index 7260815bb9e93c801ab1dab7b3c7dbd3ac6d591c..906d294242196347c81da9cc789a781069453c73 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2001-09-06  Gary V. Vaughan  <gary@gnu.org>
 
+       * 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  <aoliva@redhat.com>) 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!
+
        From Michael Pruett <mpruett@engr.sgi.com>:
        * libltdl/ltdl.c (find_module): `0' valued arguments to
        tryall_dlopen_module() must be explicitly cast to avoid compiler
index b45c5128b4bd03517e3ff0ca9ad791a755a898c3..87dec3de8084e2e547a1f3fcbd22d7fa2b4b8512 100644 (file)
@@ -4865,13 +4865,13 @@ EOF
     solaris*)
       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z defs'
       if test "$GXX" = yes; then
-        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags `test "x$allow_undefined_flag" = "x$no_undefined_flag" && $CC --print-libgcc-file-name`'
         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags `test "x$allow_undefined_flag" = "x$no_undefined_flag" && $CC --print-libgcc-file-name`~$rm $lib.exp'
       else
-        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+        _LT_AC_TAGVAR(archive_cmds, $1)='$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`'
         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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'
       fi
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no