Revision 3292

View differences:

config.guess
1 1
#! /bin/sh
2 2
# Attempt to guess a canonical system name.
3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5
#   Free Software Foundation, Inc.
3
#   Copyright 1992-2013 Free Software Foundation, Inc.
6 4

  
7
timestamp='2009-06-10'
5
timestamp='2013-06-10'
8 6

  
9 7
# This file is free software; you can redistribute it and/or modify it
10 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 10
# (at your option) any later version.
13 11
#
14 12
# This program is distributed in the hope that it will be useful, but
......
17 15
# General Public License for more details.
18 16
#
19 17
# You should have received a copy of the GNU General Public License
20
# along with this program; if not, write to the Free Software
21
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
22
# 02110-1301, USA.
18
# along with this program; if not, see <http://www.gnu.org/licenses/>.
23 19
#
24 20
# As a special exception to the GNU General Public License, if you
25 21
# distribute this file as part of a program that contains a
26 22
# configuration script generated by Autoconf, you may include it under
27
# the same distribution terms that you use for the rest of that program.
28

  
29

  
30
# Originally written by Per Bothner <per@bothner.com>.
31
# Please send patches to <config-patches@gnu.org>.  Submit a context
32
# diff and a properly formatted ChangeLog entry.
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").
33 26
#
34
# This script attempts to guess a canonical system name similar to
35
# config.sub.  If it succeeds, it prints the system name on stdout, and
36
# exits with 0.  Otherwise, it exits with 1.
27
# Originally written by Per Bothner.
37 28
#
38
# The plan is that this can be called by configure scripts if you
39
# don't specify an explicit build system type.
29
# You can get the latest version of this script from:
30
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
31
#
32
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
40 33

  
34

  
41 35
me=`echo "$0" | sed -e 's,.*/,,'`
42 36

  
43 37
usage="\
......
56 50
GNU config.guess ($timestamp)
57 51

  
58 52
Originally written by Per Bothner.
59
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
60
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
53
Copyright 1992-2013 Free Software Foundation, Inc.
61 54

  
62 55
This is free software; see the source for copying conditions.  There is NO
63 56
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
......
139 132
UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
140 133
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
141 134

  
135
case "${UNAME_SYSTEM}" in
136
Linux|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'`
153
	;;
154
esac
155

  
142 156
# Note: order is significant - the case branches are not exclusive.
143 157

  
144 158
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
145 159
    *:NetBSD:*:*)
146 160
	# NetBSD (nbsd) targets should (where applicable) match one or
147
	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
161
	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
148 162
	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
149 163
	# switched to ELF, *-*-netbsd* would select the old
150 164
	# object file format.  This provides both forward
......
180 194
		fi
181 195
		;;
182 196
	    *)
183
	        os=netbsd
197
		os=netbsd
184 198
		;;
185 199
	esac
186 200
	# The OS release
......
201 215
	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
202 216
	echo "${machine}-${os}${release}"
203 217
	exit ;;
218
    *:Bitrig:*:*)
219
	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
220
	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
221
	exit ;;
204 222
    *:OpenBSD:*:*)
205 223
	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
206 224
	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
......
223 241
		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
224 242
		;;
225 243
	*5.*)
226
	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
244
		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
227 245
		;;
228 246
	esac
229 247
	# According to Compaq, /usr/sbin/psrinfo has been available on
......
269 287
	# A Xn.n version is an unreleased experimental baselevel.
270 288
	# 1.2 uses "1.2" for uname -r.
271 289
	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
272
	exit ;;
290
	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
291
	exitcode=$?
292
	trap '' 0
293
	exit $exitcode ;;
273 294
    Alpha\ *:Windows_NT*:*)
274 295
	# How do we know it's Interix rather than the generic POSIX subsystem?
275 296
	# Should we change UNAME_MACHINE based on the output of uname instead
......
295 316
	echo s390-ibm-zvmoe
296 317
	exit ;;
297 318
    *:OS400:*:*)
298
        echo powerpc-ibm-os400
319
	echo powerpc-ibm-os400
299 320
	exit ;;
300 321
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
301 322
	echo arm-acorn-riscix${UNAME_RELEASE}
302 323
	exit ;;
303
    arm:riscos:*:*|arm:RISCOS:*:*)
324
    arm*:riscos:*:*|arm*:RISCOS:*:*)
304 325
	echo arm-unknown-riscos
305 326
	exit ;;
306 327
    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
......
333 354
    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
334 355
	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335 356
	exit ;;
357
    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
358
	echo i386-pc-auroraux${UNAME_RELEASE}
359
	exit ;;
336 360
    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
337 361
	eval $set_cc_for_build
338 362
	SUN_ARCH="i386"
......
391 415
    # MiNT.  But MiNT is downward compatible to TOS, so this should
392 416
    # be no problem.
393 417
    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
394
        echo m68k-atari-mint${UNAME_RELEASE}
418
	echo m68k-atari-mint${UNAME_RELEASE}
395 419
	exit ;;
396 420
    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
397 421
	echo m68k-atari-mint${UNAME_RELEASE}
398
        exit ;;
422
	exit ;;
399 423
    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
400
        echo m68k-atari-mint${UNAME_RELEASE}
424
	echo m68k-atari-mint${UNAME_RELEASE}
401 425
	exit ;;
402 426
    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
403
        echo m68k-milan-mint${UNAME_RELEASE}
404
        exit ;;
427
	echo m68k-milan-mint${UNAME_RELEASE}
428
	exit ;;
405 429
    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
406
        echo m68k-hades-mint${UNAME_RELEASE}
407
        exit ;;
430
	echo m68k-hades-mint${UNAME_RELEASE}
431
	exit ;;
408 432
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
409
        echo m68k-unknown-mint${UNAME_RELEASE}
410
        exit ;;
433
	echo m68k-unknown-mint${UNAME_RELEASE}
434
	exit ;;
411 435
    m68k:machten:*:*)
412 436
	echo m68k-apple-machten${UNAME_RELEASE}
413 437
	exit ;;
......
477 501
	echo m88k-motorola-sysv3
478 502
	exit ;;
479 503
    AViiON:dgux:*:*)
480
        # DG/UX returns AViiON for all architectures
