Blame SOURCES/0022-Update-configure-for-aarch64-bz-926701.patch

271612
From 1b30bcd831a6e1c3dd16c0e53379df228da3e87b Mon Sep 17 00:00:00 2001
271612
From: "Richard W.M. Jones" <rjones@redhat.com>
271612
Date: Tue, 29 Nov 2022 08:14:20 +0000
271612
Subject: [PATCH 22/23] Update configure for aarch64 (bz #926701)
271612
271612
---
271612
 config.guess | 585 +++++++++++++++++++++++++++------------------------
271612
 config.sub   | 327 +++++++++++++++++++++-------
271612
 2 files changed, 560 insertions(+), 352 deletions(-)
271612
271612
diff --git a/config.guess b/config.guess
271612
index 396482d..872b96a 100755
271612
--- a/config.guess
271612
+++ b/config.guess
695b7d
@@ -1,10 +1,10 @@
695b7d
 #! /bin/sh
695b7d
 # Attempt to guess a canonical system name.
695b7d
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
695b7d
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
695b7d
-#   Inc.
695b7d
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
695b7d
+#   2011, 2012 Free Software Foundation, Inc.
695b7d
 
695b7d
-timestamp='2006-07-02'
695b7d
+timestamp='2012-09-25'
695b7d
 
695b7d
 # This file is free software; you can redistribute it and/or modify it
695b7d
 # under the terms of the GNU General Public License as published by
271612
@@ -17,9 +17,7 @@ timestamp='2006-07-02'
695b7d
 # General Public License for more details.
695b7d
 #
695b7d
 # You should have received a copy of the GNU General Public License
695b7d
-# along with this program; if not, write to the Free Software
695b7d
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
695b7d
-# 02110-1301, USA.
695b7d
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
695b7d
 #
695b7d
 # As a special exception to the GNU General Public License, if you
695b7d
 # distribute this file as part of a program that contains a
271612
@@ -27,16 +25,16 @@ timestamp='2006-07-02'
695b7d
 # the same distribution terms that you use for the rest of that program.
695b7d
 
695b7d
 
695b7d
-# Originally written by Per Bothner <per@bothner.com>.
695b7d
-# Please send patches to <config-patches@gnu.org>.  Submit a context
695b7d
-# diff and a properly formatted ChangeLog entry.
695b7d
+# Originally written by Per Bothner.  Please send patches (context
695b7d
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
695b7d
+# entry.
695b7d
 #
695b7d
 # This script attempts to guess a canonical system name similar to
695b7d
 # config.sub.  If it succeeds, it prints the system name on stdout, and
695b7d
 # exits with 0.  Otherwise, it exits with 1.
695b7d
 #
695b7d
-# The plan is that this can be called by configure scripts if you
695b7d
-# don't specify an explicit build system type.
695b7d
+# You can get the latest version of this script from:
695b7d
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
695b7d
 
695b7d
 me=`echo "$0" | sed -e 's,.*/,,'`
695b7d
 
271612
@@ -56,7 +54,8 @@ version="\
695b7d
 GNU config.guess ($timestamp)
695b7d
 
695b7d
 Originally written by Per Bothner.
695b7d
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
695b7d
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
695b7d
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
695b7d
 Free Software Foundation, Inc.
695b7d
 
695b7d
 This is free software; see the source for copying conditions.  There is NO
271612
@@ -144,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
695b7d
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
695b7d
     *:NetBSD:*:*)
695b7d
 	# NetBSD (nbsd) targets should (where applicable) match one or
695b7d
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
695b7d
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
695b7d
 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
695b7d
 	# switched to ELF, *-*-netbsd* would select the old
695b7d
 	# object file format.  This provides both forward
271612
@@ -161,6 +160,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
695b7d
 	    arm*) machine=arm-unknown ;;
695b7d
 	    sh3el) machine=shl-unknown ;;
695b7d
 	    sh3eb) machine=sh-unknown ;;
695b7d
+	    sh5el) machine=sh5le-unknown ;;
695b7d
 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
695b7d
 	esac
695b7d
 	# The Operating System including object format, if it has switched
271612
@@ -169,7 +169,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
695b7d
 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
695b7d
 		eval $set_cc_for_build
695b7d
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
695b7d
-			| grep __ELF__ >/dev/null
695b7d
+			| grep -q __ELF__
695b7d
 		then
695b7d
 		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
695b7d
 		    # Return netbsd for either.  FIX?
271612
@@ -179,7 +179,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
695b7d
 		fi
695b7d
 		;;
695b7d
 	    *)
695b7d
-	        os=netbsd
695b7d
+		os=netbsd
695b7d
 		;;
695b7d
 	esac
695b7d
 	# The OS release
271612
@@ -200,6 +200,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
695b7d
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
695b7d
 	echo "${machine}-${os}${release}"
695b7d
 	exit ;;
695b7d
+    *:Bitrig:*:*)
695b7d
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
695b7d
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
695b7d
+	exit ;;
695b7d
     *:OpenBSD:*:*)
695b7d
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
695b7d
 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
271612
@@ -222,7 +226,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
695b7d
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
695b7d
 		;;
695b7d
 	*5.*)
695b7d
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
695b7d
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
695b7d
 		;;
695b7d
 	esac
695b7d
 	# According to Compaq, /usr/sbin/psrinfo has been available on
271612
@@ -268,7 +272,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
695b7d
 	# A Xn.n version is an unreleased experimental baselevel.
695b7d
 	# 1.2 uses "1.2" for uname -r.
695b7d
 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
695b7d
-	exit ;;
695b7d
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
695b7d
+	exitcode=$?
695b7d
+	trap '' 0
695b7d
+	exit $exitcode ;;
695b7d
     Alpha\ *:Windows_NT*:*)
695b7d
 	# How do we know it's Interix rather than the generic POSIX subsystem?
695b7d
 	# Should we change UNAME_MACHINE based on the output of uname instead
271612
@@ -294,12 +301,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
695b7d
 	echo s390-ibm-zvmoe
695b7d
 	exit ;;
695b7d
     *:OS400:*:*)
695b7d
-        echo powerpc-ibm-os400
695b7d
+	echo powerpc-ibm-os400
695b7d
 	exit ;;
695b7d
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
695b7d
 	echo arm-acorn-riscix${UNAME_RELEASE}
695b7d
 	exit ;;
695b7d
-    arm:riscos:*:*|arm:RISCOS:*:*)
695b7d
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
695b7d
 	echo arm-unknown-riscos
695b7d
 	exit ;;
695b7d
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
271612
@@ -323,14 +330,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
695b7d
 	case `/usr/bin/uname -p` in
695b7d
 	    sparc) echo sparc-icl-nx7; exit ;;
695b7d
 	esac ;;
695b7d
+    s390x:SunOS:*:*)
695b7d
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
695b7d
+	exit ;;
695b7d
     sun4H:SunOS:5.*:*)
695b7d
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
695b7d
 	exit ;;
695b7d
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
695b7d
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
695b7d
 	exit ;;
695b7d
-    i86pc:SunOS:5.*:*)
695b7d
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
695b7d
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
695b7d
+	echo i386-pc-auroraux${UNAME_RELEASE}
695b7d
+	exit ;;
695b7d
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
695b7d
+	eval $set_cc_for_build
695b7d
+	SUN_ARCH="i386"
695b7d
+	# If there is a compiler, see if it is configured for 64-bit objects.
695b7d
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
695b7d
+	# This test works for both compilers.
695b7d
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
695b7d
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
695b7d
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
695b7d
+		grep IS_64BIT_ARCH >/dev/null
695b7d
+	    then
695b7d
+		SUN_ARCH="x86_64"
695b7d
+	    fi
695b7d
+	fi
695b7d
+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
695b7d
 	exit ;;
695b7d
     sun4*:SunOS:6*:*)
695b7d
 	# According to config.sub, this is the proper way to canonicalize
271612
@@ -374,23 +400,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
695b7d
     # MiNT.  But MiNT is downward compatible to TOS, so this should
695b7d
     # be no problem.
695b7d
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
695b7d
-        echo m68k-atari-mint${UNAME_RELEASE}
695b7d
+	echo m68k-atari-mint${UNAME_RELEASE}
695b7d
 	exit ;;
695b7d
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
695b7d
 	echo m68k-atari-mint${UNAME_RELEASE}
695b7d
-        exit ;;
695b7d
+	exit ;;
695b7d
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
695b7d
-        echo m68k-atari-mint${UNAME_RELEASE}
695b7d
+	echo m68k-atari-mint${UNAME_RELEASE}
695b7d
 	exit ;;
