From: Albert Chin-A-Young Date: Mon, 19 Apr 2004 14:37:35 +0000 (+0000) Subject: * m4/libtool.m4: Use cc rather than ld to create a X-Git-Tag: release-1-9b~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2c4685b0321481b7ba4a2651539eacf69b57b22;p=thirdparty%2Flibtool.git * 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. --- diff --git a/ChangeLog b/ChangeLog index b20d47eb4..ef692a7f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2004-04-19 Albert Chin-A-Young + * 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. diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 5fec29978..f00956ee3 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -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