[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch to support IA64 HP-UX
From: |
Steve Ellcey |
Subject: |
Patch to support IA64 HP-UX |
Date: |
Wed, 11 Apr 2001 11:13:25 -0700 (PDT) |
I have put together a libtool.m4 patch to support the HP-UX IA64
(Itanium) platform and would like to have it checked in if it is
acceptable. IA64 HP-UX differs from the PA platform in a number of ways
such as using the .so suffix instead of .sl. I also took advantage of
some new (HP-UX) features to make IA64 HP-UX look more like other ELF
platforms. These include using LD_LIBRARY_PATH instead of SHLIB_PATH
and using -L to hardcode paths instead of +b. SHLIB_PATH and +b are
still supported on IA64 but I chose not to use them in order to create a
more 'standard' type configuration.
I ran the libtool test suite and it does not pass completely (fails 6 of
75 tests) but the other HP-UX platforms don't seem to pass completely
either so I was hoping this could be checked in anyway and fixes could
be added later once the basic support is in. I spent the better part of
two days trying to get the full test suite to pass and I don't know if I
can afford to spend any more time on it right now, but I would like to
get some support for IA64 HP-UX into the official source tree if
possible.
Steve Ellcey
address@hidden
----------------------------------------------------------------
*** libtool.m4.orig Wed Apr 11 11:03:15 2001
--- libtool.m4 Wed Apr 11 10:58:06 2001
*************** case $host in
*** 97,102 ****
--- 97,118 ----
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"
*************** AC_CACHE_VAL(lt_cv_prog_cc_pic,
*** 825,830 ****
--- 841,852 ----
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
+ hpux*)
+ # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
+ if test "$host_cpu" != ia64; then
+ lt_cv_prog_cc_pic='-fPIC'
+ fi
+ ;;
darwin* | rhapsody*)
# PIC is the default on this platform
# Common symbols not allowed in MH_DYLIB files
*************** else
*** 1500,1514 ****
;;
hpux9* | hpux10* | hpux11*)
! 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
- 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.
export_dynamic_flag_spec='${wl}-E'
;;
--- 1522,1543 ----
;;
hpux9* | hpux10* | hpux11*)
! hardcode_minus_L=yes
! 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' ;;
! *)
! hardcode_direct=yes
! hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
! hardcode_libdir_separator=:
! 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 ;;
esac
export_dynamic_flag_spec='${wl}-E'
;;
*************** gnu*)
*** 1917,1930 ****
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'
# HP-UX runs *really* slowly unless shared libraries are mode 555.
postinstall_cmds='chmod 555 $lib'
;;
--- 1946,1974 ----
hpux9* | hpux10* | hpux11*)
# Give a soname corresponding to the major version so that dld.sl refuses to
# link against other versions.
version_type=sunos
need_lib_prefix=no
need_version=no
! case "$host_cpu" in
! ia64*) dynamic_linker="$host_os dld.so"
! 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"
! library_names_spec='${libname}${release}.sl$versuffix
${libname}${release}.sl$major $libname.sl'
! soname_spec='${libname}${release}.sl$major'
! shlibpath_var=SHLIB_PATH
! shlibpath_overrides_runpath=no # +s is required to enable
SHLIB_PATH
! ;;
! esac
# HP-UX runs *really* slowly unless shared libraries are mode 555.
postinstall_cmds='chmod 555 $lib'
;;
*************** gnu*)
*** 3104,3112 ****
;;
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
;;
irix5* | irix6*)
--- 3148,3165 ----
;;
hpux10.20*|hpux11*)
! 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*)
- Patch to support IA64 HP-UX,
Steve Ellcey <=