695b7d
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
695b7d
-        echo m68k-milan-mint${UNAME_RELEASE}
695b7d
-        exit ;;
695b7d
+	echo m68k-milan-mint${UNAME_RELEASE}
695b7d
+	exit ;;
695b7d
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
695b7d
-        echo m68k-hades-mint${UNAME_RELEASE}
695b7d
-        exit ;;
695b7d
+	echo m68k-hades-mint${UNAME_RELEASE}
695b7d
+	exit ;;
695b7d
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
695b7d
-        echo m68k-unknown-mint${UNAME_RELEASE}
695b7d
-        exit ;;
695b7d
+	echo m68k-unknown-mint${UNAME_RELEASE}
695b7d
+	exit ;;
695b7d
     m68k:machten:*:*)
695b7d
 	echo m68k-apple-machten${UNAME_RELEASE}
695b7d
 	exit ;;
271612
@@ -460,8 +486,8 @@ EOF
695b7d
 	echo m88k-motorola-sysv3
695b7d
 	exit ;;
695b7d
     AViiON:dgux:*:*)
695b7d
-        # DG/UX returns AViiON for all architectures
695b7d
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
695b7d
+	# DG/UX returns AViiON for all architectures
695b7d
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
695b7d
 	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
695b7d
 	then
695b7d
 	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
271612
@@ -474,7 +500,7 @@ EOF
695b7d
 	else
695b7d
 	    echo i586-dg-dgux${UNAME_RELEASE}
695b7d
 	fi
695b7d
- 	exit ;;
695b7d
+	exit ;;
695b7d
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
695b7d
 	echo m88k-dolphin-sysv3
695b7d
 	exit ;;
271612
@@ -531,7 +557,7 @@ EOF
695b7d
 		echo rs6000-ibm-aix3.2
695b7d
 	fi
695b7d
 	exit ;;
695b7d
-    *:AIX:*:[45])
695b7d
+    *:AIX:*:[4567])
695b7d
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
695b7d
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
695b7d
 		IBM_ARCH=rs6000
271612
@@ -574,52 +600,52 @@ EOF
695b7d
 	    9000/[678][0-9][0-9])
695b7d
 		if [ -x /usr/bin/getconf ]; then
695b7d
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
695b7d
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
695b7d
-                    case "${sc_cpu_version}" in
695b7d
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
695b7d
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
695b7d
-                      532)                      # CPU_PA_RISC2_0
695b7d
-                        case "${sc_kernel_bits}" in
695b7d
-                          32) HP_ARCH="hppa2.0n" ;;
695b7d
-                          64) HP_ARCH="hppa2.0w" ;;
695b7d
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
695b7d
+		    case "${sc_cpu_version}" in
695b7d
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
695b7d
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
695b7d
+		      532)                      # CPU_PA_RISC2_0
695b7d
+			case "${sc_kernel_bits}" in
695b7d
+			  32) HP_ARCH="hppa2.0n" ;;
695b7d
+			  64) HP_ARCH="hppa2.0w" ;;
695b7d
 			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
695b7d
-                        esac ;;
695b7d
-                    esac
695b7d
+			esac ;;
695b7d
+		    esac
695b7d
 		fi
695b7d
 		if [ "${HP_ARCH}" = "" ]; then
695b7d
 		    eval $set_cc_for_build
695b7d
-		    sed 's/^              //' << EOF >$dummy.c
695b7d
+		    sed 's/^		//' << EOF >$dummy.c
695b7d
 
695b7d
-              #define _HPUX_SOURCE
695b7d
-              #include <stdlib.h>
695b7d
-              #include <unistd.h>
271612
+		#define _HPUX_SOURCE
271612
+		#include <stdlib.h>
271612
+		#include <unistd.h>
271612
 
695b7d
-              int main ()
695b7d
-              {
695b7d
-              #if defined(_SC_KERNEL_BITS)
695b7d
-                  long bits = sysconf(_SC_KERNEL_BITS);
695b7d
-              #endif
695b7d
-                  long cpu  = sysconf (_SC_CPU_VERSION);
271612
+		int main ()
271612
+		{
271612
+		#if defined(_SC_KERNEL_BITS)
271612
+		    long bits = sysconf(_SC_KERNEL_BITS);
271612
+		#endif
271612
+		    long cpu  = sysconf (_SC_CPU_VERSION);
271612
 
695b7d
-                  switch (cpu)
695b7d
-              	{
695b7d
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
695b7d
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
695b7d
-              	case CPU_PA_RISC2_0:
695b7d
-              #if defined(_SC_KERNEL_BITS)
695b7d
-              	    switch (bits)
695b7d
-              		{
695b7d
-              		case 64: puts ("hppa2.0w"); break;
695b7d
-              		case 32: puts ("hppa2.0n"); break;
695b7d
-              		default: puts ("hppa2.0"); break;
695b7d
-              		} break;
695b7d
-              #else  /* !defined(_SC_KERNEL_BITS) */
695b7d
-              	    puts ("hppa2.0"); break;
695b7d
-              #endif
695b7d
-              	default: puts ("hppa1.0"); break;
695b7d
-              	}
695b7d
-                  exit (0);
695b7d
-              }
695b7d
+		    switch (cpu)
695b7d
+			{
695b7d
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
695b7d
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
695b7d
+			case CPU_PA_RISC2_0:
695b7d
+		#if defined(_SC_KERNEL_BITS)
695b7d
+			    switch (bits)
695b7d
+				{
695b7d
+				case 64: puts ("hppa2.0w"); break;
695b7d
+				case 32: puts ("hppa2.0n"); break;
695b7d
+				default: puts ("hppa2.0"); break;
695b7d
+				} break;
695b7d
+		#else  /* !defined(_SC_KERNEL_BITS) */
695b7d
+			    puts ("hppa2.0"); break;
695b7d
+		#endif
695b7d
+			default: puts ("hppa1.0"); break;
695b7d
+			}
695b7d
+		    exit (0);
695b7d
+		}
695b7d
 EOF
695b7d
 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
695b7d
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
271612
@@ -639,7 +665,7 @@ EOF
695b7d
 	    # => hppa64-hp-hpux11.23
695b7d
 
695b7d
 	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
695b7d
-		grep __LP64__ >/dev/null
695b7d
+		grep -q __LP64__
695b7d
 	    then
695b7d
 		HP_ARCH="hppa2.0w"
695b7d
 	    else
271612
@@ -710,22 +736,22 @@ EOF
695b7d
 	exit ;;
695b7d
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
695b7d
 	echo c1-convex-bsd
695b7d
-        exit ;;
695b7d
+	exit ;;
695b7d
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
695b7d
 	if getsysinfo -f scalar_acc
695b7d
 	then echo c32-convex-bsd
695b7d
 	else echo c2-convex-bsd
695b7d
 	fi
695b7d
-        exit ;;
695b7d
+	exit ;;
695b7d
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
695b7d
 	echo c34-convex-bsd
695b7d
-        exit ;;
695b7d
+	exit ;;
695b7d
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
695b7d
 	echo c38-convex-bsd
695b7d
-        exit ;;
695b7d
+	exit ;;
695b7d
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
695b7d
 	echo c4-convex-bsd
695b7d
-        exit ;;
695b7d
+	exit ;;
695b7d
     CRAY*Y-MP:*:*:*)
695b7d
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
695b7d
 	exit ;;
271612
@@ -749,14 +775,14 @@ EOF
695b7d
 	exit ;;
695b7d
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
695b7d
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
695b7d
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
695b7d
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
695b7d
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
695b7d
-        exit ;;
695b7d
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
695b7d
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
695b7d
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
695b7d
+	exit ;;
695b7d
     5000:UNIX_System_V:4.*:*)
695b7d
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
695b7d
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
695b7d
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
695b7d
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
695b7d
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
695b7d
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
695b7d
 	exit ;;
695b7d
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
695b7d
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
271612
@@ -768,37 +794,51 @@ EOF
695b7d
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
695b7d
 	exit ;;
695b7d
     *:FreeBSD:*:*)
695b7d
-	case ${UNAME_MACHINE} in
695b7d
-	    pc98)
695b7d
-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
695b7d
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
695b7d
+	case ${UNAME_PROCESSOR} in
695b7d
 	    amd64)
695b7d
 		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
695b7d
 	    *)
695b7d
-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
695b7d
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
695b7d
 	esac
695b7d
 	exit ;;
695b7d
     i*:CYGWIN*:*)
695b7d
 	echo ${UNAME_MACHINE}-pc-cygwin
695b7d
 	exit ;;
