Blame SOURCES/dump-aarch64.patch

512a8e
diff -urN dump-0.4b44/config.guess dump-0.4b44-aarch64/config.guess
512a8e
--- dump-0.4b44/config.guess	2003-01-24 05:01:44.000000000 -0600
512a8e
+++ dump-0.4b44-aarch64/config.guess	2013-03-03 04:18:12.766799480 -0600
512a8e
@@ -1,9 +1,10 @@
512a8e
 #! /bin/sh
512a8e
 # Attempt to guess a canonical system name.
512a8e
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
512a8e
-#   2000, 2001, 2002 Free Software Foundation, Inc.
512a8e
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
512a8e
+#   2011, 2012 Free Software Foundation, Inc.
512a8e
 
512a8e
-timestamp='2002-07-23'
512a8e
+timestamp='2012-09-25'
512a8e
 
512a8e
 # This file is free software; you can redistribute it and/or modify it
512a8e
 # under the terms of the GNU General Public License as published by
512a8e
@@ -16,24 +17,24 @@
512a8e
 # General Public License for more details.
512a8e
 #
512a8e
 # You should have received a copy of the GNU General Public License
512a8e
-# along with this program; if not, write to the Free Software
512a8e
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
512a8e
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
512a8e
 #
512a8e
 # As a special exception to the GNU General Public License, if you
512a8e
 # distribute this file as part of a program that contains a
512a8e
 # configuration script generated by Autoconf, you may include it under
512a8e
 # the same distribution terms that you use for the rest of that program.
512a8e
 
512a8e
-# Originally written by Per Bothner <per@bothner.com>.
512a8e
-# Please send patches to <config-patches@gnu.org>.  Submit a context
512a8e
-# diff and a properly formatted ChangeLog entry.
512a8e
+
512a8e
+# Originally written by Per Bothner.  Please send patches (context
512a8e
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
512a8e
+# entry.
512a8e
 #
512a8e
 # This script attempts to guess a canonical system name similar to
512a8e
 # config.sub.  If it succeeds, it prints the system name on stdout, and
512a8e
 # exits with 0.  Otherwise, it exits with 1.
512a8e
 #
512a8e
-# The plan is that this can be called by configure scripts if you
512a8e
-# don't specify an explicit build system type.
512a8e
+# You can get the latest version of this script from:
512a8e
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
512a8e
 
512a8e
 me=`echo "$0" | sed -e 's,.*/,,'`
512a8e
 
512a8e
@@ -53,7 +54,8 @@
512a8e
 GNU config.guess ($timestamp)
512a8e
 
512a8e
 Originally written by Per Bothner.
512a8e
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
512a8e
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
512a8e
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
512a8e
 Free Software Foundation, Inc.
512a8e
 
512a8e
 This is free software; see the source for copying conditions.  There is NO
512a8e
@@ -66,11 +68,11 @@
512a8e
 while test $# -gt 0 ; do
512a8e
   case $1 in
512a8e
     --time-stamp | --time* | -t )
512a8e
-       echo "$timestamp" ; exit 0 ;;
512a8e
+       echo "$timestamp" ; exit ;;
512a8e
     --version | -v )
512a8e
-       echo "$version" ; exit 0 ;;
512a8e
+       echo "$version" ; exit ;;
512a8e
     --help | --h* | -h )
512a8e
-       echo "$usage"; exit 0 ;;
512a8e
+       echo "$usage"; exit ;;
512a8e
     -- )     # Stop option processing
512a8e
        shift; break ;;
512a8e
     - )	# Use stdin as input.
512a8e
@@ -98,30 +100,32 @@
512a8e
 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
512a8e
 # use `HOST_CC' if defined, but it is deprecated.
512a8e
 
512a8e
-# This shell variable is my proudest work .. or something. --bje
512a8e
+# Portable tmp directory creation inspired by the Autoconf team.
512a8e
 
512a8e
-set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
512a8e
-(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
512a8e
-   || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
512a8e
-dummy=$tmpdir/dummy ;
512a8e
-files="$dummy.c $dummy.o $dummy.rel $dummy" ;
512a8e
-trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
512a8e
+set_cc_for_build='
512a8e
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
512a8e
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
512a8e
+: ${TMPDIR=/tmp} ;
512a8e
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
512a8e
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
512a8e
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
512a8e
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
512a8e
+dummy=$tmp/dummy ;
512a8e
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
512a8e
 case $CC_FOR_BUILD,$HOST_CC,$CC in
512a8e
  ,,)    echo "int x;" > $dummy.c ;
512a8e
 	for c in cc gcc c89 c99 ; do
512a8e
-	  if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then
512a8e
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
512a8e
 	     CC_FOR_BUILD="$c"; break ;
512a8e
 	  fi ;
512a8e
 	done ;
512a8e
-	rm -f $files ;
512a8e
 	if test x"$CC_FOR_BUILD" = x ; then
512a8e
 	  CC_FOR_BUILD=no_compiler_found ;
512a8e
 	fi
512a8e
 	;;
512a8e
  ,,*)   CC_FOR_BUILD=$CC ;;
512a8e
  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
512a8e
-esac ;
512a8e
-unset files'
512a8e
+esac ; set_cc_for_build= ;'
512a8e
 
512a8e
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
512a8e
 # (ghazi@noc.rutgers.edu 1994-08-24)
512a8e
@@ -139,7 +143,7 @@
512a8e
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
512a8e
     *:NetBSD:*:*)
512a8e
 	# NetBSD (nbsd) targets should (where applicable) match one or
512a8e
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
512a8e
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
512a8e
 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
512a8e
 	# switched to ELF, *-*-netbsd* would select the old
512a8e
 	# object file format.  This provides both forward
512a8e
@@ -156,6 +160,7 @@
512a8e
 	    arm*) machine=arm-unknown ;;
512a8e
 	    sh3el) machine=shl-unknown ;;
512a8e
 	    sh3eb) machine=sh-unknown ;;
512a8e
+	    sh5el) machine=sh5le-unknown ;;
512a8e
 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
512a8e
 	esac
512a8e
 	# The Operating System including object format, if it has switched
512a8e
@@ -164,7 +169,7 @@
512a8e
 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
512a8e
 		eval $set_cc_for_build
512a8e
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
512a8e
-			| grep __ELF__ >/dev/null
512a8e
+			| grep -q __ELF__
512a8e
 		then
512a8e
 		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
512a8e
 		    # Return netbsd for either.  FIX?
512a8e
@@ -174,148 +179,139 @@
512a8e
 		fi
512a8e
 		;;
512a8e
 	    *)
512a8e
-	        os=netbsd
512a8e
+		os=netbsd
512a8e
 		;;
512a8e
 	esac
512a8e
 	# The OS release
512a8e
-	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
512a8e
+	# Debian GNU/NetBSD machines have a different userland, and
512a8e
+	# thus, need a distinct triplet. However, they do not need
512a8e
+	# kernel version information, so it can be replaced with a
512a8e
+	# suitable tag, in the style of linux-gnu.
512a8e
+	case "${UNAME_VERSION}" in
512a8e
+	    Debian*)
512a8e
+		release='-gnu'
512a8e
+		;;
512a8e
+	    *)
512a8e
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
512a8e
+		;;
512a8e
+	esac
512a8e
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
512a8e
 	# contains redundant information, the shorter form:
512a8e
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
512a8e
 	echo "${machine}-${os}${release}"
512a8e
-	exit 0 ;;
512a8e
-    amiga:OpenBSD:*:*)
512a8e
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
-    arc:OpenBSD:*:*)
512a8e
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
-    hp300:OpenBSD:*:*)
512a8e
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
-    mac68k:OpenBSD:*:*)
512a8e
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
-    macppc:OpenBSD:*:*)
512a8e
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
-    mvme68k:OpenBSD:*:*)
512a8e
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
-    mvme88k:OpenBSD:*:*)
512a8e
-	echo m88k-unknown-openbsd${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
-    mvmeppc:OpenBSD:*:*)
512a8e
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
-    pmax:OpenBSD:*:*)
512a8e
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
-    sgi:OpenBSD:*:*)
512a8e
-	echo mipseb-unknown-openbsd${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
-    sun3:OpenBSD:*:*)
512a8e
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
-    wgrisc:OpenBSD:*:*)
512a8e
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    *:Bitrig:*:*)
512a8e
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
512a8e
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
     *:OpenBSD:*:*)
512a8e
-	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
512a8e
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
+    *:ekkoBSD:*:*)
512a8e
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
+    *:SolidBSD:*:*)
512a8e
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
+    macppc:MirBSD:*:*)
512a8e
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
+    *:MirBSD:*:*)
512a8e
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
     alpha:OSF1:*:*)
512a8e
-	if test $UNAME_RELEASE = "V4.0"; then
512a8e
+	case $UNAME_RELEASE in
512a8e
+	*4.0)
512a8e
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
512a8e
-	fi
512a8e
+		;;
512a8e
+	*5.*)
512a8e
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
512a8e
+		;;
512a8e
+	esac
512a8e
+	# According to Compaq, /usr/sbin/psrinfo has been available on
512a8e
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
512a8e
+	# covers most systems running today.  This code pipes the CPU
512a8e
+	# types through head -n 1, so we only detect the type of CPU 0.
512a8e
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
512a8e
+	case "$ALPHA_CPU_TYPE" in
512a8e
+	    "EV4 (21064)")
512a8e
+		UNAME_MACHINE="alpha" ;;
512a8e
+	    "EV4.5 (21064)")
512a8e
+		UNAME_MACHINE="alpha" ;;
512a8e
+	    "LCA4 (21066/21068)")
512a8e
+		UNAME_MACHINE="alpha" ;;
512a8e
+	    "EV5 (21164)")
512a8e
+		UNAME_MACHINE="alphaev5" ;;
512a8e
+	    "EV5.6 (21164A)")
512a8e
+		UNAME_MACHINE="alphaev56" ;;
512a8e
+	    "EV5.6 (21164PC)")
512a8e
+		UNAME_MACHINE="alphapca56" ;;
512a8e
+	    "EV5.7 (21164PC)")
512a8e
+		UNAME_MACHINE="alphapca57" ;;
512a8e
+	    "EV6 (21264)")
512a8e
+		UNAME_MACHINE="alphaev6" ;;
512a8e
+	    "EV6.7 (21264A)")
512a8e
+		UNAME_MACHINE="alphaev67" ;;
512a8e
+	    "EV6.8CB (21264C)")
512a8e
+		UNAME_MACHINE="alphaev68" ;;
512a8e
+	    "EV6.8AL (21264B)")
512a8e
+		UNAME_MACHINE="alphaev68" ;;
512a8e
+	    "EV6.8CX (21264D)")
512a8e
+		UNAME_MACHINE="alphaev68" ;;
512a8e
+	    "EV6.9A (21264/EV69A)")
512a8e
+		UNAME_MACHINE="alphaev69" ;;
512a8e
+	    "EV7 (21364)")
512a8e
+		UNAME_MACHINE="alphaev7" ;;
512a8e
+	    "EV7.9 (21364A)")
512a8e
+		UNAME_MACHINE="alphaev79" ;;
512a8e
+	esac
512a8e
+	# A Pn.n version is a patched version.
512a8e
 	# A Vn.n version is a released version.
512a8e
 	# A Tn.n version is a released field test version.
512a8e
 	# A Xn.n version is an unreleased experimental baselevel.
512a8e
 	# 1.2 uses "1.2" for uname -r.
512a8e
-	eval $set_cc_for_build
512a8e
-	cat <<EOF >$dummy.s
512a8e
-	.data
512a8e
-\$Lformat:
512a8e
-	.byte 37,100,45,37,120,10,0	# "%d-%x\n"
512a8e
-
512a8e
-	.text
512a8e
-	.globl main
512a8e
-	.align 4
512a8e
-	.ent main
512a8e
-main:
512a8e
-	.frame \$30,16,\$26,0
512a8e
-	ldgp \$29,0(\$27)
512a8e
-	.prologue 1
512a8e
-	.long 0x47e03d80 # implver \$0
512a8e
-	lda \$2,-1
512a8e
-	.long 0x47e20c21 # amask \$2,\$1
512a8e
-	lda \$16,\$Lformat
512a8e
-	mov \$0,\$17
512a8e
-	not \$1,\$18
512a8e
-	jsr \$26,printf
512a8e
-	ldgp \$29,0(\$26)
512a8e
-	mov 0,\$16
512a8e
-	jsr \$26,exit
512a8e
-	.end main
512a8e
-EOF
512a8e
-	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
512a8e
-	if test "$?" = 0 ; then
512a8e
-		case `$dummy` in
512a8e
-			0-0)
512a8e
-				UNAME_MACHINE="alpha"
512a8e
-				;;
512a8e
-			1-0)
512a8e
-				UNAME_MACHINE="alphaev5"
512a8e
-				;;
512a8e
-			1-1)
512a8e
-				UNAME_MACHINE="alphaev56"
512a8e
-				;;
512a8e
-			1-101)
512a8e
-				UNAME_MACHINE="alphapca56"
512a8e
-				;;
512a8e
-			2-303)
512a8e
-				UNAME_MACHINE="alphaev6"
512a8e
-				;;
512a8e
-			2-307)
512a8e
-				UNAME_MACHINE="alphaev67"
512a8e
-				;;
512a8e
-			2-1307)
512a8e
-				UNAME_MACHINE="alphaev68"
512a8e
-				;;
512a8e
-			3-1307)
512a8e
-				UNAME_MACHINE="alphaev7"
512a8e
-				;;
512a8e
-		esac
512a8e
-	fi
512a8e
-	rm -f $dummy.s $dummy && rmdir $tmpdir
512a8e
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
512a8e
-	exit 0 ;;
512a8e
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
512a8e
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
512a8e
+	exitcode=$?
512a8e
+	trap '' 0
512a8e
+	exit $exitcode ;;
512a8e
     Alpha\ *:Windows_NT*:*)
