5 # Attempt to guess a canonical system name.
6 -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
7 -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
9 +# Copyright 1992-2014 Free Software Foundation, Inc.
11 -timestamp='2007-05-17'
12 +timestamp='2014-03-23'
14 # This file is free software; you can redistribute it and/or modify it
15 # under the terms of the GNU General Public License as published by
16 -# the Free Software Foundation; either version 2 of the License, or
17 +# the Free Software Foundation; either version 3 of the License, or
18 # (at your option) any later version.
20 # This program is distributed in the hope that it will be useful, but
22 # General Public License for more details.
24 # You should have received a copy of the GNU General Public License
25 -# along with this program; if not, write to the Free Software
26 -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
28 +# along with this program; if not, see <http://www.gnu.org/licenses/>.
30 # As a special exception to the GNU General Public License, if you
31 # distribute this file as part of a program that contains a
32 # configuration script generated by Autoconf, you may include it under
33 -# the same distribution terms that you use for the rest of that program.
36 -# Originally written by Per Bothner <per@bothner.com>.
37 -# Please send patches to <config-patches@gnu.org>. Submit a context
38 -# diff and a properly formatted ChangeLog entry.
39 +# the same distribution terms that you use for the rest of that
40 +# program. This Exception is an additional permission under section 7
41 +# of the GNU General Public License, version 3 ("GPLv3").
43 -# This script attempts to guess a canonical system name similar to
44 -# config.sub. If it succeeds, it prints the system name on stdout, and
45 -# exits with 0. Otherwise, it exits with 1.
46 +# Originally written by Per Bothner.
48 -# The plan is that this can be called by configure scripts if you
49 -# don't specify an explicit build system type.
50 +# You can get the latest version of this script from:
51 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
53 +# Please send patches with a ChangeLog entry to config-patches@gnu.org.
56 me=`echo "$0" | sed -e 's,.*/,,'`
59 GNU config.guess ($timestamp)
61 Originally written by Per Bothner.
62 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
63 -Free Software Foundation, Inc.
64 +Copyright 1992-2014 Free Software Foundation, Inc.
66 This is free software; see the source for copying conditions. There is NO
67 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
69 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
70 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
72 +case "${UNAME_SYSTEM}" in
74 + # If the system lacks a compiler, then just pick glibc.
75 + # We could probably try harder.
78 + eval $set_cc_for_build
79 + cat <<-EOF > $dummy.c
80 + #include <features.h>
81 + #if defined(__UCLIBC__)
83 + #elif defined(__dietlibc__)
89 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
93 # Note: order is significant - the case branches are not exclusive.
95 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
97 # NetBSD (nbsd) targets should (where applicable) match one or
98 - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
99 + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
100 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
101 # switched to ELF, *-*-netbsd* would select the old
102 # object file format. This provides both forward
104 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
105 eval $set_cc_for_build
106 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
107 - | grep __ELF__ >/dev/null
110 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
111 # Return netbsd for either. FIX?
122 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
123 echo "${machine}-${os}${release}"
126 + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
127 + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
130 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
131 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
133 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
136 - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
137 + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
140 # According to Compaq, /usr/sbin/psrinfo has been available on
142 # A Xn.n version is an unreleased experimental baselevel.
143 # 1.2 uses "1.2" for uname -r.
144 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
146 + # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
150 Alpha\ *:Windows_NT*:*)
151 # How do we know it's Interix rather than the generic POSIX subsystem?
152 # Should we change UNAME_MACHINE based on the output of uname instead
153 @@ -295,12 +316,12 @@
157 - echo powerpc-ibm-os400
158 + echo powerpc-ibm-os400
160 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
161 echo arm-acorn-riscix${UNAME_RELEASE}
163 - arm:riscos:*:*|arm:RISCOS:*:*)
164 + arm*:riscos:*:*|arm*:RISCOS:*:*)
165 echo arm-unknown-riscos
167 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
168 @@ -324,14 +345,33 @@
169 case `/usr/bin/uname -p` in
170 sparc) echo sparc-icl-nx7; exit ;;
173 + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
176 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
178 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
179 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
181 - i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*)
182 - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
183 + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
184 + echo i386-pc-auroraux${UNAME_RELEASE}
186 + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
187 + eval $set_cc_for_build
189 + # If there is a compiler, see if it is configured for 64-bit objects.
190 + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
191 + # This test works for both compilers.
192 + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
193 + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
194 + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
195 + grep IS_64BIT_ARCH >/dev/null
200 + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
203 # According to config.sub, this is the proper way to canonicalize
204 @@ -375,23 +415,23 @@
205 # MiNT. But MiNT is downward compatible to TOS, so this should
207 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
208 - echo m68k-atari-mint${UNAME_RELEASE}
209 + echo m68k-atari-mint${UNAME_RELEASE}
211 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
212 echo m68k-atari-mint${UNAME_RELEASE}
215 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
216 - echo m68k-atari-mint${UNAME_RELEASE}
217 + echo m68k-atari-mint${UNAME_RELEASE}
219 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
220 - echo m68k-milan-mint${UNAME_RELEASE}
222 + echo m68k-milan-mint${UNAME_RELEASE}
224 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
225 - echo m68k-hades-mint${UNAME_RELEASE}
227 + echo m68k-hades-mint${UNAME_RELEASE}
229 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
230 - echo m68k-unknown-mint${UNAME_RELEASE}
232 + echo m68k-unknown-mint${UNAME_RELEASE}
235 echo m68k-apple-machten${UNAME_RELEASE}
238 echo m88k-motorola-sysv3
241 - # DG/UX returns AViiON for all architectures
242 - UNAME_PROCESSOR=`/usr/bin/uname -p`
243 + # DG/UX returns AViiON for all architectures
244 + UNAME_PROCESSOR=`/usr/bin/uname -p`
245 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
247 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
250 echo i586-dg-dgux${UNAME_RELEASE}
254 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
255 echo m88k-dolphin-sysv3
258 echo rs6000-ibm-aix3.2
263 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
264 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
266 @@ -575,52 +615,52 @@
267 9000/[678][0-9][0-9])
268 if [ -x /usr/bin/getconf ]; then
269 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
270 - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
271 - case "${sc_cpu_version}" in
272 - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
273 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
274 - 532) # CPU_PA_RISC2_0
275 - case "${sc_kernel_bits}" in
276 - 32) HP_ARCH="hppa2.0n" ;;
277 - 64) HP_ARCH="hppa2.0w" ;;
278 + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
279 + case "${sc_cpu_version}" in
280 + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
281 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
282 + 532) # CPU_PA_RISC2_0
283 + case "${sc_kernel_bits}" in
284 + 32) HP_ARCH="hppa2.0n" ;;
285 + 64) HP_ARCH="hppa2.0w" ;;
286 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
292 if [ "${HP_ARCH}" = "" ]; then
293 eval $set_cc_for_build
294 - sed 's/^ //' << EOF >$dummy.c
295 + sed 's/^ //' << EOF >$dummy.c
297 + #define _HPUX_SOURCE
298 + #include <stdlib.h>
299 + #include <unistd.h>
301 - #define _HPUX_SOURCE
302 - #include <stdlib.h>
303 - #include <unistd.h>
307 - #if defined(_SC_KERNEL_BITS)
308 - long bits = sysconf(_SC_KERNEL_BITS);
310 - long cpu = sysconf (_SC_CPU_VERSION);
314 - case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
315 - case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
316 - case CPU_PA_RISC2_0:
317 - #if defined(_SC_KERNEL_BITS)
320 - case 64: puts ("hppa2.0w"); break;
321 - case 32: puts ("hppa2.0n"); break;
322 - default: puts ("hppa2.0"); break;
324 - #else /* !defined(_SC_KERNEL_BITS) */
325 - puts ("hppa2.0"); break;
327 - default: puts ("hppa1.0"); break;
333 + #if defined(_SC_KERNEL_BITS)
334 + long bits = sysconf(_SC_KERNEL_BITS);
336 + long cpu = sysconf (_SC_CPU_VERSION);
340 + case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
341 + case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
342 + case CPU_PA_RISC2_0:
343 + #if defined(_SC_KERNEL_BITS)
346 + case 64: puts ("hppa2.0w"); break;
347 + case 32: puts ("hppa2.0n"); break;
348 + default: puts ("hppa2.0"); break;
350 + #else /* !defined(_SC_KERNEL_BITS) */
351 + puts ("hppa2.0"); break;
353 + default: puts ("hppa1.0"); break;
358 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
359 test -z "$HP_ARCH" && HP_ARCH=hppa
361 # => hppa64-hp-hpux11.23
363 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
364 - grep __LP64__ >/dev/null
369 @@ -711,22 +751,22 @@
371 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
375 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
376 if getsysinfo -f scalar_acc
377 then echo c32-convex-bsd
378 else echo c2-convex-bsd
382 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
386 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
390 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
395 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
397 @@ -750,14 +790,14 @@
399 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
400 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
401 - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
402 - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
403 - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
405 + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
406 + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
407 + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
409 5000:UNIX_System_V:4.*:*)
410 - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
411 - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
412 - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
413 + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
414 + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
415 + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
417 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
418 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
419 @@ -769,40 +809,51 @@
420 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
423 - case ${UNAME_MACHINE} in
425 - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
426 + UNAME_PROCESSOR=`/usr/bin/uname -p`
427 + case ${UNAME_PROCESSOR} in
429 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
431 - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
432 + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
436 echo ${UNAME_MACHINE}-pc-cygwin
439 + echo ${UNAME_MACHINE}-pc-mingw64
442 echo ${UNAME_MACHINE}-pc-mingw32
445 + echo ${UNAME_MACHINE}-pc-msys
448 - # uname -m includes "-pc" on this system.
449 - echo ${UNAME_MACHINE}-mingw32
450 + # uname -m includes "-pc" on this system.
451 + echo ${UNAME_MACHINE}-mingw32
454 echo ${UNAME_MACHINE}-pc-pw32
456 - *:Interix*:[3456]*)
457 - case ${UNAME_MACHINE} in
460 + case ${UNAME_MACHINE} in
462 echo i586-pc-interix${UNAME_RELEASE}
464 - EM64T | authenticamd)
465 + authenticamd | genuineintel | EM64T)
466 echo x86_64-unknown-interix${UNAME_RELEASE}
469 + echo ia64-unknown-interix${UNAME_RELEASE}
472 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
473 echo i${UNAME_MACHINE}-pc-mks
478 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
479 # How do we know it's Interix rather than the generic POSIX subsystem?
480 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
481 @@ -823,203 +874,157 @@
485 - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
486 + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
489 # other systems with GNU libc and userland
490 - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
491 + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
494 echo ${UNAME_MACHINE}-pc-minix
497 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
499 + aarch64_be:Linux:*:*)
500 + UNAME_MACHINE=aarch64_be
501 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
504 + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
505 + EV5) UNAME_MACHINE=alphaev5 ;;
506 + EV56) UNAME_MACHINE=alphaev56 ;;
507 + PCA56) UNAME_MACHINE=alphapca56 ;;
508 + PCA57) UNAME_MACHINE=alphapca56 ;;
509 + EV6) UNAME_MACHINE=alphaev6 ;;
510 + EV67) UNAME_MACHINE=alphaev67 ;;
511 + EV68*) UNAME_MACHINE=alphaev68 ;;
513 + objdump --private-headers /bin/sh | grep -q ld.so.1
514 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
515 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
517 + arc:Linux:*:* | arceb:Linux:*:*)
518 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
521 - echo ${UNAME_MACHINE}-unknown-linux-gnu
522 + eval $set_cc_for_build
523 + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
524 + | grep -q __ARM_EABI__
526 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
528 + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
529 + | grep -q __ARM_PCS_VFP
531 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
533 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
538 - echo ${UNAME_MACHINE}-unknown-linux-gnu
539 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
542 - echo cris-axis-linux-gnu
543 + echo ${UNAME_MACHINE}-axis-linux-${LIBC}
546 - echo crisv32-axis-linux-gnu
547 + echo ${UNAME_MACHINE}-axis-linux-${LIBC}
550 - echo frv-unknown-linux-gnu
551 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
554 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
557 + echo ${UNAME_MACHINE}-pc-linux-${LIBC}
560 - echo ${UNAME_MACHINE}-unknown-linux-gnu
561 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
564 - echo ${UNAME_MACHINE}-unknown-linux-gnu
565 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
568 - echo ${UNAME_MACHINE}-unknown-linux-gnu
569 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
572 + mips:Linux:*:* | mips64:Linux:*:*)
573 eval $set_cc_for_build
574 sed 's/^ //' << EOF >$dummy.c
578 + #undef ${UNAME_MACHINE}
579 + #undef ${UNAME_MACHINE}el
580 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
582 + CPU=${UNAME_MACHINE}el
584 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
586 + CPU=${UNAME_MACHINE}
592 - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
597 - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
598 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
599 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
602 - eval $set_cc_for_build
603 - sed 's/^ //' << EOF >$dummy.c
607 - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
610 - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
617 - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
622 - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
625 - echo or32-unknown-linux-gnu
626 + openrisc*:Linux:*:*)
627 + echo or1k-unknown-linux-${LIBC}
630 - echo powerpc-unknown-linux-gnu
631 + or32:Linux:*:* | or1k*:Linux:*:*)
632 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
635 - echo powerpc64-unknown-linux-gnu
637 + echo sparc-unknown-linux-${LIBC}
640 - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
641 - EV5) UNAME_MACHINE=alphaev5 ;;
642 - EV56) UNAME_MACHINE=alphaev56 ;;
643 - PCA56) UNAME_MACHINE=alphapca56 ;;
644 - PCA57) UNAME_MACHINE=alphapca56 ;;
645 - EV6) UNAME_MACHINE=alphaev6 ;;
646 - EV67) UNAME_MACHINE=alphaev67 ;;
647 - EV68*) UNAME_MACHINE=alphaev68 ;;
649 - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
650 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
651 - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
652 + parisc64:Linux:*:* | hppa64:Linux:*:*)
653 + echo hppa64-unknown-linux-${LIBC}
655 parisc:Linux:*:* | hppa:Linux:*:*)
657 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
658 - PA7*) echo hppa1.1-unknown-linux-gnu ;;
659 - PA8*) echo hppa2.0-unknown-linux-gnu ;;
660 - *) echo hppa-unknown-linux-gnu ;;
661 + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
662 + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
663 + *) echo hppa-unknown-linux-${LIBC} ;;
666 - parisc64:Linux:*:* | hppa64:Linux:*:*)
667 - echo hppa64-unknown-linux-gnu
669 + echo powerpc64-unknown-linux-${LIBC}
672 + echo powerpc-unknown-linux-${LIBC}
675 + echo powerpc64le-unknown-linux-${LIBC}
678 + echo powerpcle-unknown-linux-${LIBC}
680 s390:Linux:*:* | s390x:Linux:*:*)
681 - echo ${UNAME_MACHINE}-ibm-linux
682 + echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
685 - echo ${UNAME_MACHINE}-unknown-linux-gnu
686 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
689 - echo ${UNAME_MACHINE}-unknown-linux-gnu
690 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
692 sparc:Linux:*:* | sparc64:Linux:*:*)
693 - echo ${UNAME_MACHINE}-unknown-linux-gnu
694 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
697 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
700 - echo ${UNAME_MACHINE}-dec-linux-gnu
701 + echo ${UNAME_MACHINE}-dec-linux-${LIBC}
704 - echo x86_64-unknown-linux-gnu
705 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
708 - echo xtensa-unknown-linux-gnu
710 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
713 - # The BFD linker knows what the default object file format is, so
714 - # first see if it will tell us. cd to the root directory to prevent
715 - # problems with other programs or directories called `ld' in the path.
716 - # Set LC_ALL=C to ensure ld outputs messages in English.
717 - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
718 - | sed -ne '/supported targets:/!d
720 - s/.*supported targets: *//
723 - case "$ld_supported_targets" in
725 - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
728 - echo "${UNAME_MACHINE}-pc-linux-gnuaout"
731 - echo "${UNAME_MACHINE}-pc-linux-gnucoff"
734 - # Either a pre-BFD a.out linker (linux-gnuoldld) or
735 - # one that does not give us useful --help.
736 - echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
739 - # Determine whether the default compiler is a.out or elf
740 - eval $set_cc_for_build
741 - sed 's/^ //' << EOF >$dummy.c
742 - #include <features.h>
745 - # if __GLIBC__ >= 2
754 - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
760 - #ifdef __dietlibc__
764 - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
769 - test x"${LIBC}" != x && {
770 - echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
773 - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
776 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
777 # earlier versions are messed up and put the nodename in both
778 @@ -1027,11 +1032,11 @@
779 echo i386-sequent-sysv4
781 i*86:UNIX_SV:4.2MP:2.*)
782 - # Unixware is an offshoot of SVR4, but it has its own version
783 - # number series starting with 2...
784 - # I am not positive that other SVR4 systems won't match this,
785 + # Unixware is an offshoot of SVR4, but it has its own version
786 + # number series starting with 2...
787 + # I am not positive that other SVR4 systems won't match this,
788 # I just have to hope. -- rms.
789 - # Use sysv4.2uw... so that sysv4* matches it.
790 + # Use sysv4.2uw... so that sysv4* matches it.
791 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
794 @@ -1048,7 +1053,7 @@
796 echo ${UNAME_MACHINE}-pc-syllable
798 - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
799 + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
800 echo i386-unknown-lynxos${UNAME_RELEASE}
803 @@ -1063,7 +1068,7 @@
807 - # UnixWare 7.x, OpenUNIX and OpenServer 6.
808 + # UnixWare 7.x, OpenUNIX and OpenServer 6.
809 case `/bin/uname -X | grep "^Machine"` in
810 *486*) UNAME_MACHINE=i486 ;;
811 *Pentium) UNAME_MACHINE=i586 ;;
812 @@ -1091,10 +1096,13 @@
815 # Left here for compatibility:
816 - # uname -m prints for DJGPP always 'pc', but it prints nothing about
817 - # the processor, so we play safe by assuming i386.
818 - echo i386-pc-msdosdjgpp
820 + # uname -m prints for DJGPP always 'pc', but it prints nothing about
821 + # the processor, so we play safe by assuming i586.
822 + # Note: whatever this is, it MUST be the same as what config.sub
823 + # prints for the "djgpp" host, or else GDB configury will decide that
824 + # this is a cross-build.
825 + echo i586-pc-msdosdjgpp
830 @@ -1129,8 +1137,18 @@
831 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
832 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
833 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
834 - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
835 - && { echo i486-ncr-sysv4; exit; } ;;
836 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
837 + && { echo i486-ncr-sysv4; exit; } ;;
838 + NCR*:*:4.2:* | MPRAS*:*:4.2:*)
840 + test -r /etc/.relid \
841 + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
842 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
843 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
844 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
845 + && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
846 + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
847 + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
848 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
849 echo m68k-unknown-lynxos${UNAME_RELEASE}
851 @@ -1143,7 +1161,7 @@
853 echo rs6000-unknown-lynxos${UNAME_RELEASE}
855 - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
856 + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
857 echo powerpc-unknown-lynxos${UNAME_RELEASE}
860 @@ -1163,10 +1181,10 @@
864 - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
865 - # says <Richard.M.Bartel@ccMail.Census.GOV>
866 - echo i586-unisys-sysv4
868 + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
869 + # says <Richard.M.Bartel@ccMail.Census.GOV>
870 + echo i586-unisys-sysv4
872 *:UNIX_System_V:4*:FTX*)
873 # From Gerald Hewes <hewes@openmarket.com>.
874 # How about differentiating between stratus architectures? -djm
875 @@ -1192,11 +1210,11 @@
877 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
878 if [ -d /usr/nec ]; then
879 - echo mips-nec-sysv${UNAME_RELEASE}
880 + echo mips-nec-sysv${UNAME_RELEASE}
882 - echo mips-unknown-sysv${UNAME_RELEASE}
883 + echo mips-unknown-sysv${UNAME_RELEASE}
887 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
890 @@ -1206,6 +1224,12 @@
891 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
894 + BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
898 + echo x86_64-unknown-haiku
901 echo sx4-nec-superux${UNAME_RELEASE}
903 @@ -1232,9 +1256,31 @@
906 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
907 - case $UNAME_PROCESSOR in
908 - unknown) UNAME_PROCESSOR=powerpc ;;
910 + eval $set_cc_for_build
911 + if test "$UNAME_PROCESSOR" = unknown ; then
912 + UNAME_PROCESSOR=powerpc
914 + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
915 + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
916 + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
917 + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
918 + grep IS_64BIT_ARCH >/dev/null
920 + case $UNAME_PROCESSOR in
921 + i386) UNAME_PROCESSOR=x86_64 ;;
922 + powerpc) UNAME_PROCESSOR=powerpc64 ;;
926 + elif test "$UNAME_PROCESSOR" = i386 ; then
927 + # Avoid executing cc on OS X 10.9, as it ships with a stub
928 + # that puts up a graphical alert prompting to install
929 + # developer tools. Any system running Mac OS X 10.7 or
930 + # later (Darwin 11 and later) is required to have a 64-bit
931 + # processor. This is not true of the ARM version of Darwin
932 + # that Apple uses in portable devices.
933 + UNAME_PROCESSOR=x86_64
935 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
937 *:procnto*:*:* | *:QNX:[0123456789]*:*)
938 @@ -1248,7 +1294,10 @@
942 - NSE-?:NONSTOP_KERNEL:*:*)
943 + NEO-?:NONSTOP_KERNEL:*:*)
944 + echo neo-tandem-nsk${UNAME_RELEASE}
946 + NSE-*:NONSTOP_KERNEL:*:*)
947 echo nse-tandem-nsk${UNAME_RELEASE}
949 NSR-?:NONSTOP_KERNEL:*:*)
950 @@ -1293,13 +1342,13 @@
951 echo pdp10-unknown-its
954 - echo mips-sei-seiux${UNAME_RELEASE}
955 + echo mips-sei-seiux${UNAME_RELEASE}
958 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
961 - UNAME_MACHINE=`(uname -p) 2>/dev/null`
962 + UNAME_MACHINE=`(uname -p) 2>/dev/null`
963 case "${UNAME_MACHINE}" in
964 A*) echo alpha-dec-vms ; exit ;;
965 I*) echo ia64-dec-vms ; exit ;;
966 @@ -1314,158 +1363,13 @@
968 echo ${UNAME_MACHINE}-pc-rdos
972 -#echo '(No uname command or uname output not recognized.)' 1>&2
973 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
975 -eval $set_cc_for_build
978 -# include <sys/types.h>
979 -# include <sys/utsname.h>
984 -#if defined (MIPSEB)
985 - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
986 - I don't know.... */
987 - printf ("mips-sony-bsd\n"); exit (0);
989 -#include <sys/param.h>
990 - printf ("m68k-sony-newsos%s\n",
1000 -#if defined (__arm) && defined (__acorn) && defined (__unix)
1001 - printf ("arm-acorn-riscix\n"); exit (0);
1004 -#if defined (hp300) && !defined (hpux)
1005 - printf ("m68k-hp-bsd\n"); exit (0);
1009 -#if !defined (__ARCHITECTURE__)
1010 -#define __ARCHITECTURE__ "m68k"
1013 - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1015 - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1017 - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1021 -#if defined (MULTIMAX) || defined (n16)
1022 -#if defined (UMAXV)
1023 - printf ("ns32k-encore-sysv\n"); exit (0);
1026 - printf ("ns32k-encore-mach\n"); exit (0);
1028 - printf ("ns32k-encore-bsd\n"); exit (0);
1033 -#if defined (__386BSD__)
1034 - printf ("i386-pc-bsd\n"); exit (0);
1037 -#if defined (sequent)
1039 - printf ("i386-sequent-dynix\n"); exit (0);
1041 -#if defined (ns32000)
1042 - printf ("ns32k-sequent-dynix\n"); exit (0);
1046 -#if defined (_SEQUENT_)
1047 - struct utsname un;
1051 - if (strncmp(un.version, "V2", 2) == 0) {
1052 - printf ("i386-sequent-ptx2\n"); exit (0);
1054 - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1055 - printf ("i386-sequent-ptx1\n"); exit (0);
1057 - printf ("i386-sequent-ptx\n"); exit (0);
1062 -# if !defined (ultrix)
1063 -# include <sys/param.h>
1066 - printf ("vax-dec-bsd4.3\n"); exit (0);
1069 - printf ("vax-dec-bsd4.3reno\n"); exit (0);
1071 - printf ("vax-dec-bsd\n"); exit (0);
1075 - printf ("vax-dec-bsd\n"); exit (0);
1078 - printf ("vax-dec-ultrix\n"); exit (0);
1082 -#if defined (alliant) && defined (i860)
1083 - printf ("i860-alliant-bsd\n"); exit (0);
1090 -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1091 - { echo "$SYSTEM_NAME"; exit; }
1093 -# Apollos put the system type in the environment.
1095 -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1097 -# Convex versions that predate uname can use getsysinfo(1)
1099 -if [ -x /usr/convex/getsysinfo ]
1101 - case `getsysinfo -f cpu_type` in
1103 - echo c1-convex-bsd
1106 - if getsysinfo -f scalar_acc
1107 - then echo c32-convex-bsd
1108 - else echo c2-convex-bsd
1112 - echo c34-convex-bsd
1115 - echo c38-convex-bsd
1117 + echo ${UNAME_MACHINE}-pc-aros
1120 - echo c4-convex-bsd
1121 + x86_64:VMkernel:*:*)
1122 + echo ${UNAME_MACHINE}-unknown-esx
1129 $0: unable to guess system type
1130 @@ -1474,9 +1378,9 @@
1131 the operating system you are using. It is advised that you
1132 download the most up to date version of the config scripts from
1134 - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
1135 + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1137 - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
1138 + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1140 If the version you run ($0) is already up to date, please
1141 send the following data and any information you think might be
1146 # Configuration validation subroutine script.
1147 -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
1148 -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
1151 -timestamp='2007-04-29'
1153 -# This file is (in principle) common to ALL GNU software.
1154 -# The presence of a machine in this file suggests that SOME GNU software
1155 -# can handle that machine. It does not imply ALL GNU software can.
1157 -# This file is free software; you can redistribute it and/or modify
1158 -# it under the terms of the GNU General Public License as published by
1159 -# the Free Software Foundation; either version 2 of the License, or
1160 +# Copyright 1992-2014 Free Software Foundation, Inc.
1162 +timestamp='2014-05-01'
1164 +# This file is free software; you can redistribute it and/or modify it
1165 +# under the terms of the GNU General Public License as published by
1166 +# the Free Software Foundation; either version 3 of the License, or
1167 # (at your option) any later version.
1169 -# This program is distributed in the hope that it will be useful,
1170 -# but WITHOUT ANY WARRANTY; without even the implied warranty of
1171 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1172 -# GNU General Public License for more details.
1173 +# This program is distributed in the hope that it will be useful, but
1174 +# WITHOUT ANY WARRANTY; without even the implied warranty of
1175 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1176 +# General Public License for more details.
1178 # You should have received a copy of the GNU General Public License
1179 -# along with this program; if not, write to the Free Software
1180 -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
1182 +# along with this program; if not, see <http://www.gnu.org/licenses/>.
1184 # As a special exception to the GNU General Public License, if you
1185 # distribute this file as part of a program that contains a
1186 # configuration script generated by Autoconf, you may include it under
1187 -# the same distribution terms that you use for the rest of that program.
1188 +# the same distribution terms that you use for the rest of that
1189 +# program. This Exception is an additional permission under section 7
1190 +# of the GNU General Public License, version 3 ("GPLv3").
1193 -# Please send patches to <config-patches@gnu.org>. Submit a context
1194 -# diff and a properly formatted ChangeLog entry.
1195 +# Please send patches with a ChangeLog entry to config-patches@gnu.org.
1197 # Configuration subroutine to validate and canonicalize a configuration type.
1198 # Supply the specified configuration type as an argument.
1199 # If it is invalid, we print an error message on stderr and exit with code 1.
1200 # Otherwise, we print the canonical config type on stdout and succeed.
1202 +# You can get the latest version of this script from:
1203 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1205 # This file is supposed to be the same for all GNU packages
1206 # and recognize all the CPU types, system types and aliases
1207 # that are meaningful with *any* GNU software.
1210 GNU config.sub ($timestamp)
1212 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
1213 -Free Software Foundation, Inc.
1214 +Copyright 1992-2014 Free Software Foundation, Inc.
1216 This is free software; see the source for copying conditions. There is NO
1217 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
1218 @@ -120,12 +115,18 @@
1219 # Here we must recognize all the valid KERNEL-OS combinations.
1220 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
1222 - nto-qnx* | linux-androideabi* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
1223 - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
1224 + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
1225 + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
1226 + knetbsd*-gnu* | netbsd*-gnu* | \
1227 + kopensolaris*-gnu* | \
1228 storm-chaos* | os2-emx* | rtmk-nova*)
1230 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
1234 + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
1237 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
1238 if [ $basic_machine != $1 ]
1239 @@ -148,10 +149,13 @@
1240 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
1241 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
1242 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
1243 - -apple | -axis | -knuth | -cray)
1244 + -apple | -axis | -knuth | -cray | -microblaze*)
1251 -sim | -cisco | -oki | -wec | -winbond)
1254 @@ -166,10 +170,10 @@
1268 @@ -214,6 +218,12 @@
1270 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1281 @@ -238,59 +248,85 @@
1282 # Some are omitted here because they have special meanings below.
1285 + | aarch64 | aarch64_be \
1286 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
1287 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
1289 - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
1291 + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
1296 + | c4x | c8051 | clipper \
1297 | d10v | d30v | dlx | dsp16xx \
1299 | fido | fr30 | frv \
1300 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
1302 | i370 | i860 | i960 | ia64 \
1307 | m32c | m32r | m32rle | m68000 | m68k | m88k \
1308 - | maxq | mb | microblaze | mcore | mep \
1309 + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
1310 | mips | mipsbe | mipseb | mipsel | mipsle \
1312 | mips64 | mips64el \
1313 - | mips64vr | mips64vrel \
1314 + | mips64octeon | mips64octeonel \
1315 | mips64orion | mips64orionel \
1316 + | mips64r5900 | mips64r5900el \
1317 + | mips64vr | mips64vrel \
1318 | mips64vr4100 | mips64vr4100el \
1319 | mips64vr4300 | mips64vr4300el \
1320 | mips64vr5000 | mips64vr5000el \
1321 | mips64vr5900 | mips64vr5900el \
1322 | mipsisa32 | mipsisa32el \
1323 | mipsisa32r2 | mipsisa32r2el \
1324 + | mipsisa32r6 | mipsisa32r6el \
1325 | mipsisa64 | mipsisa64el \
1326 | mipsisa64r2 | mipsisa64r2el \
1327 + | mipsisa64r6 | mipsisa64r6el \
1328 | mipsisa64sb1 | mipsisa64sb1el \
1329 | mipsisa64sr71k | mipsisa64sr71kel \
1330 + | mipsr5900 | mipsr5900el \
1331 | mipstx39 | mipstx39el \
1332 | mn10200 | mn10300 \
1337 + | nds32 | nds32le | nds32be \
1338 + | nios | nios2 | nios2eb | nios2el \
1341 + | open8 | or1k | or1knd | or32 \
1342 | pdp10 | pdp11 | pj | pjl \
1343 - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
1344 + | powerpc | powerpc64 | powerpc64le | powerpcle \
1348 - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
1349 + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
1351 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
1352 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
1353 - | spu | strongarm \
1354 - | tahoe | thumb | tic4x | tic80 | tron \
1357 + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
1359 + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
1361 - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
1363 + | x86 | xc16x | xstormy16 | xtensa \
1365 basic_machine=$basic_machine-unknown
1367 - m6811 | m68hc11 | m6812 | m68hc12)
1368 - # Motorola 68HC11/12.
1370 + basic_machine=tic54x-unknown
1373 + basic_machine=tic55x-unknown
1376 + basic_machine=tic6x-unknown
1378 + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
1379 basic_machine=$basic_machine-unknown
1382 @@ -300,6 +336,21 @@
1383 basic_machine=mt-unknown
1386 + strongarm | thumb | xscale)
1387 + basic_machine=arm-unknown
1390 + basic_machine=$basic_machine-unknown
1394 + basic_machine=armeb-unknown
1398 + basic_machine=armel-unknown
1401 # We use `pc' rather than `unknown'
1402 # because (1) that's what they normally are, and
1403 # (2) the word "unknown" tends to confuse beginning users.
1404 @@ -314,64 +365,86 @@
1405 # Recognize the basic CPU types with company name.
1408 + | aarch64-* | aarch64_be-* \
1409 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
1410 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
1411 - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
1412 + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
1413 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
1415 + | be32-* | be64-* \
1416 | bfin-* | bs2000-* \
1417 - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
1418 - | clipper-* | craynv-* | cydra-* \
1419 + | c[123]* | c30-* | [cjt]90-* | c4x-* \
1420 + | c8051-* | clipper-* | craynv-* | cydra-* \
1421 | d10v-* | d30v-* | dlx-* \
1423 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
1424 | h8300-* | h8500-* \
1425 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
1427 | i*86-* | i860-* | i960-* | ia64-* \
1428 | ip2k-* | iq2000-* \
1430 + | le32-* | le64-* \
1432 | m32c-* | m32r-* | m32rle-* \
1433 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
1434 - | m88110-* | m88k-* | maxq-* | mcore-* \
1435 + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
1436 + | microblaze-* | microblazeel-* \
1437 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
1439 | mips64-* | mips64el-* \
1440 - | mips64vr-* | mips64vrel-* \
1441 + | mips64octeon-* | mips64octeonel-* \
1442 | mips64orion-* | mips64orionel-* \
1443 + | mips64r5900-* | mips64r5900el-* \
1444 + | mips64vr-* | mips64vrel-* \
1445 | mips64vr4100-* | mips64vr4100el-* \
1446 | mips64vr4300-* | mips64vr4300el-* \
1447 | mips64vr5000-* | mips64vr5000el-* \
1448 | mips64vr5900-* | mips64vr5900el-* \
1449 | mipsisa32-* | mipsisa32el-* \
1450 | mipsisa32r2-* | mipsisa32r2el-* \
1451 + | mipsisa32r6-* | mipsisa32r6el-* \
1452 | mipsisa64-* | mipsisa64el-* \
1453 | mipsisa64r2-* | mipsisa64r2el-* \
1454 + | mipsisa64r6-* | mipsisa64r6el-* \
1455 | mipsisa64sb1-* | mipsisa64sb1el-* \
1456 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
1457 + | mipsr5900-* | mipsr5900el-* \
1458 | mipstx39-* | mipstx39el-* \
1462 - | nios-* | nios2-* \
1463 + | nds32-* | nds32le-* | nds32be-* \
1464 + | nios-* | nios2-* | nios2eb-* | nios2el-* \
1465 | none-* | np1-* | ns16k-* | ns32k-* \
1469 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
1470 - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
1471 + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
1473 - | romp-* | rs6000-* \
1474 - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
1475 + | rl78-* | romp-* | rs6000-* | rx-* \
1476 + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
1477 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
1478 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
1480 - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
1481 - | tahoe-* | thumb-* \
1482 + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
1484 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
1487 - | v850-* | v850e-* | vax-* \
1489 + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
1492 - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
1493 - | xstormy16-* | xtensa-* \
1494 + | x86-* | x86_64-* | xc16x-* | xps100-* \
1495 + | xstormy16-* | xtensa*-* \
1500 + # Recognize the basic CPU types without company name, with glob match.
1502 + basic_machine=$basic_machine-unknown
1504 # Recognize the various machine names and aliases which stand
1505 # for a CPU type and a company and sometimes even an OS.
1507 basic_machine=a29k-amd
1512 basic_machine=abacus-unknown
1515 @@ -435,6 +508,10 @@
1516 basic_machine=m68k-apollo
1520 + basic_machine=i386-pc
1524 basic_machine=m68k-apple
1526 @@ -443,10 +520,35 @@
1527 basic_machine=ns32k-sequent
1531 + basic_machine=bfin-unknown
1535 + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
1539 + basic_machine=powerpc-ibm
1543 + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
1546 + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
1549 + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
1552 basic_machine=c90-cray
1556 + basic_machine=arm-unknown
1560 basic_machine=c1-convex
1563 basic_machine=craynv-cray
1567 - basic_machine=cr16c-unknown
1569 + basic_machine=cr16-unknown
1573 @@ -514,6 +616,10 @@
1574 basic_machine=m88k-motorola
1578 + basic_machine=i686-pc
1582 basic_machine=i586-pc
1586 basic_machine=i370-ibm
1588 -# I'm not sure what "Sysv32" means. Should this be sysv3.2?
1590 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
1592 @@ -668,6 +773,14 @@
1593 basic_machine=m68k-isi
1597 + basic_machine=m68k-unknown
1601 + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
1605 basic_machine=m88k-omron
1607 @@ -679,8 +792,15 @@
1608 basic_machine=ns32k-utek
1612 + basic_machine=microblaze-xilinx
1615 + basic_machine=x86_64-pc
1619 - basic_machine=i386-pc
1620 + basic_machine=i686-pc
1624 @@ -715,10 +835,18 @@
1626 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
1629 + basic_machine=i686-pc
1633 basic_machine=i370-ibm
1637 + basic_machine=le32-unknown
1641 basic_machine=i486-ncr
1643 @@ -783,6 +911,12 @@
1645 basic_machine=np1-gould
1648 + basic_machine=neo-tandem
1651 + basic_machine=nse-tandem
1654 basic_machine=nsr-tandem
1656 @@ -813,6 +947,14 @@
1657 basic_machine=i860-intel
1661 + basic_machine=hppa-unknown
1665 + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
1669 basic_machine=sparc-tti
1671 @@ -857,9 +999,10 @@
1673 power) basic_machine=power-ibm
1675 - ppc) basic_machine=powerpc-unknown
1676 + ppc | ppcbe) basic_machine=powerpc-unknown
1678 - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1680 + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1682 ppcle | powerpclittle | ppc-le | powerpc-little)
1683 basic_machine=powerpcle-unknown
1684 @@ -884,7 +1027,11 @@
1685 basic_machine=i586-unknown
1690 + basic_machine=x86_64-pc
1694 basic_machine=i386-pc
1697 @@ -953,6 +1100,9 @@
1698 basic_machine=i860-stratus
1701 + strongarm-* | thumb-*)
1702 + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1705 basic_machine=m68000-sun
1707 @@ -1009,17 +1159,9 @@
1708 basic_machine=t90-cray
1712 - basic_machine=tic54x-unknown
1716 - basic_machine=tic55x-unknown
1720 - basic_machine=tic6x-unknown
1723 + basic_machine=$basic_machine-unknown
1727 basic_machine=mipstx39-unknown
1728 @@ -1088,6 +1230,9 @@
1730 basic_machine=xps100-honeywell
1732 + xscale-* | xscalee[bl]-*)
1733 + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1736 basic_machine=ymp-cray
1738 @@ -1096,6 +1241,10 @@
1739 basic_machine=z8k-unknown
1743 + basic_machine=z80-unknown
1747 basic_machine=none-none
1749 @@ -1134,7 +1283,7 @@
1751 basic_machine=we32k-att
1753 - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
1754 + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1755 basic_machine=sh-unknown
1757 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1758 @@ -1181,9 +1330,12 @@
1759 if [ x"$os" != x"" ]
1762 - # First match some system type aliases
1763 - # that might get confused with valid system types.
1764 + # First match some system type aliases
1765 + # that might get confused with valid system types.
1766 # -solaris* is a basic system type, with this one exception.
1770 -solaris1 | -solaris1.*)
1771 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1773 @@ -1204,21 +1356,23 @@
1774 # Each alternative MUST END IN A *, to match a version number.
1775 # -sysv* is not here because it comes later, after sysvr4.
1776 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1777 - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1778 - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1779 + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1780 + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1781 + | -sym* | -kopensolaris* | -plan9* \
1782 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1784 + | -aos* | -aros* \
1785 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1786 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1787 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1788 - | -openbsd* | -solidbsd* \
1789 + | -bitrig* | -openbsd* | -solidbsd* \
1790 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1791 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1792 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1793 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1794 - | -chorusos* | -chorusrdb* \
1795 - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1796 - | -mingw32* | -linux-androideabi | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1797 + | -chorusos* | -chorusrdb* | -cegcc* \
1798 + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1799 + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1800 + | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1801 | -uxpv* | -beos* | -mpeix* | -udk* \
1802 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1803 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1804 @@ -1226,7 +1380,7 @@
1805 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1806 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1807 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1808 - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
1809 + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
1810 # Remember, each alternative MUST END IN *, to match a version number.
1813 @@ -1265,7 +1419,7 @@
1822 @@ -1314,7 +1468,7 @@
1831 @@ -1350,12 +1504,14 @@
1849 @@ -1378,10 +1534,10 @@
1850 # system, and we'll never get to this point.
1852 case $basic_machine in
1862 @@ -1393,8 +1549,23 @@
1886 # This must come before the *-dec entry.
1888 @@ -1414,14 +1585,11 @@
1892 - # This also exists in the configure program, but was not the
1904 @@ -1448,7 +1616,7 @@
1913 @@ -1553,7 +1721,7 @@