481
        UNAME_PROCESSOR=`/usr/bin/uname -p`
504
	# DG/UX returns AViiON for all architectures
505
	UNAME_PROCESSOR=`/usr/bin/uname -p`
482 506
	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
483 507
	then
484 508
	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
......
491 515
	else
492 516
	    echo i586-dg-dgux${UNAME_RELEASE}
493 517
	fi
494
 	exit ;;
518
	exit ;;
495 519
    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
496 520
	echo m88k-dolphin-sysv3
497 521
	exit ;;
......
548 572
		echo rs6000-ibm-aix3.2
549 573
	fi
550 574
	exit ;;
551
    *:AIX:*:[456])
575
    *:AIX:*:[4567])
552 576
	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
553 577
	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
554 578
		IBM_ARCH=rs6000
......
591 615
	    9000/[678][0-9][0-9])
592 616
		if [ -x /usr/bin/getconf ]; then
593 617
		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
594
                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
595
                    case "${sc_cpu_version}" in
596
                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
597
                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
598
                      532)                      # CPU_PA_RISC2_0
599
                        case "${sc_kernel_bits}" in
600
                          32) HP_ARCH="hppa2.0n" ;;
601
                          64) HP_ARCH="hppa2.0w" ;;
618
		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
619
		    case "${sc_cpu_version}" in
620
		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
621
		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
622
		      532)                      # CPU_PA_RISC2_0
623
			case "${sc_kernel_bits}" in
624
			  32) HP_ARCH="hppa2.0n" ;;
625
			  64) HP_ARCH="hppa2.0w" ;;
602 626
			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
603
                        esac ;;
604
                    esac
627
			esac ;;
628
		    esac
605 629
		fi
606 630
		if [ "${HP_ARCH}" = "" ]; then
607 631
		    eval $set_cc_for_build
608
		    sed 's/^              //' << EOF >$dummy.c
632
		    sed 's/^		//' << EOF >$dummy.c
609 633

  
610
              #define _HPUX_SOURCE
611
              #include <stdlib.h>
612
              #include <unistd.h>
634
		#define _HPUX_SOURCE
635
		#include <stdlib.h>
636
		#include <unistd.h>
613 637

  
614
              int main ()
615
              {
616
              #if defined(_SC_KERNEL_BITS)
617
                  long bits = sysconf(_SC_KERNEL_BITS);
618
              #endif
619
                  long cpu  = sysconf (_SC_CPU_VERSION);
638
		int main ()
639
		{
640
		#if defined(_SC_KERNEL_BITS)
641
		    long bits = sysconf(_SC_KERNEL_BITS);
642
		#endif
643
		    long cpu  = sysconf (_SC_CPU_VERSION);
620 644

  
621
                  switch (cpu)
622
              	{
623
              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
624
              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
625
              	case CPU_PA_RISC2_0:
626
              #if defined(_SC_KERNEL_BITS)
627
              	    switch (bits)
628
              		{
629
              		case 64: puts ("hppa2.0w"); break;
630
              		case 32: puts ("hppa2.0n"); break;
631
              		default: puts ("hppa2.0"); break;
632
              		} break;
633
              #else  /* !defined(_SC_KERNEL_BITS) */
634
              	    puts ("hppa2.0"); break;
635
              #endif
636
              	default: puts ("hppa1.0"); break;
637
              	}
638
                  exit (0);
639
              }
645
		    switch (cpu)
646
			{
647
			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
648
			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
649
			case CPU_PA_RISC2_0:
650
		#if defined(_SC_KERNEL_BITS)
651
			    switch (bits)
652
				{
653
				case 64: puts ("hppa2.0w"); break;
654
				case 32: puts ("hppa2.0n"); break;
655
				default: puts ("hppa2.0"); break;
656
				} break;
657
		#else  /* !defined(_SC_KERNEL_BITS) */
658
			    puts ("hppa2.0"); break;
659
		#endif
660
			default: puts ("hppa1.0"); break;
661
			}
662
		    exit (0);
663
		}
640 664
EOF
641 665
		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
642 666
		    test -z "$HP_ARCH" && HP_ARCH=hppa
......
727 751
	exit ;;
728 752
    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
729 753
	echo c1-convex-bsd
730
        exit ;;
754
	exit ;;
731 755
    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
732 756
	if getsysinfo -f scalar_acc
733 757
	then echo c32-convex-bsd
734 758
	else echo c2-convex-bsd
735 759
	fi
736
        exit ;;
760
	exit ;;
737 761
    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
738 762
	echo c34-convex-bsd
739
        exit ;;
763
	exit ;;
740 764
    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
741 765
	echo c38-convex-bsd
742
        exit ;;
766
	exit ;;
743 767
    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
744 768
	echo c4-convex-bsd
745
        exit ;;
769
	exit ;;
746 770
    CRAY*Y-MP:*:*:*)
747 771
	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
748 772
	exit ;;
......
766 790
	exit ;;
767 791
    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
768 792
	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
769
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
770
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
771
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
772
        exit ;;
793
	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
794
	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
795
	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
796
	exit ;;
773 797
    5000:UNIX_System_V:4.*:*)
774
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
775
        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
776
        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
798
	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
799
	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
800
	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
777 801
	exit ;;
778 802
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
779 803
	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
......
785 809
	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
786 810
	exit ;;
787 811
    *:FreeBSD:*:*)
788
	case ${UNAME_MACHINE} in
789
	    pc98)
790
		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
812
	UNAME_PROCESSOR=`/usr/bin/uname -p`
813
	case ${UNAME_PROCESSOR} in
791 814
	    amd64)
792 815
		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
793 816
	    *)
794
		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
817
		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
795 818
	esac
796 819
	exit ;;
797 820
    i*:CYGWIN*:*)
798 821
	echo ${UNAME_MACHINE}-pc-cygwin
799 822
	exit ;;
823
    *:MINGW64*:*)
824
	echo ${UNAME_MACHINE}-pc-mingw64
825
	exit ;;
800 826
    *:MINGW*:*)
801 827
	echo ${UNAME_MACHINE}-pc-mingw32
802 828
	exit ;;
829
    i*:MSYS*:*)
