summaryrefslogtreecommitdiff
path: root/config.guess
diff options
context:
space:
mode:
Diffstat (limited to 'config.guess')
-rwxr-xr-xconfig.guess101
1 files changed, 54 insertions, 47 deletions
diff --git a/config.guess b/config.guess
index c7607c74f..e3a2116a7 100755
--- a/config.guess
+++ b/config.guess
@@ -1,10 +1,10 @@
1#! /bin/sh 1#! /bin/sh
2# Attempt to guess a canonical system name. 2# Attempt to guess a canonical system name.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5# Free Software Foundation, Inc. 5# Free Software Foundation, Inc.
6 6
7timestamp='2008-04-14' 7timestamp='2009-06-10'
8 8
9# This file is free software; you can redistribute it and/or modify it 9# This file is free software; you can redistribute it and/or modify it
10# under the terms of the GNU General Public License as published by 10# under the terms of the GNU General Public License as published by
@@ -170,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
170 arm*|i386|m68k|ns32k|sh3*|sparc|vax) 170 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
171 eval $set_cc_for_build 171 eval $set_cc_for_build
172 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 172 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
173 | grep __ELF__ >/dev/null 173 | grep -q __ELF__
174 then 174 then
175 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 175 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
176 # Return netbsd for either. FIX? 176 # Return netbsd for either. FIX?
@@ -324,6 +324,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
324 case `/usr/bin/uname -p` in 324 case `/usr/bin/uname -p` in
325 sparc) echo sparc-icl-nx7; exit ;; 325 sparc) echo sparc-icl-nx7; exit ;;
326 esac ;; 326 esac ;;
327 s390x:SunOS:*:*)
328 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
329 exit ;;
327 sun4H:SunOS:5.*:*) 330 sun4H:SunOS:5.*:*)
328 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 331 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
329 exit ;; 332 exit ;;
@@ -331,7 +334,20 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
331 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 334 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
332 exit ;; 335 exit ;;
333 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 336 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
334 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 337 eval $set_cc_for_build
338 SUN_ARCH="i386"
339 # If there is a compiler, see if it is configured for 64-bit objects.
340 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
341 # This test works for both compilers.
342 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
343 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
344 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
345 grep IS_64BIT_ARCH >/dev/null
346 then
347 SUN_ARCH="x86_64"
348 fi
349 fi
350 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335 exit ;; 351 exit ;;
336 sun4*:SunOS:6*:*) 352 sun4*:SunOS:6*:*)
337 # According to config.sub, this is the proper way to canonicalize 353 # According to config.sub, this is the proper way to canonicalize
@@ -640,7 +656,7 @@ EOF
640 # => hppa64-hp-hpux11.23 656 # => hppa64-hp-hpux11.23
641 657
642 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 658 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
643 grep __LP64__ >/dev/null 659 grep -q __LP64__
644 then 660 then
645 HP_ARCH="hppa2.0w" 661 HP_ARCH="hppa2.0w"
646 else 662 else
@@ -796,7 +812,7 @@ EOF
796 x86) 812 x86)
797 echo i586-pc-interix${UNAME_RELEASE} 813 echo i586-pc-interix${UNAME_RELEASE}
798 exit ;; 814 exit ;;
799 EM64T | authenticamd) 815 EM64T | authenticamd | genuineintel)
800 echo x86_64-unknown-interix${UNAME_RELEASE} 816 echo x86_64-unknown-interix${UNAME_RELEASE}
801 exit ;; 817 exit ;;
802 IA64) 818 IA64)
@@ -806,6 +822,9 @@ EOF
806 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 822 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
807 echo i${UNAME_MACHINE}-pc-mks 823 echo i${UNAME_MACHINE}-pc-mks
808 exit ;; 824 exit ;;
825 8664:Windows_NT:*)
826 echo x86_64-pc-mks
827 exit ;;
809 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 828 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
810 # How do we know it's Interix rather than the generic POSIX subsystem? 829 # How do we know it's Interix rather than the generic POSIX subsystem?
811 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 830 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -866,40 +885,17 @@ EOF
866 m68*:Linux:*:*) 885 m68*:Linux:*:*)
867 echo ${UNAME_MACHINE}-unknown-linux-gnu 886 echo ${UNAME_MACHINE}-unknown-linux-gnu
868 exit ;; 887 exit ;;
869 mips:Linux:*:*) 888 mips:Linux:*:* | mips64:Linux:*:*)
870 eval $set_cc_for_build 889 eval $set_cc_for_build
871 sed 's/^ //' << EOF >$dummy.c 890 sed 's/^ //' << EOF >$dummy.c
872 #undef CPU 891 #undef CPU
873 #undef mips 892 #undef ${UNAME_MACHINE}
874 #undef mipsel 893 #undef ${UNAME_MACHINE}el
875 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 894 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
876 CPU=mipsel 895 CPU=${UNAME_MACHINE}el
877 #else 896 #else
878 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 897 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
879 CPU=mips 898 CPU=${UNAME_MACHINE}
880 #else
881 CPU=
882 #endif
883 #endif
884EOF
885 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
886 /^CPU/{
887 s: ::g
888 p
889 }'`"
890 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
891 ;;
892 mips64:Linux:*:*)
893 eval $set_cc_for_build
894 sed 's/^ //' << EOF >$dummy.c
895 #undef CPU
896 #undef mips64
897 #undef mips64el
898 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
899 CPU=mips64el
900 #else
901 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
902 CPU=mips64
903 #else 899 #else
904 CPU= 900 CPU=
905 #endif 901 #endif
@@ -931,10 +927,13 @@ EOF
931 EV67) UNAME_MACHINE=alphaev67 ;; 927 EV67) UNAME_MACHINE=alphaev67 ;;
932 EV68*) UNAME_MACHINE=alphaev68 ;; 928 EV68*) UNAME_MACHINE=alphaev68 ;;
933 esac 929 esac
934 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 930 objdump --private-headers /bin/sh | grep -q ld.so.1
935 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 931 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
936 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 932 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
937 exit ;; 933 exit ;;
934 padre:Linux:*:*)
935 echo sparc-unknown-linux-gnu
936 exit ;;
938 parisc:Linux:*:* | hppa:Linux:*:*) 937 parisc:Linux:*:* | hppa:Linux:*:*)
939 # Look for CPU level 938 # Look for CPU level
940 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 939 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -982,14 +981,6 @@ EOF
982 elf32-i386) 981 elf32-i386)
983 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 982 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
984 ;; 983 ;;
985 a.out-i386-linux)
986 echo "${UNAME_MACHINE}-pc-linux-gnuaout"
987 exit ;;
988 "")
989 # Either a pre-BFD a.out linker (linux-gnuoldld) or
990 # one that does not give us useful --help.
991 echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
992 exit ;;
993 esac 984 esac
994 # Determine whether the default compiler is a.out or elf 985 # Determine whether the default compiler is a.out or elf
995 eval $set_cc_for_build 986 eval $set_cc_for_build
@@ -1055,7 +1046,7 @@ EOF
1055 i*86:syllable:*:*) 1046 i*86:syllable:*:*)
1056 echo ${UNAME_MACHINE}-pc-syllable 1047 echo ${UNAME_MACHINE}-pc-syllable
1057 exit ;; 1048 exit ;;
1058 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 1049 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1059 echo i386-unknown-lynxos${UNAME_RELEASE} 1050 echo i386-unknown-lynxos${UNAME_RELEASE}
1060 exit ;; 1051 exit ;;
1061 i*86:*DOS:*:*) 1052 i*86:*DOS:*:*)
@@ -1099,8 +1090,11 @@ EOF
1099 pc:*:*:*) 1090 pc:*:*:*)
1100 # Left here for compatibility: 1091 # Left here for compatibility:
1101 # uname -m prints for DJGPP always 'pc', but it prints nothing about 1092 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1102 # the processor, so we play safe by assuming i386. 1093 # the processor, so we play safe by assuming i586.
1103 echo i386-pc-msdosdjgpp 1094 # Note: whatever this is, it MUST be the same as what config.sub
1095 # prints for the "djgpp" host, or else GDB configury will decide that
1096 # this is a cross-build.
1097 echo i586-pc-msdosdjgpp
1104 exit ;; 1098 exit ;;
1105 Intel:Mach:3*:*) 1099 Intel:Mach:3*:*)
1106 echo i386-pc-mach3 1100 echo i386-pc-mach3
@@ -1138,6 +1132,16 @@ EOF
1138 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1132 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1139 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1133 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1140 && { echo i486-ncr-sysv4; exit; } ;; 1134 && { echo i486-ncr-sysv4; exit; } ;;
1135 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1136 OS_REL='.3'
1137 test -r /etc/.relid \
1138 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1139 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1140 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1141 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1142 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1143 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1144 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1141 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1145 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1142 echo m68k-unknown-lynxos${UNAME_RELEASE} 1146 echo m68k-unknown-lynxos${UNAME_RELEASE}
1143 exit ;; 1147 exit ;;
@@ -1150,7 +1154,7 @@ EOF
1150 rs6000:LynxOS:2.*:*) 1154 rs6000:LynxOS:2.*:*)
1151 echo rs6000-unknown-lynxos${UNAME_RELEASE} 1155 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1152 exit ;; 1156 exit ;;
1153 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 1157 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1154 echo powerpc-unknown-lynxos${UNAME_RELEASE} 1158 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1155 exit ;; 1159 exit ;;
1156 SM[BE]S:UNIX_SV:*:*) 1160 SM[BE]S:UNIX_SV:*:*)
@@ -1324,6 +1328,9 @@ EOF
1324 i*86:rdos:*:*) 1328 i*86:rdos:*:*)
1325 echo ${UNAME_MACHINE}-pc-rdos 1329 echo ${UNAME_MACHINE}-pc-rdos
1326 exit ;; 1330 exit ;;
1331 i*86:AROS:*:*)
1332 echo ${UNAME_MACHINE}-pc-aros
1333 exit ;;
1327esac 1334esac
1328 1335
1329#echo '(No uname command or uname output not recognized.)' 1>&2 1336#echo '(No uname command or uname output not recognized.)' 1>&2