Adjust GUESS tuple for PA-RISC linux.

64-bit kernels can support running both 32 and 64-bit user code. Select
hppa-unknown-linux-$LIBC or hppa64-unknown-linux-$LIBC depending on
whether compiler defines LP64 or not.

Always select hppa-unknown-linux-$LIBC with 32-bit kernel. This will
generate 32-bit PA 1.1 code. If PA 2.0 code is desired, user can use a
compiler option to select it.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
This commit is contained in:
John David Anglin 2023-11-11 16:01:00 +13:00 committed by Chris Packham
parent 1ea6e309e5
commit 70c6e877fa

16
scripts/config.guess vendored
View File

@ -1112,15 +1112,17 @@ EOF
GUESS=sparc-unknown-linux-$LIBC
;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
GUESS=hppa64-unknown-linux-$LIBC
# We have a 64-bit kernel supporting 32 and 64-bit code.
if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
GUESS=hppa-unknown-linux-$LIBC
else
GUESS=hppa64-unknown-linux-$LIBC
fi
;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
*) GUESS=hppa-unknown-linux-$LIBC ;;
esac
GUESS=hppa-unknown-linux-$LIBC
;;
ppc64:Linux:*:*)
GUESS=powerpc64-unknown-linux-$LIBC