695b7d
-    i*:MINGW*:*)
695b7d
+    *:MINGW64*:*)
695b7d
+	echo ${UNAME_MACHINE}-pc-mingw64
695b7d
+	exit ;;
695b7d
+    *:MINGW*:*)
695b7d
 	echo ${UNAME_MACHINE}-pc-mingw32
695b7d
 	exit ;;
695b7d
+    i*:MSYS*:*)
695b7d
+	echo ${UNAME_MACHINE}-pc-msys
695b7d
+	exit ;;
695b7d
     i*:windows32*:*)
695b7d
-    	# uname -m includes "-pc" on this system.
695b7d
-    	echo ${UNAME_MACHINE}-mingw32
695b7d
+	# uname -m includes "-pc" on this system.
695b7d
+	echo ${UNAME_MACHINE}-mingw32
695b7d
 	exit ;;
695b7d
     i*:PW*:*)
695b7d
 	echo ${UNAME_MACHINE}-pc-pw32
695b7d
 	exit ;;
695b7d
-    x86:Interix*:[3456]*)
695b7d
-	echo i586-pc-interix${UNAME_RELEASE}
695b7d
-	exit ;;
695b7d
-    EM64T:Interix*:[3456]*)
695b7d
-	echo x86_64-unknown-interix${UNAME_RELEASE}
695b7d
-	exit ;;
695b7d
+    *:Interix*:*)
695b7d
+	case ${UNAME_MACHINE} in
695b7d
+	    x86)
695b7d
+		echo i586-pc-interix${UNAME_RELEASE}
695b7d
+		exit ;;
695b7d
+	    authenticamd | genuineintel | EM64T)
695b7d
+		echo x86_64-unknown-interix${UNAME_RELEASE}
695b7d
+		exit ;;
695b7d
+	    IA64)
695b7d
+		echo ia64-unknown-interix${UNAME_RELEASE}
695b7d
+		exit ;;
695b7d
+	esac ;;
695b7d
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
695b7d
 	echo i${UNAME_MACHINE}-pc-mks
695b7d
 	exit ;;
695b7d
+    8664:Windows_NT:*)
695b7d
+	echo x86_64-pc-mks
695b7d
+	exit ;;
695b7d
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
695b7d
 	# How do we know it's Interix rather than the generic POSIX subsystem?
695b7d
 	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
271612
@@ -828,85 +868,13 @@ EOF
695b7d
     i*86:Minix:*:*)
695b7d
 	echo ${UNAME_MACHINE}-pc-minix
695b7d
 	exit ;;
695b7d
-    arm*:Linux:*:*)
695b7d
+    aarch64:Linux:*:*)
695b7d
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
695b7d
 	exit ;;
271612
-    avr32*:Linux:*:*)
695b7d
+    aarch64_be:Linux:*:*)
695b7d
+	UNAME_MACHINE=aarch64_be
695b7d
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
695b7d
 	exit ;;
271612
-    cris:Linux:*:*)
695b7d
-	echo cris-axis-linux-gnu
271612
-	exit ;;
271612
-    crisv32:Linux:*:*)
695b7d
-	echo crisv32-axis-linux-gnu
271612
-	exit ;;
271612
-    frv:Linux:*:*)
695b7d
-    	echo frv-unknown-linux-gnu
271612
-	exit ;;
271612
-    ia64:Linux:*:*)
271612
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
271612
-	exit ;;
271612
-    m32r*:Linux:*:*)
271612
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
271612
-	exit ;;
271612
-    m68*:Linux:*:*)
271612
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
271612
-	exit ;;
695b7d
-    mips:Linux:*:*)
695b7d
-	eval $set_cc_for_build
695b7d
-	sed 's/^	//' << EOF >$dummy.c
695b7d
-	#undef CPU
695b7d
-	#undef mips
695b7d
-	#undef mipsel
695b7d
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
695b7d
-	CPU=mipsel
695b7d
-	#else
695b7d
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
695b7d
-	CPU=mips
695b7d
-	#else
695b7d
-	CPU=
695b7d
-	#endif
695b7d
-	#endif
695b7d
-EOF
695b7d
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
695b7d
-	    /^CPU/{
695b7d
-		s: ::g
695b7d
-		p
695b7d
-	    }'`"
695b7d
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
695b7d
-	;;
695b7d
-    mips64:Linux:*:*)
271612
-	eval $set_cc_for_build
271612
-	sed 's/^	//' << EOF >$dummy.c
271612
-	#undef CPU
695b7d
-	#undef mips64
695b7d
-	#undef mips64el
271612
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
695b7d
-	CPU=mips64el
271612
-	#else
271612
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
695b7d
-	CPU=mips64
271612
-	#else
271612
-	CPU=
271612
-	#endif
271612
-	#endif
271612
-EOF
695b7d
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
695b7d
-	    /^CPU/{
695b7d
-		s: ::g
695b7d
-		p
695b7d
-	    }'`"
271612
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
271612
-	;;
271612
-    or32:Linux:*:*)
695b7d
-	echo or32-unknown-linux-gnu
695b7d
-	exit ;;
695b7d
-    ppc:Linux:*:*)
695b7d
-	echo powerpc-unknown-linux-gnu
271612
-	exit ;;
695b7d
-    ppc64:Linux:*:*)
695b7d
-	echo powerpc64-unknown-linux-gnu
271612
-	exit ;;
271612
     alpha:Linux:*:*)
271612
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
271612
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
271612
@@ -916,11 +884,90 @@ EOF
271612
 	  EV6)   UNAME_MACHINE=alphaev6 ;;
271612
 	  EV67)  UNAME_MACHINE=alphaev67 ;;
271612
 	  EV68*) UNAME_MACHINE=alphaev68 ;;
695b7d
-        esac
695b7d
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
271612
+	esac
271612
+	objdump --private-headers /bin/sh | grep -q ld.so.1
271612
 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
271612
 	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
271612
 	exit ;;
271612
+    arm*:Linux:*:*)
271612
+	eval $set_cc_for_build
271612
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
271612
+	    | grep -q __ARM_EABI__
271612
+	then
271612
+	    echo ${UNAME_MACHINE}-unknown-linux-gnu
271612
+	else
271612
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
271612
+		| grep -q __ARM_PCS_VFP
271612
+	    then
271612
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
271612
+	    else
271612
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
271612
+	    fi
271612
+	fi
271612
+	exit ;;
271612
+    avr32*:Linux:*:*)
271612
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
271612
+	exit ;;
271612
+    cris:Linux:*:*)
271612
+	echo ${UNAME_MACHINE}-axis-linux-gnu
271612
+	exit ;;
271612
+    crisv32:Linux:*:*)
271612
+	echo ${UNAME_MACHINE}-axis-linux-gnu
271612
+	exit ;;
271612
+    frv:Linux:*:*)
271612
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
271612
+	exit ;;
271612
+    hexagon:Linux:*:*)
271612
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
271612
+	exit ;;
271612
+    i*86:Linux:*:*)
271612
+	LIBC=gnu
271612
+	eval $set_cc_for_build
271612
+	sed 's/^	//' << EOF >$dummy.c
271612
+	#ifdef __dietlibc__
271612
+	LIBC=dietlibc
271612
+	#endif
271612
+EOF
271612
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
271612
+	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
271612
+	exit ;;
271612
+    ia64:Linux:*:*)
271612
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
271612
+	exit ;;
271612
+    m32r*:Linux:*:*)
271612
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
271612
+	exit ;;
271612
+    m68*:Linux:*:*)
271612
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
271612
+	exit ;;
271612
+    mips:Linux:*:* | mips64:Linux:*:*)
271612
+	eval $set_cc_for_build
271612
+	sed 's/^	//' << EOF >$dummy.c
271612
+	#undef CPU
271612
+	#undef ${UNAME_MACHINE}
271612
+	#undef ${UNAME_MACHINE}el
271612
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
271612
+	CPU=${UNAME_MACHINE}el
271612
+	#else
271612
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
271612
+	CPU=${UNAME_MACHINE}
271612
+	#else
271612
+	CPU=
271612
+	#endif
271612
+	#endif
271612
+EOF
271612
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
271612
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
271612
+	;;
271612
+    or32:Linux:*:*)
271612
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
271612
+	exit ;;
271612
+    padre:Linux:*:*)
271612
+	echo sparc-unknown-linux-gnu
271612
+	exit ;;
695b7d
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
695b7d
+	echo hppa64-unknown-linux-gnu
271612
+	exit ;;
695b7d
     parisc:Linux:*:* | hppa:Linux:*:*)
695b7d
 	# Look for CPU level
