libtool-patches
[Top][All Lists]
Advanced

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

Re: IA64 HP-UX support


From: Robert Boehne
Subject: Re: IA64 HP-UX support
Date: Tue, 31 Jul 2001 10:11:03 -0500

Steve:

This looks good to me.  The only problem is the format of the patch,
it doesn't conform to the format requested by the Libtool contributions
web page.  This can cause problems applying the patch.  I'll let you
get by this time though. ;)  I'm committing this right away.

Thanks for the patch!

Robert

Steve Ellcey wrote:
> 
> Here is a libtool.m4 patch to support HP-UX on IA64.  I probably could
> have done this with fewer changes by making IA64 HP-UX act more like PA
> HP-UX but I decided to try and make it look more like other ELF based
> platforms instead.  So I made changes to reflect that the compilers
> generate PIC by default, and that we can hardcode a path into an
> executable without using the linker +b option and can use
> LD_LIBRARY_PATH instead of SHLIB_PATH.
> 
> IA64 HP-UX does still support SHLIB_PATH and the +b linker option and
> shl_load so we could make this look more like PA HP-UX if we wanted.
> Let me know if you think that would be a better approach.
> 
> Anyway, if it looks good as is, I would appreciate it if someone could
> check it in.  I have a copyright assignment on file.  I ran the test
> suite and got a single failure (depdemo-make.test) but if I rerun the
> tests with TESTS='depdemo-static.test depdemo-make.test
> depdemo-unst.test' to try and reproduce the error it works fine, so I
> don't know what is going on.  When it fails (and VERBOSE=1) I get:
> 
> ld: Missing library symbol table in ./l4/.libs/libl4.a
> 
> But libl4.a looks fine if I examine it with nm or odump or any other
> tools.
> 
> Steve Ellcey
> address@hidden
> 
> 2001-07-30  Steve Ellcey  <address@hidden>
> 
>         * libtool.m4 (ia64-*-hpux*)  Add support for ia64*-*-hpux* platform.
> 
> *** libtool.m4.orig     Mon Jul 30 13:22:32 2001
> --- libtool.m4  Mon Jul 30 15:01:10 2001
> *************** test "x$enable_libtool_lock" != xno && e
> *** 424,429 ****
> --- 424,444 ----
>   # Some flags need to be propagated to the compiler or linker for good
>   # libtool support.
>   case $host in
> + 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.$ac_objext` in
> +     *ELF-32*)
> +       HPUX_IA64_MODE="32"
> +       ;;
> +     *ELF-64*)
> +       HPUX_IA64_MODE="64"
> +       ;;
> +     esac
> +   fi
> +   rm -rf conftest*
> +   ;;
>   *-*-irix6*)
>     # Find out which ABI we are using.
>     echo '[#]line __oline__ "configure"' > conftest.$ac_ext
> *************** else
> *** 736,742 ****
>     *)
>       AC_CHECK_FUNC(shl_load, lt_cv_dlopen="shl_load",
>         [AC_CHECK_LIB(dld, shl_load,
> !         [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"],
>           [AC_CHECK_LIB(dl, dlopen,
>             [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
>             [AC_CHECK_FUNC(dlopen, lt_cv_dlopen="dlopen",
> --- 751,757 ----
>     *)
>       AC_CHECK_FUNC(shl_load, lt_cv_dlopen="shl_load",
>         [AC_CHECK_LIB(dld, shl_load,
> !         [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
>           [AC_CHECK_LIB(dl, dlopen,
>             [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
>             [AC_CHECK_FUNC(dlopen, lt_cv_dlopen="dlopen",
> *************** gnu*)
> *** 1159,1172 ****
>   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'
>     ;;
> --- 1174,1202 ----
>   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
> !   if test "$host_cpu" = ia64; then
> !     hardcode_into_libs=yes
> !     dynamic_linker="$host_os dld.so"
> !     shlibpath_var=LD_LIBRARY_PATH
> !     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
> !     library_names_spec='${libname}${release}.so$versuffix 
> ${libname}${release}.so$major $libname.so'
> !     soname_spec='${libname}${release}.so$major'
> !     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
> !   else
> !     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'
> !   fi
>     # HP-UX runs *really* slowly unless shared libraries are mode 555.
>     postinstall_cmds='chmod 555 $lib'
>     ;;
> *************** gnu*)
> *** 1859,1867 ****
>     ;;
> 
>   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*)
> --- 1889,1902 ----
>     ;;
> 
>   hpux10.20* | hpux11*)
>     lt_cv_file_magic_cmd=/usr/bin/file
> !   if test "$host_cpu" = ia64; then
> !     [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_test_file=/usr/lib/hpux32/libc.so
> !   else
> !     [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_test_file=/usr/lib/libc.sl
> !   fi
>     ;;
> 
>   irix5* | irix6*)
> *************** case $host_os in
> *** 2502,2512 ****
>       ;;
>     hpux*)
>       if test $with_gnu_ld = no; then
> !       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
> !       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
> !       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
>       fi
> -     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
>       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, but 
> as the default
>                          # location of the library.
> 
> --- 2537,2556 ----
>       ;;
>     hpux*)
>       if test $with_gnu_ld = no; then
> !       if test "$host_cpu" = ia64; then
> !         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
> !       else
> !         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
> !         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
> !         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
> !       fi
> !     fi
> !     if test "$host_cpu" = ia64; then
> !       _LT_AC_TAGVAR(hardcode_direct, $1)=no
> !       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
> !     else
> !       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
>       fi
>       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, but 
> as the default
>                          # location of the library.
> 
> *************** case $host_os in
> *** 2517,2524 ****
>           ;;
>         aCC)
>         case $host_os in
> !       hpux9*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm 
> $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o 
> $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects 
> $compiler_flags~test $output_objdir/$soname = $lib || mv 
> $output_objdir/$soname $lib' ;;
> !       *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname 
> ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs 
> $postdep_objects $compiler_flags' ;;
>         esac
>           # Commands to make compiler produce verbose output that lists
>           # what "hidden" libraries, object files and flags are used when
> --- 2561,2576 ----
>           ;;
>         aCC)
>         case $host_os in
> !         hpux9*)
> !             _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC 
> -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects 
> $libobjs $deplibs $postdep_objects $compiler_flags~test 
> $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
> !           ;;
> !       *)
> !           if test "$host_cpu" = ia64; then
> !             _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib 
> $linker_flags $libobjs $deplibs'
> !           else
> !             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname 
> ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs 
> $postdep_objects $compiler_flags'
> !           fi
> !           ;;
>         esac
>           # Commands to make compiler produce verbose output that lists
>           # what "hidden" libraries, object files and flags are used when
> *************** case $host_os in
> *** 2534,2541 ****
>           if test $GXX = yes; then
>           if test $with_gnu_ld = no; then
>             case "$host_os" in
> !           hpux9*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm 
> $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b 
> ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs 
> $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib 
> || mv $output_objdir/$soname $lib' ;;
> !           *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC 
> ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects 
> $libobjs $deplibs $postdep_objects $compiler_flags' ;;
>             esac
>           fi
>         else
> --- 2586,2601 ----
>           if test $GXX = yes; then
>           if test $with_gnu_ld = no; then
>             case "$host_os" in
> !             hpux9*)
> !                 _LT_AC_TAGVAR(archive_cmds, $1)='$rm 
> $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b 
> ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs 
> $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib 
> || mv $output_objdir/$soname $lib'
> !                 ;;
> !           *)
> !                 if test "$host_cpu" = ia64; then
> !                   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o 
> $lib $linker_flags $libobjs $deplibs'
> !                 else
> !                   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib 
> -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib 
> $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
> !                 fi
> !                 ;;
>             esac
>           fi
>         else
> *************** cygwin* | mingw* | pw32*)
> *** 3600,3605 ****
> --- 3660,3668 ----
>     [symcode='[ABCDGISTW]']
>     ;;
>   hpux*) # Its linker distinguishes data from code symbols
> +   if test "$host_cpu" = ia64; then
> +     [symcode='[ABCDEGRST]']
> +   fi
>     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int 
> \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
>     lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ 
>  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  
> {\"\2\", (lt_ptr) \&\2},/p'"
>     ;;
> *************** ifelse([$1],[CXX],[
> *** 3791,3796 ****
> --- 3854,3865 ----
>           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
>         fi
>         ;;
> +     hpux*)
> +       # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
> +       if test "$host_cpu" != ia64; then
> +         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
> +       fi
> +       ;;
>       *)
>         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
>         ;;
> *************** ifelse([$1],[CXX],[
> *** 3835,3846 ****
>             CC)
>               _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
>               _LT_AC_TAGVAR(lt_prog_compiler_static, 
> $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
> !             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
>               ;;
>             aCC)
>               _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
>               _LT_AC_TAGVAR(lt_prog_compiler_static, 
> $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
> !             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
>               ;;
>             *)
>               ;;
> --- 3904,3919 ----
>             CC)
>               _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
>               _LT_AC_TAGVAR(lt_prog_compiler_static, 
> $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
> !             if test "$host_cpu" != ia64; then
> !               _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
> !             fi
>               ;;
>             aCC)
>               _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
>               _LT_AC_TAGVAR(lt_prog_compiler_static, 
> $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
> !             if test "$host_cpu" != ia64; then
> !               _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
> !             fi
>               ;;
>             *)
>               ;;
> *************** ifelse([$1],[CXX],[
> *** 4024,4029 ****
> --- 4097,4109 ----
>           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
>         fi
>         ;;
> +
> +     hpux*)
> +       # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
> +       if test "$host_cpu" != ia64; then
> +         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
> +       fi
> +       ;;
> 
>       *)
>         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
> *************** ifelse([$1],[CXX],[
> *** 4050,4056 ****
> 
>       hpux9* | hpux10* | hpux11*)
>         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
> !       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
>         # Is there a better lt_prog_compiler_static that works with the 
> bundled CC?
>         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
>         ;;
> --- 4130,4138 ----
> 
>       hpux9* | hpux10* | hpux11*)
>         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
> !       if test "$host_cpu" != ia64; then
> !         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
> !       fi
>         # Is there a better lt_prog_compiler_static that works with the 
> bundled CC?
>         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
>         ;;
> *************** EOF
> *** 4600,4619 ****
>       hpux9* | hpux10* | hpux11*)
>         if test $GXX = yes; then
>           case $host_os in
> !         hpux9*) _LT_AC_TAGVAR(archive_cmds, $1)='$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' ;;
> !         *) _LT_AC_TAGVAR(archive_cmds, $1)='$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*) _LT_AC_TAGVAR(archive_cmds, $1)='$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' ;;
> !         *) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b 
> $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
>           esac
>         fi
> !       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
> !       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
> !       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
> !       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, but 
> as the default
> !                        # location of the library.
>         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
>         ;;
> 
> --- 4682,4724 ----
>       hpux9* | hpux10* | hpux11*)
>         if test $GXX = yes; then
>           case $host_os in
> !           hpux9*)
> !             _LT_AC_TAGVAR(archive_cmds, $1)='$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'
> !             ;;
> !         *)
> !             if test "$host_cpu" = ia64; then
> !               _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h 
> ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
> !             else
> !               _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h 
> ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs 
> $compiler_flags'
> !             fi
> !             ;;
>           esac
>         else
>           case $host_os in
> !           hpux9*)
> !             _LT_AC_TAGVAR(archive_cmds, $1)='$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'
> !             ;;
> !           *)
> !             if test "$host_cpu" = ia64; then
> !               _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib 
> $libobjs $deplibs $linker_flags'
> !             else
> !               _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b 
> $install_libdir -o $lib $libobjs $deplibs $linker_flags'
> !             fi
> !             ;;
>           esac
>         fi
> !       if test "$host_cpu" = ia64; then
> !         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
> !         _LT_AC_TAGVAR(hardcode_direct, $1)=no
> !         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
> !       else
> !         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
> !         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
> !         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
> !       fi
> !       # 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
>         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
>         ;;
> 
> 
> _______________________________________________
> Libtool-patches mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/libtool-patches

-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  address@hidden



reply via email to

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