From: Albert Chin-A-Young Date: Mon, 19 Apr 2004 14:47:29 +0000 (+0000) Subject: * m4/libtool.m4: Use cc rather than ld to created X-Git-Tag: release-1-9b~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b835daafcc61936dac1029ac38ea5562eb17dfc;p=thirdparty%2Flibtool.git * 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. --- diff --git a/ChangeLog b/ChangeLog index ef692a7f3..311e9607e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2004-04-19 Albert Chin-A-Young + * 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 diff --git a/m4/libtool.m4 b/m4/libtool.m4 index f00956ee3..f97c0ad16 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -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*)