512a8e
 	# How do we know it's Interix rather than the generic POSIX subsystem?
512a8e
 	# Should we change UNAME_MACHINE based on the output of uname instead
512a8e
 	# of the specific Alpha model?
512a8e
 	echo alpha-pc-interix
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     21064:Windows_NT:50:3)
512a8e
 	echo alpha-dec-winnt3.5
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     Amiga*:UNIX_System_V:4.0:*)
512a8e
 	echo m68k-unknown-sysv4
512a8e
-	exit 0;;
512a8e
+	exit ;;
512a8e
     *:[Aa]miga[Oo][Ss]:*:*)
512a8e
 	echo ${UNAME_MACHINE}-unknown-amigaos
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *:[Mm]orph[Oo][Ss]:*:*)
512a8e
 	echo ${UNAME_MACHINE}-unknown-morphos
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *:OS/390:*:*)
512a8e
 	echo i370-ibm-openedition
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    *:z/VM:*:*)
512a8e
+	echo s390-ibm-zvmoe
512a8e
+	exit ;;
512a8e
+    *:OS400:*:*)
512a8e
+	echo powerpc-ibm-os400
512a8e
+	exit ;;
512a8e
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
512a8e
 	echo arm-acorn-riscix${UNAME_RELEASE}
512a8e
-	exit 0;;
512a8e
+	exit ;;
512a8e
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
512a8e
+	echo arm-unknown-riscos
512a8e
+	exit ;;
512a8e
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
512a8e
 	echo hppa1.1-hitachi-hiuxmpp
512a8e
-	exit 0;;
512a8e
+	exit ;;
512a8e
     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
512a8e
 	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
512a8e
 	if test "`(/bin/universe) 2>/dev/null`" = att ; then
512a8e
@@ -323,29 +319,51 @@
512a8e
 	else
512a8e
 		echo pyramid-pyramid-bsd
512a8e
 	fi
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     NILE*:*:*:dcosx)
512a8e
 	echo pyramid-pyramid-svr4
512a8e
-	exit 0 ;;
512a8e
-    DRS?6000:UNIX_SV:4.2*:7*)
512a8e
+	exit ;;
512a8e
+    DRS?6000:unix:4.0:6*)
512a8e
+	echo sparc-icl-nx6
512a8e
+	exit ;;
512a8e
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
512a8e
 	case `/usr/bin/uname -p` in
512a8e
-	    sparc) echo sparc-icl-nx7 && exit 0 ;;
512a8e
+	    sparc) echo sparc-icl-nx7; exit ;;
512a8e
 	esac ;;
512a8e
+    s390x:SunOS:*:*)
512a8e
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
512a8e
+	exit ;;
512a8e
     sun4H:SunOS:5.*:*)
512a8e
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
512a8e
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
512a8e
-	exit 0 ;;
512a8e
-    i86pc:SunOS:5.*:*)
512a8e
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
512a8e
+	echo i386-pc-auroraux${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
512a8e
+	eval $set_cc_for_build
512a8e
+	SUN_ARCH="i386"
512a8e
+	# If there is a compiler, see if it is configured for 64-bit objects.
512a8e
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
512a8e
+	# This test works for both compilers.
512a8e
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
512a8e
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
512a8e
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
512a8e
+		grep IS_64BIT_ARCH >/dev/null
512a8e
+	    then
512a8e
+		SUN_ARCH="x86_64"
512a8e
+	    fi
512a8e
+	fi
512a8e
+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
512a8e
+	exit ;;
512a8e
     sun4*:SunOS:6*:*)
512a8e
 	# According to config.sub, this is the proper way to canonicalize
512a8e
 	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
512a8e
 	# it's likely to be more like Solaris than SunOS4.
512a8e
 	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     sun4*:SunOS:*:*)
512a8e
 	case "`/usr/bin/arch -k`" in
512a8e
 	    Series*|S4*)
512a8e
@@ -354,10 +372,10 @@
512a8e
 	esac
512a8e
 	# Japanese Language versions have a version number like `4.1.3-JL'.
512a8e
 	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     sun3*:SunOS:*:*)
512a8e
 	echo m68k-sun-sunos${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     sun*:*:4.2BSD:*)
512a8e
 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
512a8e
 	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
512a8e
@@ -369,10 +387,10 @@
512a8e
 		echo sparc-sun-sunos${UNAME_RELEASE}
512a8e
 		;;
512a8e
 	esac
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     aushp:SunOS:*:*)
512a8e
 	echo sparc-auspex-sunos${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     # The situation for MiNT is a little confusing.  The machine name
512a8e
     # can be virtually everything (everything which is not
512a8e
     # "atarist" or "atariste" at least should have a processor
512a8e
@@ -382,38 +400,41 @@
512a8e
     # MiNT.  But MiNT is downward compatible to TOS, so this should
512a8e
     # be no problem.
512a8e
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
512a8e
-        echo m68k-atari-mint${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	echo m68k-atari-mint${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
512a8e
 	echo m68k-atari-mint${UNAME_RELEASE}
512a8e
-        exit 0 ;;
512a8e
+	exit ;;
512a8e
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
512a8e
-        echo m68k-atari-mint${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	echo m68k-atari-mint${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
512a8e
-        echo m68k-milan-mint${UNAME_RELEASE}
512a8e
-        exit 0 ;;
512a8e
+	echo m68k-milan-mint${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
512a8e
-        echo m68k-hades-mint${UNAME_RELEASE}
512a8e
-        exit 0 ;;
512a8e
+	echo m68k-hades-mint${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
512a8e
-        echo m68k-unknown-mint${UNAME_RELEASE}
512a8e
-        exit 0 ;;
512a8e
+	echo m68k-unknown-mint${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
+    m68k:machten:*:*)
512a8e
+	echo m68k-apple-machten${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
     powerpc:machten:*:*)
512a8e
 	echo powerpc-apple-machten${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     RISC*:Mach:*:*)
512a8e
 	echo mips-dec-mach_bsd4.3
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     RISC*:ULTRIX:*:*)
512a8e
 	echo mips-dec-ultrix${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     VAX*:ULTRIX*:*:*)
512a8e
 	echo vax-dec-ultrix${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     2020:CLIX:*:* | 2430:CLIX:*:*)
512a8e
 	echo clipper-intergraph-clix${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     mips:*:*:UMIPS | mips:*:*:RISCos)
512a8e
 	eval $set_cc_for_build
512a8e
 	sed 's/^	//' << EOF >$dummy.c
512a8e
@@ -437,33 +458,36 @@
512a8e
 	  exit (-1);
512a8e
 	}
512a8e
 EOF
512a8e
-	$CC_FOR_BUILD $dummy.c -o $dummy \
512a8e
-	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
512a8e
-	  && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
512a8e
-	rm -f $dummy.c $dummy && rmdir $tmpdir
512a8e
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
512a8e
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
512a8e
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
512a8e
+	    { echo "$SYSTEM_NAME"; exit; }
512a8e
 	echo mips-mips-riscos${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     Motorola:PowerMAX_OS:*:*)
512a8e
 	echo powerpc-motorola-powermax
512a8e
-	exit 0 ;;
512a8e
-    Night_Hawk:*:*:PowerMAX_OS)
512a8e
+	exit ;;
512a8e
+    Motorola:*:4.3:PL8-*)
512a8e
 	echo powerpc-harris-powermax
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
512a8e
+	echo powerpc-harris-powermax
512a8e
+	exit ;;
512a8e
     Night_Hawk:Power_UNIX:*:*)
512a8e
 	echo powerpc-harris-powerunix
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     m88k:CX/UX:7*:*)
512a8e
 	echo m88k-harris-cxux7
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     m88k:*:4*:R4*)
512a8e
 	echo m88k-motorola-sysv4
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     m88k:*:3*:R3*)
512a8e
 	echo m88k-motorola-sysv3
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     AViiON:dgux:*:*)
512a8e
-        # DG/UX returns AViiON for all architectures
512a8e
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
512a8e
+	# DG/UX returns AViiON for all architectures
512a8e
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
512a8e
 	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
512a8e
 	then
512a8e
 	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
512a8e
@@ -476,29 +500,29 @@
512a8e
 	else
512a8e
 	    echo i586-dg-dgux${UNAME_RELEASE}
512a8e
 	fi
512a8e
- 	exit 0 ;;
512a8e
+	exit ;;
512a8e
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
512a8e
 	echo m88k-dolphin-sysv3
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     M88*:*:R3*:*)
512a8e
 	# Delta 88k system running SVR3
512a8e
 	echo m88k-motorola-sysv3
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
512a8e
 	echo m88k-tektronix-sysv3
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
512a8e
 	echo m68k-tektronix-bsd
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *:IRIX*:*:*)
512a8e
 	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
512a8e
-	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
512a8e
-	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
512a8e
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
512a8e
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
512a8e
     i*86:AIX:*:*)
512a8e
 	echo i386-ibm-aix
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     ia64:AIX:*:*)
512a8e
 	if [ -x /usr/bin/oslevel ] ; then
512a8e
 		IBM_REV=`/usr/bin/oslevel`
512a8e
@@ -506,7 +530,7 @@
512a8e
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
512a8e
 	fi
512a8e
 	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *:AIX:2:3)
512a8e
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
512a8e
 		eval $set_cc_for_build
512a8e
@@ -521,16 +545,19 @@
512a8e
 			exit(0);
512a8e
 			}
512a8e
 EOF
512a8e
-		$CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
512a8e
-		rm -f $dummy.c $dummy && rmdir $tmpdir
512a8e
-		echo rs6000-ibm-aix3.2.5
512a8e
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
512a8e
+		then
512a8e
+			echo "$SYSTEM_NAME"
512a8e
+		else
512a8e
+			echo rs6000-ibm-aix3.2.5
512a8e
+		fi
512a8e
 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
512a8e
 		echo rs6000-ibm-aix3.2.4
512a8e
 	else
512a8e
 		echo rs6000-ibm-aix3.2
512a8e
 	fi
512a8e
-	exit 0 ;;
512a8e
-    *:AIX:*:[45])
512a8e
+	exit ;;
512a8e
+    *:AIX:*:[4567])
512a8e
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
512a8e
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
512a8e
 		IBM_ARCH=rs6000
512a8e
@@ -543,28 +570,28 @@
512a8e
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
512a8e
 	fi
512a8e
 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *:AIX:*:*)
512a8e
 	echo rs6000-ibm-aix
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
512a8e
 	echo romp-ibm-bsd4.4
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
512a8e
 	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
512a8e
-	exit 0 ;;                           # report: romp-ibm BSD 4.3
512a8e
+	exit ;;                             # report: romp-ibm BSD 4.3
512a8e
     *:BOSX:*:*)
512a8e
 	echo rs6000-bull-bosx
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     DPX/2?00:B.O.S.:*:*)
512a8e
 	echo m68k-bull-sysv3
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     9000/[34]??:4.3bsd:1.*:*)
512a8e
 	echo m68k-hp-bsd
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
512a8e
 	echo m68k-hp-bsd4.4
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     9000/[34678]??:HP-UX:*:*)
512a8e
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
512a8e
 	case "${UNAME_MACHINE}" in
512a8e
@@ -573,64 +600,84 @@
512a8e
 	    9000/[678][0-9][0-9])
512a8e
 		if [ -x /usr/bin/getconf ]; then
512a8e
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
512a8e
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
512a8e
-                    case "${sc_cpu_version}" in
512a8e
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
512a8e
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
512a8e
-                      532)                      # CPU_PA_RISC2_0
512a8e
-                        case "${sc_kernel_bits}" in
512a8e
-                          32) HP_ARCH="hppa2.0n" ;;
512a8e
-                          64) HP_ARCH="hppa2.0w" ;;
512a8e
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
512a8e
+		    case "${sc_cpu_version}" in
512a8e
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
512a8e
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
512a8e
+		      532)                      # CPU_PA_RISC2_0
512a8e
+			case "${sc_kernel_bits}" in
512a8e
+			  32) HP_ARCH="hppa2.0n" ;;
512a8e
+			  64) HP_ARCH="hppa2.0w" ;;
512a8e
 			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
512a8e
-                        esac ;;
512a8e
-                    esac
512a8e
+			esac ;;
512a8e
+		    esac
512a8e
 		fi
512a8e
 		if [ "${HP_ARCH}" = "" ]; then
512a8e
 		    eval $set_cc_for_build
