]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ltcf-c.sh: On Solaris, use `gcc -shared' to build a shared library if we've got GCC.
authorMark Mitchell <mark@codesourcery.com>
Mon, 13 Nov 2000 00:49:03 +0000 (00:49 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Mon, 13 Nov 2000 00:49:03 +0000 (00:49 +0000)
* ltcf-c.sh: On Solaris, use `gcc -shared' to build a shared library
if we've got GCC.

From-SVN: r37414

ChangeLog
ltcf-c.sh

index 2d37b6ff2879592b8b092dc69ac7b8ace88bbfc5..024b60186f90d748e502bf8394aa99170fede222 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-11-12  Mark Mitchell  <mark@codesourcery.com>
+
+       * ltcf-c.sh: On Solaris, use `gcc -shared' to build a shared library
+       if we've got GCC.
+
 2000-11-11  Philip Blundell  <philb@gnu.org>
 
        * MAINTAINERS: Add self to Write After Approval list.
index 6bccb11c5d6805625b001775952f2d541a7bdf99..57df16c939bc68de3282d8e742d517fea49c0083 100644 (file)
--- a/ltcf-c.sh
+++ b/ltcf-c.sh
@@ -425,11 +425,15 @@ 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'
-    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'
+    if test "$with_gcc" = yes; then
+      archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      archive_expsym_cmds='$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
+      archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      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'
+    fi
     hardcode_libdir_flag_spec='-R$libdir'
     hardcode_shlibpath_var=no
     case "$host_os" in