libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: objc/2902: collect2 doesn't ...: libtool should use collect2?


From: John David Anglin
Subject: Re: objc/2902: collect2 doesn't ...: libtool should use collect2?
Date: Thu, 31 May 2001 18:38:53 -0400 (EDT)

> OTOH, since we do know it is safe to link in libgcc, because it's PIC,
> we might just get rid of the -nostdlib, and let GCC do the library
> magic by itself.  This should be good enough for objc.
> 
> Could you test such a change and re-post the patch, in case it works?

It does.  Test results for hppa1.1-hp-hpux10.20 are here:
<http://gcc.gnu.org/ml/gcc-testresults/2001-05/msg00734.html>.  I
also ran `-static'.  The revised patch is enclosed.

Dave
-- 
J. David Anglin                                  address@hidden
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

2001-05-31  John David Anglin  <address@hidden>

        * ltcf-c.sh (archive_cmd):  Use gcc to link shared archives when
        $with_gcc = yes.

--- ltcf-c.sh.orig      Sun May 20 14:57:40 2001
+++ ltcf-c.sh   Thu May 31 18:34:37 2001
@@ -411,10 +411,17 @@
     ;;
 
   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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]