512a8e
-		    sed 's/^              //' << EOF >$dummy.c
512a8e
+		    sed 's/^		//' << EOF >$dummy.c
512a8e
+
512a8e
+		#define _HPUX_SOURCE
512a8e
+		#include <stdlib.h>
512a8e
+		#include <unistd.h>
512a8e
 
512a8e
-              #define _HPUX_SOURCE
512a8e
-              #include <stdlib.h>
512a8e
-              #include <unistd.h>
512a8e
-
512a8e
-              int main ()
512a8e
-              {
512a8e
-              #if defined(_SC_KERNEL_BITS)
512a8e
-                  long bits = sysconf(_SC_KERNEL_BITS);
512a8e
-              #endif
512a8e
-                  long cpu  = sysconf (_SC_CPU_VERSION);
512a8e
-
512a8e
-                  switch (cpu)
512a8e
-              	{
512a8e
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
512a8e
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
512a8e
-              	case CPU_PA_RISC2_0:
512a8e
-              #if defined(_SC_KERNEL_BITS)
512a8e
-              	    switch (bits)
512a8e
-              		{
512a8e
-              		case 64: puts ("hppa2.0w"); break;
512a8e
-              		case 32: puts ("hppa2.0n"); break;
512a8e
-              		default: puts ("hppa2.0"); break;
512a8e
-              		} break;
512a8e
-              #else  /* !defined(_SC_KERNEL_BITS) */
512a8e
-              	    puts ("hppa2.0"); break;
512a8e
-              #endif
512a8e
-              	default: puts ("hppa1.0"); break;
512a8e
-              	}
512a8e
-                  exit (0);
512a8e
-              }
512a8e
+		int main ()
512a8e
+		{
512a8e
+		#if defined(_SC_KERNEL_BITS)
512a8e
+		    long bits = sysconf(_SC_KERNEL_BITS);
512a8e
+		#endif
512a8e
+		    long cpu  = sysconf (_SC_CPU_VERSION);
512a8e
+
512a8e
+		    switch (cpu)
512a8e
+			{
512a8e
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
512a8e
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
512a8e
+			case CPU_PA_RISC2_0:
512a8e
+		#if defined(_SC_KERNEL_BITS)
512a8e
+			    switch (bits)
512a8e
+				{
512a8e
+				case 64: puts ("hppa2.0w"); break;
512a8e
+				case 32: puts ("hppa2.0n"); break;
512a8e
+				default: puts ("hppa2.0"); break;
512a8e
+				} break;
512a8e
+		#else  /* !defined(_SC_KERNEL_BITS) */
512a8e
+			    puts ("hppa2.0"); break;
512a8e
+		#endif
512a8e
+			default: puts ("hppa1.0"); break;
512a8e
+			}
512a8e
+		    exit (0);
512a8e
+		}
512a8e
 EOF
512a8e
-		    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy`
512a8e
-		    if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
512a8e
-		    rm -f $dummy.c $dummy && rmdir $tmpdir
512a8e
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
512a8e
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
512a8e
 		fi ;;
512a8e
 	esac
512a8e
+	if [ ${HP_ARCH} = "hppa2.0w" ]
512a8e
+	then
512a8e
+	    eval $set_cc_for_build
512a8e
+
512a8e
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
512a8e
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
512a8e
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
512a8e
+	    #
512a8e
+	    # $ CC_FOR_BUILD=cc ./config.guess
512a8e
+	    # => hppa2.0w-hp-hpux11.23
512a8e
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
512a8e
+	    # => hppa64-hp-hpux11.23
512a8e
+
512a8e
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
512a8e
+		grep -q __LP64__
512a8e
+	    then
512a8e
+		HP_ARCH="hppa2.0w"
512a8e
+	    else
512a8e
+		HP_ARCH="hppa64"
512a8e
+	    fi
512a8e
+	fi
512a8e
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     ia64:HP-UX:*:*)
512a8e
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
512a8e
 	echo ia64-hp-hpux${HPUX_REV}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     3050*:HI-UX:*:*)
512a8e
 	eval $set_cc_for_build
512a8e
 	sed 's/^	//' << EOF >$dummy.c
512a8e
@@ -658,186 +705,269 @@
512a8e
 	  exit (0);
512a8e
 	}
512a8e
 EOF
512a8e
-	$CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
512a8e
-	rm -f $dummy.c $dummy && rmdir $tmpdir
512a8e
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
512a8e
+		{ echo "$SYSTEM_NAME"; exit; }
512a8e
 	echo unknown-hitachi-hiuxwe2
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
512a8e
 	echo hppa1.1-hp-bsd
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     9000/8??:4.3bsd:*:*)
512a8e
 	echo hppa1.0-hp-bsd
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
512a8e
 	echo hppa1.0-hp-mpeix
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
512a8e
 	echo hppa1.1-hp-osf
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     hp8??:OSF1:*:*)
512a8e
 	echo hppa1.0-hp-osf
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     i*86:OSF1:*:*)
512a8e
 	if [ -x /usr/sbin/sysversion ] ; then
512a8e
 	    echo ${UNAME_MACHINE}-unknown-osf1mk
512a8e
 	else
512a8e
 	    echo ${UNAME_MACHINE}-unknown-osf1
512a8e
 	fi
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     parisc*:Lites*:*:*)
512a8e
 	echo hppa1.1-hp-lites
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
512a8e
 	echo c1-convex-bsd
512a8e
-        exit 0 ;;
512a8e
+	exit ;;
512a8e
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
512a8e
 	if getsysinfo -f scalar_acc
512a8e
 	then echo c32-convex-bsd
512a8e
 	else echo c2-convex-bsd
512a8e
 	fi
512a8e
-        exit 0 ;;
512a8e
+	exit ;;
512a8e
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
512a8e
 	echo c34-convex-bsd
512a8e
-        exit 0 ;;
512a8e
+	exit ;;
512a8e
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
512a8e
 	echo c38-convex-bsd
512a8e
-        exit 0 ;;
512a8e
+	exit ;;
512a8e
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
512a8e
 	echo c4-convex-bsd
512a8e
-        exit 0 ;;
512a8e
+	exit ;;
512a8e
     CRAY*Y-MP:*:*:*)
512a8e
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     CRAY*[A-Z]90:*:*:*)
512a8e
 	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
512a8e
 	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
512a8e
 	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
512a8e
 	      -e 's/\.[^.]*$/.X/'
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     CRAY*TS:*:*:*)
512a8e
 	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
512a8e
-	exit 0 ;;
512a8e
-    CRAY*T3D:*:*:*)
512a8e
-	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     CRAY*T3E:*:*:*)
512a8e
 	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     CRAY*SV1:*:*:*)
512a8e
 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    *:UNICOS/mp:*:*)
512a8e
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
512a8e
+	exit ;;
512a8e
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
512a8e
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
512a8e
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
512a8e
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
512a8e
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
512a8e
-        exit 0 ;;
512a8e
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
512a8e
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
512a8e
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
512a8e
+	exit ;;
512a8e
+    5000:UNIX_System_V:4.*:*)
512a8e
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
512a8e
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
512a8e
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
512a8e
+	exit ;;
512a8e
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
512a8e
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     sparc*:BSD/OS:*:*)
512a8e
 	echo sparc-unknown-bsdi${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *:BSD/OS:*:*)
512a8e
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *:FreeBSD:*:*)
512a8e
-	# Determine whether the default compiler uses glibc.
512a8e
-	eval $set_cc_for_build
512a8e
-	sed 's/^	//' << EOF >$dummy.c
512a8e
-	#include <features.h>
512a8e
-	#if __GLIBC__ >= 2
512a8e
-	LIBC=gnu
512a8e
-	#else
512a8e
-	LIBC=
512a8e
-	#endif
512a8e
-EOF
512a8e
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
512a8e
-	rm -f $dummy.c && rmdir $tmpdir
512a8e
-	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
512a8e
-	exit 0 ;;
512a8e
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
512a8e
+	case ${UNAME_PROCESSOR} in
512a8e
+	    amd64)
512a8e
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
512a8e
+	    *)
512a8e
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
512a8e
+	esac
512a8e
+	exit ;;
512a8e
     i*:CYGWIN*:*)
512a8e
 	echo ${UNAME_MACHINE}-pc-cygwin
512a8e
-	exit 0 ;;
512a8e
-    i*:MINGW*:*)
512a8e
+	exit ;;
512a8e
+    *:MINGW64*:*)
512a8e
+	echo ${UNAME_MACHINE}-pc-mingw64
512a8e
+	exit ;;
512a8e
+    *:MINGW*:*)
512a8e
 	echo ${UNAME_MACHINE}-pc-mingw32
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    i*:MSYS*:*)
512a8e
+	echo ${UNAME_MACHINE}-pc-msys
512a8e
+	exit ;;
512a8e
+    i*:windows32*:*)
512a8e
+	# uname -m includes "-pc" on this system.
512a8e
+	echo ${UNAME_MACHINE}-mingw32
512a8e
+	exit ;;
512a8e
     i*:PW*:*)
512a8e
 	echo ${UNAME_MACHINE}-pc-pw32
512a8e
-	exit 0 ;;
512a8e
-    x86:Interix*:3*)
512a8e
-	echo i386-pc-interix3
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    *:Interix*:*)
512a8e
+	case ${UNAME_MACHINE} in
512a8e
+	    x86)
512a8e
+		echo i586-pc-interix${UNAME_RELEASE}
512a8e
+		exit ;;
512a8e
+	    authenticamd | genuineintel | EM64T)
512a8e
+		echo x86_64-unknown-interix${UNAME_RELEASE}
512a8e
+		exit ;;
512a8e
+	    IA64)
512a8e
+		echo ia64-unknown-interix${UNAME_RELEASE}
512a8e
+		exit ;;
512a8e
+	esac ;;
512a8e
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
512a8e
+	echo i${UNAME_MACHINE}-pc-mks
512a8e
+	exit ;;
512a8e
+    8664:Windows_NT:*)
512a8e
+	echo x86_64-pc-mks
512a8e
+	exit ;;
512a8e
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
512a8e
 	# How do we know it's Interix rather than the generic POSIX subsystem?
512a8e
 	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
512a8e
 	# UNAME_MACHINE based on the output of uname instead of i386?
512a8e
-	echo i386-pc-interix
512a8e
-	exit 0 ;;
512a8e
+	echo i586-pc-interix
512a8e
+	exit ;;
512a8e
     i*:UWIN*:*)
512a8e
 	echo ${UNAME_MACHINE}-pc-uwin
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
512a8e
+	echo x86_64-unknown-cygwin
512a8e
+	exit ;;
512a8e
     p*:CYGWIN*:*)
512a8e
 	echo powerpcle-unknown-cygwin
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     prep*:SunOS:5.*:*)
512a8e
 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *:GNU:*:*)
512a8e
+	# the GNU system
512a8e
 	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    *:GNU/*:*:*)
512a8e
+	# other systems with GNU libc and userland
512a8e
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
512a8e
+	exit ;;
512a8e
     i*86:Minix:*:*)
512a8e
 	echo ${UNAME_MACHINE}-pc-minix
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    aarch64:Linux:*:*)
512a8e
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
512a8e
+	exit ;;
512a8e
+    aarch64_be:Linux:*:*)
512a8e
+	UNAME_MACHINE=aarch64_be
512a8e
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
512a8e
+	exit ;;
512a8e
+    alpha:Linux:*:*)
512a8e
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
512a8e
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
512a8e
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
512a8e
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
512a8e
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
512a8e
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
512a8e
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
512a8e
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
512a8e
+	esac
512a8e
+	objdump --private-headers /bin/sh | grep -q ld.so.1
512a8e
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
512a8e
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
512a8e
+	exit ;;
512a8e
     arm*:Linux:*:*)
512a8e
+	eval $set_cc_for_build
512a8e
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
512a8e
+	    | grep -q __ARM_EABI__
512a8e
+	then
512a8e
+	    echo ${UNAME_MACHINE}-unknown-linux-gnu
512a8e
+	else
512a8e
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
512a8e
+		| grep -q __ARM_PCS_VFP
512a8e
+	    then
512a8e
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
512a8e
+	    else
512a8e
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
512a8e
+	    fi
512a8e
+	fi
512a8e
+	exit ;;
512a8e
+    avr32*:Linux:*:*)
512a8e
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    cris:Linux:*:*)
512a8e
+	echo ${UNAME_MACHINE}-axis-linux-gnu
512a8e
+	exit ;;
512a8e
+    crisv32:Linux:*:*)
512a8e
+	echo ${UNAME_MACHINE}-axis-linux-gnu
512a8e
+	exit ;;
512a8e
+    frv:Linux:*:*)
512a8e
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
512a8e
+	exit ;;
512a8e
+    hexagon:Linux:*:*)
512a8e
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
512a8e
+	exit ;;
512a8e
+    i*86:Linux:*:*)
512a8e
+	LIBC=gnu
512a8e
+	eval $set_cc_for_build
512a8e
+	sed 's/^	//' << EOF >$dummy.c
512a8e
+	#ifdef __dietlibc__
512a8e
+	LIBC=dietlibc
512a8e
+	#endif
512a8e
+EOF
512a8e
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
512a8e
+	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
512a8e
+	exit ;;
512a8e
     ia64:Linux:*:*)
512a8e
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    m32r*:Linux:*:*)
512a8e
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
512a8e
+	exit ;;
512a8e
     m68*:Linux:*:*)
512a8e
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
512a8e
-	exit 0 ;;
512a8e
-    mips:Linux:*:*)
512a8e
+	exit ;;
512a8e
+    mips:Linux:*:* | mips64:Linux:*:*)
512a8e
 	eval $set_cc_for_build
512a8e
 	sed 's/^	//' << EOF >$dummy.c
512a8e
 	#undef CPU
512a8e
-	#undef mips
512a8e
-	#undef mipsel
512a8e
+	#undef ${UNAME_MACHINE}
512a8e
+	#undef ${UNAME_MACHINE}el
512a8e
 	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
512a8e
-	CPU=mipsel
512a8e
+	CPU=${UNAME_MACHINE}el
512a8e
 	#else
512a8e
 	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
512a8e
-	CPU=mips
512a8e
+	CPU=${UNAME_MACHINE}
512a8e
 	#else
512a8e
 	CPU=
512a8e
 	#endif
512a8e
 	#endif
512a8e
 EOF
512a8e
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
512a8e
-	rm -f $dummy.c && rmdir $tmpdir
512a8e
-	test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
512a8e
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
512a8e
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
512a8e
 	;;
512a8e
-    ppc:Linux:*:*)
512a8e
-	echo powerpc-unknown-linux-gnu
512a8e
-	exit 0 ;;
512a8e
-    ppc64:Linux:*:*)
512a8e
-	echo powerpc64-unknown-linux-gnu
512a8e
-	exit 0 ;;
512a8e
-    alpha:Linux:*:*)
512a8e
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
512a8e
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
512a8e
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
512a8e
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
512a8e
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
512a8e
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
512a8e
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
512a8e
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
512a8e
-        esac
512a8e
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
512a8e
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
512a8e
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
512a8e
-	exit 0 ;;
512a8e
+    or32:Linux:*:*)
512a8e
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
512a8e
+	exit ;;
512a8e
+    padre:Linux:*:*)
512a8e
+	echo sparc-unknown-linux-gnu
512a8e
+	exit ;;
512a8e
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
512a8e
+	echo hppa64-unknown-linux-gnu
512a8e
+	exit ;;
512a8e
     parisc:Linux:*:* | hppa:Linux:*:*)
512a8e
 	# Look for CPU level
512a8e
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
512a8e
@@ -845,90 +975,71 @@
512a8e
 	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
512a8e
 	  *)    echo hppa-unknown-linux-gnu ;;
512a8e
 	esac
512a8e
-	exit 0 ;;
512a8e
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
512a8e
-	echo hppa64-unknown-linux-gnu
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    ppc64:Linux:*:*)
512a8e
+	echo powerpc64-unknown-linux-gnu
512a8e
+	exit ;;
512a8e
+    ppc:Linux:*:*)
512a8e
+	echo powerpc-unknown-linux-gnu
512a8e
+	exit ;;
512a8e
     s390:Linux:*:* | s390x:Linux:*:*)
512a8e
 	echo ${UNAME_MACHINE}-ibm-linux
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    sh64*:Linux:*:*)
512a8e
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
512a8e
+	exit ;;
512a8e
     sh*:Linux:*:*)
512a8e
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     sparc:Linux:*:* | sparc64:Linux:*:*)
512a8e
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    tile*:Linux:*:*)
512a8e
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
512a8e
+	exit ;;
512a8e
+    vax:Linux:*:*)
512a8e
+	echo ${UNAME_MACHINE}-dec-linux-gnu
512a8e
+	exit ;;
512a8e
     x86_64:Linux:*:*)
512a8e
-	echo x86_64-unknown-linux-gnu
512a8e
-	exit 0 ;;
512a8e
-    i*86:Linux:*:*)
512a8e
-	# The BFD linker knows what the default object file format is, so
512a8e
-	# first see if it will tell us. cd to the root directory to prevent
512a8e
-	# problems with other programs or directories called `ld' in the path.
512a8e
-	# Set LC_ALL=C to ensure ld outputs messages in English.
512a8e
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
512a8e
-			 | sed -ne '/supported targets:/!d
512a8e
-				    s/[ 	][ 	]*/ /g
512a8e
-				    s/.*supported targets: *//
512a8e
-				    s/ .*//
512a8e
-				    p'`
512a8e
-        case "$ld_supported_targets" in
512a8e
-	  elf32-i386)
512a8e
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
512a8e
-		;;
512a8e
-	  a.out-i386-linux)
512a8e
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
512a8e
-		exit 0 ;;
512a8e
-	  coff-i386)
512a8e
-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
512a8e
-		exit 0 ;;
512a8e
-	  "")
512a8e
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
512a8e
-		# one that does not give us useful --help.
512a8e
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
512a8e
-		exit 0 ;;
512a8e
-	esac
512a8e
-	# Determine whether the default compiler is a.out or elf
512a8e
-	eval $set_cc_for_build
512a8e
-	sed 's/^	//' << EOF >$dummy.c
512a8e
-	#include <features.h>
512a8e
-	#ifdef __ELF__
512a8e
-	# ifdef __GLIBC__
512a8e
-	#  if __GLIBC__ >= 2
512a8e
-	LIBC=gnu
512a8e
-	#  else
512a8e
-	LIBC=gnulibc1
512a8e
-	#  endif
512a8e
-	# else
512a8e
-	LIBC=gnulibc1
512a8e
-	# endif
512a8e
-	#else
512a8e
-	#ifdef __INTEL_COMPILER
512a8e
-	LIBC=gnu
512a8e
-	#else
512a8e
-	LIBC=gnuaout
512a8e
-	#endif
512a8e
-	#endif
512a8e
-EOF
512a8e
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
512a8e
-	rm -f $dummy.c && rmdir $tmpdir
512a8e
-	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
512a8e
-	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
512a8e
-	;;
512a8e
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
512a8e
+	exit ;;
512a8e
+    xtensa*:Linux:*:*)
512a8e
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
512a8e
+	exit ;;
512a8e
     i*86:DYNIX/ptx:4*:*)
