]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltcf-c.sh (no_undefined_flag) [Solaris ld]: Change to -zdefs.
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 12 Apr 2001 02:39:37 +0000 (02:39 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Thu, 12 Apr 2001 02:39:37 +0000 (02:39 +0000)
* ltcf-cxx.sh (no_undefined_flag) [Solaris ld]: Likewise.
* ltcf-gcj.sh (no_undefined_flag) [Solaris ld]: Likewise.
(archive_cmds, archive_expsym_cmds, output_verbose_link_cmds,
whole_archive_flag_spec) [Solaris]: Copy from ltcf-cxx.sh.

ChangeLog
ltcf-c.sh
ltcf-cxx.sh
ltcf-gcj.sh

index 76cfe0f4fafb655607e043d9afe2c21bbb97367e..bc53ed87db008b7e50b2f7e90d7326043ec86864 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2001-04-11  Alexandre Oliva  <aoliva@redhat.com>
+
+       * ltcf-c.sh (no_undefined_flag) [Solaris ld]: Change to -zdefs.
+       * ltcf-cxx.sh (no_undefined_flag) [Solaris ld]: Likewise.
+       * ltcf-gcj.sh (no_undefined_flag) [Solaris ld]: Likewise.
+       (archive_cmds, archive_expsym_cmds, output_verbose_link_cmds,
+       whole_archive_flag_spec) [Solaris]: Copy from ltcf-cxx.sh.
+
 2001-04-11  Michael Matz  <matzmich@cs.tu-berlin.de>
 
        * ltmain.in: Recognize "CC" as default --tag argument to resolve
index 4c493c81fda54e5e53ecc1073cf49f07e064ca8e..17b65111c9277c98c62d1903b912f33ae3d3f24c 100644 (file)
--- a/ltcf-c.sh
+++ b/ltcf-c.sh
@@ -505,7 +505,7 @@ else
     ;;
 
   solaris*)
-    no_undefined_flag=' -z text'
+    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'
index d135a1800ced4c4c9f80d31c281c0056aeeee53b..aefc206f9e86868a68290eeea8fafd9a703141d1 100644 (file)
@@ -540,7 +540,7 @@ case $host_os in
     case $cc_basename in
       CC)
        # Sun C++ 4.2, 5.x and Centerline C++
-        no_undefined_flag=' -ztext'
+        no_undefined_flag=' -zdefs'
         archive_cmds='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
         $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
@@ -585,6 +585,7 @@ case $host_os in
       *)
         # GNU C++ compiler with Solaris linker
         if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
+         no_undefined_flag=' ${wl}-z ${wl}defs'
           if $CC --version | egrep -v '^2\.7' > /dev/null; then
             archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
             archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
index fb407ad3705f40d6d124047fd74f85511d37b716..2fa090c1434994b47a412fcf3196d08b68c76b6f 100644 (file)
@@ -485,18 +485,22 @@ else
     ;;
 
   solaris*)
-    no_undefined_flag=' -z text'
-    # $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'
+    no_undefined_flag=' ${wl}-z ${wl}defs'
+    archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
     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'
-    hardcode_libdir_flag_spec='-R$libdir'
+      $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
+
+    # Commands to make compiler produce verbose output that lists
+    # what "hidden" libraries, object files and flags are used when
+    # linking a shared library.
+    output_verbose_link_cmds="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
+
+    hardcode_libdir_flag_spec='${wl}-R $wl$libdir'
     hardcode_shlibpath_var=no
     case $host_os in
     solaris2.[0-5] | solaris2.[0-5].*) ;;
     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
-      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+      whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;;
     esac
     link_all_deplibs=yes
     ;;