271612
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
271612
@@ -929,14 +976,17 @@ EOF
695b7d
 	  *)    echo hppa-unknown-linux-gnu ;;
695b7d
 	esac
695b7d
 	exit ;;
695b7d
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
695b7d
-	echo hppa64-unknown-linux-gnu
695b7d
+    ppc64:Linux:*:*)
695b7d
+	echo powerpc64-unknown-linux-gnu
695b7d
+	exit ;;
695b7d
+    ppc:Linux:*:*)
695b7d
+	echo powerpc-unknown-linux-gnu
695b7d
 	exit ;;
695b7d
     s390:Linux:*:* | s390x:Linux:*:*)
695b7d
 	echo ${UNAME_MACHINE}-ibm-linux
695b7d
 	exit ;;
695b7d
     sh64*:Linux:*:*)
695b7d
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
695b7d
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
695b7d
 	exit ;;
695b7d
     sh*:Linux:*:*)
695b7d
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
271612
@@ -944,75 +994,18 @@ EOF
695b7d
     sparc:Linux:*:* | sparc64:Linux:*:*)
695b7d
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
695b7d
 	exit ;;
695b7d
+    tile*:Linux:*:*)
695b7d
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
695b7d
+	exit ;;
695b7d
     vax:Linux:*:*)
695b7d
 	echo ${UNAME_MACHINE}-dec-linux-gnu
695b7d
 	exit ;;
695b7d
     x86_64:Linux:*:*)
695b7d
-	echo x86_64-unknown-linux-gnu
695b7d
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
695b7d
+	exit ;;
695b7d
+    xtensa*:Linux:*:*)
695b7d
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
695b7d
 	exit ;;
695b7d
-    i*86:Linux:*:*)
695b7d
-	# The BFD linker knows what the default object file format is, so
695b7d
-	# first see if it will tell us. cd to the root directory to prevent
695b7d
-	# problems with other programs or directories called `ld' in the path.
695b7d
-	# Set LC_ALL=C to ensure ld outputs messages in English.
695b7d
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
695b7d
-			 | sed -ne '/supported targets:/!d
695b7d
-				    s/[ 	][ 	]*/ /g
695b7d
-				    s/.*supported targets: *//
695b7d
-				    s/ .*//
695b7d
-				    p'`
695b7d
-        case "$ld_supported_targets" in
695b7d
-	  elf32-i386)
695b7d
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
695b7d
-		;;
695b7d
-	  a.out-i386-linux)
695b7d
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
695b7d
-		exit ;;
695b7d
-	  coff-i386)
695b7d
-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
695b7d
-		exit ;;
695b7d
-	  "")
695b7d
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
695b7d
-		# one that does not give us useful --help.
695b7d
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
695b7d
-		exit ;;
695b7d
-	esac
695b7d
-	# Determine whether the default compiler is a.out or elf
695b7d
-	eval $set_cc_for_build
695b7d
-	sed 's/^	//' << EOF >$dummy.c
695b7d
-	#include <features.h>
695b7d
-	#ifdef __ELF__
695b7d
-	# ifdef __GLIBC__
695b7d
-	#  if __GLIBC__ >= 2
695b7d
-	LIBC=gnu
695b7d
-	#  else
695b7d
-	LIBC=gnulibc1
695b7d
-	#  endif
695b7d
-	# else
695b7d
-	LIBC=gnulibc1
695b7d
-	# endif
695b7d
-	#else
695b7d
-	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
695b7d
-	LIBC=gnu
695b7d
-	#else
695b7d
-	LIBC=gnuaout
695b7d
-	#endif
695b7d
-	#endif
695b7d
-	#ifdef __dietlibc__
695b7d
-	LIBC=dietlibc
695b7d
-	#endif
695b7d
-EOF
695b7d
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
695b7d
-	    /^LIBC/{
695b7d
-		s: ::g
695b7d
-		p
695b7d
-	    }'`"
695b7d
-	test x"${LIBC}" != x && {
695b7d
-		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
695b7d
-		exit
695b7d
-	}
695b7d
-	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
695b7d
-	;;
695b7d
     i*86:DYNIX/ptx:4*:*)
695b7d
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
695b7d
 	# earlier versions are messed up and put the nodename in both
271612
@@ -1020,11 +1013,11 @@ EOF
695b7d
 	echo i386-sequent-sysv4
695b7d
 	exit ;;
695b7d
     i*86:UNIX_SV:4.2MP:2.*)
695b7d
-        # Unixware is an offshoot of SVR4, but it has its own version
695b7d
-        # number series starting with 2...
695b7d
-        # I am not positive that other SVR4 systems won't match this,
695b7d
+	# Unixware is an offshoot of SVR4, but it has its own version
695b7d
+	# number series starting with 2...
695b7d
+	# I am not positive that other SVR4 systems won't match this,
695b7d
 	# I just have to hope.  -- rms.
695b7d
-        # Use sysv4.2uw... so that sysv4* matches it.
695b7d
+	# Use sysv4.2uw... so that sysv4* matches it.
695b7d
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
695b7d
 	exit ;;
695b7d
     i*86:OS/2:*:*)
271612
@@ -1041,7 +1034,7 @@ EOF
695b7d
     i*86:syllable:*:*)
695b7d
 	echo ${UNAME_MACHINE}-pc-syllable
695b7d
 	exit ;;
695b7d
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
695b7d
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
695b7d
 	echo i386-unknown-lynxos${UNAME_RELEASE}
695b7d
 	exit ;;
695b7d
     i*86:*DOS:*:*)
271612
@@ -1056,7 +1049,7 @@ EOF
695b7d
 	fi
695b7d
 	exit ;;
695b7d
     i*86:*:5:[678]*)
695b7d
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
695b7d
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
695b7d
 	case `/bin/uname -X | grep "^Machine"` in
695b7d
 	    *486*)	     UNAME_MACHINE=i486 ;;
695b7d
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
271612
@@ -1084,10 +1077,13 @@ EOF
695b7d
 	exit ;;
695b7d
     pc:*:*:*)
695b7d
 	# Left here for compatibility:
695b7d
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
695b7d
-        # the processor, so we play safe by assuming i386.
695b7d
-	echo i386-pc-msdosdjgpp
695b7d
-        exit ;;
695b7d
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
695b7d
+	# the processor, so we play safe by assuming i586.
695b7d
+	# Note: whatever this is, it MUST be the same as what config.sub
695b7d
+	# prints for the "djgpp" host, or else GDB configury will decide that
695b7d
+	# this is a cross-build.
695b7d
+	echo i586-pc-msdosdjgpp
695b7d
+	exit ;;
695b7d
     Intel:Mach:3*:*)
695b7d
 	echo i386-pc-mach3
695b7d
 	exit ;;
271612
@@ -1122,8 +1118,18 @@ EOF
695b7d
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
695b7d
 	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
695b7d
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
695b7d
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
695b7d
-          && { echo i486-ncr-sysv4; exit; } ;;
695b7d
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
695b7d
+	  && { echo i486-ncr-sysv4; exit; } ;;
695b7d
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
695b7d
+	OS_REL='.3'
695b7d
+	test -r /etc/.relid \
695b7d
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
695b7d
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
695b7d
+	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
695b7d
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
695b7d
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
695b7d
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
695b7d
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
695b7d
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
695b7d
 	echo m68k-unknown-lynxos${UNAME_RELEASE}
695b7d
 	exit ;;
271612
@@ -1136,7 +1142,7 @@ EOF
695b7d
     rs6000:LynxOS:2.*:*)
695b7d
 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
695b7d
 	exit ;;
695b7d
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
695b7d
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
695b7d
 	echo powerpc-unknown-lynxos${UNAME_RELEASE}
695b7d
 	exit ;;
695b7d
     SM[BE]S:UNIX_SV:*:*)
271612
@@ -1156,10 +1162,10 @@ EOF
695b7d
 		echo ns32k-sni-sysv
695b7d
 	fi
695b7d
 	exit ;;
695b7d
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
695b7d
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
695b7d
-        echo i586-unisys-sysv4
695b7d
-        exit ;;
695b7d
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
695b7d
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
695b7d
+	echo i586-unisys-sysv4
695b7d
+	exit ;;
695b7d
     *:UNIX_System_V:4*:FTX*)
695b7d
 	# From Gerald Hewes <hewes@openmarket.com>.
695b7d
 	# How about differentiating between stratus architectures? -djm
271612
@@ -1185,11 +1191,11 @@ EOF
695b7d
 	exit ;;
695b7d
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
695b7d
 	if [ -d /usr/nec ]; then