512a8e
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
512a8e
 	# earlier versions are messed up and put the nodename in both
512a8e
 	# sysname and nodename.
512a8e
 	echo i386-sequent-sysv4
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     i*86:UNIX_SV:4.2MP:2.*)
512a8e
-        # Unixware is an offshoot of SVR4, but it has its own version
512a8e
-        # number series starting with 2...
512a8e
-        # I am not positive that other SVR4 systems won't match this,
512a8e
+	# Unixware is an offshoot of SVR4, but it has its own version
512a8e
+	# number series starting with 2...
512a8e
+	# I am not positive that other SVR4 systems won't match this,
512a8e
 	# I just have to hope.  -- rms.
512a8e
-        # Use sysv4.2uw... so that sysv4* matches it.
512a8e
+	# Use sysv4.2uw... so that sysv4* matches it.
512a8e
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    i*86:OS/2:*:*)
512a8e
+	# If we were able to find `uname', then EMX Unix compatibility
512a8e
+	# is probably installed.
512a8e
+	echo ${UNAME_MACHINE}-pc-os2-emx
512a8e
+	exit ;;
512a8e
+    i*86:XTS-300:*:STOP)
512a8e
+	echo ${UNAME_MACHINE}-unknown-stop
512a8e
+	exit ;;
512a8e
+    i*86:atheos:*:*)
512a8e
+	echo ${UNAME_MACHINE}-unknown-atheos
512a8e
+	exit ;;
512a8e
+    i*86:syllable:*:*)
512a8e
+	echo ${UNAME_MACHINE}-pc-syllable
512a8e
+	exit ;;
512a8e
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
512a8e
+	echo i386-unknown-lynxos${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
+    i*86:*DOS:*:*)
512a8e
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
512a8e
+	exit ;;
512a8e
     i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
512a8e
 	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
512a8e
 	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
512a8e
@@ -936,15 +1047,16 @@
512a8e
 	else
512a8e
 		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
512a8e
 	fi
512a8e
-	exit 0 ;;
512a8e
-    i*86:*:5:[78]*)
512a8e
+	exit ;;
512a8e
+    i*86:*:5:[678]*)
512a8e
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
512a8e
 	case `/bin/uname -X | grep "^Machine"` in
512a8e
 	    *486*)	     UNAME_MACHINE=i486 ;;
512a8e
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
512a8e
 	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
512a8e
 	esac
512a8e
 	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     i*86:*:3.2:*)
512a8e
 	if test -f /usr/options/cb.name; then
