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, 2007, 2008, 2009
5
# Free Software Foundation, Inc.
4
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5
# 2011, 2012 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
17
17
# General Public License for more details.
19
19
# You should have received a copy of the GNU General Public License
20
# along with this program; if not, write to the Free Software
21
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
20
# along with this program; if not, see <http://www.gnu.org/licenses/>.
24
22
# As a special exception to the GNU General Public License, if you
25
23
# distribute this file as part of a program that contains a
56
54
GNU config.guess ($timestamp)
58
56
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.
57
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
58
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
59
Free Software Foundation, Inc.
62
61
This is free software; see the source for copying conditions. There is NO
63
62
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
144
143
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
146
145
# NetBSD (nbsd) targets should (where applicable) match one or
147
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
146
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
148
147
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
149
148
# switched to ELF, *-*-netbsd* would select the old
150
149
# object file format. This provides both forward
269
268
# A Xn.n version is an unreleased experimental baselevel.
270
269
# 1.2 uses "1.2" for uname -r.
271
270
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
271
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
273
275
Alpha\ *:Windows_NT*:*)
274
276
# How do we know it's Interix rather than the generic POSIX subsystem?
275
277
# Should we change UNAME_MACHINE based on the output of uname instead
394
396
# MiNT. But MiNT is downward compatible to TOS, so this should
396
398
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
397
echo m68k-atari-mint${UNAME_RELEASE}
399
echo m68k-atari-mint${UNAME_RELEASE}
399
401
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
400
402
echo m68k-atari-mint${UNAME_RELEASE}
402
404
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
403
echo m68k-atari-mint${UNAME_RELEASE}
405
echo m68k-atari-mint${UNAME_RELEASE}
405
407
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
406
echo m68k-milan-mint${UNAME_RELEASE}
408
echo m68k-milan-mint${UNAME_RELEASE}
408
410
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
409
echo m68k-hades-mint${UNAME_RELEASE}
411
echo m68k-hades-mint${UNAME_RELEASE}
411
413
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
412
echo m68k-unknown-mint${UNAME_RELEASE}
414
echo m68k-unknown-mint${UNAME_RELEASE}
414
416
m68k:machten:*:*)
415
417
echo m68k-apple-machten${UNAME_RELEASE}
480
482
echo m88k-motorola-sysv3
483
# DG/UX returns AViiON for all architectures
484
UNAME_PROCESSOR=`/usr/bin/uname -p`
485
# DG/UX returns AViiON for all architectures
486
UNAME_PROCESSOR=`/usr/bin/uname -p`
485
487
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
487
489
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
594
596
9000/[678][0-9][0-9])
595
597
if [ -x /usr/bin/getconf ]; then
596
598
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
597
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
598
case "${sc_cpu_version}" in
599
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
600
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
601
532) # CPU_PA_RISC2_0
602
case "${sc_kernel_bits}" in
603
32) HP_ARCH="hppa2.0n" ;;
604
64) HP_ARCH="hppa2.0w" ;;
599
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
600
case "${sc_cpu_version}" in
601
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
602
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
603
532) # CPU_PA_RISC2_0
604
case "${sc_kernel_bits}" in
605
32) HP_ARCH="hppa2.0n" ;;
606
64) HP_ARCH="hppa2.0w" ;;
605
607
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
609
611
if [ "${HP_ARCH}" = "" ]; then
610
612
eval $set_cc_for_build
611
sed 's/^ //' << EOF >$dummy.c
619
#if defined(_SC_KERNEL_BITS)
620
long bits = sysconf(_SC_KERNEL_BITS);
622
long cpu = sysconf (_SC_CPU_VERSION);
626
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
627
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
629
#if defined(_SC_KERNEL_BITS)
632
case 64: puts ("hppa2.0w"); break;
633
case 32: puts ("hppa2.0n"); break;
634
default: puts ("hppa2.0"); break;
636
#else /* !defined(_SC_KERNEL_BITS) */
637
puts ("hppa2.0"); break;
639
default: puts ("hppa1.0"); break;
613
sed 's/^ //' << EOF >$dummy.c
621
#if defined(_SC_KERNEL_BITS)
622
long bits = sysconf(_SC_KERNEL_BITS);
624
long cpu = sysconf (_SC_CPU_VERSION);
628
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
629
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
631
#if defined(_SC_KERNEL_BITS)
634
case 64: puts ("hppa2.0w"); break;
635
case 32: puts ("hppa2.0n"); break;
636
default: puts ("hppa2.0"); break;
638
#else /* !defined(_SC_KERNEL_BITS) */
639
puts ("hppa2.0"); break;
641
default: puts ("hppa1.0"); break;
644
646
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
645
647
test -z "$HP_ARCH" && HP_ARCH=hppa
731
733
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
732
734
echo c1-convex-bsd
734
736
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
735
737
if getsysinfo -f scalar_acc
736
738
then echo c32-convex-bsd
737
739
else echo c2-convex-bsd
740
742
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
741
743
echo c34-convex-bsd
743
745
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
744
746
echo c38-convex-bsd
746
748
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
747
749
echo c4-convex-bsd
750
752
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
770
772
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
771
773
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
772
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
773
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
774
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
774
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
775
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
776
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
776
778
5000:UNIX_System_V:4.*:*)
777
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
778
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
779
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
779
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
780
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
781
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
781
783
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
782
784
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
788
790
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
791
case ${UNAME_MACHINE} in
793
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
793
UNAME_PROCESSOR=`/usr/bin/uname -p`
794
case ${UNAME_PROCESSOR} in
795
796
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
797
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
798
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
804
805
echo ${UNAME_MACHINE}-pc-mingw32
808
echo ${UNAME_MACHINE}-pc-msys
807
# uname -m includes "-pc" on this system.
808
echo ${UNAME_MACHINE}-mingw32
811
# uname -m includes "-pc" on this system.
812
echo ${UNAME_MACHINE}-mingw32
811
815
echo ${UNAME_MACHINE}-pc-pw32
814
case ${UNAME_MACHINE} in
818
case ${UNAME_MACHINE} in
816
820
echo i586-pc-interix${UNAME_RELEASE}
866
877
EV6) UNAME_MACHINE=alphaev6 ;;
867
878
EV67) UNAME_MACHINE=alphaev67 ;;
868
879
EV68*) UNAME_MACHINE=alphaev68 ;;
870
881
objdump --private-headers /bin/sh | grep -q ld.so.1
871
882
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
872
883
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
879
890
echo ${UNAME_MACHINE}-unknown-linux-gnu
881
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
892
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
893
| grep -q __ARM_PCS_VFP
895
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
897
echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
884
901
avr32*:Linux:*:*)
885
902
echo ${UNAME_MACHINE}-unknown-linux-gnu
888
echo cris-axis-linux-gnu
905
echo ${UNAME_MACHINE}-axis-linux-gnu
890
907
crisv32:Linux:*:*)
891
echo crisv32-axis-linux-gnu
908
echo ${UNAME_MACHINE}-axis-linux-gnu
894
echo frv-unknown-linux-gnu
911
echo ${UNAME_MACHINE}-unknown-linux-gnu
914
echo ${UNAME_MACHINE}-unknown-linux-gnu
967
987
sparc:Linux:*:* | sparc64:Linux:*:*)
968
988
echo ${UNAME_MACHINE}-unknown-linux-gnu
991
echo ${UNAME_MACHINE}-unknown-linux-gnu
971
994
echo ${UNAME_MACHINE}-dec-linux-gnu
973
996
x86_64:Linux:*:*)
974
echo x86_64-unknown-linux-gnu
997
echo ${UNAME_MACHINE}-unknown-linux-gnu
976
999
xtensa*:Linux:*:*)
977
echo ${UNAME_MACHINE}-unknown-linux-gnu
1000
echo ${UNAME_MACHINE}-unknown-linux-gnu
979
1002
i*86:DYNIX/ptx:4*:*)
980
1003
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
983
1006
echo i386-sequent-sysv4
985
1008
i*86:UNIX_SV:4.2MP:2.*)
986
# Unixware is an offshoot of SVR4, but it has its own version
987
# number series starting with 2...
988
# I am not positive that other SVR4 systems won't match this,
1009
# Unixware is an offshoot of SVR4, but it has its own version
1010
# number series starting with 2...
1011
# I am not positive that other SVR4 systems won't match this,
989
1012
# I just have to hope. -- rms.
990
# Use sysv4.2uw... so that sysv4* matches it.
1013
# Use sysv4.2uw... so that sysv4* matches it.
991
1014
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1021
1044
i*86:*:5:[678]*)
1022
# UnixWare 7.x, OpenUNIX and OpenServer 6.
1045
# UnixWare 7.x, OpenUNIX and OpenServer 6.
1023
1046
case `/bin/uname -X | grep "^Machine"` in
1024
1047
*486*) UNAME_MACHINE=i486 ;;
1025
1048
*Pentium) UNAME_MACHINE=i586 ;;
1049
1072
# Left here for compatibility:
1050
# uname -m prints for DJGPP always 'pc', but it prints nothing about
1051
# the processor, so we play safe by assuming i586.
1073
# uname -m prints for DJGPP always 'pc', but it prints nothing about
1074
# the processor, so we play safe by assuming i586.
1052
1075
# Note: whatever this is, it MUST be the same as what config.sub
1053
1076
# prints for the "djgpp" host, or else GDB configury will decide that
1054
1077
# this is a cross-build.
1055
1078
echo i586-pc-msdosdjgpp
1057
1080
Intel:Mach:3*:*)
1058
1081
echo i386-pc-mach3
1088
1111
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1089
1112
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1090
1113
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1091
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1092
&& { echo i486-ncr-sysv4; exit; } ;;
1114
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1115
&& { echo i486-ncr-sysv4; exit; } ;;
1093
1116
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1095
1118
test -r /etc/.relid \
1132
1155
echo ns32k-sni-sysv
1135
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1136
# says <Richard.M.Bartel@ccMail.Census.GOV>
1137
echo i586-unisys-sysv4
1158
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1159
# says <Richard.M.Bartel@ccMail.Census.GOV>
1160
echo i586-unisys-sysv4
1139
1162
*:UNIX_System_V:4*:FTX*)
1140
1163
# From Gerald Hewes <hewes@openmarket.com>.
1141
1164
# How about differentiating between stratus architectures? -djm
1162
1185
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1163
1186
if [ -d /usr/nec ]; then
1164
echo mips-nec-sysv${UNAME_RELEASE}
1187
echo mips-nec-sysv${UNAME_RELEASE}
1166
echo mips-unknown-sysv${UNAME_RELEASE}
1189
echo mips-unknown-sysv${UNAME_RELEASE}
1169
1192
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1170
1193
echo powerpc-be-beos
1275
1301
echo pdp10-unknown-its
1278
echo mips-sei-seiux${UNAME_RELEASE}
1304
echo mips-sei-seiux${UNAME_RELEASE}
1280
1306
*:DragonFly:*:*)
1281
1307
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1284
UNAME_MACHINE=`(uname -p) 2>/dev/null`
1310
UNAME_MACHINE=`(uname -p) 2>/dev/null`
1285
1311
case "${UNAME_MACHINE}" in
1286
1312
A*) echo alpha-dec-vms ; exit ;;
1287
1313
I*) echo ia64-dec-vms ; exit ;;