summaryrefslogtreecommitdiff
path: root/ltcf-c.sh
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2001-06-04 19:25:10 +0000
committerAlexandre Oliva <aoliva@redhat.com>2001-06-04 19:25:10 +0000
commit7c45e924ed4a430e27d3231720986c4f25c8d294 (patch)
tree163135b8d95bd96d356753a586a4e0a988d42238 /ltcf-c.sh
parent543198e5f131d1418752724bd55de5848ef35633 (diff)
downloadbinutils-redhat-7c45e924ed4a430e27d3231720986c4f25c8d294.tar.gz
* ltcf-c.sh (archive_cmd) [hpux, with_gcc]: Use gcc to link shared
archives.
Diffstat (limited to 'ltcf-c.sh')
-rw-r--r--ltcf-c.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/ltcf-c.sh b/ltcf-c.sh
index d9bbae9544..3245424273 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