695b7d
-	        echo mips-nec-sysv${UNAME_RELEASE}
695b7d
+		echo mips-nec-sysv${UNAME_RELEASE}
695b7d
 	else
695b7d
-	        echo mips-unknown-sysv${UNAME_RELEASE}
695b7d
+		echo mips-unknown-sysv${UNAME_RELEASE}
695b7d
 	fi
695b7d
-        exit ;;
695b7d
+	exit ;;
695b7d
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
695b7d
 	echo powerpc-be-beos
695b7d
 	exit ;;
271612
@@ -1199,6 +1205,12 @@ EOF
695b7d
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
695b7d
 	echo i586-pc-beos
695b7d
 	exit ;;
695b7d
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
695b7d
+	echo i586-pc-haiku
695b7d
+	exit ;;
695b7d
+    x86_64:Haiku:*:*)
695b7d
+	echo x86_64-unknown-haiku
695b7d
+	exit ;;
695b7d
     SX-4:SUPER-UX:*:*)
695b7d
 	echo sx4-nec-superux${UNAME_RELEASE}
695b7d
 	exit ;;
271612
@@ -1208,6 +1220,15 @@ EOF
695b7d
     SX-6:SUPER-UX:*:*)
695b7d
 	echo sx6-nec-superux${UNAME_RELEASE}
695b7d
 	exit ;;
695b7d
+    SX-7:SUPER-UX:*:*)
695b7d
+	echo sx7-nec-superux${UNAME_RELEASE}
695b7d
+	exit ;;
695b7d
+    SX-8:SUPER-UX:*:*)
695b7d
+	echo sx8-nec-superux${UNAME_RELEASE}
695b7d
+	exit ;;
695b7d
+    SX-8R:SUPER-UX:*:*)
695b7d
+	echo sx8r-nec-superux${UNAME_RELEASE}
695b7d
+	exit ;;
695b7d
     Power*:Rhapsody:*:*)
695b7d
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
695b7d
 	exit ;;
271612
@@ -1217,6 +1238,16 @@ EOF
695b7d
     *:Darwin:*:*)
695b7d
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
695b7d
 	case $UNAME_PROCESSOR in
695b7d
+	    i386)
695b7d
+		eval $set_cc_for_build
695b7d
+		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
695b7d
+		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
695b7d
+		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
695b7d
+		      grep IS_64BIT_ARCH >/dev/null
695b7d
+		  then
695b7d
+		      UNAME_PROCESSOR="x86_64"
695b7d
+		  fi
695b7d
+		fi ;;
695b7d
 	    unknown) UNAME_PROCESSOR=powerpc ;;
695b7d
 	esac
695b7d
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
271612
@@ -1232,7 +1263,10 @@ EOF
695b7d
     *:QNX:*:4*)
695b7d
 	echo i386-pc-qnx
695b7d
 	exit ;;
695b7d
-    NSE-?:NONSTOP_KERNEL:*:*)
695b7d
+    NEO-?:NONSTOP_KERNEL:*:*)
695b7d
+	echo neo-tandem-nsk${UNAME_RELEASE}
695b7d
+	exit ;;
695b7d
+    NSE-*:NONSTOP_KERNEL:*:*)
695b7d
 	echo nse-tandem-nsk${UNAME_RELEASE}
695b7d
 	exit ;;
695b7d
     NSR-?:NONSTOP_KERNEL:*:*)
271612
@@ -1277,13 +1311,13 @@ EOF
695b7d
 	echo pdp10-unknown-its
695b7d
 	exit ;;
695b7d
     SEI:*:*:SEIUX)
695b7d
-        echo mips-sei-seiux${UNAME_RELEASE}
695b7d
+	echo mips-sei-seiux${UNAME_RELEASE}
695b7d
 	exit ;;
695b7d
     *:DragonFly:*:*)
695b7d
 	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
695b7d
 	exit ;;
695b7d
     *:*VMS:*:*)
695b7d
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
695b7d
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
695b7d
 	case "${UNAME_MACHINE}" in
695b7d
 	    A*) echo alpha-dec-vms ; exit ;;
695b7d
 	    I*) echo ia64-dec-vms ; exit ;;
271612
@@ -1298,11 +1332,14 @@ EOF
695b7d
     i*86:rdos:*:*)
695b7d
 	echo ${UNAME_MACHINE}-pc-rdos
695b7d
 	exit ;;
695b7d
+    i*86:AROS:*:*)
695b7d
+	echo ${UNAME_MACHINE}-pc-aros
695b7d
+	exit ;;
695b7d
+    x86_64:VMkernel:*:*)
695b7d
+	echo ${UNAME_MACHINE}-unknown-esx
695b7d
+	exit ;;
695b7d
 esac
695b7d
 
695b7d
-#echo '(No uname command or uname output not recognized.)' 1>&2
695b7d
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
695b7d
-
695b7d
 eval $set_cc_for_build
695b7d
 cat >$dummy.c <
695b7d
 #ifdef _SEQUENT_
271612
@@ -1320,11 +1357,11 @@ main ()
695b7d
 #include <sys/param.h>
695b7d
   printf ("m68k-sony-newsos%s\n",
695b7d
 #ifdef NEWSOS4
695b7d
-          "4"
695b7d
+	"4"
695b7d
 #else
695b7d
-	  ""
695b7d
+	""
695b7d
 #endif
695b7d
-         ); exit (0);
695b7d
+	); exit (0);
695b7d
 #endif
695b7d
 #endif
695b7d
 
271612
@@ -1458,9 +1495,9 @@ This script, last modified $timestamp, has failed to recognize
695b7d
 the operating system you are using. It is advised that you
695b7d
 download the most up to date version of the config scripts from
695b7d
 
695b7d
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
695b7d
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
695b7d
 and
695b7d
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
695b7d
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
695b7d
 
695b7d
 If the version you run ($0) is already up to date, please
695b7d
 send the following data and any information you think might be
271612
diff --git a/config.sub b/config.sub
271612
index fab0aa3..826e4c6 100755
271612
--- a/config.sub
271612
+++ b/config.sub
695b7d
@@ -1,10 +1,10 @@
695b7d
 #! /bin/sh
695b7d
 # Configuration validation subroutine script.
695b7d
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
695b7d
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
695b7d
-#   Inc.
695b7d
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
695b7d
+#   2011, 2012 Free Software Foundation, Inc.
695b7d
 
695b7d
-timestamp='2006-09-20'
695b7d
+timestamp='2012-10-10'
695b7d
 
695b7d
 # This file is (in principle) common to ALL GNU software.
695b7d
 # The presence of a machine in this file suggests that SOME GNU software
271612
@@ -21,9 +21,7 @@ timestamp='2006-09-20'
695b7d
 # GNU General Public License for more details.
695b7d
 #
695b7d
 # You should have received a copy of the GNU General Public License
695b7d
-# along with this program; if not, write to the Free Software
695b7d
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
695b7d
-# 02110-1301, USA.
695b7d
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
695b7d
 #
695b7d
 # As a special exception to the GNU General Public License, if you
695b7d
 # distribute this file as part of a program that contains a
271612
@@ -32,13 +30,16 @@ timestamp='2006-09-20'
695b7d
 
695b7d
 
695b7d
 # Please send patches to <config-patches@gnu.org>.  Submit a context
695b7d
-# diff and a properly formatted ChangeLog entry.
695b7d
+# diff and a properly formatted GNU ChangeLog entry.
695b7d
 #
695b7d
 # Configuration subroutine to validate and canonicalize a configuration type.
695b7d
 # Supply the specified configuration type as an argument.
695b7d
 # If it is invalid, we print an error message on stderr and exit with code 1.
695b7d
 # Otherwise, we print the canonical config type on stdout and succeed.
695b7d
 
695b7d
+# You can get the latest version of this script from:
695b7d
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
695b7d
+
695b7d
 # This file is supposed to be the same for all GNU packages
695b7d
 # and recognize all the CPU types, system types and aliases
695b7d
 # that are meaningful with *any* GNU software.
271612
@@ -72,7 +73,8 @@ Report bugs and patches to <config-patches@gnu.org>."
695b7d
 version="\
695b7d
 GNU config.sub ($timestamp)
695b7d
 
695b7d
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
695b7d
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
695b7d
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
695b7d
 Free Software Foundation, Inc.
695b7d
 
695b7d
 This is free software; see the source for copying conditions.  There is NO
271612
@@ -120,12 +122,18 @@ esac
695b7d
 # Here we must recognize all the valid KERNEL-OS combinations.
695b7d
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
695b7d
 case $maybe_os in
