diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-13 00:49:03 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-13 00:49:03 +0000 |
commit | facb1a06997ac2fc4b38d2eaa9929a5e62c1be27 (patch) | |
tree | 2f7a4855fc6e11e7ff93b4256828062efa66fe64 /ltcf-c.sh | |
parent | 67bbe372e09001c1f70167aa72f8c585a893ae15 (diff) | |
download | gcc-facb1a06997ac2fc4b38d2eaa9929a5e62c1be27.tar.gz |
* ltcf-c.sh: On Solaris, use `gcc -shared' to build a shared library
if we've got GCC.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37414 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'ltcf-c.sh')
-rw-r--r-- | ltcf-c.sh | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ltcf-c.sh b/ltcf-c.sh index 6bccb11c5d6..57df16c939b 100644 --- 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 |