libtool-patches
[Top][All Lists]
Advanced

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

Use cc to created shared libraries on HP-UX 11.x


From: Albert Chin
Subject: Use cc to created shared libraries on HP-UX 11.x
Date: Sat, 17 Apr 2004 11:24:56 -0500
User-agent: Mutt/1.5.6i

Against HEAD.

-- 
albert chin (address@hidden)

-- snip snip
2004-04-16  Albert Chin  <address@hidden>

        * m4/libtool.m4: Use cc rather than ld to created
        a shared library on HP-UX 11.x. On HP-UX 10.x, the
        C compiler doesn't grok -b so we continue to use ld.

Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.62
diff -u -3 -p -r1.62 libtool.m4
--- m4/libtool.m4       15 Apr 2004 17:05:26 -0000      1.62
+++ m4/libtool.m4       16 Apr 2004 16:31:00 -0000
@@ -3887,7 +3887,25 @@ _LT_EOF
       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
       ;;
 
-    hpux10* | hpux11*)
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname 
${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir 
-o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+       # hardcode_minus_L: Not really in the search PATH,
+       # but as the default location of the library.
+       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      fi
+      ;;
+
+    hpux11*)
       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
        case "$host_cpu" in
        hppa*64*|ia64*)
@@ -3900,10 +3918,10 @@ _LT_EOF
       else
        case "$host_cpu" in
        hppa*64*|ia64*)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs 
$deplibs $linker_flags'
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib 
$libobjs $deplibs $compiler_flags'
          ;;
        *)
-         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir 
-o $lib $libobjs $deplibs $linker_flags'
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b 
${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        esac
       fi
@@ -3911,7 +3929,6 @@ _LT_EOF
        case "$host_cpu" in
        hppa*64*)
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no




reply via email to

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