695b7d
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
695b7d
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
695b7d
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
695b7d
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
695b7d
+  knetbsd*-gnu* | netbsd*-gnu* | \
695b7d
+  kopensolaris*-gnu* | \
695b7d
   storm-chaos* | os2-emx* | rtmk-nova*)
695b7d
     os=-$maybe_os
695b7d
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
695b7d
     ;;
695b7d
+  android-linux)
695b7d
+    os=-linux-android
695b7d
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
695b7d
+    ;;
695b7d
   *)
695b7d
     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
695b7d
     if [ $basic_machine != $1 ]
271612
@@ -148,10 +156,13 @@ case $os in
695b7d
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
695b7d
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
695b7d
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
695b7d
-	-apple | -axis | -knuth | -cray)
695b7d
+	-apple | -axis | -knuth | -cray | -microblaze*)
695b7d
 		os=
695b7d
 		basic_machine=$1
695b7d
 		;;
695b7d
+	-bluegene*)
695b7d
+		os=-cnk
695b7d
+		;;
695b7d
 	-sim | -cisco | -oki | -wec | -winbond)
695b7d
 		os=
695b7d
 		basic_machine=$1
271612
@@ -166,10 +177,10 @@ case $os in
695b7d
 		os=-chorusos
695b7d
 		basic_machine=$1
695b7d
 		;;
695b7d
- 	-chorusrdb)
695b7d
- 		os=-chorusrdb
695b7d
+	-chorusrdb)
695b7d
+		os=-chorusrdb
695b7d
 		basic_machine=$1
695b7d
- 		;;
695b7d
+		;;
695b7d
 	-hiux*)
695b7d
 		os=-hiuxwe2
695b7d
 		;;
271612
@@ -214,6 +225,12 @@ case $os in
695b7d
 	-isc*)
695b7d
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
695b7d
 		;;
695b7d
+	-lynx*178)
695b7d
+		os=-lynxos178
695b7d
+		;;
695b7d
+	-lynx*5)
695b7d
+		os=-lynxos5
695b7d
+		;;
695b7d
 	-lynx*)
695b7d
 		os=-lynxos
695b7d
 		;;
271612
@@ -238,24 +255,32 @@ case $basic_machine in
695b7d
 	# Some are omitted here because they have special meanings below.
695b7d
 	1750a | 580 \
695b7d
 	| a29k \
695b7d
+	| aarch64 | aarch64_be \
695b7d
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
695b7d
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
695b7d
 	| am33_2.0 \
695b7d
 	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
695b7d
+        | be32 | be64 \
695b7d
 	| bfin \
695b7d
 	| c4x | clipper \
695b7d
 	| d10v | d30v | dlx | dsp16xx \
695b7d
-	| fr30 | frv \
695b7d
+	| epiphany \
695b7d
+	| fido | fr30 | frv \
695b7d
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
695b7d
+	| hexagon \
695b7d
 	| i370 | i860 | i960 | ia64 \
695b7d
 	| ip2k | iq2000 \
695b7d
+	| le32 | le64 \
695b7d
+	| lm32 \
695b7d
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
695b7d
-	| maxq | mb | microblaze | mcore \
695b7d
+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
695b7d
 	| mips | mipsbe | mipseb | mipsel | mipsle \
695b7d
 	| mips16 \
695b7d
 	| mips64 | mips64el \
695b7d
-	| mips64vr | mips64vrel \
695b7d
+	| mips64octeon | mips64octeonel \
695b7d
 	| mips64orion | mips64orionel \
695b7d
+	| mips64r5900 | mips64r5900el \
695b7d
+	| mips64vr | mips64vrel \
695b7d
 	| mips64vr4100 | mips64vr4100el \
695b7d
 	| mips64vr4300 | mips64vr4300el \
695b7d
 	| mips64vr5000 | mips64vr5000el \
271612
@@ -268,29 +293,42 @@ case $basic_machine in
695b7d
 	| mipsisa64sr71k | mipsisa64sr71kel \
695b7d
 	| mipstx39 | mipstx39el \
695b7d
 	| mn10200 | mn10300 \
695b7d
+	| moxie \
695b7d
 	| mt \
695b7d
 	| msp430 \
695b7d
+	| nds32 | nds32le | nds32be \
695b7d
 	| nios | nios2 \
695b7d
 	| ns16k | ns32k \
695b7d
+	| open8 \
695b7d
 	| or32 \
695b7d
 	| pdp10 | pdp11 | pj | pjl \
695b7d
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
695b7d
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
695b7d
 	| pyramid \
695b7d
+	| rl78 | rx \
695b7d
 	| score \
695b7d
-	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
695b7d
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
695b7d
 	| sh64 | sh64le \
695b7d
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
695b7d
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
695b7d
-	| spu | strongarm \
695b7d
-	| tahoe | thumb | tic4x | tic80 | tron \
695b7d
-	| v850 | v850e \
695b7d
+	| spu \
695b7d
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
695b7d
+	| ubicom32 \
695b7d
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
695b7d
 	| we32k \
695b7d
-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
695b7d
-	| z8k)
695b7d
+	| x86 | xc16x | xstormy16 | xtensa \
695b7d
+	| z8k | z80)
695b7d
 		basic_machine=$basic_machine-unknown
695b7d
 		;;
695b7d
-	m6811 | m68hc11 | m6812 | m68hc12)
695b7d
-		# Motorola 68HC11/12.
695b7d
+	c54x)
695b7d
+		basic_machine=tic54x-unknown
695b7d
+		;;
695b7d
+	c55x)
695b7d
+		basic_machine=tic55x-unknown
695b7d
+		;;
695b7d
+	c6x)
695b7d
+		basic_machine=tic6x-unknown
695b7d
+		;;
695b7d
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
695b7d
 		basic_machine=$basic_machine-unknown
695b7d
 		os=-none
695b7d
 		;;
271612
@@ -300,6 +338,21 @@ case $basic_machine in
695b7d
 		basic_machine=mt-unknown
695b7d
 		;;
695b7d
 
695b7d
+	strongarm | thumb | xscale)
695b7d
+		basic_machine=arm-unknown
695b7d
+		;;
695b7d
+	xgate)
695b7d
+		basic_machine=$basic_machine-unknown
695b7d
+		os=-none
695b7d
+		;;
695b7d
+	xscaleeb)
695b7d
+		basic_machine=armeb-unknown
695b7d
+		;;
695b7d
+
695b7d
+	xscaleel)
695b7d
+		basic_machine=armel-unknown
695b7d
+		;;
695b7d
+
695b7d
 	# We use `pc' rather than `unknown'
695b7d
 	# because (1) that's what they normally are, and
695b7d
 	# (2) the word "unknown" tends to confuse beginning users.
271612
@@ -314,29 +367,37 @@ case $basic_machine in
695b7d
 	# Recognize the basic CPU types with company name.
695b7d
 	580-* \
695b7d
 	| a29k-* \
695b7d
+	| aarch64-* | aarch64_be-* \
695b7d
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
695b7d
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
695b7d
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
695b7d
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
695b7d
 	| avr-* | avr32-* \
695b7d
+	| be32-* | be64-* \
695b7d
 	| bfin-* | bs2000-* \
695b7d
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
695b7d
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
695b7d
 	| clipper-* | craynv-* | cydra-* \
695b7d
 	| d10v-* | d30v-* | dlx-* \
695b7d
 	| elxsi-* \
695b7d
-	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
695b7d
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
695b7d
 	| h8300-* | h8500-* \
695b7d
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
695b7d
+	| hexagon-* \
695b7d
 	| i*86-* | i860-* | i960-* | ia64-* \
695b7d
 	| ip2k-* | iq2000-* \
695b7d
+	| le32-* | le64-* \
695b7d
+	| lm32-* \
695b7d
 	| m32c-* | m32r-* | m32rle-* \
695b7d
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
695b7d
-	| m88110-* | m88k-* | maxq-* | mcore-* \
695b7d
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
695b7d
+	| microblaze-* | microblazeel-* \
695b7d
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
695b7d
 	| mips16-* \
695b7d
 	| mips64-* | mips64el-* \
695b7d
-	| mips64vr-* | mips64vrel-* \
695b7d
+	| mips64octeon-* | mips64octeonel-* \
695b7d
 	| mips64orion-* | mips64orionel-* \
695b7d
+	| mips64r5900-* | mips64r5900el-* \
695b7d
+	| mips64vr-* | mips64vrel-* \
695b7d
 	| mips64vr4100-* | mips64vr4100el-* \
695b7d
 	| mips64vr4300-* | mips64vr4300el-* \
695b7d
 	| mips64vr5000-* | mips64vr5000el-* \
