]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* m4/libtool.m4: Use cc rather than ld to create a
authorAlbert Chin-A-Young <china@thewrittenword.com>
Mon, 19 Apr 2004 14:37:35 +0000 (14:37 +0000)
committerGary V. Vaughan <gary@gnu.org>
Mon, 19 Apr 2004 14:37:35 +0000 (14:37 +0000)
shared library on Solaris. When using the Sun
Workshop compiler 5.0 (and I presume any previous
version), revert to ld due to compiler errors.

ChangeLog
m4/libtool.m4

index b20d47eb4ef465dee77d4ea1906183c2ad621b6d..ef692a7f332791c851368cc35daaefcf616db666 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2004-04-19  Albert Chin-A-Young  <china@thewrittenword.com>
 
+       * m4/libtool.m4: Use cc rather than ld to create a
+       shared library on Solaris. When using the Sun
+       Workshop compiler 5.0 (and I presume any previous
+       version), revert to ld due to compiler errors.
+
        * m4/libtool.m4: Use cc rather than ld to created
        a shared library on Tru64 UNIX.
 
index 5fec299784399336e81698eb0f58b9cdf2354ed4..f00956ee39e707edd91fb5048c466d7e61f34f3a 100644 (file)
@@ -4060,9 +4060,18 @@ _LT_EOF
        _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'
       else
-       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       _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'
+       case `$CC -V 2>&1` in
+       *"Compilers 5.0"*)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         _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'
+         ;;
+       *)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+         _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 -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+         ;;
+       esac
       fi
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no