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