libtool
[Top][All Lists]
Advanced

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

PA64 and libtool


From: ross . alexander
Subject: PA64 and libtool
Date: Wed, 14 Aug 2002 12:09:54 +0100

Dave, Jeff, Albert et al,

The whole area of PA64 support in libtool still seems to be somewhat wooly.
Basically, there are two places in libtool.m4 which must be changed to
take into account the different behaviour of the 64bit environment.  These
are AC_LIBTOOL_SYS_DYNAMIC_LINKER and AC_DEPLIBS_CHECK_METHOD.

In my opinion the 64bit environment really is quite different 32bit
environment and
the use of hppa*64*, while a little ugly, makes it clear.  Considering that
most recent
HP PA machines must run 64bit OS and hence will so will report a CPU
hppa2.0w.  Except for brave souls, users will be building for the 32bit
environment.

My interpretation of Jeff's comment is now, don't go looking for a 64bit
build
environment, but do check based on the output of $CC.

So

a) MUST use hppa*64* if --build=hppa64-hp-hpux11.?? (1)
b) SHOULD check in either libtool or config.guess based on $CC (2)

(1) Since under autoconf-2.5x, build will automatically set host unless
specified.
(2) This can be done either by cpp __LP64__, as .LEVEL or file a.out.

Questions

a) If we don't use config.guess,

*1) do we put the checks in each function?
*2) in some common code (maybe _LT_AC_LOCK) and modify $host_cpu?
*3) in some common code and set some other flag (eg HPUX_HPPA_MODE)?

b) Have I missed anything?
c) Any other problems?

I personally perfer changing config.guess, and using $host_cpu, because
this
makes the code in libtool.m4 very straight forward (see below).

Cheers,

Ross

--- libtool.m4.orig     2002-07-29 11:17:16.000000000 +0100
+++ libtool.m4    2002-08-14 10:33:19.000000000 +0100
@@ -1215,32 +1215,46 @@ gnu*)
 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
+  case $host_cpu in
+  ia64*)
     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
+    ;;
+  hppa*64*)
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}.sl$versuffix 
${libname}${release}.sl$major $libname.sl'
+    soname_spec='${libname}${release}.sl$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    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'
-  fi
+    sys_lib_search_path_spec="/lib /usr/lib /usr/ccs/lib"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  esac
   # HP-UX runs *really* slowly unless shared libraries are mode 555.
   postinstall_cmds='chmod 555 $lib'
   ;;

 irix5* | irix6* | nonstopux*)
   case $host_os in
@@ -1941,19 +1955,26 @@ freebsd*)
 gnu*)
   lt_cv_deplibs_check_method=pass_all
   ;;

 hpux10.20* | hpux11*)
   lt_cv_file_magic_cmd=/usr/bin/file
-  if test "$host_cpu" = ia64; then
+  case $host_cpu in
+  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_test_file=/usr/lib/hpux32/libc.so
-  else
+    ;;
+  hppa*64*)
+    lt_cv_deplibs_check_method='file_magic ELF-64 shared object file - PA-RISC 
[[0-9]].[[0-9]]'
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
     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
+    ;;
+  esac
   ;;

 irix5* | irix6* | nonstopux*)
   case $host_os in
   irix5* | nonstopux*)
     # this will be overridden with pass_all, but let us keep it just in case


---------------------------------------------------------------------------------

Ross Alexander                           "He knows no more about his
MIS - NEC Europe Limited            destiny than a tea leaf knows
Work ph: +44 20 8752 3394         the history of East India Company"






reply via email to

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