512a8e
 		UNAME_REL=`sed -n 's/.*Version //p' 
512a8e
@@ -962,73 +1074,86 @@
512a8e
 	else
512a8e
 		echo ${UNAME_MACHINE}-pc-sysv32
512a8e
 	fi
512a8e
-	exit 0 ;;
512a8e
-    i*86:*DOS:*:*)
512a8e
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     pc:*:*:*)
512a8e
 	# Left here for compatibility:
512a8e
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
512a8e
-        # the processor, so we play safe by assuming i386.
512a8e
-	echo i386-pc-msdosdjgpp
512a8e
-        exit 0 ;;
512a8e
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
512a8e
+	# the processor, so we play safe by assuming i586.
512a8e
+	# Note: whatever this is, it MUST be the same as what config.sub
512a8e
+	# prints for the "djgpp" host, or else GDB configury will decide that
512a8e
+	# this is a cross-build.
512a8e
+	echo i586-pc-msdosdjgpp
512a8e
+	exit ;;
512a8e
     Intel:Mach:3*:*)
512a8e
 	echo i386-pc-mach3
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     paragon:*:*:*)
512a8e
 	echo i860-intel-osf1
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     i860:*:4.*:*) # i860-SVR4
512a8e
 	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
512a8e
 	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
512a8e
 	else # Add other i860-SVR4 vendors below as they are discovered.
512a8e
 	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
512a8e
 	fi
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     mini*:CTIX:SYS*5:*)
512a8e
 	# "miniframe"
512a8e
 	echo m68010-convergent-sysv
512a8e
-	exit 0 ;;
512a8e
-    M68*:*:R3V[567]*:*)
512a8e
-	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
512a8e
-    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
512a8e
+	exit ;;
512a8e
+    mc68k:UNIX:SYSTEM5:3.51m)
512a8e
+	echo m68k-convergent-sysv
512a8e
+	exit ;;
512a8e
+    M680?0:D-NIX:5.3:*)
512a8e
+	echo m68k-diab-dnix
512a8e
+	exit ;;
512a8e
+    M68*:*:R3V[5678]*:*)
512a8e
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
512a8e
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
512a8e
 	OS_REL=''
512a8e
 	test -r /etc/.relid \
512a8e
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
512a8e
 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
512a8e
-	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
512a8e
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
512a8e
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
512a8e
-	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
512a8e
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
512a8e
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
512a8e
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
512a8e
-          && echo i486-ncr-sysv4 && exit 0 ;;
512a8e
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
512a8e
+	  && { echo i486-ncr-sysv4; exit; } ;;
512a8e
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
512a8e
+	OS_REL='.3'
512a8e
+	test -r /etc/.relid \
512a8e
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
512a8e
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
512a8e
+	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
512a8e
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
512a8e
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
512a8e
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
512a8e
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
512a8e
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
512a8e
 	echo m68k-unknown-lynxos${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     mc68030:UNIX_System_V:4.*:*)
512a8e
 	echo m68k-atari-sysv4
512a8e
-	exit 0 ;;
512a8e
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
512a8e
-	echo i386-unknown-lynxos${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     TSUNAMI:LynxOS:2.*:*)
512a8e
 	echo sparc-unknown-lynxos${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     rs6000:LynxOS:2.*:*)
512a8e
 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
512a8e
+	exit ;;
512a8e
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
512a8e
 	echo powerpc-unknown-lynxos${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     SM[BE]S:UNIX_SV:*:*)
512a8e
 	echo mips-dde-sysv${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     RM*:ReliantUNIX-*:*:*)
512a8e
 	echo mips-sni-sysv4
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     RM*:SINIX-*:*:*)
512a8e
 	echo mips-sni-sysv4
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *:SINIX-*:*:*)
512a8e
 	if uname -p 2>/dev/null >/dev/null ; then
512a8e
 		UNAME_MACHINE=`(uname -p) 2>/dev/null`
512a8e
@@ -1036,61 +1161,97 @@
512a8e
 	else
512a8e
 		echo ns32k-sni-sysv
512a8e
 	fi
512a8e
-	exit 0 ;;
512a8e
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
512a8e
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
512a8e
-        echo i586-unisys-sysv4
512a8e
-        exit 0 ;;
512a8e
+	exit ;;
512a8e
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
512a8e
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
512a8e
+	echo i586-unisys-sysv4
512a8e
+	exit ;;
512a8e
     *:UNIX_System_V:4*:FTX*)
512a8e
 	# From Gerald Hewes <hewes@openmarket.com>.
512a8e
 	# How about differentiating between stratus architectures? -djm
512a8e
 	echo hppa1.1-stratus-sysv4
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *:*:*:FTX*)
512a8e
 	# From seanf@swdc.stratus.com.
512a8e
 	echo i860-stratus-sysv4
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    i*86:VOS:*:*)
512a8e
+	# From Paul.Green@stratus.com.
512a8e
+	echo ${UNAME_MACHINE}-stratus-vos
512a8e
+	exit ;;
512a8e
     *:VOS:*:*)
512a8e
 	# From Paul.Green@stratus.com.
512a8e
 	echo hppa1.1-stratus-vos
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     mc68*:A/UX:*:*)
512a8e
 	echo m68k-apple-aux${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     news*:NEWS-OS:6*:*)
512a8e
 	echo mips-sony-newsos6
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
512a8e
 	if [ -d /usr/nec ]; then
512a8e
-	        echo mips-nec-sysv${UNAME_RELEASE}
512a8e
+		echo mips-nec-sysv${UNAME_RELEASE}
512a8e
 	else
512a8e
-	        echo mips-unknown-sysv${UNAME_RELEASE}
512a8e
+		echo mips-unknown-sysv${UNAME_RELEASE}
512a8e
 	fi
512a8e
-        exit 0 ;;
512a8e
+	exit ;;
512a8e
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
512a8e
 	echo powerpc-be-beos
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
512a8e
 	echo powerpc-apple-beos
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
512a8e
 	echo i586-pc-beos
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
512a8e
+	echo i586-pc-haiku
512a8e
+	exit ;;
512a8e
+    x86_64:Haiku:*:*)
512a8e
+	echo x86_64-unknown-haiku
512a8e
+	exit ;;
512a8e
     SX-4:SUPER-UX:*:*)
512a8e
 	echo sx4-nec-superux${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     SX-5:SUPER-UX:*:*)
512a8e
 	echo sx5-nec-superux${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    SX-6:SUPER-UX:*:*)
512a8e
+	echo sx6-nec-superux${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
+    SX-7:SUPER-UX:*:*)
512a8e
+	echo sx7-nec-superux${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
+    SX-8:SUPER-UX:*:*)
512a8e
+	echo sx8-nec-superux${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
+    SX-8R:SUPER-UX:*:*)
512a8e
+	echo sx8r-nec-superux${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
     Power*:Rhapsody:*:*)
512a8e
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *:Rhapsody:*:*)
512a8e
 	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *:Darwin:*:*)
512a8e
-	echo `uname -p`-apple-darwin${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
512a8e
+	case $UNAME_PROCESSOR in
512a8e
+	    i386)
512a8e
+		eval $set_cc_for_build
512a8e
+		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
512a8e
+		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
512a8e
+		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
512a8e
+		      grep IS_64BIT_ARCH >/dev/null
512a8e
+		  then
512a8e
+		      UNAME_PROCESSOR="x86_64"
512a8e
+		  fi
512a8e
+		fi ;;
512a8e
+	    unknown) UNAME_PROCESSOR=powerpc ;;
512a8e
+	esac
512a8e
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
512a8e
 	UNAME_PROCESSOR=`uname -p`
512a8e
 	if test "$UNAME_PROCESSOR" = "x86"; then
512a8e
@@ -1098,22 +1259,28 @@
512a8e
 		UNAME_MACHINE=pc
512a8e
 	fi
512a8e
 	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *:QNX:*:4*)
512a8e
 	echo i386-pc-qnx
512a8e
-	exit 0 ;;
512a8e
-    NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
512a8e
+	exit ;;
512a8e
+    NEO-?:NONSTOP_KERNEL:*:*)
512a8e
+	echo neo-tandem-nsk${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
+    NSE-*:NONSTOP_KERNEL:*:*)
512a8e
+	echo nse-tandem-nsk${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
+    NSR-?:NONSTOP_KERNEL:*:*)
512a8e
 	echo nsr-tandem-nsk${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *:NonStop-UX:*:*)
512a8e
 	echo mips-compaq-nonstopux
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     BS2000:POSIX*:*:*)
512a8e
 	echo bs2000-siemens-sysv
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     DS/*:UNIX_System_V:*:*)
512a8e
 	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *:Plan9:*:*)
512a8e
 	# "uname -m" is not consistent, so use $cputype instead. 386
512a8e
 	# is converted to i386 for consistency with other x86
512a8e
@@ -1124,41 +1291,55 @@
512a8e
 	    UNAME_MACHINE="$cputype"
512a8e
 	fi
512a8e
 	echo ${UNAME_MACHINE}-unknown-plan9
512a8e
-	exit 0 ;;
512a8e
-    i*86:OS/2:*:*)
512a8e
-	# If we were able to find `uname', then EMX Unix compatibility
512a8e
-	# is probably installed.
512a8e
-	echo ${UNAME_MACHINE}-pc-os2-emx
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *:TOPS-10:*:*)
512a8e
 	echo pdp10-unknown-tops10
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *:TENEX:*:*)
512a8e
 	echo pdp10-unknown-tenex
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
512a8e
 	echo pdp10-dec-tops20
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
512a8e
 	echo pdp10-xkl-tops20
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *:TOPS-20:*:*)
512a8e
 	echo pdp10-unknown-tops20
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     *:ITS:*:*)
512a8e
 	echo pdp10-unknown-its
512a8e
-	exit 0 ;;
512a8e
-    i*86:XTS-300:*:STOP)
512a8e
-	echo ${UNAME_MACHINE}-unknown-stop
512a8e
-	exit 0 ;;
512a8e
-    i*86:atheos:*:*)
512a8e
-	echo ${UNAME_MACHINE}-unknown-atheos
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
+    SEI:*:*:SEIUX)
512a8e
+	echo mips-sei-seiux${UNAME_RELEASE}
512a8e
+	exit ;;
512a8e
+    *:DragonFly:*:*)
512a8e
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
512a8e
+	exit ;;
512a8e
+    *:*VMS:*:*)
512a8e
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
512a8e
+	case "${UNAME_MACHINE}" in
512a8e
+	    A*) echo alpha-dec-vms ; exit ;;
512a8e
+	    I*) echo ia64-dec-vms ; exit ;;
512a8e
+	    V*) echo vax-dec-vms ; exit ;;
512a8e
+	esac ;;
512a8e
+    *:XENIX:*:SysV)
512a8e
+	echo i386-pc-xenix
512a8e
+	exit ;;
512a8e
+    i*86:skyos:*:*)
512a8e
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
512a8e
+	exit ;;
512a8e
+    i*86:rdos:*:*)
512a8e
+	echo ${UNAME_MACHINE}-pc-rdos
512a8e
+	exit ;;
512a8e
+    i*86:AROS:*:*)
512a8e
+	echo ${UNAME_MACHINE}-pc-aros
512a8e
+	exit ;;
512a8e
+    x86_64:VMkernel:*:*)
512a8e
+	echo ${UNAME_MACHINE}-unknown-esx
512a8e
+	exit ;;
512a8e
 esac
512a8e
 
512a8e
-#echo '(No uname command or uname output not recognized.)' 1>&2
512a8e
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
512a8e
-
512a8e
 eval $set_cc_for_build
512a8e
 cat >$dummy.c <
512a8e
 #ifdef _SEQUENT_
512a8e
@@ -1176,16 +1357,16 @@
512a8e
 #include <sys/param.h>
512a8e
   printf ("m68k-sony-newsos%s\n",
512a8e
 #ifdef NEWSOS4
512a8e
-          "4"
512a8e
+	"4"
512a8e
 #else
512a8e
-	  ""
512a8e
+	""
512a8e
 #endif
512a8e
-         ); exit (0);
512a8e
+	); exit (0);
512a8e
 #endif
512a8e
 #endif
512a8e
 
512a8e
 #if defined (__arm) && defined (__acorn) && defined (__unix)
512a8e
-  printf ("arm-acorn-riscix"); exit (0);
512a8e
+  printf ("arm-acorn-riscix\n"); exit (0);
512a8e
 #endif
512a8e
 
512a8e
 #if defined (hp300) && !defined (hpux)
512a8e
@@ -1274,12 +1455,12 @@
512a8e
 }
512a8e
 EOF
512a8e
 
512a8e
-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
512a8e
-rm -f $dummy.c $dummy && rmdir $tmpdir
512a8e
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
512a8e
+	{ echo "$SYSTEM_NAME"; exit; }
512a8e
 
512a8e
 # Apollos put the system type in the environment.
512a8e
 
512a8e
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
512a8e
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
512a8e
 
512a8e
 # Convex versions that predate uname can use getsysinfo(1)
512a8e
 
512a8e
@@ -1288,22 +1469,22 @@
512a8e
     case `getsysinfo -f cpu_type` in
512a8e
     c1*)
512a8e
 	echo c1-convex-bsd
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     c2*)
512a8e
 	if getsysinfo -f scalar_acc
512a8e
 	then echo c32-convex-bsd
512a8e
 	else echo c2-convex-bsd
512a8e
 	fi
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     c34*)
512a8e
 	echo c34-convex-bsd
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     c38*)
512a8e
 	echo c38-convex-bsd
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     c4*)
512a8e
 	echo c4-convex-bsd
512a8e
-	exit 0 ;;
512a8e
+	exit ;;
512a8e
     esac
512a8e
 fi
512a8e
 
512a8e
@@ -1314,7 +1495,9 @@
512a8e
 the operating system you are using. It is advised that you
512a8e
 download the most up to date version of the config scripts from
512a8e
 
512a8e
-    ftp://ftp.gnu.org/pub/gnu/config/
512a8e
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
512a8e
+and
512a8e
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
512a8e
 
512a8e
 If the version you run ($0) is already up to date, please
512a8e
 send the following data and any information you think might be
512a8e
diff -urN dump-0.4b44/config.sub dump-0.4b44-aarch64/config.sub
512a8e
--- dump-0.4b44/config.sub	2003-01-24 05:01:45.000000000 -0600
512a8e
+++ dump-0.4b44-aarch64/config.sub	2013-03-03 04:18:12.791796588 -0600
512a8e
@@ -1,9 +1,10 @@
512a8e
 #! /bin/sh
512a8e
 # Configuration validation subroutine script.
512a8e
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
512a8e
-#   2000, 2001, 2002 Free Software Foundation, Inc.
512a8e
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
512a8e
+#   2011, 2012 Free Software Foundation, Inc.
512a8e
 
512a8e
-timestamp='2002-07-03'
512a8e
+timestamp='2012-10-10'
512a8e
 
512a8e
 # This file is (in principle) common to ALL GNU software.
512a8e
 # The presence of a machine in this file suggests that SOME GNU software
512a8e
@@ -20,23 +21,25 @@
512a8e
 # GNU General Public License for more details.
512a8e
 #
512a8e
 # You should have received a copy of the GNU General Public License
512a8e
-# along with this program; if not, write to the Free Software
512a8e
-# Foundation, Inc., 59 Temple Place - Suite 330,
512a8e
-# Boston, MA 02111-1307, USA.
512a8e
-
512a8e
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
512a8e
+#
512a8e
 # As a special exception to the GNU General Public License, if you
512a8e
 # distribute this file as part of a program that contains a
512a8e
 # configuration script generated by Autoconf, you may include it under
512a8e
 # the same distribution terms that you use for the rest of that program.
512a8e
 
512a8e
+
512a8e
 # Please send patches to <config-patches@gnu.org>.  Submit a context
512a8e
-# diff and a properly formatted ChangeLog entry.
512a8e
+# diff and a properly formatted GNU ChangeLog entry.
512a8e
 #
512a8e
 # Configuration subroutine to validate and canonicalize a configuration type.
512a8e
 # Supply the specified configuration type as an argument.
512a8e
 # If it is invalid, we print an error message on stderr and exit with code 1.
512a8e
 # Otherwise, we print the canonical config type on stdout and succeed.
512a8e
 
512a8e
+# You can get the latest version of this script from:
512a8e
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
512a8e
+
512a8e
 # This file is supposed to be the same for all GNU packages
512a8e
 # and recognize all the CPU types, system types and aliases
512a8e
 # that are meaningful with *any* GNU software.
512a8e
@@ -70,7 +73,8 @@
512a8e
 version="\
512a8e
 GNU config.sub ($timestamp)
512a8e
 
512a8e
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
512a8e
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
512a8e
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
512a8e
 Free Software Foundation, Inc.
512a8e
 
512a8e
 This is free software; see the source for copying conditions.  There is NO
512a8e
@@ -83,11 +87,11 @@
512a8e
 while test $# -gt 0 ; do
512a8e
   case $1 in
512a8e
     --time-stamp | --time* | -t )
512a8e
-       echo "$timestamp" ; exit 0 ;;
512a8e
+       echo "$timestamp" ; exit ;;
512a8e
     --version | -v )
512a8e
-       echo "$version" ; exit 0 ;;
512a8e
+       echo "$version" ; exit ;;
512a8e
     --help | --h* | -h )
512a8e
-       echo "$usage"; exit 0 ;;
512a8e
+       echo "$usage"; exit ;;
512a8e
     -- )     # Stop option processing
512a8e
        shift; break ;;
512a8e
     - )	# Use stdin as input.
512a8e
@@ -99,7 +103,7 @@
512a8e
     *local*)
512a8e
        # First pass through any local machine types.
512a8e
        echo $1
512a8e
-       exit 0;;
512a8e
+       exit ;;
512a8e
 