271612
@@ -351,27 +412,36 @@ case $basic_machine in
695b7d
 	| mmix-* \
695b7d
 	| mt-* \
695b7d
 	| msp430-* \
695b7d
+	| nds32-* | nds32le-* | nds32be-* \
695b7d
 	| nios-* | nios2-* \
695b7d
 	| none-* | np1-* | ns16k-* | ns32k-* \
695b7d
+	| open8-* \
695b7d
 	| orion-* \
695b7d
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
695b7d
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
695b7d
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
695b7d
 	| pyramid-* \
695b7d
-	| romp-* | rs6000-* \
695b7d
-	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
695b7d
+	| rl78-* | romp-* | rs6000-* | rx-* \
695b7d
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
695b7d
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
695b7d
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
695b7d
 	| sparclite-* \
695b7d
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
695b7d
-	| tahoe-* | thumb-* \
695b7d
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
695b7d
+	| tahoe-* \
695b7d
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
695b7d
+	| tile*-* \
695b7d
 	| tron-* \
695b7d
-	| v850-* | v850e-* | vax-* \
695b7d
+	| ubicom32-* \
695b7d
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
695b7d
+	| vax-* \
695b7d
 	| we32k-* \
695b7d
-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
695b7d
-	| xstormy16-* | xtensa-* \
695b7d
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
695b7d
+	| xstormy16-* | xtensa*-* \
695b7d
 	| ymp-* \
695b7d
-	| z8k-*)
695b7d
+	| z8k-* | z80-*)
695b7d
+		;;
695b7d
+	# Recognize the basic CPU types without company name, with glob match.
695b7d
+	xtensa*)
695b7d
+		basic_machine=$basic_machine-unknown
695b7d
 		;;
695b7d
 	# Recognize the various machine names and aliases which stand
695b7d
 	# for a CPU type and a company and sometimes even an OS.
271612
@@ -389,7 +459,7 @@ case $basic_machine in
695b7d
 		basic_machine=a29k-amd
695b7d
 		os=-udi
695b7d
 		;;
695b7d
-    	abacus)
695b7d
+	abacus)
695b7d
 		basic_machine=abacus-unknown
695b7d
 		;;
695b7d
 	adobe68k)
271612
@@ -435,6 +505,10 @@ case $basic_machine in
695b7d
 		basic_machine=m68k-apollo
695b7d
 		os=-bsd
695b7d
 		;;
695b7d
+	aros)
695b7d
+		basic_machine=i386-pc
695b7d
+		os=-aros
695b7d
+		;;
695b7d
 	aux)
695b7d
 		basic_machine=m68k-apple
695b7d
 		os=-aux
271612
@@ -443,10 +517,35 @@ case $basic_machine in
695b7d
 		basic_machine=ns32k-sequent
695b7d
 		os=-dynix
695b7d
 		;;
695b7d
+	blackfin)
695b7d
+		basic_machine=bfin-unknown
695b7d
+		os=-linux
695b7d
+		;;
695b7d
+	blackfin-*)
695b7d
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
695b7d
+		os=-linux
695b7d
+		;;
695b7d
+	bluegene*)
695b7d
+		basic_machine=powerpc-ibm
695b7d
+		os=-cnk
695b7d
+		;;
695b7d
+	c54x-*)
695b7d
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
695b7d
+		;;
695b7d
+	c55x-*)
695b7d
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
695b7d
+		;;
695b7d
+	c6x-*)
695b7d
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
695b7d
+		;;
695b7d
 	c90)
695b7d
 		basic_machine=c90-cray
695b7d
 		os=-unicos
695b7d
 		;;
695b7d
+	cegcc)
695b7d
+		basic_machine=arm-unknown
695b7d
+		os=-cegcc
695b7d
+		;;
695b7d
 	convex-c1)
695b7d
 		basic_machine=c1-convex
695b7d
 		os=-bsd
271612
@@ -475,8 +574,8 @@ case $basic_machine in
695b7d
 		basic_machine=craynv-cray
695b7d
 		os=-unicosmp
695b7d
 		;;
695b7d
-	cr16c)
695b7d
-		basic_machine=cr16c-unknown
695b7d
+	cr16 | cr16-*)
695b7d
+		basic_machine=cr16-unknown
695b7d
 		os=-elf
695b7d
 		;;
695b7d
 	crds | unos)
271612
@@ -514,6 +613,10 @@ case $basic_machine in
695b7d
 		basic_machine=m88k-motorola
695b7d
 		os=-sysv3
695b7d
 		;;
695b7d
+	dicos)
695b7d
+		basic_machine=i686-pc
695b7d
+		os=-dicos
695b7d
+		;;
695b7d
 	djgpp)
695b7d
 		basic_machine=i586-pc
695b7d
 		os=-msdosdjgpp
271612
@@ -629,7 +732,6 @@ case $basic_machine in
695b7d
 	i370-ibm* | ibm*)
695b7d
 		basic_machine=i370-ibm
695b7d
 		;;
695b7d
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
695b7d
 	i*86v32)
695b7d
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
695b7d
 		os=-sysv32
271612
@@ -668,6 +770,14 @@ case $basic_machine in
695b7d
 		basic_machine=m68k-isi
695b7d
 		os=-sysv
695b7d
 		;;
695b7d
+	m68knommu)
695b7d
+		basic_machine=m68k-unknown
695b7d
+		os=-linux
695b7d
+		;;
695b7d
+	m68knommu-*)
695b7d
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
695b7d
+		os=-linux
695b7d
+		;;
695b7d
 	m88k-omron*)
695b7d
 		basic_machine=m88k-omron
695b7d
 		;;
271612
@@ -679,10 +789,21 @@ case $basic_machine in
695b7d
 		basic_machine=ns32k-utek
695b7d
 		os=-sysv
695b7d
 		;;
695b7d
+	microblaze*)
695b7d
+		basic_machine=microblaze-xilinx
695b7d
+		;;
695b7d
+	mingw64)
695b7d
+		basic_machine=x86_64-pc
695b7d
+		os=-mingw64
695b7d
+		;;
695b7d
 	mingw32)
695b7d
 		basic_machine=i386-pc
695b7d
 		os=-mingw32
695b7d
 		;;
695b7d
+	mingw32ce)
695b7d
+		basic_machine=arm-unknown
695b7d
+		os=-mingw32ce
695b7d
+		;;
695b7d
 	miniframe)
695b7d
 		basic_machine=m68000-convergent
695b7d
 		;;
271612
@@ -711,10 +832,18 @@ case $basic_machine in
695b7d
 	ms1-*)
695b7d
 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
695b7d
 		;;
695b7d
+	msys)
695b7d
+		basic_machine=i386-pc
695b7d
+		os=-msys
695b7d
+		;;
695b7d
 	mvs)
695b7d
 		basic_machine=i370-ibm
695b7d
 		os=-mvs
695b7d
 		;;
695b7d
+	nacl)
695b7d
+		basic_machine=le32-unknown
695b7d
+		os=-nacl
695b7d
+		;;
695b7d
 	ncr3000)
695b7d
 		basic_machine=i486-ncr
695b7d
 		os=-sysv4
271612
@@ -779,6 +908,12 @@ case $basic_machine in
695b7d
 	np1)
695b7d
 		basic_machine=np1-gould
695b7d
 		;;
695b7d
+	neo-tandem)
695b7d
+		basic_machine=neo-tandem
695b7d
+		;;
695b7d
+	nse-tandem)
695b7d
+		basic_machine=nse-tandem
695b7d
+		;;
695b7d
 	nsr-tandem)
695b7d
 		basic_machine=nsr-tandem
695b7d
 		;;
271612
@@ -809,6 +944,14 @@ case $basic_machine in
695b7d
 		basic_machine=i860-intel
695b7d
 		os=-osf
695b7d
 		;;
695b7d
+	parisc)
695b7d
+		basic_machine=hppa-unknown
695b7d
+		os=-linux
695b7d
+		;;
695b7d
+	parisc-*)
695b7d
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
695b7d
+		os=-linux
695b7d
+		;;
695b7d
 	pbd)
695b7d
 		basic_machine=sparc-tti
695b7d
 		;;
271612
@@ -853,9 +996,10 @@ case $basic_machine in
695b7d
 		;;
695b7d
 	power)	basic_machine=power-ibm
695b7d
 		;;
695b7d
-	ppc)	basic_machine=powerpc-unknown
695b7d
+	ppc | ppcbe)	basic_machine=powerpc-unknown
695b7d
 		;;
695b7d
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
695b7d
+	ppc-* | ppcbe-*)
695b7d
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
695b7d
 		;;
