public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: Add hppa*64* support to libtool in binutils
@ 2002-07-15  9:51 Steve Ellcey
  2002-07-15 10:25 ` John David Anglin
  2002-07-15 19:28 ` Loren James Rittle
  0 siblings, 2 replies; 16+ messages in thread
From: Steve Ellcey @ 2002-07-15  9:51 UTC (permalink / raw)
  To: dave, aoliva, rittle; +Cc: binutils, gcc-patches

> This is a first cut at adding hppa64 support to libtool in binutils.
> The same needs to done in gcc and in the libtool source.  Unfortunately,
> the binutils and gcc sources are somewhat out of sync, so it seems
> separate patches will be needed in each case.

David, I verified that if my GCC libtool patch
(http://gcc.gnu.org/ml/gcc-patches/2002-07/msg00527.html) is applied to
GCC then your binutils patch
(http://gcc.gnu.org/ml/gcc-patches/2002-07/msg00397.html) can be applied
to GCC with out any changes.  I put both patches to my local tree
(binutils and GCC) over the weekend and tested on PA32, PA64, and IA64
HP-UX and had no problems.  This would leave Loren Rittle's GCC libtool
patch (http://gcc.gnu.org/ml/gcc-patches/2002-05/msg00234.html) as the
only difference between the binutils and GCC libtools.  Loren, do you
know of any reason this patch couldn't be applied to the binutils
libtool?

I applied it to my binutils tree with no apparent bad effects.  It
probably isn't needed in binutils but it would keep the two versions of
libtool in synch.

Steve Ellcey
sje@cup.hp.com

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: Add hppa*64* support to libtool in binutils
@ 2002-08-13  8:54 ross.alexander
  2002-08-13  9:40 ` John David Anglin
  0 siblings, 1 reply; 16+ messages in thread
From: ross.alexander @ 2002-08-13  8:54 UTC (permalink / raw)
  To: law
  Cc: aoliva, binutils, binutils-owner, John David Anglin, gcc-patches,
	libtool, sje


Jeff,

At the moment my is not to check in libtool itself for 64bit environment,
and only use the $host_cpu variable as a guide to behaviour.  I have
build gtk+-2.0.x with a patched libtool and it basically behaved itself,
using the --build=hppa64-hp-hpux11.00 to tell libtool to expect 64bit code.

A couple of questions.

1) Do we put check in config.guess to output hppa64-hp-hpux11.xx if it
detects a 64bit compiler (ie $CC -E | grep __LP64__ etc)?

2) Should hardcode_into_libs be true (true for SOM, false for IA64)?

There is a bug in libtool-1.4e to do with rpath data polution deplibs, so I
haven't produced a patch yet.

Cheers,

Ross
---------------------------------------------------------------------------------

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"


                                                                                                                                
                      Jeff Law                                                                                                  
                      <law@porcupine.slc.        To:       ross.alexander@uk.neceur.com                                         
                      redhat.com>                cc:       "John David Anglin" <dave@hiauly1.hia.nrc.ca>, aoliva@redhat.com,    
                                                  binutils@sources.redhat.com, binutils-owner@sources.redhat.com,               
                      12/08/2002 18:50            gcc-patches@gcc.gnu.org, sje@cup.hp.com, libtool@sources.redhat.com           
                      Please respond to          Subject:  Re: Add hppa*64* support to libtool in binutils                      
                      law                                                                                                       
                                                                                                                                
                                                                                                                                




In message <OFA15CDC33.853DE7E3-ON80256C05.0038EA84@uk.neceur.com>,
ross.alexan
der@uk.neceur.com writes:
 >
 >David,
 >
 >I'm currently looking at revising libtool-1.4e to add HPUX64 support.
I've
 >got a
 >couple of questions.
 >
 >1) Should the mode be determined from $cpu_host or by checking __LP64__
 >in the cc defines.  Given that the config.guess returns
 >hppa2.0w-hp-hpux??.??
 >and we assume that is 32bit then do we assume the user knows what they
 >are doing and assume they only want 64bit when the target is hpux64.
 >Should libtool check that they match correctly.
We certainly don't want to go into 64bit mode unless it's explicitly been
asked for.  If you can actually run the compiler, then checking for
__LP64__ should get you this information.  Alternately if you can't run
the compiler, go into 64bit mode for hppa64-*-* configurations only.

jeff






^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: Add hppa*64* support to libtool in binutils
@ 2002-07-29  4:17 ross.alexander
  2002-07-29 14:07 ` John David Anglin
  2002-08-12 10:46 ` Jeff Law
  0 siblings, 2 replies; 16+ messages in thread
From: ross.alexander @ 2002-07-29  4:17 UTC (permalink / raw)
  To: John David Anglin
  Cc: aoliva, binutils, binutils-owner, gcc-patches, sje, libtool


David,

I'm currently looking at revising libtool-1.4e to add HPUX64 support.  I've
got a
couple of questions.

1) Should the mode be determined from $cpu_host or by checking __LP64__
in the cc defines.  Given that the config.guess returns
hppa2.0w-hp-hpux??.??
and we assume that is 32bit then do we assume the user knows what they
are doing and assume they only want 64bit when the target is hpux64.
Should
libtool check that they match correctly.

I'll use the values you used in your patch.  I assume these are pretty much
the default values for ELF environments.  Any hints would be appreciated.

Many thanks

Ross

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

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"


^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: Add hppa*64* support to libtool in binutils
@ 2002-07-10 14:40 Steve Ellcey
  2002-07-10 15:22 ` John David Anglin
  0 siblings, 1 reply; 16+ messages in thread
From: Steve Ellcey @ 2002-07-10 14:40 UTC (permalink / raw)
  To: dave; +Cc: binutils, gcc-patches

> There are some differences between the ia64 implementation and the
> hppa64 proposed here.  The ia64 defines in ltcf-cxx.sh look suspect
> to me.  It seems defines appropriate to the 32-bit SOM linker are
> being used.

What defines look suspect to you?  It might just be that it is set up to
use the HP linker and not the GNU linker.  The GNU linker has not been
ported to the IA64 HP-UX platform.

Steve Ellcey
sje@cup.hp.com

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Add hppa*64* support to libtool in binutils
@ 2002-07-09 11:16 John David Anglin
  0 siblings, 0 replies; 16+ messages in thread
From: John David Anglin @ 2002-07-09 11:16 UTC (permalink / raw)
  To: binutils, gcc-patches; +Cc: aoliva, sje

This is a first cut at adding hppa64 support to libtool in binutils.
The same needs to done in gcc and in the libtool source.  Unfortunately,
the binutils and gcc sources are somewhat out of sync, so it seems
separate patches will be needed in each case.

Basically, it appears the capabilities of the ia64 and hppa64 linkers
are very similar.  The only differences appear to be the library
locations and the file magic needed for detecting shared libraries.

There are some differences between the ia64 implementation and the
hppa64 proposed here.  The ia64 defines in ltcf-cxx.sh look suspect
to me.  It seems defines appropriate to the 32-bit SOM linker are
being used.

I have revised sys_lib_search_path_spec and sys_lib_dlsearch_path_spec
for the 32-bit SOM linker.  I added /usr/ccs/lib and removed /usr/local/lib
from sys_lib_search_path_spec.  The is some question as to whether
we need /lib as it is normally a link to /usr/lib under hpux10 and 11.
I left it because I think it was a separate directory under hpux9.
The define for sys_lib_dlsearch_path_spec reflects the documented
behavior for dld.sl.

The hpux11 dynamic loader uses LD_LIBRARY_PATH, SHLIB_PATH and
the embedded patch in that order when searching dynamically for
shared libraries.  The code here sets shlibpath_var to LD_LIBRARY_PATH
for hppa*64*.  SHLIB_PATH isn't being checked but I was wondering
if there was a way to add this somehow.

I have tested this patch with several binutils builds under
hppa64-hp-hpux11.00 with --enable-shared shared.  I have built gcc
with the resulting tools.  The basic approach was derived from a
hack to libtool in the gettext package which involves building a
number of shared libraries with dependent libraries.  This testing
was done using the GNU linker.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

2002-07-09  John David Anglin  <dave@hiauly1.hia.nrc.ca>

	* libtool.m4 (hpux10.20*|hpux11*): Add lt_cv_deplibs_check_method and
	lt_cv_file_magic_test_file defines for hppa*64*.
	* ltcf-c.sh (hpux9* | hpux10* | hpux11*): Add hardcode_direct,
	hardcode_shlibpath_var and hardcode_libdir_flag_spec defines for
	hppa*64*.
	* ltcf-cxx.sh (hpux*): Likewise.
	* ltcf-gcj.sh (hpux9* | hpux10* | hpux11*): Likewise.
	* ltconfig (hpux9* | hpux10* | hpux11*): Add dynamic_linker,
	shlibpath_var, shlibpath_overrides_runpath, library_names_spec,
	soname_spec, sys_lib_search_path_spec and sys_lib_dlsearch_path_spec
	for hppa*64*.  Update default values for sys_lib_search_path_spec and
	sys_lib_dlsearch_path_spec.

Index: libtool.m4
===================================================================
RCS file: /cvs/src/src/libtool.m4,v
retrieving revision 1.8
diff -u -3 -p -r1.8 libtool.m4
--- libtool.m4	28 Jan 2002 04:59:30 -0000	1.8
+++ libtool.m4	7 Jul 2002 18:16:03 -0000
@@ -584,15 +584,18 @@ gnu*)
   ;;
 
 hpux10.20*|hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
   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
+    ;;
   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
Index: ltcf-c.sh
===================================================================
RCS file: /cvs/src/src/ltcf-c.sh,v
retrieving revision 1.11
diff -u -3 -p -r1.11 ltcf-c.sh
--- ltcf-c.sh	28 Jan 2002 04:59:30 -0000	1.11
+++ ltcf-c.sh	7 Jul 2002 18:16:03 -0000
@@ -422,7 +422,8 @@ else
       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_libdir_flag_spec='-L$libdir'
+      ;;
     *)
       if test $with_gcc = yes; then
         case "$host_os" in
@@ -435,14 +436,23 @@ else
         *) 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.