830
	echo ${UNAME_MACHINE}-pc-msys
831
	exit ;;
803 832
    i*:windows32*:*)
804
    	# uname -m includes "-pc" on this system.
805
    	echo ${UNAME_MACHINE}-mingw32
833
	# uname -m includes "-pc" on this system.
834
	echo ${UNAME_MACHINE}-mingw32
806 835
	exit ;;
807 836
    i*:PW*:*)
808 837
	echo ${UNAME_MACHINE}-pc-pw32
809 838
	exit ;;
810
    *:Interix*:[3456]*)
811
    	case ${UNAME_MACHINE} in
839
    *:Interix*:*)
840
	case ${UNAME_MACHINE} in
812 841
	    x86)
813 842
		echo i586-pc-interix${UNAME_RELEASE}
814 843
		exit ;;
815
	    EM64T | authenticamd | genuineintel)
844
	    authenticamd | genuineintel | EM64T)
816 845
		echo x86_64-unknown-interix${UNAME_RELEASE}
817 846
		exit ;;
818 847
	    IA64)
......
845 874
	exit ;;
846 875
    *:GNU:*:*)
847 876
	# the GNU system
848
	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
877
	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
849 878
	exit ;;
850 879
    *:GNU/*:*:*)
851 880
	# other systems with GNU libc and userland
852
	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
881
	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
853 882
	exit ;;
854 883
    i*86:Minix:*:*)
855 884
	echo ${UNAME_MACHINE}-pc-minix
856 885
	exit ;;
886
    aarch64:Linux:*:*)
887
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
888
	exit ;;
889
    aarch64_be:Linux:*:*)
890
	UNAME_MACHINE=aarch64_be
891
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
892
	exit ;;
893
    alpha:Linux:*:*)
894
	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
895
	  EV5)   UNAME_MACHINE=alphaev5 ;;
896
	  EV56)  UNAME_MACHINE=alphaev56 ;;
897
	  PCA56) UNAME_MACHINE=alphapca56 ;;
898
	  PCA57) UNAME_MACHINE=alphapca56 ;;
899
	  EV6)   UNAME_MACHINE=alphaev6 ;;
900
	  EV67)  UNAME_MACHINE=alphaev67 ;;
901
	  EV68*) UNAME_MACHINE=alphaev68 ;;
902
	esac
903
	objdump --private-headers /bin/sh | grep -q ld.so.1
904
	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
905
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
906
	exit ;;
907
    arc:Linux:*:* | arceb:Linux:*:*)
908
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
909
	exit ;;
857 910
    arm*:Linux:*:*)
858 911
	eval $set_cc_for_build
859 912
	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
860 913
	    | grep -q __ARM_EABI__
861 914
	then
862
	    echo ${UNAME_MACHINE}-unknown-linux-gnu
915
	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
863 916
	else
864
	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
917
	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
918
		| grep -q __ARM_PCS_VFP
919
	    then
920
		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
921
	    else
922
		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
923
	    fi
865 924
	fi
866 925
	exit ;;
867 926
    avr32*:Linux:*:*)
868
	echo ${UNAME_MACHINE}-unknown-linux-gnu
927
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
869 928
	exit ;;
870 929
    cris:Linux:*:*)
871
	echo cris-axis-linux-gnu
930
	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
872 931
	exit ;;
873 932
    crisv32:Linux:*:*)
874
	echo crisv32-axis-linux-gnu
933
	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
875 934
	exit ;;
876 935
    frv:Linux:*:*)
877
    	echo frv-unknown-linux-gnu
936
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
878 937
	exit ;;
938
    hexagon:Linux:*:*)
939
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
940
	exit ;;
941
    i*86:Linux:*:*)
942
	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
943
	exit ;;
879 944
    ia64:Linux:*:*)
880
	echo ${UNAME_MACHINE}-unknown-linux-gnu
945
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
881 946
	exit ;;
882 947
    m32r*:Linux:*:*)
883
	echo ${UNAME_MACHINE}-unknown-linux-gnu
948
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
884 949
	exit ;;
885 950
    m68*:Linux:*:*)
886
	echo ${UNAME_MACHINE}-unknown-linux-gnu
951
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
887 952
	exit ;;
888 953
    mips:Linux:*:* | mips64:Linux:*:*)
889 954
	eval $set_cc_for_build
......
901 966
	#endif
902 967
	#endif
903 968
EOF
904
	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
905
	    /^CPU/{
906
		s: ::g
907
		p
908
	    }'`"
909
	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
969
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
970
	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
910 971
	;;
972
    or1k:Linux:*:*)
973
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
974
	exit ;;
911 975
    or32:Linux:*:*)
912
	echo or32-unknown-linux-gnu
976
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
913 977
	exit ;;
914
    ppc:Linux:*:*)
915
	echo powerpc-unknown-linux-gnu
978
    padre:Linux:*:*)
979
	echo sparc-unknown-linux-${LIBC}
916 980
	exit ;;
917
    ppc64:Linux:*:*)
918
	echo powerpc64-unknown-linux-gnu
981
    parisc64:Linux:*:* | hppa64:Linux:*:*)
982
	echo hppa64-unknown-linux-${LIBC}
919 983
	exit ;;
920
    alpha:Linux:*:*)
921
	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
922
	  EV5)   UNAME_MACHINE=alphaev5 ;;
923
	  EV56)  UNAME_MACHINE=alphaev56 ;;
924
	  PCA56) UNAME_MACHINE=alphapca56 ;;
925
	  PCA57) UNAME_MACHINE=alphapca56 ;;
926
	  EV6)   UNAME_MACHINE=alphaev6 ;;
927
	  EV67)  UNAME_MACHINE=alphaev67 ;;
928
	  EV68*) UNAME_MACHINE=alphaev68 ;;
929
        esac
930
	objdump --private-headers /bin/sh | grep -q ld.so.1
931
	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
932
	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
933
	exit ;;
934
    padre:Linux:*:*)
935
	echo sparc-unknown-linux-gnu
936
	exit ;;
937 984
    parisc:Linux:*:* | hppa:Linux:*:*)
938 985
	# Look for CPU level
939 986
	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
940
	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
941
	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
942
	  *)    echo hppa-unknown-linux-gnu ;;
987
	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
988
	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
989
	  *)    echo hppa-unknown-linux-${LIBC} ;;
943 990
	esac
944 991
	exit ;;
945
    parisc64:Linux:*:* | hppa64:Linux:*:*)
946
	echo hppa64-unknown-linux-gnu
992
    ppc64:Linux:*:*)
993
	echo powerpc64-unknown-linux-${LIBC}
947 994
	exit ;;
995
    ppc:Linux:*:*)
996
	echo powerpc-unknown-linux-${LIBC}
997
	exit ;;
998
    ppc64le:Linux:*:*)
999
	echo powerpc64le-unknown-linux-${LIBC}
1000
	exit ;;
1001
    ppcle:Linux:*:*)
1002
	echo powerpcle-unknown-linux-${LIBC}
1003
	exit ;;
948 1004
    s390:Linux:*:* | s390x:Linux:*:*)
949
	echo ${UNAME_MACHINE}-ibm-linux
1005
	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
950 1006
	exit ;;
951 1007
    sh64*:Linux:*:*)
952
    	echo ${UNAME_MACHINE}-unknown-linux-gnu
1008
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
953 1009
	exit ;;
954 1010
    sh*:Linux:*:*)
955
	echo ${UNAME_MACHINE}-unknown-linux-gnu
1011
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
956 1012
	exit ;;
957 1013
    sparc:Linux:*:* | sparc64:Linux:*:*)
958
	echo ${UNAME_MACHINE}-unknown-linux-gnu
1014
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
959 1015
	exit ;;
1016
    tile*:Linux:*:*)
1017
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1018
	exit ;;
960 1019
    vax:Linux:*:*)
961
	echo ${UNAME_MACHINE}-dec-linux-gnu
1020
	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
962 1021
	exit ;;
963 1022
    x86_64:Linux:*:*)
964
	echo x86_64-unknown-linux-gnu
1023
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
965 1024
	exit ;;
966 1025
    xtensa*:Linux:*:*)
967
    	echo ${UNAME_MACHINE}-unknown-linux-gnu
1026
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
968 1027
	exit ;;
969
    i*86:Linux:*:*)
970
	# The BFD linker knows what the default object file format is, so
971
	# first see if it will tell us. cd to the root directory to prevent
972
	# problems with other programs or directories called `ld' in the path.
973
	# Set LC_ALL=C to ensure ld outputs messages in English.
974
	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
975
			 | sed -ne '/supported targets:/!d
976
				    s/[ 	][ 	]*/ /g