512a8e
     * )
512a8e
        break ;;
512a8e
@@ -118,10 +122,18 @@
512a8e
 # Here we must recognize all the valid KERNEL-OS combinations.
512a8e
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
512a8e
 case $maybe_os in
512a8e
-  nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
512a8e
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
512a8e
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
512a8e
+  knetbsd*-gnu* | netbsd*-gnu* | \
512a8e
+  kopensolaris*-gnu* | \
512a8e
+  storm-chaos* | os2-emx* | rtmk-nova*)
512a8e
     os=-$maybe_os
512a8e
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
512a8e
     ;;
512a8e
+  android-linux)
512a8e
+    os=-linux-android
512a8e
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
512a8e
+    ;;
512a8e
   *)
512a8e
     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
512a8e
     if [ $basic_machine != $1 ]
512a8e
@@ -144,10 +156,13 @@
512a8e
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
512a8e
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
512a8e
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
512a8e
-	-apple | -axis)
512a8e
+	-apple | -axis | -knuth | -cray | -microblaze*)
512a8e
 		os=
512a8e
 		basic_machine=$1
512a8e
 		;;
512a8e
+	-bluegene*)
512a8e
+		os=-cnk
512a8e
+		;;
512a8e
 	-sim | -cisco | -oki | -wec | -winbond)
512a8e
 		os=
512a8e
 		basic_machine=$1
512a8e
@@ -162,13 +177,17 @@
512a8e
 		os=-chorusos
512a8e
 		basic_machine=$1
512a8e
 		;;
512a8e
- 	-chorusrdb)
512a8e
- 		os=-chorusrdb
512a8e
+	-chorusrdb)
512a8e
+		os=-chorusrdb
512a8e
 		basic_machine=$1
512a8e
- 		;;
512a8e
+		;;
512a8e
 	-hiux*)
512a8e
 		os=-hiuxwe2
512a8e
 		;;
512a8e
+	-sco6)
512a8e
+		os=-sco5v6
512a8e
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
512a8e
+		;;
512a8e
 	-sco5)
512a8e
 		os=-sco3.2v5
512a8e
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
512a8e
@@ -185,6 +204,10 @@
512a8e
 		# Don't forget version if it is 3.2v4 or newer.
512a8e
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
512a8e
 		;;
512a8e
+	-sco5v6*)
512a8e
+		# Don't forget version if it is 3.2v4 or newer.
512a8e
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
512a8e
+		;;
512a8e
 	-sco*)
512a8e
 		os=-sco3.2v2
512a8e
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
512a8e
@@ -202,6 +225,12 @@
512a8e
 	-isc*)
512a8e
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
512a8e
 		;;
512a8e
+	-lynx*178)
512a8e
+		os=-lynxos178
512a8e
+		;;
512a8e
+	-lynx*5)
512a8e
+		os=-lynxos5
512a8e
+		;;
512a8e
 	-lynx*)
512a8e
 		os=-lynxos
512a8e
 		;;
512a8e
@@ -226,51 +255,103 @@
512a8e
 	# Some are omitted here because they have special meanings below.
512a8e
 	1750a | 580 \
512a8e
 	| a29k \
512a8e
+	| aarch64 | aarch64_be \
512a8e
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
512a8e
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
512a8e
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
512a8e
+	| am33_2.0 \
512a8e
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
512a8e
+        | be32 | be64 \
512a8e
+	| bfin \
512a8e
 	| c4x | clipper \
512a8e
 	| d10v | d30v | dlx | dsp16xx \
512a8e
-	| fr30 | frv \
512a8e
+	| epiphany \
512a8e
+	| fido | fr30 | frv \
512a8e
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
512a8e
+	| hexagon \
512a8e
 	| i370 | i860 | i960 | ia64 \
512a8e
-	| ip2k \
512a8e
-	| m32r | m68000 | m68k | m88k | mcore \
512a8e
+	| ip2k | iq2000 \
512a8e
+	| le32 | le64 \
512a8e
+	| lm32 \
512a8e
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
512a8e
+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
512a8e
 	| mips | mipsbe | mipseb | mipsel | mipsle \
512a8e
 	| mips16 \
512a8e
 	| mips64 | mips64el \
512a8e
+	| mips64octeon | mips64octeonel \
512a8e
 	| mips64orion | mips64orionel \
512a8e
+	| mips64r5900 | mips64r5900el \
512a8e
+	| mips64vr | mips64vrel \
512a8e
 	| mips64vr4100 | mips64vr4100el \
512a8e
 	| mips64vr4300 | mips64vr4300el \
512a8e
 	| mips64vr5000 | mips64vr5000el \
512a8e
+	| mips64vr5900 | mips64vr5900el \
512a8e
 	| mipsisa32 | mipsisa32el \
512a8e
+	| mipsisa32r2 | mipsisa32r2el \
512a8e
 	| mipsisa64 | mipsisa64el \
512a8e
+	| mipsisa64r2 | mipsisa64r2el \
512a8e
 	| mipsisa64sb1 | mipsisa64sb1el \
512a8e
+	| mipsisa64sr71k | mipsisa64sr71kel \
512a8e
 	| mipstx39 | mipstx39el \
512a8e
 	| mn10200 | mn10300 \
512a8e
+	| moxie \
512a8e
+	| mt \
512a8e
+	| msp430 \
512a8e
+	| nds32 | nds32le | nds32be \
512a8e
+	| nios | nios2 \
512a8e
 	| ns16k | ns32k \
512a8e
-	| openrisc | or32 \
512a8e
+	| open8 \
512a8e
+	| or32 \
512a8e
 	| pdp10 | pdp11 | pj | pjl \
512a8e
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
512a8e
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
512a8e
 	| pyramid \
512a8e
-	| sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
512a8e
+	| rl78 | rx \
512a8e
+	| score \
512a8e
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
512a8e
 	| sh64 | sh64le \
512a8e
-	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
512a8e
-	| strongarm \
512a8e
-	| tahoe | thumb | tic80 | tron \
512a8e
-	| v850 | v850e \
512a8e
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
512a8e
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
512a8e
+	| spu \
512a8e
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
512a8e
+	| ubicom32 \
512a8e
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
512a8e
 	| we32k \
512a8e
-	| x86 | xscale | xstormy16 | xtensa \
512a8e
-	| z8k)
512a8e
+	| x86 | xc16x | xstormy16 | xtensa \
512a8e
+	| z8k | z80)
512a8e
 		basic_machine=$basic_machine-unknown
512a8e
 		;;
512a8e
-	m6811 | m68hc11 | m6812 | m68hc12)
512a8e
-		# Motorola 68HC11/12.
512a8e
+	c54x)
512a8e
+		basic_machine=tic54x-unknown
512a8e
+		;;
512a8e
+	c55x)
512a8e
+		basic_machine=tic55x-unknown
512a8e
+		;;
512a8e
+	c6x)
512a8e
+		basic_machine=tic6x-unknown
512a8e
+		;;
512a8e
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
512a8e
 		basic_machine=$basic_machine-unknown
512a8e
 		os=-none
512a8e
 		;;
512a8e
 	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
512a8e
 		;;
512a8e
+	ms1)
512a8e
+		basic_machine=mt-unknown
512a8e
+		;;
512a8e
+
512a8e
+	strongarm | thumb | xscale)
512a8e
+		basic_machine=arm-unknown
512a8e
+		;;
512a8e
+	xgate)
512a8e
+		basic_machine=$basic_machine-unknown
512a8e
+		os=-none
512a8e
+		;;
512a8e
+	xscaleeb)
512a8e
+		basic_machine=armeb-unknown
512a8e
+		;;
512a8e
+
512a8e
+	xscaleel)
512a8e
+		basic_machine=armel-unknown
512a8e
+		;;
512a8e
 
512a8e
 	# We use `pc' rather than `unknown'
512a8e
 	# because (1) that's what they normally are, and
512a8e
@@ -286,52 +367,81 @@
512a8e
 	# Recognize the basic CPU types with company name.
512a8e
 	580-* \
512a8e
 	| a29k-* \
512a8e
+	| aarch64-* | aarch64_be-* \
512a8e
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
512a8e
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
512a8e
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
512a8e
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
512a8e
-	| avr-* \
512a8e
-	| bs2000-* \
512a8e
-	| c[123]* | c30-* | [cjt]90-* | c54x-* \
512a8e
-	| clipper-* | cydra-* \
512a8e
+	| avr-* | avr32-* \
512a8e
+	| be32-* | be64-* \
512a8e
+	| bfin-* | bs2000-* \
512a8e
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
512a8e
+	| clipper-* | craynv-* | cydra-* \
512a8e
 	| d10v-* | d30v-* | dlx-* \
512a8e
 	| elxsi-* \
512a8e
-	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
512a8e
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
512a8e
 	| h8300-* | h8500-* \
512a8e
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
512a8e
+	| hexagon-* \
512a8e
 	| i*86-* | i860-* | i960-* | ia64-* \
512a8e
-	| ip2k-* \
512a8e
-	| m32r-* \
512a8e
+	| ip2k-* | iq2000-* \
512a8e
+	| le32-* | le64-* \
512a8e
+	| lm32-* \
512a8e
+	| m32c-* | m32r-* | m32rle-* \
512a8e
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
512a8e
-	| m88110-* | m88k-* | mcore-* \
512a8e
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
512a8e
+	| microblaze-* | microblazeel-* \
512a8e
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
512a8e
 	| mips16-* \
512a8e
 	| mips64-* | mips64el-* \
512a8e
+	| mips64octeon-* | mips64octeonel-* \
512a8e
 	| mips64orion-* | mips64orionel-* \
512a8e
+	| mips64r5900-* | mips64r5900el-* \
512a8e
+	| mips64vr-* | mips64vrel-* \
512a8e
 	| mips64vr4100-* | mips64vr4100el-* \
512a8e
 	| mips64vr4300-* | mips64vr4300el-* \
512a8e
 	| mips64vr5000-* | mips64vr5000el-* \
512a8e
+	| mips64vr5900-* | mips64vr5900el-* \
512a8e
 	| mipsisa32-* | mipsisa32el-* \
512a8e
+	| mipsisa32r2-* | mipsisa32r2el-* \
512a8e
 	| mipsisa64-* | mipsisa64el-* \
512a8e
+	| mipsisa64r2-* | mipsisa64r2el-* \
512a8e
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
512a8e
-	| mipstx39 | mipstx39el \
512a8e
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
512a8e
+	| mipstx39-* | mipstx39el-* \
512a8e
+	| mmix-* \
512a8e
+	| mt-* \
512a8e
+	| msp430-* \
512a8e
+	| nds32-* | nds32le-* | nds32be-* \
512a8e
+	| nios-* | nios2-* \
512a8e
 	| none-* | np1-* | ns16k-* | ns32k-* \
512a8e
+	| open8-* \
512a8e
 	| orion-* \
512a8e
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
512a8e
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
512a8e
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
512a8e
 	| pyramid-* \
512a8e
-	| romp-* | rs6000-* \
512a8e
-	| sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
512a8e
+	| rl78-* | romp-* | rs6000-* | rx-* \
512a8e
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
512a8e
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
512a8e
-	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
512a8e
-	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
512a8e
-	| tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
512a8e
-	| v850-* | v850e-* | vax-* \
512a8e
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
512a8e
+	| sparclite-* \
512a8e
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
512a8e
+	| tahoe-* \
512a8e
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
512a8e
+	| tile*-* \
512a8e
+	| tron-* \
512a8e
+	| ubicom32-* \
512a8e
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
512a8e
+	| vax-* \
512a8e
 	| we32k-* \
512a8e
-	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
512a8e
-	| xtensa-* \
512a8e
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
512a8e
+	| xstormy16-* | xtensa*-* \
512a8e
 	| ymp-* \
512a8e
-	| z8k-*)
512a8e
+	| z8k-* | z80-*)
512a8e
+		;;
512a8e
+	# Recognize the basic CPU types without company name, with glob match.
512a8e
+	xtensa*)
512a8e
+		basic_machine=$basic_machine-unknown
512a8e
 		;;
512a8e
 	# Recognize the various machine names and aliases which stand
512a8e
 	# for a CPU type and a company and sometimes even an OS.
512a8e
@@ -349,6 +459,9 @@
512a8e
 		basic_machine=a29k-amd
512a8e
 		os=-udi
512a8e
 		;;
512a8e
+	abacus)
512a8e
+		basic_machine=abacus-unknown
512a8e
+		;;
512a8e
 	adobe68k)
512a8e
 		basic_machine=m68010-adobe
512a8e
 		os=-scout
512a8e
@@ -363,6 +476,12 @@
512a8e
 		basic_machine=a29k-none
512a8e
 		os=-bsd
512a8e
 		;;
512a8e
+	amd64)
512a8e
+		basic_machine=x86_64-pc
512a8e
+		;;
512a8e
+	amd64-*)
512a8e
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
512a8e
+		;;
512a8e
 	amdahl)
512a8e
 		basic_machine=580-amdahl
512a8e
 		os=-sysv
512a8e
@@ -386,6 +505,10 @@
512a8e
 		basic_machine=m68k-apollo
512a8e
 		os=-bsd
512a8e
 		;;