+      case "$host_cpu" in
+      hppa*64*)
+	hardcode_direct=no
+	hardcode_shlibpath_var=no
+	hardcode_libdir_flag_spec='-L$libdir'
+	;;
+      *)
+	hardcode_direct=yes
+	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.
+	export_dynamic_flag_spec='${wl}-E'
+	;;
+      esac
       ;;
     esac
-    export_dynamic_flag_spec='${wl}-E'
-    hardcode_direct=yes
     ;;
 
   irix5* | irix6*)
Index: ltcf-cxx.sh
===================================================================
RCS file: /cvs/src/src/ltcf-cxx.sh,v
retrieving revision 1.13
diff -u -3 -p -r1.13 ltcf-cxx.sh
--- ltcf-cxx.sh	4 Jul 2002 22:51:16 -0000	1.13
+++ ltcf-cxx.sh	7 Jul 2002 18:16:03 -0000
@@ -252,17 +252,29 @@ case $host_os in
     if test $with_gnu_ld = no; then
       case "$host_cpu" in
 	ia64*)
+	  hardcode_direct=yes
 	  hardcode_libdir_flag_spec='-L$libdir'
-	  hardcode_shlibpath_var=no ;;
+	  hardcode_shlibpath_var=no
+	  hardcode_libdir_separator=:
+	  export_dynamic_flag_spec='${wl}-E'
+	  hardcode_minus_L=yes # Not in the search PATH, but as the default
+			       # location of the library.
+	  ;;
+	hppa*64*)
+	  hardcode_direct=no
+	  hardcode_libdir_flag_spec='-L$libdir'
+	  hardcode_shlibpath_var=no
+	  ;;
 	*)
