From 833b6505b7d6aecda7d03b7f9511624db5a3d80e Mon Sep 17 00:00:00 2001 From: aoliva Date: Mon, 4 Jun 2001 19:24:57 +0000 Subject: * ltcf-c.sh (archive_cmd) [hpux, with_gcc]: Use gcc to link shared archives. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42870 138bc75d-0d04-0410-961f-82ee72b054a4 --- ltcf-c.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'ltcf-c.sh') diff --git a/ltcf-c.sh b/ltcf-c.sh index d9bbae95441..3245424273d 100644 --- a/ltcf-c.sh +++ b/ltcf-c.sh @@ -411,10 +411,17 @@ else ;; hpux9* | hpux10* | hpux11*) - case $host_os in - hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; - *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; - esac + if test $with_gcc = yes; then + case "$host_os" in + hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; + *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; + esac + else + case $host_os in + hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; + *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; + esac + fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes -- cgit v1.2.1