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,
60
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
59
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
60
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
61
Software Foundation, Inc.
62
63
This is free software; see the source for copying conditions. There is NO
63
64
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
853
859
echo ${UNAME_MACHINE}-pc-minix
862
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
863
EV5) UNAME_MACHINE=alphaev5 ;;
864
EV56) UNAME_MACHINE=alphaev56 ;;
865
PCA56) UNAME_MACHINE=alphapca56 ;;
866
PCA57) UNAME_MACHINE=alphapca56 ;;
867
EV6) UNAME_MACHINE=alphaev6 ;;
868
EV67) UNAME_MACHINE=alphaev67 ;;
869
EV68*) UNAME_MACHINE=alphaev68 ;;
871
objdump --private-headers /bin/sh | grep -q ld.so.1
872
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
873
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
856
876
eval $set_cc_for_build
857
877
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
858
878
| grep -q __ARM_EABI__
860
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
880
echo ${UNAME_MACHINE}-unknown-linux-gnu
862
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
882
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
865
885
avr32*:Linux:*:*)
866
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
886
echo ${UNAME_MACHINE}-unknown-linux-gnu
869
echo cris-axis-linux-${LIBC}
889
echo cris-axis-linux-gnu
871
891
crisv32:Linux:*:*)
872
echo crisv32-axis-linux-${LIBC}
892
echo crisv32-axis-linux-gnu
875
echo frv-unknown-linux-${LIBC}
895
echo frv-unknown-linux-gnu
899
eval $set_cc_for_build
900
sed 's/^ //' << EOF >$dummy.c
905
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
906
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
878
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
909
echo ${UNAME_MACHINE}-unknown-linux-gnu
881
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
912
echo ${UNAME_MACHINE}-unknown-linux-gnu
884
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
915
echo ${UNAME_MACHINE}-unknown-linux-gnu
887
eval $set_cc_for_build
888
sed 's/^ //' << EOF >$dummy.c
892
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
895
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
902
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
907
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
910
eval $set_cc_for_build
911
sed 's/^ //' << EOF >$dummy.c
915
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
918
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
925
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
930
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
917
mips:Linux:*:* | mips64:Linux:*:*)
918
eval $set_cc_for_build
919
sed 's/^ //' << EOF >$dummy.c
921
#undef ${UNAME_MACHINE}
922
#undef ${UNAME_MACHINE}el
923
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
924
CPU=${UNAME_MACHINE}el
926
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
933
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
934
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
933
echo or32-unknown-linux-${LIBC}
936
echo powerpc-unknown-linux-${LIBC}
939
echo powerpc64-unknown-linux-${LIBC}
942
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
943
EV5) UNAME_MACHINE=alphaev5 ;;
944
EV56) UNAME_MACHINE=alphaev56 ;;
945
PCA56) UNAME_MACHINE=alphapca56 ;;
946
PCA57) UNAME_MACHINE=alphapca56 ;;
947
EV6) UNAME_MACHINE=alphaev6 ;;
948
EV67) UNAME_MACHINE=alphaev67 ;;
949
EV68*) UNAME_MACHINE=alphaev68 ;;
951
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
952
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
953
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
937
echo or32-unknown-linux-gnu
940
echo sparc-unknown-linux-gnu
942
parisc64:Linux:*:* | hppa64:Linux:*:*)
943
echo hppa64-unknown-linux-gnu
955
945
parisc:Linux:*:* | hppa:Linux:*:*)
956
946
# Look for CPU level
957
947
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
958
PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
959
PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
960
*) echo hppa-unknown-linux-${LIBC} ;;
948
PA7*) echo hppa1.1-unknown-linux-gnu ;;
949
PA8*) echo hppa2.0-unknown-linux-gnu ;;
950
*) echo hppa-unknown-linux-gnu ;;
963
parisc64:Linux:*:* | hppa64:Linux:*:*)
964
echo hppa64-unknown-linux-${LIBC}
954
echo powerpc64-unknown-linux-gnu
957
echo powerpc-unknown-linux-gnu
966
959
s390:Linux:*:* | s390x:Linux:*:*)
967
960
echo ${UNAME_MACHINE}-ibm-linux
970
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
963
echo ${UNAME_MACHINE}-unknown-linux-gnu
973
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
966
echo ${UNAME_MACHINE}-unknown-linux-gnu
975
968
sparc:Linux:*:* | sparc64:Linux:*:*)
976
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
969
echo ${UNAME_MACHINE}-unknown-linux-gnu
979
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
972
echo ${UNAME_MACHINE}-dec-linux-gnu
981
974
x86_64:Linux:*:*)
982
echo x86_64-unknown-linux-${LIBC}
975
echo x86_64-unknown-linux-gnu
984
977
xtensa*:Linux:*:*)
985
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
978
echo ${UNAME_MACHINE}-unknown-linux-gnu
988
# The BFD linker knows what the default object file format is, so
989
# first see if it will tell us. cd to the root directory to prevent
990
# problems with other programs or directories called `ld' in the path.
991
# Set LC_ALL=C to ensure ld outputs messages in English.
992
ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
993
| sed -ne '/supported targets:/!d
995
s/.*supported targets: *//
998
case "$ld_supported_targets" in
1000
TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
1003
echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
1006
echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
1009
# Either a pre-BFD a.out linker (linux-gnuoldld) or
1010
# one that does not give us useful --help.
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
1016
# Determine whether the default compiler is a.out or elf
1017
eval $set_cc_for_build
1018
sed 's/^ //' << EOF >$dummy.c
1019
#include <features.h>
1031
#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1041
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1046
test x"${LIBC}" != x && {
1047
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1050
test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1052
980
i*86:DYNIX/ptx:4*:*)
1053
981
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1054
982
# earlier versions are messed up and put the nodename in both