977
				    s/.*supported targets: *//
978
				    s/ .*//
979
				    p'`
980
        case "$ld_supported_targets" in
981
	  elf32-i386)
982
		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
983
		;;
984
	esac
985
	# Determine whether the default compiler is a.out or elf
986
	eval $set_cc_for_build
987
	sed 's/^	//' << EOF >$dummy.c
988
	#include <features.h>
989
	#ifdef __ELF__
990
	# ifdef __GLIBC__
991
	#  if __GLIBC__ >= 2
992
	LIBC=gnu
993
	#  else
994
	LIBC=gnulibc1
995
	#  endif
996
	# else
997
	LIBC=gnulibc1
998
	# endif
999
	#else
1000
	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1001
	LIBC=gnu
1002
	#else
1003
	LIBC=gnuaout
1004
	#endif
1005
	#endif
1006
	#ifdef __dietlibc__
1007
	LIBC=dietlibc
1008
	#endif
1009
EOF
1010
	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1011
	    /^LIBC/{
1012
		s: ::g
1013
		p
1014
	    }'`"
1015
	test x"${LIBC}" != x && {
1016
		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1017
		exit
1018
	}
1019
	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1020
	;;
1021 1028
    i*86:DYNIX/ptx:4*:*)
1022 1029
	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1023 1030
	# earlier versions are messed up and put the nodename in both
......
1025 1032
	echo i386-sequent-sysv4
1026 1033
	exit ;;
1027 1034
    i*86:UNIX_SV:4.2MP:2.*)
1028
        # Unixware is an offshoot of SVR4, but it has its own version
1029
        # number series starting with 2...
1030
        # I am not positive that other SVR4 systems won't match this,
1035
	# Unixware is an offshoot of SVR4, but it has its own version
1036
	# number series starting with 2...
1037
	# I am not positive that other SVR4 systems won't match this,
1031 1038
	# I just have to hope.  -- rms.
1032
        # Use sysv4.2uw... so that sysv4* matches it.
1039
	# Use sysv4.2uw... so that sysv4* matches it.
1033 1040
	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1034 1041
	exit ;;
1035 1042
    i*86:OS/2:*:*)
......
1061 1068
	fi
1062 1069
	exit ;;
1063 1070
    i*86:*:5:[678]*)
1064
    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
1071
	# UnixWare 7.x, OpenUNIX and OpenServer 6.
1065 1072
	case `/bin/uname -X | grep "^Machine"` in
1066 1073
	    *486*)	     UNAME_MACHINE=i486 ;;
1067 1074
	    *Pentium)	     UNAME_MACHINE=i586 ;;
......
1089 1096
	exit ;;
1090 1097
    pc:*:*:*)
1091 1098
	# Left here for compatibility:
1092
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
1093
        # the processor, so we play safe by assuming i586.
1099
	# uname -m prints for DJGPP always 'pc', but it prints nothing about
1100
	# the processor, so we play safe by assuming i586.
1094 1101
	# Note: whatever this is, it MUST be the same as what config.sub
1095 1102
	# prints for the "djgpp" host, or else GDB configury will decide that
1096 1103
	# this is a cross-build.
1097 1104
	echo i586-pc-msdosdjgpp
1098
        exit ;;
1105
	exit ;;
1099 1106
    Intel:Mach:3*:*)
1100 1107
	echo i386-pc-mach3
1101 1108
	exit ;;
......
1130 1137
	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1131 1138
	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1132 1139
    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1133
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1134
          && { echo i486-ncr-sysv4; exit; } ;;
1140
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1141
	  && { echo i486-ncr-sysv4; exit; } ;;
1135 1142
    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1136 1143
	OS_REL='.3'
1137 1144
	test -r /etc/.relid \
