libtool
[Top][All Lists]
Advanced

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

hppa64* for 1.4 branch


From: Albert Chin
Subject: hppa64* for 1.4 branch
Date: Fri, 20 Dec 2002 10:23:14 -0600
User-agent: Mutt/1.4i

Yes, I know the 1.4 branch is deprecated.

Because this patch is based on one submitted by Ross Alexander, it
cannot be committed until a copyright assignment form by Ross has been
accepted by the FSF.

2002-12-20  Albert Chin-A-Young (address@hidden)

        * libtool.m4, ltmain.in: Add support for hppa*64* based on
        a patch by Ross Alexander <address@hidden>.
        Credit to Ross! Use +b to hardcode library runtime path.
        Add new variable, $hardcode_libdir_flag_spec_ld, that
        is equivalent to $hardcode_libdir_flag_spec but is used
        when ld is used for linking. This works around having to
        set wl=''.

-- 
albert chin (address@hidden)

-- snip snip
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.166.2.49
diff -u -3 -p -r1.166.2.49 libtool.m4
--- libtool.m4  23 Oct 2002 00:55:33 -0000      1.166.2.49
+++ libtool.m4  20 Dec 2002 16:16:20 -0000
@@ -910,7 +910,14 @@ AC_CACHE_VAL(lt_cv_prog_cc_pic,
       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
       lt_cv_prog_cc_wl='-Wl,'
       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
-      lt_cv_prog_cc_pic='+Z'
+      case "$host_cpu" in
+      hppa*64*)
+       # +Z the default
+       ;;
+      *)
+       lt_cv_prog_cc_pic='+Z'
+       ;;
+      esac
       ;;
 
     irix5* | irix6* | nonstopux*)
@@ -1627,14 +1634,34 @@ else
   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' ;;
+    *)
+      case "$host_cpu" in
+      hppa*64*)
+       archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+       ;;
+      *)
+       archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs 
$deplibs $linker_flags'
+       ;;
+      esac
+      ;;
+    esac
+    case "$host_cpu" in
+    hppa*64*)
+      hardcode_direct=no
+      hardcode_into_libs=yes
+      hardcode_libdir_flag_spec_ld='+b $libdir'
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+    *)
+      export_dynamic_flag_spec='${wl}-E'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_minus_L=yes # Not in the search PATH, but as the default
+                          # location of the library
+      ;;
     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'
     ;;
 
   irix5* | irix6* | nonstopux*)
@@ -2127,12 +2154,21 @@ hpux9* | hpux10* | hpux11*)
   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'
+  case "$host_cpu" in
+  hppa*64*)
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+  esac
   ;;
 
 irix5* | irix6* | nonstopux*)
@@ -2489,8 +2526,8 @@ if test -f "$ltmain"; then
     old_striplib striplib file_magic_cmd export_symbols_cmds \
     deplibs_check_method allow_undefined_flag no_undefined_flag \
     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
-    global_symbol_to_c_name_address \
-    hardcode_libdir_flag_spec hardcode_libdir_separator  \
+    global_symbol_to_c_name_address hardcode_libdir_flag_spec \
+    hardcode_libdir_flag_spec_ld hardcode_libdir_separator \
     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
 
@@ -2752,6 +2789,11 @@ hardcode_into_libs=$hardcode_into_libs
 # This must work even if \$libdir does not exist.
 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
 # Whether we need a single -rpath flag with a separated argument.
 hardcode_libdir_separator=$lt_hardcode_libdir_separator
 
@@ -3376,9 +3418,17 @@ 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*64*)
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) 
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
+    ;;
+  esac
   ;;
 
 irix5* | irix6* | nonstopux*)
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/ltmain.in,v
retrieving revision 1.259.2.26
diff -u -3 -p -r1.259.2.26 ltmain.in
--- ltmain.in   11 Oct 2002 16:06:07 -0000      1.259.2.26
+++ ltmain.in   20 Dec 2002 16:16:21 -0000
@@ -2801,7 +2801,11 @@ EOF
          if test -n "$hardcode_libdir_separator" &&
             test -n "$hardcode_libdirs"; then
            libdir="$hardcode_libdirs"
-           eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+           if test -n "$hardcode_libdir_flag_spec_ld"; then
+             eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+           else
+             eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+           fi
          fi
          if test -n "$runpath_var" && test -n "$perm_rpath"; then
            # We should set the runpath_var.



reply via email to

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