This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Patch to config.guess (2002-07-03) to detect 64bit HPUX compiler
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: dave at hiauly1 dot hia dot nrc dot ca (John David Anglin)
- Cc: bje at redhat dot com, ross dot alexander at uk dot neceur dot com, law at redhat dot com, binutils at sources dot redhat dot com
- Date: Tue, 3 Dec 2002 19:51:19 -0500 (EST)
- Subject: Re: Patch to config.guess (2002-07-03) to detect 64bit HPUX compiler
> We need to eval $set_cc_for_build. I am doing a gcc bootstrap with
> the patch below. I have verified that it correctly selects hppa64
> when using gcc (64-bit version selected using $PATH) and the HP
> bundled compiler selected with CC="cc +DA2.0W".
There was a further problem... I directed the output of the
__LP64__ check to /dev/null. I guess the "-q" was necessary.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
Index: config.guess
===================================================================
RCS file: /cvsroot/gcc/gcc/config.guess,v
retrieving revision 1.53
diff -u -3 -p -r1.53 config.guess
--- config.guess 20 Aug 2002 21:53:23 -0000 1.53
+++ config.guess 3 Dec 2002 22:29:52 -0000
@@ -621,10 +621,21 @@ EOF
}
EOF
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy`
- if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
+ test -z "$HP_ARCH" && HP_ARCH=hppa
rm -f $dummy.c $dummy && rmdir $tmpdir
fi ;;
esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ # avoid double evaluation of $set_cc_for_build
+ test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
ia64:HP-UX:*:*)