......
1174 1181
		echo ns32k-sni-sysv
1175 1182
	fi
1176 1183
	exit ;;
1177
    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1178
                      # says <Richard.M.Bartel@ccMail.Census.GOV>
1179
        echo i586-unisys-sysv4
1180
        exit ;;
1184
    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1185
			# says <Richard.M.Bartel@ccMail.Census.GOV>
1186
	echo i586-unisys-sysv4
1187
	exit ;;
1181 1188
    *:UNIX_System_V:4*:FTX*)
1182 1189
	# From Gerald Hewes <hewes@openmarket.com>.
1183 1190
	# How about differentiating between stratus architectures? -djm
......
1203 1210
	exit ;;
1204 1211
    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1205 1212
	if [ -d /usr/nec ]; then
1206
	        echo mips-nec-sysv${UNAME_RELEASE}
1213
		echo mips-nec-sysv${UNAME_RELEASE}
1207 1214
	else
1208
	        echo mips-unknown-sysv${UNAME_RELEASE}
1215
		echo mips-unknown-sysv${UNAME_RELEASE}
1209 1216
	fi
1210
        exit ;;
1217
	exit ;;
1211 1218
    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
1212 1219
	echo powerpc-be-beos
1213 1220
	exit ;;
......
1220 1227
    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
1221 1228
	echo i586-pc-haiku
1222 1229
	exit ;;
1230
    x86_64:Haiku:*:*)
1231
	echo x86_64-unknown-haiku
1232
	exit ;;
1223 1233
    SX-4:SUPER-UX:*:*)
1224 1234
	echo sx4-nec-superux${UNAME_RELEASE}
1225 1235
	exit ;;
......
1246 1256
	exit ;;
1247 1257
    *:Darwin:*:*)
1248 1258
	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1249
	case $UNAME_PROCESSOR in
1250
	    unknown) UNAME_PROCESSOR=powerpc ;;
1251
	esac
1259
	eval $set_cc_for_build
1260
	if test "$UNAME_PROCESSOR" = unknown ; then
1261
	    UNAME_PROCESSOR=powerpc
1262
	fi
1263
	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1264
	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1265
		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1266
		grep IS_64BIT_ARCH >/dev/null
1267
	    then
1268
		case $UNAME_PROCESSOR in
1269
		    i386) UNAME_PROCESSOR=x86_64 ;;
1270
		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
1271
		esac
1272
	    fi
1273
	fi
1252 1274
	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1253 1275
	exit ;;
1254 1276
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
......
1262 1284
    *:QNX:*:4*)
1263 1285
	echo i386-pc-qnx
1264 1286
	exit ;;
1265
    NSE-?:NONSTOP_KERNEL:*:*)
1287
    NEO-?:NONSTOP_KERNEL:*:*)
1288
	echo neo-tandem-nsk${UNAME_RELEASE}
1289
	exit ;;
1290
    NSE-*:NONSTOP_KERNEL:*:*)
1266 1291
	echo nse-tandem-nsk${UNAME_RELEASE}
1267 1292
	exit ;;
1268 1293
    NSR-?:NONSTOP_KERNEL:*:*)
......
1307 1332
	echo pdp10-unknown-its
1308 1333
	exit ;;
1309 1334
    SEI:*:*:SEIUX)
1310
        echo mips-sei-seiux${UNAME_RELEASE}
1335
	echo mips-sei-seiux${UNAME_RELEASE}
1311 1336
	exit ;;
1312 1337
    *:DragonFly:*:*)
1313 1338
	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1314 1339
	exit ;;
1315 1340
    *:*VMS:*:*)
1316
    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
1341
	UNAME_MACHINE=`(uname -p) 2>/dev/null`
1317 1342
	case "${UNAME_MACHINE}" in
1318 1343
	    A*) echo alpha-dec-vms ; exit ;;
1319 1344
	    I*) echo ia64-dec-vms ; exit ;;
......
1331 1356
    i*86:AROS:*:*)
1332 1357
	echo ${UNAME_MACHINE}-pc-aros
1333 1358
	exit ;;
1359
    x86_64:VMkernel:*:*)
1360
	echo ${UNAME_MACHINE}-unknown-esx
1361
	exit ;;
1334 1362
esac
1335 1363

  
1336
#echo '(No uname command or uname output not recognized.)' 1>&2
1337
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1338

  
1339 1364
eval $set_cc_for_build
1340 1365
cat >$dummy.c <<EOF
1341 1366
#ifdef _SEQUENT_
......
1353 1378
#include <sys/param.h>
1354 1379
  printf ("m68k-sony-newsos%s\n",
1355 1380
#ifdef NEWSOS4
1356
          "4"
1381
	"4"
1357 1382
#else
1358
	  ""
1383
	""
1359 1384
#endif
1360
         ); exit (0);
1385
	); exit (0);
1361 1386
#endif
1362 1387
#endif
1363 1388

  
config.sub
1 1
#! /bin/sh
2 2
# Configuration validation subroutine script.
3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5
#   Free Software Foundation, Inc.
3
#   Copyright 1992-2013 Free Software Foundation, Inc.
6 4

  
7
timestamp='2009-06-11'
5
timestamp='2013-10-01'
8 6

  
9
# This file is (in principle) common to ALL GNU software.
10
# The presence of a machine in this file suggests that SOME GNU software
11
# can handle that machine.  It does not imply ALL GNU software can.
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
7
# This file is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
16 10
# (at your option) any later version.
17 11
#
18
# This program is distributed in the hope that it will be useful,
19
# but WITHOUT ANY WARRANTY; without even the implied warranty of
20
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
# GNU General Public License for more details.
12
# This program is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
# General Public License for more details.
22 16
#
23 17
# You should have received a copy of the GNU General Public License
24
# along with this program; if not, write to the Free Software
25
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
26
# 02110-1301, USA.
18
# along with this program; if not, see <http://www.gnu.org/licenses/>.
27 19
#
28 20
# As a special exception to the GNU General Public License, if you
29 21
# distribute this file as part of a program that contains a
30 22
# configuration script generated by Autoconf, you may include it under
31
# 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").
32 26

  
33 27

  
34
# Please send patches to <config-patches@gnu.org>.  Submit a context
35
# diff and a properly formatted ChangeLog entry.
28
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
36 29
#
37 30
# Configuration subroutine to validate and canonicalize a configuration type.
38 31
# Supply the specified configuration type as an argument.
39 32
# If it is invalid, we print an error message on stderr and exit with code 1.
40 33
# Otherwise, we print the canonical config type on stdout and succeed.
41 34

  
35
# You can get the latest version of this script from:
36
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
37

  
42 38
# This file is supposed to be the same for all GNU packages
43 39
# and recognize all the CPU types, system types and aliases
44 40
# that are meaningful with *any* GNU software.
......
72 68
version="\
73 69
GNU config.sub ($timestamp)
74 70

  
75
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
76
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
71
Copyright 1992-2013 Free Software Foundation, Inc.
77 72

  
78 73
This is free software; see the source for copying conditions.  There is NO
79 74
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
......
120 115
# Here we must recognize all the valid KERNEL-OS combinations.
121 116
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
122 117
case $maybe_os in
123
  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
