2
2
# Attempt to guess a canonical system name.
3
3
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
4
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
5
# Free Software Foundation, Inc.
9
9
# This file is free software; you can redistribute it and/or modify it
10
10
# under the terms of the GNU General Public License as published by
56
56
GNU config.guess ($timestamp)
58
58
Originally written by Per Bothner.
59
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
60
Free Software Foundation, Inc.
59
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
60
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
62
62
This is free software; see the source for copying conditions. There is NO
63
63
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
139
139
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
140
140
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
142
if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
143
eval $set_cc_for_build
144
cat << EOF > $dummy.c
145
#include <features.h>
147
# ifdef __UCLIBC_CONFIG_VERSION__
148
LIBC=uclibc __UCLIBC_CONFIG_VERSION__
156
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
142
159
# Note: order is significant - the case branches are not exclusive.
144
161
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
161
178
arm*) machine=arm-unknown ;;
162
179
sh3el) machine=shl-unknown ;;
163
180
sh3eb) machine=sh-unknown ;;
181
sh5el) machine=sh5le-unknown ;;
164
182
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
166
184
# The Operating System including object format, if it has switched
329
347
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
330
348
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
350
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
333
351
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335
353
sun4*:SunOS:6*:*)
791
809
echo ${UNAME_MACHINE}-pc-pw32
793
x86:Interix*:[3456]*)
794
echo i586-pc-interix${UNAME_RELEASE}
796
EM64T:Interix*:[3456]*)
797
echo x86_64-unknown-interix${UNAME_RELEASE}
812
case ${UNAME_MACHINE} in
814
echo i586-pc-interix${UNAME_RELEASE}
816
EM64T | authenticamd)
817
echo x86_64-unknown-interix${UNAME_RELEASE}
820
echo ia64-unknown-interix${UNAME_RELEASE}
799
823
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
800
824
echo i${UNAME_MACHINE}-pc-mks
829
853
echo ${UNAME_MACHINE}-pc-minix
832
echo ${UNAME_MACHINE}-unknown-linux-gnu
856
eval $set_cc_for_build
857
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
858
| grep -q __ARM_EABI__
860
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
862
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
834
865
avr32*:Linux:*:*)
835
echo ${UNAME_MACHINE}-unknown-linux-gnu
866
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
838
echo cris-axis-linux-gnu
869
echo cris-axis-linux-${LIBC}
840
871
crisv32:Linux:*:*)
841
echo crisv32-axis-linux-gnu
872
echo crisv32-axis-linux-${LIBC}
844
echo frv-unknown-linux-gnu
875
echo frv-unknown-linux-${LIBC}
847
echo ${UNAME_MACHINE}-unknown-linux-gnu
878
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
850
echo ${UNAME_MACHINE}-unknown-linux-gnu
881
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
853
echo ${UNAME_MACHINE}-unknown-linux-gnu
884
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
856
887
eval $set_cc_for_build
899
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
930
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
902
echo or32-unknown-linux-gnu
933
echo or32-unknown-linux-${LIBC}
905
echo powerpc-unknown-linux-gnu
936
echo powerpc-unknown-linux-${LIBC}
908
echo powerpc64-unknown-linux-gnu
939
echo powerpc64-unknown-linux-${LIBC}
911
942
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
918
949
EV68*) UNAME_MACHINE=alphaev68 ;;
920
951
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
921
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
922
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
952
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
953
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
924
955
parisc:Linux:*:* | hppa:Linux:*:*)
925
956
# Look for CPU level
926
957
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
927
PA7*) echo hppa1.1-unknown-linux-gnu ;;
928
PA8*) echo hppa2.0-unknown-linux-gnu ;;
929
*) echo hppa-unknown-linux-gnu ;;
958
PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
959
PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
960
*) echo hppa-unknown-linux-${LIBC} ;;
932
963
parisc64:Linux:*:* | hppa64:Linux:*:*)
933
echo hppa64-unknown-linux-gnu
964
echo hppa64-unknown-linux-${LIBC}
935
966
s390:Linux:*:* | s390x:Linux:*:*)
936
967
echo ${UNAME_MACHINE}-ibm-linux
939
echo ${UNAME_MACHINE}-unknown-linux-gnu
970
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
942
echo ${UNAME_MACHINE}-unknown-linux-gnu
973
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
944
975
sparc:Linux:*:* | sparc64:Linux:*:*)
945
echo ${UNAME_MACHINE}-unknown-linux-gnu
976
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
948
echo ${UNAME_MACHINE}-dec-linux-gnu
979
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
950
981
x86_64:Linux:*:*)
951
echo x86_64-unknown-linux-gnu
982
echo x86_64-unknown-linux-${LIBC}
985
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
954
988
# The BFD linker knows what the default object file format is, so
964
998
case "$ld_supported_targets" in
966
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
1000
TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
968
1002
a.out-i386-linux)
969
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
1003
echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
972
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
1006
echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
975
1009
# Either a pre-BFD a.out linker (linux-gnuoldld) or
976
1010
# one that does not give us useful --help.
977
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
1011
echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
1014
# This should get integrated into the C code below, but now we hack
1015
if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi
980
1016
# Determine whether the default compiler is a.out or elf
981
1017
eval $set_cc_for_build
982
1018
sed 's/^ //' << EOF >$dummy.c
1208
1244
SX-6:SUPER-UX:*:*)
1209
1245
echo sx6-nec-superux${UNAME_RELEASE}
1248
echo sx7-nec-superux${UNAME_RELEASE}
1251
echo sx8-nec-superux${UNAME_RELEASE}
1254
echo sx8r-nec-superux${UNAME_RELEASE}
1211
1256
Power*:Rhapsody:*:*)
1212
1257
echo powerpc-apple-rhapsody${UNAME_RELEASE}
1458
1503
the operating system you are using. It is advised that you
1459
1504
download the most up to date version of the config scripts from
1461
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
1506
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1463
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
1508
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1465
1510
If the version you run ($0) is already up to date, please
1466
1511
send the following data and any information you think might be