tools/config.guess
changeset 1096 4632c305eb73
parent 952 4db000267992
     1.1 --- a/tools/config.guess	Tue Oct 21 09:16:00 2008 +0000
     1.2 +++ b/tools/config.guess	Thu Dec 11 18:15:41 2008 +0000
     1.3 @@ -4,7 +4,7 @@
     1.4  #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
     1.5  #   Free Software Foundation, Inc.
     1.6  
     1.7 -timestamp='2008-09-28'
     1.8 +timestamp='2008-12-11'
     1.9  
    1.10  # This file is free software; you can redistribute it and/or modify it
    1.11  # under the terms of the GNU General Public License as published by
    1.12 @@ -331,7 +331,22 @@
    1.13  	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    1.14  	exit ;;
    1.15      i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
    1.16 -	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    1.17 +	eval $set_cc_for_build
    1.18 +	SUN_ARCH="i386"
    1.19 +	# If there is a compiler, see if it is configured for 64-bit objects.
    1.20 +	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
    1.21 +	# This test works for both compilers.  Note that the full path to
    1.22 +	# /usr/bin/echo is necessary to work around the shell builtins for
    1.23 +	# echo that do not handle newlines.
    1.24 +	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
    1.25 +	    if /usr/bin/echo '\n#ifdef __amd64\nIS_64BIT_ARCH\n#endif' | \
    1.26 +		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
    1.27 +		grep IS_64BIT_ARCH >/dev/null
    1.28 +	    then
    1.29 +		SUN_ARCH="x86_64"
    1.30 +	    fi
    1.31 +	fi
    1.32 +	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    1.33  	exit ;;
    1.34      sun4*:SunOS:6*:*)
    1.35  	# According to config.sub, this is the proper way to canonicalize