512a8e
+	aros)
512a8e
+		basic_machine=i386-pc
512a8e
+		os=-aros
512a8e
+		;;
512a8e
 	aux)
512a8e
 		basic_machine=m68k-apple
512a8e
 		os=-aux
512a8e
@@ -394,10 +517,35 @@
512a8e
 		basic_machine=ns32k-sequent
512a8e
 		os=-dynix
512a8e
 		;;
512a8e
+	blackfin)
512a8e
+		basic_machine=bfin-unknown
512a8e
+		os=-linux
512a8e
+		;;
512a8e
+	blackfin-*)
512a8e
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
512a8e
+		os=-linux
512a8e
+		;;
512a8e
+	bluegene*)
512a8e
+		basic_machine=powerpc-ibm
512a8e
+		os=-cnk
512a8e
+		;;
512a8e
+	c54x-*)
512a8e
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
512a8e
+		;;
512a8e
+	c55x-*)
512a8e
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
512a8e
+		;;
512a8e
+	c6x-*)
512a8e
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
512a8e
+		;;
512a8e
 	c90)
512a8e
 		basic_machine=c90-cray
512a8e
 		os=-unicos
512a8e
 		;;
512a8e
+	cegcc)
512a8e
+		basic_machine=arm-unknown
512a8e
+		os=-cegcc
512a8e
+		;;
512a8e
 	convex-c1)
512a8e
 		basic_machine=c1-convex
512a8e
 		os=-bsd
512a8e
@@ -422,12 +570,27 @@
512a8e
 		basic_machine=j90-cray
512a8e
 		os=-unicos
512a8e
 		;;
512a8e
+	craynv)
512a8e
+		basic_machine=craynv-cray
512a8e
+		os=-unicosmp
512a8e
+		;;
512a8e
+	cr16 | cr16-*)
512a8e
+		basic_machine=cr16-unknown
512a8e
+		os=-elf
512a8e
+		;;
512a8e
 	crds | unos)
512a8e
 		basic_machine=m68k-crds
512a8e
 		;;
512a8e
+	crisv32 | crisv32-* | etraxfs*)
512a8e
+		basic_machine=crisv32-axis
512a8e
+		;;
512a8e
 	cris | cris-* | etrax*)
512a8e
 		basic_machine=cris-axis
512a8e
 		;;
512a8e
+	crx)
512a8e
+		basic_machine=crx-unknown
512a8e
+		os=-elf
512a8e
+		;;
512a8e
 	da30 | da30-*)
512a8e
 		basic_machine=m68k-da30
512a8e
 		;;
512a8e
@@ -450,6 +613,14 @@
512a8e
 		basic_machine=m88k-motorola
512a8e
 		os=-sysv3
512a8e
 		;;
512a8e
+	dicos)
512a8e
+		basic_machine=i686-pc
512a8e
+		os=-dicos
512a8e
+		;;
512a8e
+	djgpp)
512a8e
+		basic_machine=i586-pc
512a8e
+		os=-msdosdjgpp
512a8e
+		;;
512a8e
 	dpx20 | dpx20-*)
512a8e
 		basic_machine=rs6000-bull
512a8e
 		os=-bosx
512a8e
@@ -561,7 +732,6 @@
512a8e
 	i370-ibm* | ibm*)
512a8e
 		basic_machine=i370-ibm
512a8e
 		;;
512a8e
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
512a8e
 	i*86v32)
512a8e
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
512a8e
 		os=-sysv32
512a8e
@@ -600,6 +770,14 @@
512a8e
 		basic_machine=m68k-isi
512a8e
 		os=-sysv
512a8e
 		;;
512a8e
+	m68knommu)
512a8e
+		basic_machine=m68k-unknown
512a8e
+		os=-linux
512a8e
+		;;
512a8e
+	m68knommu-*)
512a8e
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
512a8e
+		os=-linux
512a8e
+		;;
512a8e
 	m88k-omron*)
512a8e
 		basic_machine=m88k-omron
512a8e
 		;;
512a8e
@@ -611,10 +789,21 @@
512a8e
 		basic_machine=ns32k-utek
512a8e
 		os=-sysv
512a8e
 		;;
512a8e
+	microblaze*)
512a8e
+		basic_machine=microblaze-xilinx
512a8e
+		;;
512a8e
+	mingw64)
512a8e
+		basic_machine=x86_64-pc
512a8e
+		os=-mingw64
512a8e
+		;;
512a8e
 	mingw32)
512a8e
 		basic_machine=i386-pc
512a8e
 		os=-mingw32
512a8e
 		;;
512a8e
+	mingw32ce)
512a8e
+		basic_machine=arm-unknown
512a8e
+		os=-mingw32ce
512a8e
+		;;
512a8e
 	miniframe)
512a8e
 		basic_machine=m68000-convergent
512a8e
 		;;
512a8e
@@ -628,10 +817,6 @@
512a8e
 	mips3*)
512a8e
 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
512a8e
 		;;
512a8e
-	mmix*)
512a8e
-		basic_machine=mmix-knuth
512a8e
-		os=-mmixware
512a8e
-		;;
512a8e
 	monitor)
512a8e
 		basic_machine=m68k-rom68k
512a8e
 		os=-coff
512a8e
@@ -644,10 +829,21 @@
512a8e
 		basic_machine=i386-pc
512a8e
 		os=-msdos
512a8e
 		;;
512a8e
+	ms1-*)
512a8e
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
512a8e
+		;;
512a8e
+	msys)
512a8e
+		basic_machine=i386-pc
512a8e
+		os=-msys
512a8e
+		;;
512a8e
 	mvs)
512a8e
 		basic_machine=i370-ibm
512a8e
 		os=-mvs
512a8e
 		;;
512a8e
+	nacl)
512a8e
+		basic_machine=le32-unknown
512a8e
+		os=-nacl
512a8e
+		;;
512a8e
 	ncr3000)
512a8e
 		basic_machine=i486-ncr
512a8e
 		os=-sysv4
512a8e
@@ -712,6 +908,12 @@
512a8e
 	np1)
512a8e
 		basic_machine=np1-gould
512a8e
 		;;
512a8e
+	neo-tandem)
512a8e
+		basic_machine=neo-tandem
512a8e
+		;;
512a8e
+	nse-tandem)
512a8e
+		basic_machine=nse-tandem
512a8e
+		;;
512a8e
 	nsr-tandem)
512a8e
 		basic_machine=nsr-tandem
512a8e
 		;;
512a8e
@@ -719,9 +921,12 @@
512a8e
 		basic_machine=hppa1.1-oki
512a8e
 		os=-proelf
512a8e
 		;;
512a8e
-	or32 | or32-*)
512a8e
+	openrisc | openrisc-*)
512a8e
 		basic_machine=or32-unknown
512a8e
-		os=-coff
512a8e
+		;;
512a8e
+	os400)
512a8e
+		basic_machine=powerpc-ibm
512a8e
+		os=-os400
512a8e
 		;;
512a8e
 	OSE68000 | ose68000)
512a8e
 		basic_machine=m68000-ericsson
512a8e
@@ -739,55 +944,76 @@
512a8e
 		basic_machine=i860-intel
512a8e
 		os=-osf
512a8e
 		;;
512a8e
+	parisc)
512a8e
+		basic_machine=hppa-unknown
512a8e
+		os=-linux
512a8e
+		;;
512a8e
+	parisc-*)
512a8e
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
512a8e
+		os=-linux
512a8e
+		;;
512a8e
 	pbd)
512a8e
 		basic_machine=sparc-tti
512a8e
 		;;
512a8e
 	pbb)
512a8e
 		basic_machine=m68k-tti
512a8e
 		;;
512a8e
-        pc532 | pc532-*)
512a8e
+	pc532 | pc532-*)
512a8e
 		basic_machine=ns32k-pc532
512a8e
 		;;
512a8e
+	pc98)
512a8e
+		basic_machine=i386-pc
512a8e
+		;;
512a8e
+	pc98-*)
512a8e
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
512a8e
+		;;
512a8e
 	pentium | p5 | k5 | k6 | nexgen | viac3)
512a8e
 		basic_machine=i586-pc
512a8e
 		;;
512a8e
-	pentiumpro | p6 | 6x86 | athlon)
512a8e
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
512a8e
 		basic_machine=i686-pc
512a8e
 		;;
512a8e
-	pentiumii | pentium2)
512a8e
+	pentiumii | pentium2 | pentiumiii | pentium3)
512a8e
 		basic_machine=i686-pc
512a8e
 		;;
512a8e
+	pentium4)
512a8e
+		basic_machine=i786-pc
512a8e
+		;;
512a8e
 	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
512a8e
 		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
512a8e
 		;;
512a8e
 	pentiumpro-* | p6-* | 6x86-* | athlon-*)
512a8e
 		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
512a8e
 		;;
512a8e
-	pentiumii-* | pentium2-*)
512a8e
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
512a8e
 		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
512a8e
 		;;
512a8e
+	pentium4-*)
512a8e
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
512a8e
+		;;
512a8e
 	pn)
512a8e
 		basic_machine=pn-gould
512a8e
 		;;
512a8e
 	power)	basic_machine=power-ibm
512a8e
 		;;
512a8e
-	ppc)	basic_machine=powerpc-unknown
512a8e
-	        ;;
512a8e
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
512a8e
+	ppc | ppcbe)	basic_machine=powerpc-unknown
512a8e
+		;;
512a8e
+	ppc-* | ppcbe-*)
512a8e
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
512a8e
 		;;
512a8e
 	ppcle | powerpclittle | ppc-le | powerpc-little)
512a8e
 		basic_machine=powerpcle-unknown
512a8e
-	        ;;
512a8e
+		;;
512a8e
 	ppcle-* | powerpclittle-*)
512a8e
 		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
512a8e
 		;;
512a8e
 	ppc64)	basic_machine=powerpc64-unknown
512a8e
-	        ;;
512a8e
+		;;
512a8e
 	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
512a8e
 		;;
512a8e
 	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
512a8e
 		basic_machine=powerpc64le-unknown
512a8e
-	        ;;
512a8e
+		;;
512a8e
 	ppc64le-* | powerpc64little-*)
512a8e
 		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
512a8e
 		;;
512a8e
@@ -798,6 +1024,10 @@
512a8e
 		basic_machine=i586-unknown
512a8e
 		os=-pw32
512a8e
 		;;
512a8e
+	rdos)
512a8e
+		basic_machine=i386-pc
512a8e
+		os=-rdos
512a8e
+		;;
512a8e
 	rom68k)
512a8e
 		basic_machine=m68k-rom68k
512a8e
 		os=-coff
512a8e
@@ -818,6 +1048,20 @@
512a8e
 		basic_machine=a29k-amd
512a8e
 		os=-udi
512a8e
 		;;
512a8e
+	sb1)
512a8e
+		basic_machine=mipsisa64sb1-unknown
512a8e
+		;;
512a8e
+	sb1el)
512a8e
+		basic_machine=mipsisa64sb1el-unknown
512a8e
+		;;
512a8e
+	sde)
512a8e
+		basic_machine=mipsisa32-sde
512a8e
+		os=-elf
512a8e
+		;;
512a8e
+	sei)
512a8e
+		basic_machine=mips-sei
512a8e
+		os=-seiux
512a8e
+		;;
512a8e
 	sequent)
512a8e
 		basic_machine=i386-sequent
512a8e
 		;;
512a8e
@@ -825,6 +1069,12 @@
512a8e
 		basic_machine=sh-hitachi
512a8e
 		os=-hms
512a8e
 		;;
512a8e
+	sh5el)
512a8e
+		basic_machine=sh5le-unknown
512a8e
+		;;
512a8e
+	sh64)
512a8e
+		basic_machine=sh64-unknown
512a8e
+		;;
512a8e
 	sparclite-wrs | simso-wrs)
512a8e
 		basic_machine=sparclite-wrs
512a8e
 		os=-vxworks
512a8e
@@ -843,6 +1093,9 @@
512a8e
 		basic_machine=i860-stratus
512a8e
 		os=-sysv4
512a8e
 		;;
512a8e
+	strongarm-* | thumb-*)
512a8e
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
512a8e
+		;;
512a8e
 	sun2)
512a8e
 		basic_machine=m68000-sun
512a8e
 		;;
512a8e
@@ -883,7 +1136,7 @@
512a8e
 	sun386 | sun386i | roadrunner)
512a8e
 		basic_machine=i386-sun
512a8e
 		;;
512a8e
-        sv1)
512a8e
+	sv1)
512a8e
 		basic_machine=sv1-cray
512a8e
 		os=-unicos
512a8e
 		;;
512a8e
@@ -891,10 +1144,6 @@
512a8e
 		basic_machine=i386-sequent
512a8e
 		os=-dynix
512a8e
 		;;
512a8e
-	t3d)
512a8e
-		basic_machine=alpha-cray
512a8e
-		os=-unicos
512a8e
-		;;
512a8e
 	t3e)
512a8e
 		basic_machine=alphaev5-cray
512a8e
 		os=-unicos
512a8e
@@ -903,9 +1152,9 @@
512a8e
 		basic_machine=t90-cray
512a8e
 		os=-unicos
512a8e
 		;;