-	  hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' ;;
+	  hardcode_direct=yes
+	  hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_separator=:
+	  export_dynamic_flag_spec='${wl}-E'
+	  hardcode_minus_L=yes # Not in the search PATH, but as the default
+			       # location of the library.
+	  ;;
       esac
-      hardcode_direct=yes
-      hardcode_libdir_separator=:
-      export_dynamic_flag_spec='${wl}-E'
     fi
-    hardcode_minus_L=yes # Not in the search PATH, but as the default
-			 # location of the library.
 
     case $cc_basename in
       CC)
Index: ltcf-gcj.sh
===================================================================
RCS file: /cvs/src/src/ltcf-gcj.sh,v
retrieving revision 1.8
diff -u -3 -p -r1.8 ltcf-gcj.sh
--- ltcf-gcj.sh	14 Nov 2001 06:24:41 -0000	1.8
+++ ltcf-gcj.sh	7 Jul 2002 18:16:03 -0000
@@ -414,12 +414,21 @@ else
     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'
+    case "$host_cpu" in
+    hppa*64*)
+      hardcode_direct=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    *)
+      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'
+      ;;
+    esac
     ;;
 
   irix5* | irix6*)
Index: ltconfig
===================================================================
RCS file: /cvs/src/src/ltconfig,v
retrieving revision 1.16
diff -u -3 -p -r1.16 ltconfig
--- ltconfig	28 Jan 2002 04:59:30 -0000	1.16
+++ ltconfig	7 Jul 2002 18:16:04 -0000
@@ -1173,12 +1173,23 @@ hpux9* | hpux10* | hpux11*)
     fi
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
+  hppa*64*)
+    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'
+    sys_lib_search_path_spec="/lib /usr/lib /usr/ccs/lib"
+    sys_lib_dlsearch_path_spec="/usr/lib /usr/ccs/lib"
     ;;
   esac
   # HP-UX runs *really* slowly unless shared libraries are mode 555.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2002-08-14 17:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-15  9:51 Add hppa*64* support to libtool in binutils Steve Ellcey
2002-07-15 10:25 ` John David Anglin
2002-07-15 19:28 ` Loren James Rittle
  -- strict thread matches above, loose matches on Subject: below --
2002-08-13  8:54 ross.alexander
2002-08-13  9:40 ` John David Anglin
2002-08-13 10:42   ` Jeff Law
2002-08-13 11:39     ` John David Anglin
2002-08-14  8:09       ` Jeff Law
2002-08-14 10:52         ` John David Anglin
2002-08-13 13:07     ` John David Anglin
2002-07-29  4:17 ross.alexander
2002-07-29 14:07 ` John David Anglin
2002-08-12 10:46 ` Jeff Law
2002-07-10 14:40 Steve Ellcey
2002-07-10 15:22 ` John David Anglin
2002-07-09 11:16 John David Anglin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).