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
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, 2011, 2012
61
Free 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."
144
145
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
146
147
# NetBSD (nbsd) targets should (where applicable) match one or
147
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
148
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
148
149
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
149
150
# switched to ELF, *-*-netbsd* would select the old
150
151
# object file format. This provides both forward
269
270
# A Xn.n version is an unreleased experimental baselevel.
270
271
# 1.2 uses "1.2" for uname -r.
271
272
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
273
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
273
277
Alpha\ *:Windows_NT*:*)
274
278
# How do we know it's Interix rather than the generic POSIX subsystem?
275
279
# Should we change UNAME_MACHINE based on the output of uname instead
394
398
# MiNT. But MiNT is downward compatible to TOS, so this should
396
400
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
397
echo m68k-atari-mint${UNAME_RELEASE}
401
echo m68k-atari-mint${UNAME_RELEASE}
399
403
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
400
404
echo m68k-atari-mint${UNAME_RELEASE}
402
406
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
403
echo m68k-atari-mint${UNAME_RELEASE}
407
echo m68k-atari-mint${UNAME_RELEASE}
405
409
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
406
echo m68k-milan-mint${UNAME_RELEASE}
410
echo m68k-milan-mint${UNAME_RELEASE}
408
412
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
409
echo m68k-hades-mint${UNAME_RELEASE}
413
echo m68k-hades-mint${UNAME_RELEASE}
411
415
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
412
echo m68k-unknown-mint${UNAME_RELEASE}
416
echo m68k-unknown-mint${UNAME_RELEASE}
414
418
m68k:machten:*:*)
415
419
echo m68k-apple-machten${UNAME_RELEASE}
480
484
echo m88k-motorola-sysv3
483
# DG/UX returns AViiON for all architectures
484
UNAME_PROCESSOR=`/usr/bin/uname -p`
487
# DG/UX returns AViiON for all architectures
488
UNAME_PROCESSOR=`/usr/bin/uname -p`
485
489
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
487
491
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
594
598
9000/[678][0-9][0-9])
595
599
if [ -x /usr/bin/getconf ]; then
596
600
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" ;;
601
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
602
case "${sc_cpu_version}" in
603
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
604
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
605
532) # CPU_PA_RISC2_0
606
case "${sc_kernel_bits}" in
607
32) HP_ARCH="hppa2.0n" ;;
608
64) HP_ARCH="hppa2.0w" ;;
605
609
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
609
613
if [ "${HP_ARCH}" = "" ]; then
610
614
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;
615
sed 's/^ //' << EOF >$dummy.c
623
#if defined(_SC_KERNEL_BITS)
624
long bits = sysconf(_SC_KERNEL_BITS);
626
long cpu = sysconf (_SC_CPU_VERSION);
630
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
631
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
633
#if defined(_SC_KERNEL_BITS)
636
case 64: puts ("hppa2.0w"); break;
637
case 32: puts ("hppa2.0n"); break;
638
default: puts ("hppa2.0"); break;
640
#else /* !defined(_SC_KERNEL_BITS) */
641
puts ("hppa2.0"); break;
643
default: puts ("hppa1.0"); break;
644
648
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
645
649
test -z "$HP_ARCH" && HP_ARCH=hppa
731
735
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
732
736
echo c1-convex-bsd
734
738
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
735
739
if getsysinfo -f scalar_acc
736
740
then echo c32-convex-bsd
737
741
else echo c2-convex-bsd
740
744
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
741
745
echo c34-convex-bsd
743
747
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
744
748
echo c38-convex-bsd
746
750
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
747
751
echo c4-convex-bsd
750
754
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
770
774
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
771
775
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}"
776
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
777
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
778
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
776
780
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}"
781
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
782
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
783
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
781
785
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
782
786
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
788
792
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
791
case ${UNAME_MACHINE} in
793
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
795
UNAME_PROCESSOR=`/usr/bin/uname -p`
796
case ${UNAME_PROCESSOR} in
795
798
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
797
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
800
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
804
807
echo ${UNAME_MACHINE}-pc-mingw32
810
echo ${UNAME_MACHINE}-pc-msys
807
# uname -m includes "-pc" on this system.
808
echo ${UNAME_MACHINE}-mingw32
813
# uname -m includes "-pc" on this system.
814
echo ${UNAME_MACHINE}-mingw32
811
817
echo ${UNAME_MACHINE}-pc-pw32
814
case ${UNAME_MACHINE} in
820
case ${UNAME_MACHINE} in
816
822
echo i586-pc-interix${UNAME_RELEASE}
866
872
EV6) UNAME_MACHINE=alphaev6 ;;
867
873
EV67) UNAME_MACHINE=alphaev67 ;;
868
874
EV68*) UNAME_MACHINE=alphaev68 ;;
870
876
objdump --private-headers /bin/sh | grep -q ld.so.1
871
877
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
872
878
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
879
885
echo ${UNAME_MACHINE}-unknown-linux-gnu
881
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
887
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
888
| grep -q __ARM_PCS_VFP
890
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
892
echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
884
896
avr32*:Linux:*:*)
885
897
echo ${UNAME_MACHINE}-unknown-linux-gnu
888
echo cris-axis-linux-gnu
900
echo ${UNAME_MACHINE}-axis-linux-gnu
890
902
crisv32:Linux:*:*)
891
echo crisv32-axis-linux-gnu
903
echo ${UNAME_MACHINE}-axis-linux-gnu
894
echo frv-unknown-linux-gnu
906
echo ${UNAME_MACHINE}-unknown-linux-gnu
909
echo ${UNAME_MACHINE}-unknown-linux-gnu
967
982
sparc:Linux:*:* | sparc64:Linux:*:*)
968
983
echo ${UNAME_MACHINE}-unknown-linux-gnu
986
echo ${UNAME_MACHINE}-unknown-linux-gnu
971
989
echo ${UNAME_MACHINE}-dec-linux-gnu
973
991
x86_64:Linux:*:*)
974
echo x86_64-unknown-linux-gnu
992
echo ${UNAME_MACHINE}-unknown-linux-gnu
976
994
xtensa*:Linux:*:*)
977
echo ${UNAME_MACHINE}-unknown-linux-gnu
995
echo ${UNAME_MACHINE}-unknown-linux-gnu
979
997
i*86:DYNIX/ptx:4*:*)
980
998
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
983
1001
echo i386-sequent-sysv4
985
1003
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,
1004
# Unixware is an offshoot of SVR4, but it has its own version
1005
# number series starting with 2...
1006
# I am not positive that other SVR4 systems won't match this,
989
1007
# I just have to hope. -- rms.
990
# Use sysv4.2uw... so that sysv4* matches it.
1008
# Use sysv4.2uw... so that sysv4* matches it.
991
1009
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1021
1039
i*86:*:5:[678]*)
1022
# UnixWare 7.x, OpenUNIX and OpenServer 6.
1040
# UnixWare 7.x, OpenUNIX and OpenServer 6.
1023
1041
case `/bin/uname -X | grep "^Machine"` in
1024
1042
*486*) UNAME_MACHINE=i486 ;;
1025
1043
*Pentium) UNAME_MACHINE=i586 ;;
1049
1067
# 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.
1068
# uname -m prints for DJGPP always 'pc', but it prints nothing about
1069
# the processor, so we play safe by assuming i586.
1052
1070
# Note: whatever this is, it MUST be the same as what config.sub
1053
1071
# prints for the "djgpp" host, or else GDB configury will decide that
1054
1072
# this is a cross-build.
1055
1073
echo i586-pc-msdosdjgpp
1057
1075
Intel:Mach:3*:*)
1058
1076
echo i386-pc-mach3
1088
1106
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1089
1107
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1090
1108
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; } ;;
1109
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1110
&& { echo i486-ncr-sysv4; exit; } ;;
1093
1111
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1095
1113
test -r /etc/.relid \
1132
1150
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
1153
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1154
# says <Richard.M.Bartel@ccMail.Census.GOV>
1155
echo i586-unisys-sysv4
1139
1157
*:UNIX_System_V:4*:FTX*)
1140
1158
# From Gerald Hewes <hewes@openmarket.com>.
1141
1159
# How about differentiating between stratus architectures? -djm
1162
1180
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1163
1181
if [ -d /usr/nec ]; then
1164
echo mips-nec-sysv${UNAME_RELEASE}
1182
echo mips-nec-sysv${UNAME_RELEASE}
1166
echo mips-unknown-sysv${UNAME_RELEASE}
1184
echo mips-unknown-sysv${UNAME_RELEASE}
1169
1187
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1170
1188
echo powerpc-be-beos
1275
1296
echo pdp10-unknown-its
1278
echo mips-sei-seiux${UNAME_RELEASE}
1299
echo mips-sei-seiux${UNAME_RELEASE}
1280
1301
*:DragonFly:*:*)
1281
1302
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1284
UNAME_MACHINE=`(uname -p) 2>/dev/null`
1305
UNAME_MACHINE=`(uname -p) 2>/dev/null`
1285
1306
case "${UNAME_MACHINE}" in
1286
1307
A*) echo alpha-dec-vms ; exit ;;
1287
1308
I*) echo ia64-dec-vms ; exit ;;