]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* m4/libtool.m4: Use cc rather than ld to created
authorAlbert Chin-A-Young <china@thewrittenword.com>
Mon, 19 Apr 2004 14:47:29 +0000 (14:47 +0000)
committerGary V. Vaughan <gary@gnu.org>
Mon, 19 Apr 2004 14:47:29 +0000 (14:47 +0000)
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.

ChangeLog
m4/libtool.m4

index ef692a7f332791c851368cc35daaefcf616db666..311e9607eedb9151e0c5438d48e4c5d5f6c46a1c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2004-04-19  Albert Chin-A-Young  <china@thewrittenword.com>
 
+       * 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.
+
        * m4/libtool.m4: Use cc rather than ld to create a
        shared library on Solaris. When using the Sun
        Workshop compiler 5.0 (and I presume any previous
index f00956ee39e707edd91fb5048c466d7e61f34f3a..f97c0ad161f1292397a129c6729022da1036e53e 100644 (file)
@@ -3899,7 +3899,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*)
@@ -3912,10 +3930,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
@@ -3923,7 +3941,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
@@ -4838,7 +4855,6 @@ if test -n "$compiler"; then
         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)=:
           ;;
         ia64*)