124
  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
118
  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
119
  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
120
  knetbsd*-gnu* | netbsd*-gnu* | \
125 121
  kopensolaris*-gnu* | \
126 122
  storm-chaos* | os2-emx* | rtmk-nova*)
127 123
    os=-$maybe_os
128 124
    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
129 125
    ;;
126
  android-linux)
127
    os=-linux-android
128
    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
129
    ;;
130 130
  *)
131 131
    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
132 132
    if [ $basic_machine != $1 ]
......
149 149
	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
150 150
	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
151 151
	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
152
	-apple | -axis | -knuth | -cray)
152
	-apple | -axis | -knuth | -cray | -microblaze*)
153 153
		os=
154 154
		basic_machine=$1
155 155
		;;
156
        -bluegene*)
157
	        os=-cnk
156
	-bluegene*)
157
		os=-cnk
158 158
		;;
159 159
	-sim | -cisco | -oki | -wec | -winbond)
160 160
		os=
......
170 170
		os=-chorusos
171 171
		basic_machine=$1
172 172
		;;
173
 	-chorusrdb)
174
 		os=-chorusrdb
173
	-chorusrdb)
174
		os=-chorusrdb
175 175
		basic_machine=$1
176
 		;;
176
		;;
177 177
	-hiux*)
178 178
		os=-hiuxwe2
179 179
		;;
......
218 218
	-isc*)
219 219
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
220 220
		;;
221
	-lynx*178)
222
		os=-lynxos178
223
		;;
224
	-lynx*5)
225
		os=-lynxos5
226
		;;
221 227
	-lynx*)
222 228
		os=-lynxos
223 229
		;;
......
242 248
	# Some are omitted here because they have special meanings below.
243 249
	1750a | 580 \
244 250
	| a29k \
251
	| aarch64 | aarch64_be \
245 252
	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
246 253
	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
247 254
	| am33_2.0 \
248
	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
255
	| arc | arceb \
256
	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
257
	| avr | avr32 \
258
	| be32 | be64 \
249 259
	| bfin \
250
	| c4x | clipper \
260
	| c4x | c8051 | clipper \
251 261
	| d10v | d30v | dlx | dsp16xx \
262
	| epiphany \
252 263
	| fido | fr30 | frv \
253 264
	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
265
	| hexagon \
254 266
	| i370 | i860 | i960 | ia64 \
255 267
	| ip2k | iq2000 \
268
	| k1om \
269
	| le32 | le64 \
256 270
	| lm32 \
257 271
	| m32c | m32r | m32rle | m68000 | m68k | m88k \
258
	| maxq | mb | microblaze | mcore | mep | metag \
272
	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
259 273
	| mips | mipsbe | mipseb | mipsel | mipsle \
260 274
	| mips16 \
261 275
	| mips64 | mips64el \
......
273 287
	| mipsisa64r2 | mipsisa64r2el \
274 288
	| mipsisa64sb1 | mipsisa64sb1el \
275 289
	| mipsisa64sr71k | mipsisa64sr71kel \
290
	| mipsr5900 | mipsr5900el \
276 291
	| mipstx39 | mipstx39el \
277 292
	| mn10200 | mn10300 \
278 293
	| moxie \
279 294
	| mt \
280 295
	| msp430 \
281
	| nios | nios2 \
296
	| nds32 | nds32le | nds32be \
297
	| nios | nios2 | nios2eb | nios2el \
282 298
	| ns16k | ns32k \
283
	| or32 \
299
	| open8 \
300
	| or1k | or32 \
284 301
	| pdp10 | pdp11 | pj | pjl \
285
	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
302
	| powerpc | powerpc64 | powerpc64le | powerpcle \
286 303
	| pyramid \
304
	| rl78 | rx \
287 305
	| score \
288 306
	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
289 307
	| sh64 | sh64le \
290 308
	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
291 309
	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
292
	| spu | strongarm \
293
	| tahoe | thumb | tic4x | tic80 | tron \
294
	| v850 | v850e \
310
	| spu \
311
	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
312
	| ubicom32 \
313
	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
295 314
	| we32k \
296
	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
315
	| x86 | xc16x | xstormy16 | xtensa \
297 316
	| z8k | z80)
298 317
		basic_machine=$basic_machine-unknown
299 318
		;;
300
	m6811 | m68hc11 | m6812 | m68hc12)
301
		# Motorola 68HC11/12.
319
	c54x)
320
		basic_machine=tic54x-unknown
321
		;;
322
	c55x)
323
		basic_machine=tic55x-unknown
324
		;;
325
	c6x)
326
		basic_machine=tic6x-unknown
327
		;;
328
	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
302 329
		basic_machine=$basic_machine-unknown
303 330
		os=-none
304 331
		;;
......
308 335
		basic_machine=mt-unknown
309 336
		;;
310 337

  
338
	strongarm | thumb | xscale)
339
		basic_machine=arm-unknown
340
		;;
341
	xgate)
342
		basic_machine=$basic_machine-unknown
343
		os=-none
344
		;;
345
	xscaleeb)
346
		basic_machine=armeb-unknown
347
		;;
348

  
349
	xscaleel)
350
		basic_machine=armel-unknown
