aboutsummaryrefslogtreecommitdiff
path: root/ltcf-c.sh
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-04 19:33:03 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-04 19:33:03 +0000
commit761c31c6e26afb59b57c4749a7eb7481f8f437f8 (patch)
tree547b5baa80e434d991e72be96f508ed887197ca0 /ltcf-c.sh
parentb32d36021cddbc517d3b15af2425edd3edf0fe76 (diff)
* ltcf-c.sh (archive_cmds, archive_expsym_cmds) [solaris,
with_gcc]: Use `gcc -shared' to build a shared library. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42874 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'ltcf-c.sh')
-rw-r--r--ltcf-c.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/ltcf-c.sh b/ltcf-c.sh
index 3245424273d..1ce95e2507d 100644
--- a/ltcf-c.sh
+++ b/ltcf-c.sh
@@ -513,11 +513,15 @@ else
solaris*)
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'
- 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