Add hppa*64* support to libtool in binutils

John David Anglin dave@hiauly1.hia.nrc.ca
Tue Aug 13 13:07:00 GMT 2002


Jeff Law wrote:

> In message <200208131637.g7DGbYKR027710@hiauly1.hia.nrc.ca>, "John David Anglin

>
>  >That would certainly seem convenient.  Also, libtool runs configure
>  >in its testsuite.  When I build it for hppa64, the testsuite unfortunately
>  >ignores the options used configuring it and as a result configures
>  >for hppa2.0w even though it is using 64bit tools  :-(
> Hmm, I hadn't thought of this case.  It probably makes sense though.
>
> ie, if I've done something like
>
> CC=<some PA64 compiler>
> configure
>
> Then, shouldn't that build a 64bit toolchain?  We have (in effect) explicitly
> asked for 64bit tools by the setting of CC.  It should probably also return
> hppa64-whatever as the "guessed" system.

I believe that the attached patch will do the trick.  Tested with a
couple of configurations of libtool in hppa2.0w-hp-hpux11.00 and
hppa64-hp-hpux11.00 modes.

Dave
-------------- next part --------------
2002-08-13  John David Anglin  <dave@hiauly1.hia.nrc.ca>

	* config.guess (9000/[34678]??:HP-UX:*:*): For 64-bit kernels, set
	HP_ARCH to hppa64 if the code level of CC_FOR_BUILD is 2.0w or 2.0W.

--- config.guess.orig	Mon Jan  7 17:09:42 2002
+++ config.guess	Tue Aug 13 15:20:07 2002
@@ -603,6 +603,20 @@
 		    rm -f $dummy.c $dummy
 		fi ;;
 	esac
+	if [ "${HP_ARCH}" = "hppa2.0w" ]; then
+	  # Check if the arch should be hppa2.0w or hppa64.
+	  eval $set_cc_for_build
+	  sed 's/^	//' << EOF >$dummy.c
+	int main () {}
+EOF
+	  (CCOPTS= $CC_FOR_BUILD $dummy.c -S) && HP_LEVEL=`awk '{if (NR==1) print $2}' $dummy.s`
+	  rm -f $dummy.c $dummy.s
+	  case ${HP_LEVEL} in
+	  2.0w | 2.0W)
+	    HP_ARCH=hppa64
+	    ;;
+	  esac
+	fi
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
 	exit 0 ;;
     ia64:HP-UX:*:*)


More information about the Binutils mailing list