351
		;;
352

  
311 353
	# We use `pc' rather than `unknown'
312 354
	# because (1) that's what they normally are, and
313 355
	# (2) the word "unknown" tends to confuse beginning users.
......
322 364
	# Recognize the basic CPU types with company name.
323 365
	580-* \
324 366
	| a29k-* \
367
	| aarch64-* | aarch64_be-* \
325 368
	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
326 369
	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
327
	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
370
	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
328 371
	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
329 372
	| avr-* | avr32-* \
373
	| be32-* | be64-* \
330 374
	| bfin-* | bs2000-* \
331
	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
332
	| clipper-* | craynv-* | cydra-* \
375
	| c[123]* | c30-* | [cjt]90-* | c4x-* \
376
	| c8051-* | clipper-* | craynv-* | cydra-* \
333 377
	| d10v-* | d30v-* | dlx-* \
334 378
	| elxsi-* \
335 379
	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
336 380
	| h8300-* | h8500-* \
337 381
	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
382
	| hexagon-* \
338 383
	| i*86-* | i860-* | i960-* | ia64-* \
339 384
	| ip2k-* | iq2000-* \
385
	| k1om-* \
386
	| le32-* | le64-* \
340 387
	| lm32-* \
341 388
	| m32c-* | m32r-* | m32rle-* \
342 389
	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
343 390
	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
391
	| microblaze-* | microblazeel-* \
344 392
	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
345 393
	| mips16-* \
346 394
	| mips64-* | mips64el-* \
......
358 406
	| mipsisa64r2-* | mipsisa64r2el-* \
359 407
	| mipsisa64sb1-* | mipsisa64sb1el-* \
360 408
	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
409
	| mipsr5900-* | mipsr5900el-* \
361 410
	| mipstx39-* | mipstx39el-* \
362 411
	| mmix-* \
363 412
	| mt-* \
364 413
	| msp430-* \
365
	| nios-* | nios2-* \
414
	| nds32-* | nds32le-* | nds32be-* \
415
	| nios-* | nios2-* | nios2eb-* | nios2el-* \
366 416
	| none-* | np1-* | ns16k-* | ns32k-* \
417
	| open8-* \
367 418
	| orion-* \
368 419
	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
369
	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
420
	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
370 421
	| pyramid-* \
371
	| romp-* | rs6000-* \
422
	| rl78-* | romp-* | rs6000-* | rx-* \
372 423
	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
373 424
	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
374 425
	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
375 426
	| sparclite-* \
376
	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
377
	| tahoe-* | thumb-* \
378
	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
427
	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
428
	| tahoe-* \
429
	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
430
	| tile*-* \
379 431
	| tron-* \
380
	| v850-* | v850e-* | vax-* \
432
	| ubicom32-* \
433
	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
434
	| vax-* \
381 435
	| we32k-* \
382
	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
436
	| x86-* | x86_64-* | xc16x-* | xps100-* \
383 437
	| xstormy16-* | xtensa*-* \
384 438
	| ymp-* \
385 439
	| z8k-* | z80-*)
......
404 458
		basic_machine=a29k-amd
405 459
		os=-udi
406 460
		;;
407
    	abacus)
461
	abacus)
408 462
		basic_machine=abacus-unknown
409 463
		;;
410 464
	adobe68k)
......
474 528
		basic_machine=powerpc-ibm
475 529
		os=-cnk
476 530
		;;
531
	c54x-*)
532
		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
533
		;;
534
	c55x-*)
535
		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
536
		;;
537
	c6x-*)
538
		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
539
		;;
477 540
	c90)
478 541
		basic_machine=c90-cray
479 542
		os=-unicos
480 543
		;;
481
        cegcc)
544
	cegcc)
482 545
		basic_machine=arm-unknown
483 546
		os=-cegcc
484 547
		;;
......
510 573
		basic_machine=craynv-cray
511 574
		os=-unicosmp
512 575
		;;
513
	cr16)
576
	cr16 | cr16-*)
514 577
		basic_machine=cr16-unknown
515 578
		os=-elf
516 579
		;;
......
668 731
	i370-ibm* | ibm*)
669 732
		basic_machine=i370-ibm
670 733
		;;
671
# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
672 734
	i*86v32)
673 735
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
674 736
		os=-sysv32
......
726 788
		basic_machine=ns32k-utek
727 789
		os=-sysv
728 790
		;;
791
	microblaze*)
792
		basic_machine=microblaze-xilinx
793
		;;
794
	mingw64)
795
		basic_machine=x86_64-pc
796
		os=-mingw64
797
		;;
729 798
	mingw32)
730
		basic_machine=i386-pc
799
		basic_machine=i686-pc
731 800
		os=-mingw32
732 801
		;;
733 802
	mingw32ce)
......
762 831
	ms1-*)
763 832
		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
764 833
		;;
834
	msys)
835
		basic_machine=i686-pc
836
		os=-msys
837
		;;
765 838
	mvs)
766 839
		basic_machine=i370-ibm
767 840
		os=-mvs
768 841
		;;
842
	nacl)
843
		basic_machine=le32-unknown
844
		os=-nacl
845
		;;
769 846
	ncr3000)
770 847
		basic_machine=i486-ncr
771 848
		os=-sysv4
......
830 907
	np1)
831 908
		basic_machine=np1-gould
832 909
		;;
910
	neo-tandem)
911
		basic_machine=neo-tandem
912
		;;
913
	nse-tandem)
914
		basic_machine=nse-tandem
915
		;;
833 916
	nsr-tandem)
834 917
		basic_machine=nsr-tandem
835 918
		;;
......
912 995
		;;
913 996
	power)	basic_machine=power-ibm
914 997
		;;
915
	ppc)	basic_machine=powerpc-unknown
998
	ppc | ppcbe)	basic_machine=powerpc-unknown
916 999
		;;
917
	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1000
	ppc-* | ppcbe-*)
1001
		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
918 1002
		;;
919 1003
	ppcle | powerpclittle | ppc-le | powerpc-little)
920 1004
		basic_machine=powerpcle-unknown
......
939 1023
		basic_machine=i586-unknown
940 1024
		os=-pw32
941 1025
		;;
942
	rdos)
