libtool-patches
[Top][All Lists]
Advanced

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

Building C++ libraries with GNU ld on HP-UX


From: Alexandre Oliva
Subject: Building C++ libraries with GNU ld on HP-UX
Date: 18 Apr 2001 01:53:49 -0300
User-agent: Gnus/5.090002 (Oort Gnus v0.02) XEmacs/21.1 (Cuyahoga Valley)

GNU ld supports 64-bit object files on HP-UX.  But MLB libtool still
uses flags specific to the HP-UX linker when linking C++ libraries.
This patch fixes this problem.  It is reported to allow
GCC+libstdc++-v3 to bootstrap on a 64-bit HP-UX 11.0/pa system.  Ok to
install?

Index: ChangeLog
from  Alexandre Oliva  <address@hidden>

        * ltcf-cxx.sh [HP-UX GNU ld]: Don't use flags specific to the
        HP-UX linker.

Index: ltcf-cxx.sh
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/ltcf-cxx.sh,v
retrieving revision 1.1.2.40
diff -u -p -r1.1.2.40 ltcf-cxx.sh
--- ltcf-cxx.sh 2001/04/12 02:39:36 1.1.2.40
+++ ltcf-cxx.sh 2001/04/18 04:47:37
@@ -243,12 +243,14 @@ case $host_os in
     ld_shlibs=yes
     ;;
   hpux*)
-    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-    hardcode_libdir_separator=:
+    if test ${with_gnu_ld} = no; then
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      export_dynamic_flag_spec='${wl}-E'
+    fi
     hardcode_direct=yes
     hardcode_minus_L=yes # Not in the search PATH, but as the default
                         # location of the library.
-    export_dynamic_flag_spec='${wl}-E'
 
     case $cc_basename in
       CC)
@@ -272,10 +274,12 @@ case $host_os in
         ;;
       *)
         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 $predep_objects $libobjs 
$deplibs $postdep_objects $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 $predep_objects $libobjs $deplibs $postdep_objects 
$compiler_flags' ;;
-         esac
+         if test $with_gnu_ld = no; thenn
+           case "$host_os" in
+           hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC 
${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs 
$deplibs $postdep_objects $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 $predep_objects $libobjs $deplibs $postdep_objects 
$compiler_flags' ;;
+           esac
+         fi
        else
          # FIXME: insert proper C++ library support
           ld_shlibs=no
-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  address@hidden, redhat.com}
CS PhD student at IC-Unicamp        address@hidden, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

reply via email to

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