695b7d
 	ppcle | powerpclittle | ppc-le | powerpc-little)
695b7d
 		basic_machine=powerpcle-unknown
271612
@@ -925,6 +1069,9 @@ case $basic_machine in
695b7d
 		basic_machine=sh-hitachi
695b7d
 		os=-hms
695b7d
 		;;
695b7d
+	sh5el)
695b7d
+		basic_machine=sh5le-unknown
695b7d
+		;;
695b7d
 	sh64)
695b7d
 		basic_machine=sh64-unknown
695b7d
 		;;
271612
@@ -946,6 +1093,9 @@ case $basic_machine in
695b7d
 		basic_machine=i860-stratus
695b7d
 		os=-sysv4
695b7d
 		;;
695b7d
+	strongarm-* | thumb-*)
695b7d
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
695b7d
+		;;
695b7d
 	sun2)
695b7d
 		basic_machine=m68000-sun
695b7d
 		;;
271612
@@ -1002,17 +1152,9 @@ case $basic_machine in
695b7d
 		basic_machine=t90-cray
695b7d
 		os=-unicos
695b7d
 		;;
695b7d
-	tic54x | c54x*)
695b7d
-		basic_machine=tic54x-unknown
695b7d
-		os=-coff
695b7d
-		;;
695b7d
-	tic55x | c55x*)
695b7d
-		basic_machine=tic55x-unknown
695b7d
-		os=-coff
695b7d
-		;;
695b7d
-	tic6x | c6x*)
695b7d
-		basic_machine=tic6x-unknown
695b7d
-		os=-coff
695b7d
+	tile*)
695b7d
+		basic_machine=$basic_machine-unknown
695b7d
+		os=-linux-gnu
695b7d
 		;;
695b7d
 	tx39)
695b7d
 		basic_machine=mipstx39-unknown
271612
@@ -1081,6 +1223,9 @@ case $basic_machine in
695b7d
 	xps | xps100)
695b7d
 		basic_machine=xps100-honeywell
695b7d
 		;;
695b7d
+	xscale-* | xscalee[bl]-*)
695b7d
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
695b7d
+		;;
695b7d
 	ymp)
695b7d
 		basic_machine=ymp-cray
695b7d
 		os=-unicos
271612
@@ -1089,6 +1234,10 @@ case $basic_machine in
695b7d
 		basic_machine=z8k-unknown
695b7d
 		os=-sim
695b7d
 		;;
695b7d
+	z80-*-coff)
695b7d
+		basic_machine=z80-unknown
695b7d
+		os=-sim
695b7d
+		;;
695b7d
 	none)
695b7d
 		basic_machine=none-none
695b7d
 		os=-none
271612
@@ -1127,7 +1276,7 @@ case $basic_machine in
695b7d
 	we32k)
695b7d
 		basic_machine=we32k-att
695b7d
 		;;
695b7d
-	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
695b7d
+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
695b7d
 		basic_machine=sh-unknown
695b7d
 		;;
695b7d
 	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
271612
@@ -1174,9 +1323,12 @@ esac
695b7d
 if [ x"$os" != x"" ]
695b7d
 then
695b7d
 case $os in
695b7d
-        # First match some system type aliases
695b7d
-        # that might get confused with valid system types.
695b7d
+	# First match some system type aliases
695b7d
+	# that might get confused with valid system types.
695b7d
 	# -solaris* is a basic system type, with this one exception.
695b7d
+	-auroraux)
695b7d
+		os=-auroraux
695b7d
+		;;
695b7d
 	-solaris1 | -solaris1.*)
695b7d
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
695b7d
 		;;
271612
@@ -1197,21 +1349,23 @@ case $os in
695b7d
 	# Each alternative MUST END IN A *, to match a version number.
695b7d
 	# -sysv* is not here because it comes later, after sysvr4.
695b7d
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
695b7d
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
695b7d
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
695b7d
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
695b7d
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
695b7d
+	      | -sym* | -kopensolaris* \
695b7d
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
695b7d
-	      | -aos* \
695b7d
+	      | -aos* | -aros* \
695b7d
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
695b7d
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
695b7d
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
695b7d
-	      | -openbsd* | -solidbsd* \
695b7d
+	      | -bitrig* | -openbsd* | -solidbsd* \
695b7d
 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
695b7d
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
695b7d
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
695b7d
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
695b7d
-	      | -chorusos* | -chorusrdb* \
695b7d
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
695b7d
-	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
695b7d
+	      | -chorusos* | -chorusrdb* | -cegcc* \
695b7d
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
695b7d
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
695b7d
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
695b7d
 	      | -uxpv* | -beos* | -mpeix* | -udk* \
695b7d
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
695b7d
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
271612
@@ -1219,7 +1373,7 @@ case $os in
695b7d
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
695b7d
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
695b7d
 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
695b7d
-	      | -skyos* | -haiku* | -rdos* | -toppers*)
695b7d
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
695b7d
 	# Remember, each alternative MUST END IN *, to match a version number.
695b7d
 		;;
695b7d
 	-qnx*)
271612
@@ -1258,7 +1412,7 @@ case $os in
695b7d
 	-opened*)
695b7d
 		os=-openedition
695b7d
 		;;
695b7d
-        -os400*)
695b7d
+	-os400*)
695b7d
 		os=-os400
695b7d
 		;;
695b7d
 	-wince*)
271612
@@ -1307,7 +1461,7 @@ case $os in
695b7d
 	-sinix*)
695b7d
 		os=-sysv4
695b7d
 		;;
695b7d
-        -tpf*)
695b7d
+	-tpf*)
695b7d
 		os=-tpf
695b7d
 		;;
695b7d
 	-triton*)
271612
@@ -1349,6 +1503,11 @@ case $os in
695b7d
 	-zvmoe)
695b7d
 		os=-zvmoe
695b7d
 		;;
695b7d
+	-dicos*)
695b7d
+		os=-dicos
695b7d
+		;;
695b7d
+	-nacl*)
695b7d
+		;;
695b7d
 	-none)
695b7d
 		;;
695b7d
 	*)
271612
@@ -1371,10 +1530,10 @@ else
695b7d
 # system, and we'll never get to this point.
695b7d
 
695b7d
 case $basic_machine in
695b7d
-        score-*)
695b7d
+	score-*)
695b7d
 		os=-elf
695b7d
 		;;
695b7d
-        spu-*)
695b7d
+	spu-*)
695b7d
 		os=-elf
695b7d
 		;;
695b7d
 	*-acorn)
271612
@@ -1386,8 +1545,20 @@ case $basic_machine in
695b7d
 	arm*-semi)
695b7d
 		os=-aout
695b7d
 		;;
695b7d
-        c4x-* | tic4x-*)
695b7d
-        	os=-coff
695b7d
+	c4x-* | tic4x-*)
695b7d
+		os=-coff
695b7d
+		;;
695b7d
+	hexagon-*)
695b7d
+		os=-elf
695b7d
+		;;
695b7d
+	tic54x-*)
695b7d
+		os=-coff
695b7d
+		;;
695b7d
+	tic55x-*)
695b7d
+		os=-coff
695b7d
+		;;
695b7d
+	tic6x-*)
695b7d
+		os=-coff
695b7d
 		;;
695b7d
 	# This must come before the *-dec entry.
695b7d
 	pdp10-*)
271612
@@ -1407,13 +1578,13 @@ case $basic_machine in
695b7d
 		;;
695b7d
 	m68000-sun)
695b7d
 		os=-sunos3
695b7d
-		# This also exists in the configure program, but was not the
695b7d
-		# default.
695b7d
-		# os=-sunos4
695b7d
 		;;
695b7d
 	m68*-cisco)
695b7d
 		os=-aout
695b7d
 		;;
695b7d
+	mep-*)
695b7d
+		os=-elf
695b7d
+		;;
695b7d
 	mips*-cisco)
695b7d
 		os=-elf
695b7d
 		;;
271612
@@ -1438,7 +1609,7 @@ case $basic_machine in
695b7d
 	*-ibm)
695b7d
 		os=-aix
695b7d
 		;;
695b7d
-    	*-knuth)
695b7d
+	*-knuth)
695b7d
 		os=-mmixware
695b7d
 		;;
695b7d
 	*-wec)
271612
@@ -1543,7 +1714,7 @@ case $basic_machine in
695b7d
 			-sunos*)
695b7d
 				vendor=sun
695b7d
 				;;
695b7d
-			-aix*)
695b7d
+			-cnk*|-aix*)
695b7d
 				vendor=ibm
695b7d
 				;;
695b7d
 			-beos*)
271612
-- 
271612
2.31.1
271612