1026
	rdos | rdos64)
1027
		basic_machine=x86_64-pc
1028
		os=-rdos
1029
		;;
1030
	rdos32)
943 1031
		basic_machine=i386-pc
944 1032
		os=-rdos
945 1033
		;;
......
1008 1096
		basic_machine=i860-stratus
1009 1097
		os=-sysv4
1010 1098
		;;
1099
	strongarm-* | thumb-*)
1100
		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1101
		;;
1011 1102
	sun2)
1012 1103
		basic_machine=m68000-sun
1013 1104
		;;
......
1064 1155
		basic_machine=t90-cray
1065 1156
		os=-unicos
1066 1157
		;;
1067
	tic54x | c54x*)
1068
		basic_machine=tic54x-unknown
1069
		os=-coff
1070
		;;
1071
	tic55x | c55x*)
1072
		basic_machine=tic55x-unknown
1073
		os=-coff
1074
		;;
1075
	tic6x | c6x*)
1076
		basic_machine=tic6x-unknown
1077
		os=-coff
1078
		;;
1079 1158
	tile*)
1080
		basic_machine=tile-unknown
1159
		basic_machine=$basic_machine-unknown
1081 1160
		os=-linux-gnu
1082 1161
		;;
1083 1162
	tx39)
......
1147 1226
	xps | xps100)
1148 1227
		basic_machine=xps100-honeywell
1149 1228
		;;
1229
	xscale-* | xscalee[bl]-*)
1230
		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1231
		;;
1150 1232
	ymp)
1151 1233
		basic_machine=ymp-cray
1152 1234
		os=-unicos
......
1244 1326
if [ x"$os" != x"" ]
1245 1327
then
1246 1328
case $os in
1247
        # First match some system type aliases
1248
        # that might get confused with valid system types.
1329
	# First match some system type aliases
1330
	# that might get confused with valid system types.
1249 1331
	# -solaris* is a basic system type, with this one exception.
1332
	-auroraux)
1333
		os=-auroraux
1334
		;;
1250 1335
	-solaris1 | -solaris1.*)
1251 1336
		os=`echo $os | sed -e 's|solaris1|sunos4|'`
1252 1337
		;;
......
1268 1353
	# -sysv* is not here because it comes later, after sysvr4.
1269 1354
	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1270 1355
	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1271
	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1272
	      | -kopensolaris* \
1356
	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1357
	      | -sym* | -kopensolaris* | -plan9* \
1273 1358
	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1274 1359
	      | -aos* | -aros* \
1275 1360
	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1276 1361
	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1277 1362
	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1278
	      | -openbsd* | -solidbsd* \
1363
	      | -bitrig* | -openbsd* | -solidbsd* \
1279 1364
	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1280 1365
	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1281 1366
	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1282 1367
	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1283 1368
	      | -chorusos* | -chorusrdb* | -cegcc* \
1284
	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1285
	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1369
	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1370
	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1371
	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1286 1372
	      | -uxpv* | -beos* | -mpeix* | -udk* \
1287 1373
	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1288 1374
	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
......
1290 1376
	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1291 1377
	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1292 1378
	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1293
	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
1379
	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1294 1380
	# Remember, each alternative MUST END IN *, to match a version number.
1295 1381
		;;
1296 1382
	-qnx*)
......
1329 1415
	-opened*)
1330 1416
		os=-openedition
1331 1417
		;;
1332
        -os400*)
1418
	-os400*)
1333 1419
		os=-os400
1334 1420
		;;
1335 1421
	-wince*)
......
1378 1464
	-sinix*)
1379 1465
		os=-sysv4
1380 1466
		;;
1381
        -tpf*)
1467
	-tpf*)
1382 1468
		os=-tpf
1383 1469
		;;
1384 1470
	-triton*)
......
1414 1500
	-aros*)
1415 1501
		os=-aros
1416 1502
		;;
1417
	-kaos*)
1418
		os=-kaos
1419
		;;
1420 1503
	-zvmoe)
1421 1504
		os=-zvmoe
1422 1505
		;;
1423 1506
	-dicos*)
1424 1507
		os=-dicos
1425 1508
		;;
1509
	-nacl*)
1510
		;;
1426 1511
	-none)
1427 1512
		;;
1428 1513
	*)
......
1445 1530
# system, and we'll never get to this point.
1446 1531

  
1447 1532
case $basic_machine in
1448
        score-*)
1533
	score-*)
1449 1534
		os=-elf
1450 1535
		;;
1451
        spu-*)
1536
	spu-*)
1452 1537
		os=-elf
1453 1538
		;;
1454 1539
	*-acorn)
......
1460 1545
	arm*-semi)
1461 1546
		os=-aout
1462 1547
		;;
1463
        c4x-* | tic4x-*)
1464
        	os=-coff
1548
	c4x-* | tic4x-*)
1549
		os=-coff
1465 1550
		;;
1551
	c8051-*)
1552
		os=-elf
1553
		;;
1554
	hexagon-*)
1555
		os=-elf
1556
		;;
1557
	tic54x-*)
1558
		os=-coff
1559
		;;
1560
	tic55x-*)
1561
		os=-coff
1562
		;;
1563
	tic6x-*)
1564
		os=-coff
1565
		;;
1466 1566
	# This must come before the *-dec entry.
1467 1567
	pdp10-*)
1468 1568
		os=-tops20
......
1481 1581
		;;
1482 1582
	m68000-sun)
1483 1583
		os=-sunos3
1484
		# This also exists in the configure program, but was not the
1485
		# default.
1486
		# os=-sunos4
1487 1584
		;;
1488 1585
	m68*-cisco)
1489 1586
		os=-aout
1490 1587
		;;
1491
        mep-*)
1588
	mep-*)
1492 1589
		os=-elf
1493 1590
		;;
1494 1591
	mips*-cisco)
......
1497 1594
	mips*-*)
1498 1595
		os=-elf
1499 1596
		;;
1597
	or1k-*)
1598
		os=-elf
1599
		;;
1500 1600
	or32-*)
1501 1601
		os=-coff
1502 1602
		;;
......
1515 1615
	*-ibm)
1516 1616
		os=-aix
1517 1617
		;;
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff