From 01e207b7f3a0519644c5b7229dcf9036b14ee377 Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Sat, 15 Nov 2008 21:57:16 +1100 Subject: [PATCH] Add support for detecting x86_64 Solaris. --- ChangeLog | 7 +++++++ config.guess | 17 +++++++++++++++-- testsuite/config-guess.data | 1 + 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c043df7..8e7facc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-11-15 Ali Bahrami + Ben Elliston + + * config.guess: Add support for detecting x86_64 Solaris. + * testsuite/config-guess.data: Add a previously missing test case + for i86pc SunOS. + 2008-09-28 Ben Elliston Dann Corbit diff --git a/config.guess b/config.guess index f0f0d36..c0d5198 100755 --- a/config.guess +++ b/config.guess @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. -timestamp='2008-09-28' +timestamp='2008-11-15' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -331,7 +331,20 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + eval $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 /usr/bin/echo '\n#ifdef __amd64\nIS_64BIT_ARCH\n#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 diff --git a/testsuite/config-guess.data b/testsuite/config-guess.data index 2293f9c..37d55e0 100644 --- a/testsuite/config-guess.data +++ b/testsuite/config-guess.data @@ -33,6 +33,7 @@ x86_64 1.0 MINGW ignored x86_64-pc-mingw32 i386 1.0 MINGW ignored i386-pc-mingw32 SX-8R 1.0 SUPER-UX ignored sx8r-nec-superux1.0 i86xen 5.6 SunOS ignored i386-pc-solaris2.6 +i86pc 5.6 SunOS ignored i386-pc-solaris2.6 IA64 6.0 Interix ignored ia64-unknown-interix6.0 BePC 1.0 Haiku ignored i586-pc-haiku padre 2.6.15 Linux ignored sparc-unknown-linux-gnu