summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfig.guess475
-rwxr-xr-xconfig.sub130
2 files changed, 274 insertions, 331 deletions
diff --git a/config.guess b/config.guess
index c5636280d..c4bd827a7 100755
--- a/config.guess
+++ b/config.guess
@@ -1,14 +1,12 @@
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 1992-2016 Free Software Foundation, Inc.
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5# 2011, 2012, 2013 Free Software Foundation, Inc.
6 4
7timestamp='2012-12-23' 5timestamp='2016-05-15'
8 6
9# This file is free software; you can redistribute it and/or modify it 7# 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 8# under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 2 of the License, or 9# the Free Software Foundation; either version 3 of the License, or
12# (at your option) any later version. 10# (at your option) any later version.
13# 11#
14# This program is distributed in the hope that it will be useful, but 12# This program is distributed in the hope that it will be useful, but
@@ -22,19 +20,17 @@ timestamp='2012-12-23'
22# As a special exception to the GNU General Public License, if you 20# As a special exception to the GNU General Public License, if you
23# distribute this file as part of a program that contains a 21# distribute this file as part of a program that contains a
24# configuration script generated by Autoconf, you may include it under 22# configuration script generated by Autoconf, you may include it under
25# the same distribution terms that you use for the rest of that program. 23# the same distribution terms that you use for the rest of that
26 24# program. This Exception is an additional permission under section 7
27 25# of the GNU General Public License, version 3 ("GPLv3").
28# Originally written by Per Bothner. Please send patches (context
29# diff format) to <config-patches@gnu.org> and include a ChangeLog
30# entry.
31# 26#
32# This script attempts to guess a canonical system name similar to 27# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
33# config.sub. If it succeeds, it prints the system name on stdout, and
34# exits with 0. Otherwise, it exits with 1.
35# 28#
36# You can get the latest version of this script from: 29# You can get the latest version of this script from:
37# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 30# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
31#
32# Please send patches to <config-patches@gnu.org>.
33
38 34
39me=`echo "$0" | sed -e 's,.*/,,'` 35me=`echo "$0" | sed -e 's,.*/,,'`
40 36
@@ -54,9 +50,7 @@ version="\
54GNU config.guess ($timestamp) 50GNU config.guess ($timestamp)
55 51
56Originally written by Per Bothner. 52Originally written by Per Bothner.
57Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 53Copyright 1992-2016 Free Software Foundation, Inc.
582001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
592012, 2013 Free Software Foundation, Inc.
60 54
61This is free software; see the source for copying conditions. There is NO 55This is free software; see the source for copying conditions. There is NO
62warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 56warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
138UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 132UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
139UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 133UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
140 134
135case "${UNAME_SYSTEM}" in
136Linux|GNU|GNU/*)
137 # If the system lacks a compiler, then just pick glibc.
138 # We could probably try harder.
139 LIBC=gnu
140
141 eval $set_cc_for_build
142 cat <<-EOF > $dummy.c
143 #include <features.h>
144 #if defined(__UCLIBC__)
145 LIBC=uclibc
146 #elif defined(__dietlibc__)
147 LIBC=dietlibc
148 #else
149 LIBC=gnu
150 #endif
151 EOF
152 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
153 ;;
154esac
155
141# Note: order is significant - the case branches are not exclusive. 156# Note: order is significant - the case branches are not exclusive.
142 157
143case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 158case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -153,19 +168,29 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
153 # Note: NetBSD doesn't particularly care about the vendor 168 # Note: NetBSD doesn't particularly care about the vendor
154 # portion of the name. We always set it to "unknown". 169 # portion of the name. We always set it to "unknown".
155 sysctl="sysctl -n hw.machine_arch" 170 sysctl="sysctl -n hw.machine_arch"
156 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 171 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
157 /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 172 /sbin/$sysctl 2>/dev/null || \
173 /usr/sbin/$sysctl 2>/dev/null || \
174 echo unknown)`
158 case "${UNAME_MACHINE_ARCH}" in 175 case "${UNAME_MACHINE_ARCH}" in
159 armeb) machine=armeb-unknown ;; 176 armeb) machine=armeb-unknown ;;
160 arm*) machine=arm-unknown ;; 177 arm*) machine=arm-unknown ;;
161 sh3el) machine=shl-unknown ;; 178 sh3el) machine=shl-unknown ;;
162 sh3eb) machine=sh-unknown ;; 179 sh3eb) machine=sh-unknown ;;
163 sh5el) machine=sh5le-unknown ;; 180 sh5el) machine=sh5le-unknown ;;
181 earmv*)
182 arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
183 endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
184 machine=${arch}${endian}-unknown
185 ;;
164 *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 186 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
165 esac 187 esac
166 # The Operating System including object format, if it has switched 188 # The Operating System including object format, if it has switched
167 # to ELF recently, or will in the future. 189 # to ELF recently (or will in the future) and ABI.
168 case "${UNAME_MACHINE_ARCH}" in 190 case "${UNAME_MACHINE_ARCH}" in
191 earm*)
192 os=netbsdelf
193 ;;
169 arm*|i386|m68k|ns32k|sh3*|sparc|vax) 194 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
170 eval $set_cc_for_build 195 eval $set_cc_for_build
171 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 196 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -182,6 +207,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
182 os=netbsd 207 os=netbsd
183 ;; 208 ;;
184 esac 209 esac
210 # Determine ABI tags.
211 case "${UNAME_MACHINE_ARCH}" in
212 earm*)
213 expr='s/^earmv[0-9]/-eabi/;s/eb$//'
214 abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
215 ;;
216 esac
185 # The OS release 217 # The OS release
186 # Debian GNU/NetBSD machines have a different userland, and 218 # Debian GNU/NetBSD machines have a different userland, and
187 # thus, need a distinct triplet. However, they do not need 219 # thus, need a distinct triplet. However, they do not need
@@ -192,13 +224,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
192 release='-gnu' 224 release='-gnu'
193 ;; 225 ;;
194 *) 226 *)
195 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 227 release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
196 ;; 228 ;;
197 esac 229 esac
198 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 230 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
199 # contains redundant information, the shorter form: 231 # contains redundant information, the shorter form:
200 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 232 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
201 echo "${machine}-${os}${release}" 233 echo "${machine}-${os}${release}${abi}"
202 exit ;; 234 exit ;;
203 *:Bitrig:*:*) 235 *:Bitrig:*:*)
204 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` 236 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
@@ -208,6 +240,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
208 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 240 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
209 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 241 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
210 exit ;; 242 exit ;;
243 *:LibertyBSD:*:*)
244 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
245 echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
246 exit ;;
211 *:ekkoBSD:*:*) 247 *:ekkoBSD:*:*)
212 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 248 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
213 exit ;; 249 exit ;;
@@ -220,6 +256,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
220 *:MirBSD:*:*) 256 *:MirBSD:*:*)
221 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 257 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
222 exit ;; 258 exit ;;
259 *:Sortix:*:*)
260 echo ${UNAME_MACHINE}-unknown-sortix
261 exit ;;
223 alpha:OSF1:*:*) 262 alpha:OSF1:*:*)
224 case $UNAME_RELEASE in 263 case $UNAME_RELEASE in
225 *4.0) 264 *4.0)
@@ -236,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
236 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 275 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
237 case "$ALPHA_CPU_TYPE" in 276 case "$ALPHA_CPU_TYPE" in
238 "EV4 (21064)") 277 "EV4 (21064)")
239 UNAME_MACHINE="alpha" ;; 278 UNAME_MACHINE=alpha ;;
240 "EV4.5 (21064)") 279 "EV4.5 (21064)")
241 UNAME_MACHINE="alpha" ;; 280 UNAME_MACHINE=alpha ;;
242 "LCA4 (21066/21068)") 281 "LCA4 (21066/21068)")
243 UNAME_MACHINE="alpha" ;; 282 UNAME_MACHINE=alpha ;;
244 "EV5 (21164)") 283 "EV5 (21164)")
245 UNAME_MACHINE="alphaev5" ;; 284 UNAME_MACHINE=alphaev5 ;;
246 "EV5.6 (21164A)") 285 "EV5.6 (21164A)")
247 UNAME_MACHINE="alphaev56" ;; 286 UNAME_MACHINE=alphaev56 ;;
248 "EV5.6 (21164PC)") 287 "EV5.6 (21164PC)")
249 UNAME_MACHINE="alphapca56" ;; 288 UNAME_MACHINE=alphapca56 ;;
250 "EV5.7 (21164PC)") 289 "EV5.7 (21164PC)")
251 UNAME_MACHINE="alphapca57" ;; 290 UNAME_MACHINE=alphapca57 ;;
252 "EV6 (21264)") 291 "EV6 (21264)")
253 UNAME_MACHINE="alphaev6" ;; 292 UNAME_MACHINE=alphaev6 ;;
254 "EV6.7 (21264A)") 293 "EV6.7 (21264A)")
255 UNAME_MACHINE="alphaev67" ;; 294 UNAME_MACHINE=alphaev67 ;;
256 "EV6.8CB (21264C)") 295 "EV6.8CB (21264C)")
257 UNAME_MACHINE="alphaev68" ;; 296 UNAME_MACHINE=alphaev68 ;;
258 "EV6.8AL (21264B)") 297 "EV6.8AL (21264B)")
259 UNAME_MACHINE="alphaev68" ;; 298 UNAME_MACHINE=alphaev68 ;;
260 "EV6.8CX (21264D)") 299 "EV6.8CX (21264D)")
261 UNAME_MACHINE="alphaev68" ;; 300 UNAME_MACHINE=alphaev68 ;;
262 "EV6.9A (21264/EV69A)") 301 "EV6.9A (21264/EV69A)")
263 UNAME_MACHINE="alphaev69" ;; 302 UNAME_MACHINE=alphaev69 ;;
264 "EV7 (21364)") 303 "EV7 (21364)")
265 UNAME_MACHINE="alphaev7" ;; 304 UNAME_MACHINE=alphaev7 ;;
266 "EV7.9 (21364A)") 305 "EV7.9 (21364A)")
267 UNAME_MACHINE="alphaev79" ;; 306 UNAME_MACHINE=alphaev79 ;;
268 esac 307 esac
269 # A Pn.n version is a patched version. 308 # A Pn.n version is a patched version.
270 # A Vn.n version is a released version. 309 # A Vn.n version is a released version.
271 # A Tn.n version is a released field test version. 310 # A Tn.n version is a released field test version.
272 # A Xn.n version is an unreleased experimental baselevel. 311 # A Xn.n version is an unreleased experimental baselevel.
273 # 1.2 uses "1.2" for uname -r. 312 # 1.2 uses "1.2" for uname -r.
274 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 313 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
275 # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 314 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
276 exitcode=$? 315 exitcode=$?
277 trap '' 0 316 trap '' 0
@@ -344,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
344 exit ;; 383 exit ;;
345 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 384 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
346 eval $set_cc_for_build 385 eval $set_cc_for_build
347 SUN_ARCH="i386" 386 SUN_ARCH=i386
348 # If there is a compiler, see if it is configured for 64-bit objects. 387 # If there is a compiler, see if it is configured for 64-bit objects.
349 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 388 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
350 # This test works for both compilers. 389 # This test works for both compilers.
351 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 390 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
352 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 391 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
353 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 392 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
354 grep IS_64BIT_ARCH >/dev/null 393 grep IS_64BIT_ARCH >/dev/null
355 then 394 then
356 SUN_ARCH="x86_64" 395 SUN_ARCH=x86_64
357 fi 396 fi
358 fi 397 fi
359 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 398 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -378,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
378 exit ;; 417 exit ;;
379 sun*:*:4.2BSD:*) 418 sun*:*:4.2BSD:*)
380 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 419 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
381 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 420 test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
382 case "`/bin/arch`" in 421 case "`/bin/arch`" in
383 sun3) 422 sun3)
384 echo m68k-sun-sunos${UNAME_RELEASE} 423 echo m68k-sun-sunos${UNAME_RELEASE}
@@ -564,8 +603,9 @@ EOF
564 else 603 else
565 IBM_ARCH=powerpc 604 IBM_ARCH=powerpc
566 fi 605 fi
567 if [ -x /usr/bin/oslevel ] ; then 606 if [ -x /usr/bin/lslpp ] ; then
568 IBM_REV=`/usr/bin/oslevel` 607 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
608 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
569 else 609 else
570 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 610 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
571 fi 611 fi
@@ -602,13 +642,13 @@ EOF
602 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 642 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
603 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 643 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
604 case "${sc_cpu_version}" in 644 case "${sc_cpu_version}" in
605 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 645 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
606 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 646 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
607 532) # CPU_PA_RISC2_0 647 532) # CPU_PA_RISC2_0
608 case "${sc_kernel_bits}" in 648 case "${sc_kernel_bits}" in
609 32) HP_ARCH="hppa2.0n" ;; 649 32) HP_ARCH=hppa2.0n ;;
610 64) HP_ARCH="hppa2.0w" ;; 650 64) HP_ARCH=hppa2.0w ;;
611 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 651 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
612 esac ;; 652 esac ;;
613 esac 653 esac
614 fi 654 fi
@@ -647,11 +687,11 @@ EOF
647 exit (0); 687 exit (0);
648 } 688 }
649EOF 689EOF
650 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 690 (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
651 test -z "$HP_ARCH" && HP_ARCH=hppa 691 test -z "$HP_ARCH" && HP_ARCH=hppa
652 fi ;; 692 fi ;;
653 esac 693 esac
654 if [ ${HP_ARCH} = "hppa2.0w" ] 694 if [ ${HP_ARCH} = hppa2.0w ]
655 then 695 then
656 eval $set_cc_for_build 696 eval $set_cc_for_build
657 697
@@ -664,12 +704,12 @@ EOF
664 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 704 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
665 # => hppa64-hp-hpux11.23 705 # => hppa64-hp-hpux11.23
666 706
667 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 707 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
668 grep -q __LP64__ 708 grep -q __LP64__
669 then 709 then
670 HP_ARCH="hppa2.0w" 710 HP_ARCH=hppa2.0w
671 else 711 else
672 HP_ARCH="hppa64" 712 HP_ARCH=hppa64
673 fi 713 fi
674 fi 714 fi
675 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 715 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -774,14 +814,14 @@ EOF
774 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 814 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
775 exit ;; 815 exit ;;
776 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 816 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
777 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 817 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
778 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 818 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
779 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 819 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
780 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 820 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
781 exit ;; 821 exit ;;
782 5000:UNIX_System_V:4.*:*) 822 5000:UNIX_System_V:4.*:*)
783 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 823 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
784 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 824 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
785 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 825 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
786 exit ;; 826 exit ;;
787 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 827 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
@@ -811,7 +851,7 @@ EOF
811 *:MINGW*:*) 851 *:MINGW*:*)
812 echo ${UNAME_MACHINE}-pc-mingw32 852 echo ${UNAME_MACHINE}-pc-mingw32
813 exit ;; 853 exit ;;
814 i*:MSYS*:*) 854 *:MSYS*:*)
815 echo ${UNAME_MACHINE}-pc-msys 855 echo ${UNAME_MACHINE}-pc-msys
816 exit ;; 856 exit ;;
817 i*:windows32*:*) 857 i*:windows32*:*)
@@ -859,21 +899,21 @@ EOF
859 exit ;; 899 exit ;;
860 *:GNU:*:*) 900 *:GNU:*:*)
861 # the GNU system 901 # the GNU system
862 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 902 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
863 exit ;; 903 exit ;;
864 *:GNU/*:*:*) 904 *:GNU/*:*:*)
865 # other systems with GNU libc and userland 905 # other systems with GNU libc and userland
866 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 906 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
867 exit ;; 907 exit ;;
868 i*86:Minix:*:*) 908 i*86:Minix:*:*)
869 echo ${UNAME_MACHINE}-pc-minix 909 echo ${UNAME_MACHINE}-pc-minix
870 exit ;; 910 exit ;;
871 aarch64:Linux:*:*) 911 aarch64:Linux:*:*)
872 echo ${UNAME_MACHINE}-unknown-linux-gnu 912 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
873 exit ;; 913 exit ;;
874 aarch64_be:Linux:*:*) 914 aarch64_be:Linux:*:*)
875 UNAME_MACHINE=aarch64_be 915 UNAME_MACHINE=aarch64_be
876 echo ${UNAME_MACHINE}-unknown-linux-gnu 916 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
877 exit ;; 917 exit ;;
878 alpha:Linux:*:*) 918 alpha:Linux:*:*)
879 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 919 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -886,59 +926,60 @@ EOF
886 EV68*) UNAME_MACHINE=alphaev68 ;; 926 EV68*) UNAME_MACHINE=alphaev68 ;;
887 esac 927 esac
888 objdump --private-headers /bin/sh | grep -q ld.so.1 928 objdump --private-headers /bin/sh | grep -q ld.so.1
889 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 929 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
890 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 930 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
931 exit ;;
932 arc:Linux:*:* | arceb:Linux:*:*)
933 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
891 exit ;; 934 exit ;;
892 arm*:Linux:*:*) 935 arm*:Linux:*:*)
893 eval $set_cc_for_build 936 eval $set_cc_for_build
894 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 937 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
895 | grep -q __ARM_EABI__ 938 | grep -q __ARM_EABI__
896 then 939 then
897 echo ${UNAME_MACHINE}-unknown-linux-gnu 940 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
898 else 941 else
899 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 942 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
900 | grep -q __ARM_PCS_VFP 943 | grep -q __ARM_PCS_VFP
901 then 944 then
902 echo ${UNAME_MACHINE}-unknown-linux-gnueabi 945 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
903 else 946 else
904 echo ${UNAME_MACHINE}-unknown-linux-gnueabihf 947 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
905 fi 948 fi
906 fi 949 fi
907 exit ;; 950 exit ;;
908 avr32*:Linux:*:*) 951 avr32*:Linux:*:*)
909 echo ${UNAME_MACHINE}-unknown-linux-gnu 952 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
910 exit ;; 953 exit ;;
911 cris:Linux:*:*) 954 cris:Linux:*:*)
912 echo ${UNAME_MACHINE}-axis-linux-gnu 955 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
913 exit ;; 956 exit ;;
914 crisv32:Linux:*:*) 957 crisv32:Linux:*:*)
915 echo ${UNAME_MACHINE}-axis-linux-gnu 958 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
959 exit ;;
960 e2k:Linux:*:*)
961 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
916 exit ;; 962 exit ;;
917 frv:Linux:*:*) 963 frv:Linux:*:*)
918 echo ${UNAME_MACHINE}-unknown-linux-gnu 964 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
919 exit ;; 965 exit ;;
920 hexagon:Linux:*:*) 966 hexagon:Linux:*:*)
921 echo ${UNAME_MACHINE}-unknown-linux-gnu 967 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
922 exit ;; 968 exit ;;
923 i*86:Linux:*:*) 969 i*86:Linux:*:*)
924 LIBC=gnu 970 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
925 eval $set_cc_for_build
926 sed 's/^ //' << EOF >$dummy.c
927 #ifdef __dietlibc__
928 LIBC=dietlibc
929 #endif
930EOF
931 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
932 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
933 exit ;; 971 exit ;;
934 ia64:Linux:*:*) 972 ia64:Linux:*:*)
935 echo ${UNAME_MACHINE}-unknown-linux-gnu 973 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
974 exit ;;
975 k1om:Linux:*:*)
976 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
936 exit ;; 977 exit ;;
937 m32r*:Linux:*:*) 978 m32r*:Linux:*:*)
938 echo ${UNAME_MACHINE}-unknown-linux-gnu 979 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
939 exit ;; 980 exit ;;
940 m68*:Linux:*:*) 981 m68*:Linux:*:*)
941 echo ${UNAME_MACHINE}-unknown-linux-gnu 982 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
942 exit ;; 983 exit ;;
943 mips:Linux:*:* | mips64:Linux:*:*) 984 mips:Linux:*:* | mips64:Linux:*:*)
944 eval $set_cc_for_build 985 eval $set_cc_for_build
@@ -957,60 +998,63 @@ EOF
957 #endif 998 #endif
958EOF 999EOF
959 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 1000 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
960 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 1001 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
961 ;; 1002 ;;
962 or32:Linux:*:*) 1003 openrisc*:Linux:*:*)
963 echo ${UNAME_MACHINE}-unknown-linux-gnu 1004 echo or1k-unknown-linux-${LIBC}
1005 exit ;;
1006 or32:Linux:*:* | or1k*:Linux:*:*)
1007 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
964 exit ;; 1008 exit ;;
965 padre:Linux:*:*) 1009 padre:Linux:*:*)
966 echo sparc-unknown-linux-gnu 1010 echo sparc-unknown-linux-${LIBC}
967 exit ;; 1011 exit ;;
968 parisc64:Linux:*:* | hppa64:Linux:*:*) 1012 parisc64:Linux:*:* | hppa64:Linux:*:*)
969 echo hppa64-unknown-linux-gnu 1013 echo hppa64-unknown-linux-${LIBC}
970 exit ;; 1014 exit ;;
971 parisc:Linux:*:* | hppa:Linux:*:*) 1015 parisc:Linux:*:* | hppa:Linux:*:*)
972 # Look for CPU level 1016 # Look for CPU level
973 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 1017 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
974 PA7*) echo hppa1.1-unknown-linux-gnu ;; 1018 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
975 PA8*) echo hppa2.0-unknown-linux-gnu ;; 1019 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
976 *) echo hppa-unknown-linux-gnu ;; 1020 *) echo hppa-unknown-linux-${LIBC} ;;
977 esac 1021 esac
978 exit ;; 1022 exit ;;
979 ppc64:Linux:*:*) 1023 ppc64:Linux:*:*)
980 echo powerpc64-unknown-linux-gnu 1024 echo powerpc64-unknown-linux-${LIBC}
981 exit ;; 1025 exit ;;
982 ppc:Linux:*:*) 1026 ppc:Linux:*:*)
983 echo powerpc-unknown-linux-gnu 1027 echo powerpc-unknown-linux-${LIBC}
984 exit ;; 1028 exit ;;
985 ppc64le:Linux:*:*) 1029 ppc64le:Linux:*:*)
986 echo powerpc64le-unknown-linux-gnu 1030 echo powerpc64le-unknown-linux-${LIBC}
987 exit ;; 1031 exit ;;
988 ppcle:Linux:*:*) 1032 ppcle:Linux:*:*)
989 echo powerpcle-unknown-linux-gnu 1033 echo powerpcle-unknown-linux-${LIBC}
990 exit ;; 1034 exit ;;
991 s390:Linux:*:* | s390x:Linux:*:*) 1035 s390:Linux:*:* | s390x:Linux:*:*)
992 echo ${UNAME_MACHINE}-ibm-linux 1036 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
993 exit ;; 1037 exit ;;
994 sh64*:Linux:*:*) 1038 sh64*:Linux:*:*)
995 echo ${UNAME_MACHINE}-unknown-linux-gnu 1039 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
996 exit ;; 1040 exit ;;
997 sh*:Linux:*:*) 1041 sh*:Linux:*:*)
998 echo ${UNAME_MACHINE}-unknown-linux-gnu 1042 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
999 exit ;; 1043 exit ;;
1000 sparc:Linux:*:* | sparc64:Linux:*:*) 1044 sparc:Linux:*:* | sparc64:Linux:*:*)
1001 echo ${UNAME_MACHINE}-unknown-linux-gnu 1045 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1002 exit ;; 1046 exit ;;
1003 tile*:Linux:*:*) 1047 tile*:Linux:*:*)
1004 echo ${UNAME_MACHINE}-unknown-linux-gnu 1048 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1005 exit ;; 1049 exit ;;
1006 vax:Linux:*:*) 1050 vax:Linux:*:*)
1007 echo ${UNAME_MACHINE}-dec-linux-gnu 1051 echo ${UNAME_MACHINE}-dec-linux-${LIBC}
1008 exit ;; 1052 exit ;;
1009 x86_64:Linux:*:*) 1053 x86_64:Linux:*:*)
1010 echo ${UNAME_MACHINE}-unknown-linux-gnu 1054 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
1011 exit ;; 1055 exit ;;
1012 xtensa*:Linux:*:*) 1056 xtensa*:Linux:*:*)
1013 echo ${UNAME_MACHINE}-unknown-linux-gnu 1057 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1014 exit ;; 1058 exit ;;
1015 i*86:DYNIX/ptx:4*:*) 1059 i*86:DYNIX/ptx:4*:*)
1016 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1060 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1086,7 +1130,7 @@ EOF
1086 # uname -m prints for DJGPP always 'pc', but it prints nothing about 1130 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1087 # the processor, so we play safe by assuming i586. 1131 # the processor, so we play safe by assuming i586.
1088 # Note: whatever this is, it MUST be the same as what config.sub 1132 # Note: whatever this is, it MUST be the same as what config.sub
1089 # prints for the "djgpp" host, or else GDB configury will decide that 1133 # prints for the "djgpp" host, or else GDB configure will decide that
1090 # this is a cross-build. 1134 # this is a cross-build.
1091 echo i586-pc-msdosdjgpp 1135 echo i586-pc-msdosdjgpp
1092 exit ;; 1136 exit ;;
@@ -1235,6 +1279,9 @@ EOF
1235 SX-8R:SUPER-UX:*:*) 1279 SX-8R:SUPER-UX:*:*)
1236 echo sx8r-nec-superux${UNAME_RELEASE} 1280 echo sx8r-nec-superux${UNAME_RELEASE}
1237 exit ;; 1281 exit ;;
1282 SX-ACE:SUPER-UX:*:*)
1283 echo sxace-nec-superux${UNAME_RELEASE}
1284 exit ;;
1238 Power*:Rhapsody:*:*) 1285 Power*:Rhapsody:*:*)
1239 echo powerpc-apple-rhapsody${UNAME_RELEASE} 1286 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1240 exit ;; 1287 exit ;;
@@ -1243,24 +1290,36 @@ EOF
1243 exit ;; 1290 exit ;;
1244 *:Darwin:*:*) 1291 *:Darwin:*:*)
1245 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1292 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1246 case $UNAME_PROCESSOR in 1293 eval $set_cc_for_build
1247 i386) 1294 if test "$UNAME_PROCESSOR" = unknown ; then
1248 eval $set_cc_for_build 1295 UNAME_PROCESSOR=powerpc
1249 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 1296 fi
1250 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1297 if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1251 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 1298 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1252 grep IS_64BIT_ARCH >/dev/null 1299 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1253 then 1300 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1254 UNAME_PROCESSOR="x86_64" 1301 grep IS_64BIT_ARCH >/dev/null
1255 fi 1302 then
1256 fi ;; 1303 case $UNAME_PROCESSOR in
1257 unknown) UNAME_PROCESSOR=powerpc ;; 1304 i386) UNAME_PROCESSOR=x86_64 ;;
1258 esac 1305 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1306 esac
1307 fi
1308 fi
1309 elif test "$UNAME_PROCESSOR" = i386 ; then
1310 # Avoid executing cc on OS X 10.9, as it ships with a stub
1311 # that puts up a graphical alert prompting to install
1312 # developer tools. Any system running Mac OS X 10.7 or
1313 # later (Darwin 11 and later) is required to have a 64-bit
1314 # processor. This is not true of the ARM version of Darwin
1315 # that Apple uses in portable devices.
1316 UNAME_PROCESSOR=x86_64
1317 fi
1259 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1318 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1260 exit ;; 1319 exit ;;
1261 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1320 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1262 UNAME_PROCESSOR=`uname -p` 1321 UNAME_PROCESSOR=`uname -p`
1263 if test "$UNAME_PROCESSOR" = "x86"; then 1322 if test "$UNAME_PROCESSOR" = x86; then
1264 UNAME_PROCESSOR=i386 1323 UNAME_PROCESSOR=i386
1265 UNAME_MACHINE=pc 1324 UNAME_MACHINE=pc
1266 fi 1325 fi
@@ -1291,7 +1350,7 @@ EOF
1291 # "uname -m" is not consistent, so use $cputype instead. 386 1350 # "uname -m" is not consistent, so use $cputype instead. 386
1292 # is converted to i386 for consistency with other x86 1351 # is converted to i386 for consistency with other x86
1293 # operating systems. 1352 # operating systems.
1294 if test "$cputype" = "386"; then 1353 if test "$cputype" = 386; then
1295 UNAME_MACHINE=i386 1354 UNAME_MACHINE=i386
1296 else 1355 else
1297 UNAME_MACHINE="$cputype" 1356 UNAME_MACHINE="$cputype"
@@ -1333,7 +1392,7 @@ EOF
1333 echo i386-pc-xenix 1392 echo i386-pc-xenix
1334 exit ;; 1393 exit ;;
1335 i*86:skyos:*:*) 1394 i*86:skyos:*:*)
1336 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1395 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
1337 exit ;; 1396 exit ;;
1338 i*86:rdos:*:*) 1397 i*86:rdos:*:*)
1339 echo ${UNAME_MACHINE}-pc-rdos 1398 echo ${UNAME_MACHINE}-pc-rdos
@@ -1344,171 +1403,25 @@ EOF
1344 x86_64:VMkernel:*:*) 1403 x86_64:VMkernel:*:*)
1345 echo ${UNAME_MACHINE}-unknown-esx 1404 echo ${UNAME_MACHINE}-unknown-esx
1346 exit ;; 1405 exit ;;
1347esac 1406 amd64:Isilon\ OneFS:*:*)
1348 1407 echo x86_64-unknown-onefs
1349eval $set_cc_for_build
1350cat >$dummy.c <<EOF
1351#ifdef _SEQUENT_
1352# include <sys/types.h>
1353# include <sys/utsname.h>
1354#endif
1355main ()
1356{
1357#if defined (sony)
1358#if defined (MIPSEB)
1359 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1360 I don't know.... */
1361 printf ("mips-sony-bsd\n"); exit (0);
1362#else
1363#include <sys/param.h>
1364 printf ("m68k-sony-newsos%s\n",
1365#ifdef NEWSOS4
1366 "4"
1367#else
1368 ""
1369#endif
1370 ); exit (0);
1371#endif
1372#endif
1373
1374#if defined (__arm) && defined (__acorn) && defined (__unix)
1375 printf ("arm-acorn-riscix\n"); exit (0);
1376#endif
1377
1378#if defined (hp300) && !defined (hpux)
1379 printf ("m68k-hp-bsd\n"); exit (0);
1380#endif
1381
1382#if defined (NeXT)
1383#if !defined (__ARCHITECTURE__)
1384#define __ARCHITECTURE__ "m68k"
1385#endif
1386 int version;
1387 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1388 if (version < 4)
1389 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1390 else
1391 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1392 exit (0);
1393#endif
1394
1395#if defined (MULTIMAX) || defined (n16)
1396#if defined (UMAXV)
1397 printf ("ns32k-encore-sysv\n"); exit (0);
1398#else
1399#if defined (CMU)
1400 printf ("ns32k-encore-mach\n"); exit (0);
1401#else
1402 printf ("ns32k-encore-bsd\n"); exit (0);
1403#endif
1404#endif
1405#endif
1406
1407#if defined (__386BSD__)
1408 printf ("i386-pc-bsd\n"); exit (0);
1409#endif
1410
1411#if defined (sequent)
1412#if defined (i386)
1413 printf ("i386-sequent-dynix\n"); exit (0);
1414#endif
1415#if defined (ns32000)
1416 printf ("ns32k-sequent-dynix\n"); exit (0);
1417#endif
1418#endif
1419
1420#if defined (_SEQUENT_)
1421 struct utsname un;
1422
1423 uname(&un);
1424
1425 if (strncmp(un.version, "V2", 2) == 0) {
1426 printf ("i386-sequent-ptx2\n"); exit (0);
1427 }
1428 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1429 printf ("i386-sequent-ptx1\n"); exit (0);
1430 }
1431 printf ("i386-sequent-ptx\n"); exit (0);
1432
1433#endif
1434
1435#if defined (vax)
1436# if !defined (ultrix)
1437# include <sys/param.h>
1438# if defined (BSD)
1439# if BSD == 43
1440 printf ("vax-dec-bsd4.3\n"); exit (0);
1441# else
1442# if BSD == 199006
1443 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1444# else
1445 printf ("vax-dec-bsd\n"); exit (0);
1446# endif
1447# endif
1448# else
1449 printf ("vax-dec-bsd\n"); exit (0);
1450# endif
1451# else
1452 printf ("vax-dec-ultrix\n"); exit (0);
1453# endif
1454#endif
1455
1456#if defined (alliant) && defined (i860)
1457 printf ("i860-alliant-bsd\n"); exit (0);
1458#endif
1459
1460 exit (1);
1461}
1462EOF
1463
1464$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1465 { echo "$SYSTEM_NAME"; exit; }
1466
1467# Apollos put the system type in the environment.
1468
1469test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1470
1471# Convex versions that predate uname can use getsysinfo(1)
1472
1473if [ -x /usr/convex/getsysinfo ]
1474then
1475 case `getsysinfo -f cpu_type` in
1476 c1*)
1477 echo c1-convex-bsd
1478 exit ;; 1408 exit ;;
1479 c2*) 1409esac
1480 if getsysinfo -f scalar_acc
1481 then echo c32-convex-bsd
1482 else echo c2-convex-bsd
1483 fi
1484 exit ;;
1485 c34*)
1486 echo c34-convex-bsd
1487 exit ;;
1488 c38*)
1489 echo c38-convex-bsd
1490 exit ;;
1491 c4*)
1492 echo c4-convex-bsd
1493 exit ;;
1494 esac
1495fi
1496 1410
1497cat >&2 <<EOF 1411cat >&2 <<EOF
1498$0: unable to guess system type 1412$0: unable to guess system type
1499 1413
1500This script, last modified $timestamp, has failed to recognize 1414This script (version $timestamp), has failed to recognize the
1501the operating system you are using. It is advised that you 1415operating system you are using. If your script is old, overwrite
1502download the most up to date version of the config scripts from 1416config.guess and config.sub with the latest versions from:
1503 1417
1504 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 1418 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1505and 1419and
1506 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1420 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1507 1421
1508If the version you run ($0) is already up to date, please 1422If $0 has already been updated, send the following data and any
1509send the following data and any information you think might be 1423information you think might be pertinent to config-patches@gnu.org to
1510pertinent to <config-patches@gnu.org> in order to provide the needed 1424provide the necessary information to handle your system.
1511information to handle your system.
1512 1425
1513config.guess timestamp = $timestamp 1426config.guess timestamp = $timestamp
1514 1427
diff --git a/config.sub b/config.sub
index eee8dccb0..9feb73bf0 100755
--- a/config.sub
+++ b/config.sub
@@ -1,24 +1,18 @@
1#! /bin/sh 1#! /bin/sh
2# Configuration validation subroutine script. 2# Configuration validation subroutine script.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3# Copyright 1992-2016 Free Software Foundation, Inc.
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5# 2011, 2012, 2013 Free Software Foundation, Inc.
6 4
7timestamp='2012-12-23' 5timestamp='2016-06-20'
8 6
9# This file is (in principle) common to ALL GNU software. 7# This file is free software; you can redistribute it and/or modify it
10# The presence of a machine in this file suggests that SOME GNU software 8# under the terms of the GNU General Public License as published by
11# can handle that machine. It does not imply ALL GNU software can. 9# the Free Software Foundation; either version 3 of the License, or
12#
13# This file is free software; you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by
15# the Free Software Foundation; either version 2 of the License, or
16# (at your option) any later version. 10# (at your option) any later version.
17# 11#
18# This program is distributed in the hope that it will be useful, 12# This program is distributed in the hope that it will be useful, but
19# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21# GNU General Public License for more details. 15# General Public License for more details.
22# 16#
23# You should have received a copy of the GNU General Public License 17# You should have received a copy of the GNU General Public License
24# along with this program; if not, see <http://www.gnu.org/licenses/>. 18# along with this program; if not, see <http://www.gnu.org/licenses/>.
@@ -26,11 +20,12 @@ timestamp='2012-12-23'
26# As a special exception to the GNU General Public License, if you 20# As a special exception to the GNU General Public License, if you
27# distribute this file as part of a program that contains a 21# distribute this file as part of a program that contains a
28# configuration script generated by Autoconf, you may include it under 22# configuration script generated by Autoconf, you may include it under
29# the same distribution terms that you use for the rest of that program. 23# the same distribution terms that you use for the rest of that
24# program. This Exception is an additional permission under section 7
25# of the GNU General Public License, version 3 ("GPLv3").
30 26
31 27
32# Please send patches to <config-patches@gnu.org>. Submit a context 28# Please send patches to <config-patches@gnu.org>.
33# diff and a properly formatted GNU ChangeLog entry.
34# 29#
35# Configuration subroutine to validate and canonicalize a configuration type. 30# Configuration subroutine to validate and canonicalize a configuration type.
36# Supply the specified configuration type as an argument. 31# Supply the specified configuration type as an argument.
@@ -38,7 +33,7 @@ timestamp='2012-12-23'
38# Otherwise, we print the canonical config type on stdout and succeed. 33# Otherwise, we print the canonical config type on stdout and succeed.
39 34
40# You can get the latest version of this script from: 35# You can get the latest version of this script from:
41# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 36# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
42 37
43# This file is supposed to be the same for all GNU packages 38# This file is supposed to be the same for all GNU packages
44# and recognize all the CPU types, system types and aliases 39# and recognize all the CPU types, system types and aliases
@@ -58,8 +53,7 @@ timestamp='2012-12-23'
58me=`echo "$0" | sed -e 's,.*/,,'` 53me=`echo "$0" | sed -e 's,.*/,,'`
59 54
60usage="\ 55usage="\
61Usage: $0 [OPTION] CPU-MFR-OPSYS 56Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
62 $0 [OPTION] ALIAS
63 57
64Canonicalize a configuration name. 58Canonicalize a configuration name.
65 59
@@ -73,9 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
73version="\ 67version="\
74GNU config.sub ($timestamp) 68GNU config.sub ($timestamp)
75 69
76Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 70Copyright 1992-2016 Free Software Foundation, Inc.
772001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
782012, 2013 Free Software Foundation, Inc.
79 71
80This is free software; see the source for copying conditions. There is NO 72This is free software; see the source for copying conditions. There is NO
81warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 73warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -124,7 +116,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
124case $maybe_os in 116case $maybe_os in
125 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ 117 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
126 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ 118 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
127 knetbsd*-gnu* | netbsd*-gnu* | \ 119 knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
128 kopensolaris*-gnu* | \ 120 kopensolaris*-gnu* | \
129 storm-chaos* | os2-emx* | rtmk-nova*) 121 storm-chaos* | os2-emx* | rtmk-nova*)
130 os=-$maybe_os 122 os=-$maybe_os
@@ -259,19 +251,21 @@ case $basic_machine in
259 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 251 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
260 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 252 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
261 | am33_2.0 \ 253 | am33_2.0 \
262 | arc \ 254 | arc | arceb \
263 | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ 255 | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
264 | avr | avr32 \ 256 | avr | avr32 \
257 | ba \
265 | be32 | be64 \ 258 | be32 | be64 \
266 | bfin \ 259 | bfin \
267 | c4x | clipper \ 260 | c4x | c8051 | clipper \
268 | d10v | d30v | dlx | dsp16xx \ 261 | d10v | d30v | dlx | dsp16xx \
269 | epiphany \ 262 | e2k | epiphany \
270 | fido | fr30 | frv \ 263 | fido | fr30 | frv | ft32 \
271 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 264 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
272 | hexagon \ 265 | hexagon \
273 | i370 | i860 | i960 | ia64 \ 266 | i370 | i860 | i960 | ia64 \
274 | ip2k | iq2000 \ 267 | ip2k | iq2000 \
268 | k1om \
275 | le32 | le64 \ 269 | le32 | le64 \
276 | lm32 \ 270 | lm32 \
277 | m32c | m32r | m32rle | m68000 | m68k | m88k \ 271 | m32c | m32r | m32rle | m68000 | m68k | m88k \
@@ -289,26 +283,29 @@ case $basic_machine in
289 | mips64vr5900 | mips64vr5900el \ 283 | mips64vr5900 | mips64vr5900el \
290 | mipsisa32 | mipsisa32el \ 284 | mipsisa32 | mipsisa32el \
291 | mipsisa32r2 | mipsisa32r2el \ 285 | mipsisa32r2 | mipsisa32r2el \
286 | mipsisa32r6 | mipsisa32r6el \
292 | mipsisa64 | mipsisa64el \ 287 | mipsisa64 | mipsisa64el \
293 | mipsisa64r2 | mipsisa64r2el \ 288 | mipsisa64r2 | mipsisa64r2el \
289 | mipsisa64r6 | mipsisa64r6el \
294 | mipsisa64sb1 | mipsisa64sb1el \ 290 | mipsisa64sb1 | mipsisa64sb1el \
295 | mipsisa64sr71k | mipsisa64sr71kel \ 291 | mipsisa64sr71k | mipsisa64sr71kel \
292 | mipsr5900 | mipsr5900el \
296 | mipstx39 | mipstx39el \ 293 | mipstx39 | mipstx39el \
297 | mn10200 | mn10300 \ 294 | mn10200 | mn10300 \
298 | moxie \ 295 | moxie \
299 | mt \ 296 | mt \
300 | msp430 \ 297 | msp430 \
301 | nds32 | nds32le | nds32be \ 298 | nds32 | nds32le | nds32be \
302 | nios | nios2 \ 299 | nios | nios2 | nios2eb | nios2el \
303 | ns16k | ns32k \ 300 | ns16k | ns32k \
304 | open8 \ 301 | open8 | or1k | or1knd | or32 \
305 | or32 \
306 | pdp10 | pdp11 | pj | pjl \ 302 | pdp10 | pdp11 | pj | pjl \
307 | powerpc | powerpc64 | powerpc64le | powerpcle \ 303 | powerpc | powerpc64 | powerpc64le | powerpcle \
308 | pyramid \ 304 | pyramid \
305 | riscv32 | riscv64 \
309 | rl78 | rx \ 306 | rl78 | rx \
310 | score \ 307 | score \
311 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 308 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
312 | sh64 | sh64le \ 309 | sh64 | sh64le \
313 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 310 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
314 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 311 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -316,6 +313,7 @@ case $basic_machine in
316 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ 313 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
317 | ubicom32 \ 314 | ubicom32 \
318 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ 315 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
316 | visium \
319 | we32k \ 317 | we32k \
320 | x86 | xc16x | xstormy16 | xtensa \ 318 | x86 | xc16x | xstormy16 | xtensa \
321 | z8k | z80) 319 | z8k | z80)
@@ -330,7 +328,10 @@ case $basic_machine in
330 c6x) 328 c6x)
331 basic_machine=tic6x-unknown 329 basic_machine=tic6x-unknown
332 ;; 330 ;;
333 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) 331 leon|leon[3-9])
332 basic_machine=sparc-$basic_machine
333 ;;
334 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
334 basic_machine=$basic_machine-unknown 335 basic_machine=$basic_machine-unknown
335 os=-none 336 os=-none
336 ;; 337 ;;
@@ -372,21 +373,23 @@ case $basic_machine in
372 | aarch64-* | aarch64_be-* \ 373 | aarch64-* | aarch64_be-* \
373 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 374 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
374 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 375 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
375 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ 376 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
376 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 377 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
377 | avr-* | avr32-* \ 378 | avr-* | avr32-* \
379 | ba-* \
378 | be32-* | be64-* \ 380 | be32-* | be64-* \
379 | bfin-* | bs2000-* \ 381 | bfin-* | bs2000-* \
380 | c[123]* | c30-* | [cjt]90-* | c4x-* \ 382 | c[123]* | c30-* | [cjt]90-* | c4x-* \
381 | clipper-* | craynv-* | cydra-* \ 383 | c8051-* | clipper-* | craynv-* | cydra-* \
382 | d10v-* | d30v-* | dlx-* \ 384 | d10v-* | d30v-* | dlx-* \
383 | elxsi-* \ 385 | e2k-* | elxsi-* \
384 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 386 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
385 | h8300-* | h8500-* \ 387 | h8300-* | h8500-* \
386 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 388 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
387 | hexagon-* \ 389 | hexagon-* \
388 | i*86-* | i860-* | i960-* | ia64-* \ 390 | i*86-* | i860-* | i960-* | ia64-* \
389 | ip2k-* | iq2000-* \ 391 | ip2k-* | iq2000-* \
392 | k1om-* \
390 | le32-* | le64-* \ 393 | le32-* | le64-* \
391 | lm32-* \ 394 | lm32-* \
392 | m32c-* | m32r-* | m32rle-* \ 395 | m32c-* | m32r-* | m32rle-* \
@@ -406,28 +409,33 @@ case $basic_machine in
406 | mips64vr5900-* | mips64vr5900el-* \ 409 | mips64vr5900-* | mips64vr5900el-* \
407 | mipsisa32-* | mipsisa32el-* \ 410 | mipsisa32-* | mipsisa32el-* \
408 | mipsisa32r2-* | mipsisa32r2el-* \ 411 | mipsisa32r2-* | mipsisa32r2el-* \
412 | mipsisa32r6-* | mipsisa32r6el-* \
409 | mipsisa64-* | mipsisa64el-* \ 413 | mipsisa64-* | mipsisa64el-* \
410 | mipsisa64r2-* | mipsisa64r2el-* \ 414 | mipsisa64r2-* | mipsisa64r2el-* \
415 | mipsisa64r6-* | mipsisa64r6el-* \
411 | mipsisa64sb1-* | mipsisa64sb1el-* \ 416 | mipsisa64sb1-* | mipsisa64sb1el-* \
412 | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 417 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
418 | mipsr5900-* | mipsr5900el-* \
413 | mipstx39-* | mipstx39el-* \ 419 | mipstx39-* | mipstx39el-* \
414 | mmix-* \ 420 | mmix-* \
415 | mt-* \ 421 | mt-* \
416 | msp430-* \ 422 | msp430-* \
417 | nds32-* | nds32le-* | nds32be-* \ 423 | nds32-* | nds32le-* | nds32be-* \
418 | nios-* | nios2-* \ 424 | nios-* | nios2-* | nios2eb-* | nios2el-* \
419 | none-* | np1-* | ns16k-* | ns32k-* \ 425 | none-* | np1-* | ns16k-* | ns32k-* \
420 | open8-* \ 426 | open8-* \
427 | or1k*-* \
421 | orion-* \ 428 | orion-* \
422 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 429 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
423 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ 430 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
424 | pyramid-* \ 431 | pyramid-* \
432 | riscv32-* | riscv64-* \
425 | rl78-* | romp-* | rs6000-* | rx-* \ 433 | rl78-* | romp-* | rs6000-* | rx-* \
426 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 434 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
427 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 435 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
428 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 436 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
429 | sparclite-* \ 437 | sparclite-* \
430 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ 438 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
431 | tahoe-* \ 439 | tahoe-* \
432 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 440 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
433 | tile*-* \ 441 | tile*-* \
@@ -435,6 +443,7 @@ case $basic_machine in
435 | ubicom32-* \ 443 | ubicom32-* \
436 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ 444 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
437 | vax-* \ 445 | vax-* \
446 | visium-* \
438 | we32k-* \ 447 | we32k-* \
439 | x86-* | x86_64-* | xc16x-* | xps100-* \ 448 | x86-* | x86_64-* | xc16x-* | xps100-* \
440 | xstormy16-* | xtensa*-* \ 449 | xstormy16-* | xtensa*-* \
@@ -511,6 +520,9 @@ case $basic_machine in
511 basic_machine=i386-pc 520 basic_machine=i386-pc
512 os=-aros 521 os=-aros
513 ;; 522 ;;
523 asmjs)
524 basic_machine=asmjs-unknown
525 ;;
514 aux) 526 aux)
515 basic_machine=m68k-apple 527 basic_machine=m68k-apple
516 os=-aux 528 os=-aux
@@ -631,6 +643,14 @@ case $basic_machine in
631 basic_machine=m68k-bull 643 basic_machine=m68k-bull
632 os=-sysv3 644 os=-sysv3
633 ;; 645 ;;
646 e500v[12])
647 basic_machine=powerpc-unknown
648 os=$os"spe"
649 ;;
650 e500v[12]-*)
651 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
652 os=$os"spe"
653 ;;
634 ebmon29k) 654 ebmon29k)
635 basic_machine=a29k-amd 655 basic_machine=a29k-amd
636 os=-ebmon 656 os=-ebmon
@@ -772,6 +792,9 @@ case $basic_machine in
772 basic_machine=m68k-isi 792 basic_machine=m68k-isi
773 os=-sysv 793 os=-sysv
774 ;; 794 ;;
795 leon-*|leon[3-9]-*)
796 basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
797 ;;
775 m68knommu) 798 m68knommu)
776 basic_machine=m68k-unknown 799 basic_machine=m68k-unknown
777 os=-linux 800 os=-linux
@@ -799,7 +822,7 @@ case $basic_machine in
799 os=-mingw64 822 os=-mingw64
800 ;; 823 ;;
801 mingw32) 824 mingw32)
802 basic_machine=i386-pc 825 basic_machine=i686-pc
803 os=-mingw32 826 os=-mingw32
804 ;; 827 ;;
805 mingw32ce) 828 mingw32ce)
@@ -827,6 +850,10 @@ case $basic_machine in
827 basic_machine=powerpc-unknown 850 basic_machine=powerpc-unknown
828 os=-morphos 851 os=-morphos
829 ;; 852 ;;
853 moxiebox)
854 basic_machine=moxie-unknown
855 os=-moxiebox
856 ;;
830 msdos) 857 msdos)
831 basic_machine=i386-pc 858 basic_machine=i386-pc
832 os=-msdos 859 os=-msdos
@@ -835,7 +862,7 @@ case $basic_machine in
835 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` 862 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
836 ;; 863 ;;
837 msys) 864 msys)
838 basic_machine=i386-pc 865 basic_machine=i686-pc
839 os=-msys 866 os=-msys
840 ;; 867 ;;
841 mvs) 868 mvs)
@@ -1357,29 +1384,30 @@ case $os in
1357 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 1384 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1358 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ 1385 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1359 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ 1386 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1360 | -sym* | -kopensolaris* \ 1387 | -sym* | -kopensolaris* | -plan9* \
1361 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 1388 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1362 | -aos* | -aros* \ 1389 | -aos* | -aros* | -cloudabi* | -sortix* \
1363 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 1390 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1364 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 1391 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1365 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 1392 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1366 | -bitrig* | -openbsd* | -solidbsd* \ 1393 | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
1367 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 1394 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1368 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 1395 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1369 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 1396 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1370 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1397 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1371 | -chorusos* | -chorusrdb* | -cegcc* \ 1398 | -chorusos* | -chorusrdb* | -cegcc* \
1372 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1399 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1373 | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ 1400 | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1374 | -linux-newlib* | -linux-musl* | -linux-uclibc* \ 1401 | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1375 | -uxpv* | -beos* | -mpeix* | -udk* \ 1402 | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
1376 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 1403 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1377 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 1404 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1378 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 1405 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1379 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1406 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1380 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 1407 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1381 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1408 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1382 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) 1409 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
1410 | -onefs* | -tirtos* | -phoenix*)
1383 # Remember, each alternative MUST END IN *, to match a version number. 1411 # Remember, each alternative MUST END IN *, to match a version number.
1384 ;; 1412 ;;
1385 -qnx*) 1413 -qnx*)
@@ -1503,9 +1531,6 @@ case $os in
1503 -aros*) 1531 -aros*)
1504 os=-aros 1532 os=-aros
1505 ;; 1533 ;;
1506 -kaos*)
1507 os=-kaos
1508 ;;
1509 -zvmoe) 1534 -zvmoe)
1510 os=-zvmoe 1535 os=-zvmoe
1511 ;; 1536 ;;
@@ -1514,6 +1539,8 @@ case $os in
1514 ;; 1539 ;;
1515 -nacl*) 1540 -nacl*)
1516 ;; 1541 ;;
1542 -ios)
1543 ;;
1517 -none) 1544 -none)
1518 ;; 1545 ;;
1519 *) 1546 *)
@@ -1554,6 +1581,9 @@ case $basic_machine in
1554 c4x-* | tic4x-*) 1581 c4x-* | tic4x-*)
1555 os=-coff 1582 os=-coff
1556 ;; 1583 ;;
1584 c8051-*)
1585 os=-elf
1586 ;;
1557 hexagon-*) 1587 hexagon-*)
1558 os=-elf 1588 os=-elf
1559 ;; 1589 ;;