From 5aa2ffa962c79f678ba9bb334687c2d03a2dcb14 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 28 Jan 2002 04:59:30 +0000 Subject: [PATCH] 2002-01-27 Daniel Jacobowitz From Steve Ellcey : * libtool.m4 (HPUX_IA64_MODE): Set to 32 or 64 based on ABI. (lt_cv_deplibs_check_method, lt_cv_file_magic_cmd, lt_cv_file_magic_test_file): Set to appropriate values for HP-UX IA64. * ltcf-c.sh (archive_cmds, hardcode_*): Ditto. * ltconfig (shlibpath_*, dynamic_linker, library_names_spec, soname_spec, sys_lib_search_path_spec): Ditto. Various configure scripts regenerated. --- ChangeLog | 11 +++++++++++ libtool.m4 | 31 ++++++++++++++++++++++++++++--- ltcf-c.sh | 41 +++++++++++++++++++++++++---------------- ltconfig | 28 +++++++++++++++++++++++----- 4 files changed, 87 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 03b39e0e5..8cd7132e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2002-01-27 Daniel Jacobowitz + + From Steve Ellcey : + * libtool.m4 (HPUX_IA64_MODE): Set to 32 or 64 based on ABI. + (lt_cv_deplibs_check_method, lt_cv_file_magic_cmd, + lt_cv_file_magic_test_file): Set to appropriate values for HP-UX + IA64. + * ltcf-c.sh (archive_cmds, hardcode_*): Ditto. + * ltconfig (shlibpath_*, dynamic_linker, library_names_spec, + soname_spec, sys_lib_search_path_spec): Ditto. + 2002-01-26 Jason Thorpe * configure.in (*-*-netbsd*): New. Skip target-newlib, diff --git a/libtool.m4 b/libtool.m4 index aa7e62a0e..3f452bcba 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -159,6 +159,22 @@ case $host in rm -rf conftest* ;; +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case "`/usr/bin/file conftest.o`" in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; + *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" @@ -568,9 +584,18 @@ gnu*) ;; hpux10.20*|hpux11*) - lt_cv_deplibs_check_method=['file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'] - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libc.sl + case $host_cpu in + hppa*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'] + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + ia64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'] + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + esac ;; irix5* | irix6*) diff --git a/ltcf-c.sh b/ltcf-c.sh index f11a0cfdd..ea6a31f4c 100644 --- a/ltcf-c.sh +++ b/ltcf-c.sh @@ -417,23 +417,32 @@ else ;; hpux9* | hpux10* | hpux11*) - 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 - hardcode_minus_L=yes # Not in the search PATH, but as the default - # location of the library. + case "$host_cpu" in + ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' ;; + *) + 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_minus_L=yes # Not in the search PATH, but as the default + # location of the library. + ;; + esac export_dynamic_flag_spec='${wl}-E' + hardcode_direct=yes ;; irix5* | irix6*) diff --git a/ltconfig b/ltconfig index 746e15b93..5ccefe046 100755 --- a/ltconfig +++ b/ltconfig @@ -1155,14 +1155,32 @@ gnu*) hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. - dynamic_linker="$host_os dld.sl" version_type=sunos need_lib_prefix=no need_version=no - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' - soname_spec='${libname}${release}.sl$major' + case "$host_cpu" in + ia64*) + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32/usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' + soname_spec='${libname}${release}.sl$major' + ;; + esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;;