512a8e
-	tic54x | c54x*)
512a8e
-		basic_machine=tic54x-unknown
512a8e
-		os=-coff
512a8e
+	tile*)
512a8e
+		basic_machine=$basic_machine-unknown
512a8e
+		os=-linux-gnu
512a8e
 		;;
512a8e
 	tx39)
512a8e
 		basic_machine=mipstx39-unknown
512a8e
@@ -920,6 +1169,10 @@
512a8e
 	tower | tower-32)
512a8e
 		basic_machine=m68k-ncr
512a8e
 		;;
512a8e
+	tpf)
512a8e
+		basic_machine=s390x-ibm
512a8e
+		os=-tpf
512a8e
+		;;
512a8e
 	udi29k)
512a8e
 		basic_machine=a29k-amd
512a8e
 		os=-udi
512a8e
@@ -941,8 +1194,8 @@
512a8e
 		os=-vms
512a8e
 		;;
512a8e
 	vpp*|vx|vx-*)
512a8e
-               basic_machine=f301-fujitsu
512a8e
-               ;;
512a8e
+		basic_machine=f301-fujitsu
512a8e
+		;;
512a8e
 	vxworks960)
512a8e
 		basic_machine=i960-wrs
512a8e
 		os=-vxworks
512a8e
@@ -963,13 +1216,16 @@
512a8e
 		basic_machine=hppa1.1-winbond
512a8e
 		os=-proelf
512a8e
 		;;
512a8e
-	windows32)
512a8e
-		basic_machine=i386-pc
512a8e
-		os=-windows32-msvcrt
512a8e
+	xbox)
512a8e
+		basic_machine=i686-pc
512a8e
+		os=-mingw32
512a8e
 		;;
512a8e
-        xps | xps100)
512a8e
+	xps | xps100)
512a8e
 		basic_machine=xps100-honeywell
512a8e
 		;;
512a8e
+	xscale-* | xscalee[bl]-*)
512a8e
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
512a8e
+		;;
512a8e
 	ymp)
512a8e
 		basic_machine=ymp-cray
512a8e
 		os=-unicos
512a8e
@@ -978,6 +1234,10 @@
512a8e
 		basic_machine=z8k-unknown
512a8e
 		os=-sim
512a8e
 		;;
512a8e
+	z80-*-coff)
512a8e
+		basic_machine=z80-unknown
512a8e
+		os=-sim
512a8e
+		;;
512a8e
 	none)
512a8e
 		basic_machine=none-none
512a8e
 		os=-none
512a8e
@@ -997,6 +1257,9 @@
512a8e
 	romp)
512a8e
 		basic_machine=romp-ibm
512a8e
 		;;
512a8e
+	mmix)
512a8e
+		basic_machine=mmix-knuth
512a8e
+		;;
512a8e
 	rs6000)
512a8e
 		basic_machine=rs6000-ibm
512a8e
 		;;
512a8e
@@ -1013,16 +1276,13 @@
512a8e
 	we32k)
512a8e
 		basic_machine=we32k-att
512a8e
 		;;
512a8e
-	sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
512a8e
+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
512a8e
 		basic_machine=sh-unknown
512a8e
 		;;
512a8e
-	sh64)
512a8e
-		basic_machine=sh64-unknown
512a8e
-		;;
512a8e
-	sparc | sparcv9 | sparcv9b)
512a8e
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
512a8e
 		basic_machine=sparc-sun
512a8e
 		;;
512a8e
-        cydra)
512a8e
+	cydra)
512a8e
 		basic_machine=cydra-cydrome
512a8e
 		;;
512a8e
 	orion)
512a8e
@@ -1037,10 +1297,6 @@
512a8e
 	pmac | pmac-mpw)
512a8e
 		basic_machine=powerpc-apple
512a8e
 		;;
512a8e
-	c4x*)
512a8e
-		basic_machine=c4x-none
512a8e
-		os=-coff
512a8e
-		;;
512a8e
 	*-unknown)
512a8e
 		# Make sure to match an already-canonicalized machine name.
512a8e
 		;;
512a8e
@@ -1067,9 +1323,12 @@
512a8e
 if [ x"$os" != x"" ]
512a8e
 then
512a8e
 case $os in
512a8e
-        # First match some system type aliases
512a8e
-        # that might get confused with valid system types.
512a8e
+	# First match some system type aliases
512a8e
+	# that might get confused with valid system types.
512a8e
 	# -solaris* is a basic system type, with this one exception.
512a8e
+	-auroraux)
512a8e
+		os=-auroraux
512a8e
+		;;
512a8e
 	-solaris1 | -solaris1.*)
512a8e
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
512a8e
 		;;
512a8e
@@ -1090,24 +1349,31 @@
512a8e
 	# Each alternative MUST END IN A *, to match a version number.
512a8e
 	# -sysv* is not here because it comes later, after sysvr4.
512a8e
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
512a8e
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
512a8e
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
512a8e
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
512a8e
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
512a8e
+	      | -sym* | -kopensolaris* \
512a8e
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
512a8e
-	      | -aos* \
512a8e
+	      | -aos* | -aros* \
512a8e
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
512a8e
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
512a8e
-	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
512a8e
-	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
512a8e
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
512a8e
+	      | -bitrig* | -openbsd* | -solidbsd* \
512a8e
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
512a8e
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
512a8e
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
512a8e
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
512a8e
-	      | -chorusos* | -chorusrdb* \
512a8e
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
512a8e
-	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
512a8e
-	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
512a8e
+	      | -chorusos* | -chorusrdb* | -cegcc* \
512a8e
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
512a8e
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
512a8e
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
512a8e
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
512a8e
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
512a8e
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
512a8e
 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
512a8e
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
512a8e
-	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
512a8e
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
512a8e
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
512a8e
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
512a8e
 	# Remember, each alternative MUST END IN *, to match a version number.
512a8e
 		;;
512a8e
 	-qnx*)
512a8e
@@ -1119,16 +1385,21 @@
512a8e
 			;;
512a8e
 		esac
512a8e
 		;;
512a8e
+	-nto-qnx*)
512a8e
+		;;
512a8e
 	-nto*)
512a8e
-		os=-nto-qnx
512a8e
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
512a8e
 		;;
512a8e
 	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
512a8e
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
512a8e
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
512a8e
 	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
512a8e
 		;;
512a8e
 	-mac*)
512a8e
 		os=`echo $os | sed -e 's|mac|macos|'`
512a8e
 		;;
512a8e
+	-linux-dietlibc)
512a8e
+		os=-linux-dietlibc
512a8e
+		;;
512a8e
 	-linux*)
512a8e
 		os=`echo $os | sed -e 's|linux|linux-gnu|'`
512a8e
 		;;
512a8e
@@ -1141,6 +1412,9 @@
512a8e
 	-opened*)
512a8e
 		os=-openedition
512a8e
 		;;
512a8e
+	-os400*)
512a8e
+		os=-os400
512a8e
+		;;
512a8e
 	-wince*)
512a8e
 		os=-wince
512a8e
 		;;
512a8e
@@ -1162,6 +1436,9 @@
512a8e
 	-atheos*)
512a8e
 		os=-atheos
512a8e
 		;;
512a8e
+	-syllable*)
512a8e
+		os=-syllable
512a8e
+		;;
512a8e
 	-386bsd)
512a8e
 		os=-bsd
512a8e
 		;;
512a8e
@@ -1172,7 +1449,7 @@
512a8e
 		os=-rtmk-nova
512a8e
 		;;
512a8e
 	-ns2 )
512a8e
-	        os=-nextstep2
512a8e
+		os=-nextstep2
512a8e
 		;;
512a8e
 	-nsk*)
512a8e
 		os=-nsk
512a8e
@@ -1184,6 +1461,9 @@
512a8e
 	-sinix*)
512a8e
 		os=-sysv4
512a8e
 		;;
512a8e
+	-tpf*)
512a8e
+		os=-tpf
512a8e
+		;;
512a8e
 	-triton*)
512a8e
 		os=-sysv3
512a8e
 		;;
512a8e
@@ -1211,8 +1491,22 @@
512a8e
 	-xenix)
512a8e
 		os=-xenix
512a8e
 		;;
512a8e
-        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
512a8e
-	        os=-mint
512a8e
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
512a8e
+		os=-mint
512a8e
+		;;
512a8e
+	-aros*)
512a8e
+		os=-aros
512a8e
+		;;
512a8e
+	-kaos*)
512a8e
+		os=-kaos
512a8e
+		;;
512a8e
+	-zvmoe)
512a8e
+		os=-zvmoe
512a8e
+		;;
512a8e
+	-dicos*)
512a8e
+		os=-dicos
512a8e
+		;;
512a8e
+	-nacl*)
512a8e
 		;;
512a8e
 	-none)
512a8e
 		;;
512a8e
@@ -1236,6 +1530,12 @@
512a8e
 # system, and we'll never get to this point.
512a8e
 
512a8e
 case $basic_machine in
512a8e
+	score-*)
512a8e
+		os=-elf
512a8e
+		;;
512a8e
+	spu-*)
512a8e
+		os=-elf
512a8e
+		;;
512a8e
 	*-acorn)
512a8e
 		os=-riscix1.2
512a8e
 		;;
512a8e
@@ -1245,11 +1545,26 @@
512a8e
 	arm*-semi)
512a8e
 		os=-aout
512a8e
 		;;
512a8e
+	c4x-* | tic4x-*)
512a8e
+		os=-coff
512a8e
+		;;
512a8e
+	hexagon-*)
512a8e
+		os=-elf
512a8e
+		;;
512a8e
+	tic54x-*)
512a8e
+		os=-coff
512a8e
+		;;
512a8e
+	tic55x-*)
512a8e
+		os=-coff
512a8e
+		;;
512a8e
+	tic6x-*)
512a8e
+		os=-coff
512a8e
+		;;
512a8e
 	# This must come before the *-dec entry.
512a8e
 	pdp10-*)
512a8e
 		os=-tops20
512a8e
 		;;
512a8e
-        pdp11-*)
512a8e
+	pdp11-*)
512a8e
 		os=-none
512a8e
 		;;
512a8e
 	*-dec | vax-*)
512a8e
@@ -1263,13 +1578,13 @@
512a8e
 		;;
512a8e
 	m68000-sun)
512a8e
 		os=-sunos3
512a8e
-		# This also exists in the configure program, but was not the
512a8e
-		# default.
512a8e
-		# os=-sunos4
512a8e
 		;;
512a8e
 	m68*-cisco)
512a8e
 		os=-aout
512a8e
 		;;
512a8e
+	mep-*)
512a8e
+		os=-elf
512a8e
+		;;
512a8e
 	mips*-cisco)
512a8e
 		os=-elf
512a8e
 		;;
512a8e
@@ -1288,9 +1603,15 @@
512a8e
 	*-be)
512a8e
 		os=-beos
512a8e
 		;;
512a8e
+	*-haiku)
512a8e
+		os=-haiku
512a8e
+		;;
512a8e
 	*-ibm)
512a8e
 		os=-aix
512a8e
 		;;
512a8e
+	*-knuth)
512a8e
+		os=-mmixware
512a8e
+		;;
512a8e
 	*-wec)
512a8e
 		os=-proelf
512a8e
 		;;
512a8e
@@ -1342,19 +1663,19 @@
512a8e
 	*-next)
512a8e
 		os=-nextstep3
512a8e
 		;;
512a8e
-        *-gould)
512a8e
+	*-gould)
512a8e
 		os=-sysv
512a8e
 		;;
512a8e
-        *-highlevel)
512a8e
+	*-highlevel)
512a8e
 		os=-bsd
512a8e
 		;;
512a8e
 	*-encore)
512a8e
 		os=-bsd
512a8e
 		;;
512a8e
-        *-sgi)
512a8e
+	*-sgi)
512a8e
 		os=-irix
512a8e
 		;;
512a8e
-        *-siemens)
512a8e
+	*-siemens)
512a8e
 		os=-sysv4
512a8e
 		;;
512a8e
 	*-masscomp)
512a8e
@@ -1393,7 +1714,7 @@
512a8e
 			-sunos*)
512a8e
 				vendor=sun
512a8e
 				;;
512a8e
-			-aix*)
512a8e
+			-cnk*|-aix*)
512a8e
 				vendor=ibm
512a8e
 				;;
512a8e
 			-beos*)
512a8e
@@ -1423,9 +1744,15 @@
512a8e
 			-mvs* | -opened*)
512a8e
 				vendor=ibm
512a8e
 				;;
512a8e
+			-os400*)
512a8e
+				vendor=ibm
512a8e
+				;;
512a8e
 			-ptx*)
512a8e
 				vendor=sequent
512a8e
 				;;
512a8e
+			-tpf*)
512a8e
+				vendor=ibm
512a8e
+				;;
512a8e
 			-vxsim* | -vxworks* | -windiss*)
512a8e
 				vendor=wrs
512a8e
 				;;
512a8e
@@ -1450,7 +1777,7 @@
512a8e
 esac
512a8e
 
512a8e
 echo $basic_machine$os
512a8e
-exit 0
512a8e
+exit
512a8e
 
512a8e
 # Local variables:
512a8e
 # eval: (add-hook 'write-file-hooks 'time-stamp)