From 9e514cc93291476c61200ed4e650b524d285ae47 Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Fri, 21 Dec 2018 12:22:29 +1100 Subject: [PATCH] Revert 2018-07-18 change: From Apostolos Syropoulos : * config.guess (i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*): Use the isainfo(1) command to guess what kind of system we have. Running isainfo -b returns either "32" or "64". --- ChangeLog | 9 +++++++++ config.guess | 23 ++++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7d3bdb9..ab519b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2018-12-21 Ben Elliston + + Revert 2018-07-18 change: + + From Apostolos Syropoulos : + * config.guess (i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*): Use the + isainfo(1) command to guess what kind of system we have. Running + isainfo -b returns either "32" or "64". + 2018-12-16 Ben Elliston Revert 2018-05-05 change. diff --git a/config.guess b/config.guess index 94c4ac1..28bec27 100755 --- a/config.guess +++ b/config.guess @@ -391,15 +391,20 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - case `isainfo -b` in - 32) - echo i386-pc-solaris2"$UNAME_REL" - ;; - 64) - echo x86_64-pc-solaris2"$UNAME_REL" - ;; - esac + set_cc_for_build + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize