From 70c6e877fabba580f45b2225e4af4b9e0be1279e Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 11 Nov 2023 16:01:00 +1300 Subject: 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 --- scripts/config.guess | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/config.guess b/scripts/config.guess index 980b0208..76047c4d 100755 --- a/scripts/config.guess +++ b/scripts/config.guess @@ -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 -- cgit v1.2.3