update config.guess and config.sub SDL-1.2
authorOzkan Sezer <sezeroz@gmail.com>
Sun, 07 Oct 2018 17:56:56 +0300
branchSDL-1.2
changeset 898b5d14516f1df
parent 896 e97f5947aa93
child 902 6c862e733898
update config.guess and config.sub
build-scripts/config.guess
build-scripts/config.sub
     1.1 --- a/build-scripts/config.guess	Sun Oct 07 14:00:50 2018 +0300
     1.2 +++ b/build-scripts/config.guess	Sun Oct 07 17:56:56 2018 +0300
     1.3 @@ -1,14 +1,12 @@
     1.4  #! /bin/sh
     1.5  # Attempt to guess a canonical system name.
     1.6 -#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
     1.7 -#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
     1.8 -#   Free Software Foundation, Inc.
     1.9 +#   Copyright 1992-2017 Free Software Foundation, Inc.
    1.10  
    1.11 -timestamp='2009-09-18'
    1.12 +timestamp='2017-08-08'
    1.13  
    1.14  # This file is free software; you can redistribute it and/or modify it
    1.15  # under the terms of the GNU General Public License as published by
    1.16 -# the Free Software Foundation; either version 2 of the License, or
    1.17 +# the Free Software Foundation; either version 3 of the License, or
    1.18  # (at your option) any later version.
    1.19  #
    1.20  # This program is distributed in the hope that it will be useful, but
    1.21 @@ -17,26 +15,22 @@
    1.22  # General Public License for more details.
    1.23  #
    1.24  # You should have received a copy of the GNU General Public License
    1.25 -# along with this program; if not, write to the Free Software
    1.26 -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    1.27 -# 02110-1301, USA.
    1.28 +# along with this program; if not, see <http://www.gnu.org/licenses/>.
    1.29  #
    1.30  # As a special exception to the GNU General Public License, if you
    1.31  # distribute this file as part of a program that contains a
    1.32  # configuration script generated by Autoconf, you may include it under
    1.33 -# the same distribution terms that you use for the rest of that program.
    1.34 -
    1.35 -
    1.36 -# Originally written by Per Bothner.  Please send patches (context
    1.37 -# diff format) to <config-patches@gnu.org> and include a ChangeLog
    1.38 -# entry.
    1.39 +# the same distribution terms that you use for the rest of that
    1.40 +# program.  This Exception is an additional permission under section 7
    1.41 +# of the GNU General Public License, version 3 ("GPLv3").
    1.42  #
    1.43 -# This script attempts to guess a canonical system name similar to
    1.44 -# config.sub.  If it succeeds, it prints the system name on stdout, and
    1.45 -# exits with 0.  Otherwise, it exits with 1.
    1.46 +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
    1.47  #
    1.48  # You can get the latest version of this script from:
    1.49 -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
    1.50 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
    1.51 +#
    1.52 +# Please send patches to <config-patches@gnu.org>.
    1.53 +
    1.54  
    1.55  me=`echo "$0" | sed -e 's,.*/,,'`
    1.56  
    1.57 @@ -56,8 +50,7 @@
    1.58  GNU config.guess ($timestamp)
    1.59  
    1.60  Originally written by Per Bothner.
    1.61 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
    1.62 -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
    1.63 +Copyright 1992-2017 Free Software Foundation, Inc.
    1.64  
    1.65  This is free software; see the source for copying conditions.  There is NO
    1.66  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    1.67 @@ -139,12 +132,33 @@
    1.68  UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
    1.69  UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
    1.70  
    1.71 +case "${UNAME_SYSTEM}" in
    1.72 +Linux|GNU|GNU/*)
    1.73 +	# If the system lacks a compiler, then just pick glibc.
    1.74 +	# We could probably try harder.
    1.75 +	LIBC=gnu
    1.76 +
    1.77 +	eval $set_cc_for_build
    1.78 +	cat <<-EOF > $dummy.c
    1.79 +	#include <features.h>
    1.80 +	#if defined(__UCLIBC__)
    1.81 +	LIBC=uclibc
    1.82 +	#elif defined(__dietlibc__)
    1.83 +	LIBC=dietlibc
    1.84 +	#else
    1.85 +	LIBC=gnu
    1.86 +	#endif
    1.87 +	EOF
    1.88 +	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
    1.89 +	;;
    1.90 +esac
    1.91 +
    1.92  # Note: order is significant - the case branches are not exclusive.
    1.93  
    1.94  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
    1.95      *:NetBSD:*:*)
    1.96  	# NetBSD (nbsd) targets should (where applicable) match one or
    1.97 -	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
    1.98 +	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
    1.99  	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
   1.100  	# switched to ELF, *-*-netbsd* would select the old
   1.101  	# object file format.  This provides both forward
   1.102 @@ -154,19 +168,29 @@
   1.103  	# Note: NetBSD doesn't particularly care about the vendor
   1.104  	# portion of the name.  We always set it to "unknown".
   1.105  	sysctl="sysctl -n hw.machine_arch"
   1.106 -	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
   1.107 -	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
   1.108 +	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
   1.109 +	    /sbin/$sysctl 2>/dev/null || \
   1.110 +	    /usr/sbin/$sysctl 2>/dev/null || \
   1.111 +	    echo unknown)`
   1.112  	case "${UNAME_MACHINE_ARCH}" in
   1.113  	    armeb) machine=armeb-unknown ;;
   1.114  	    arm*) machine=arm-unknown ;;
   1.115  	    sh3el) machine=shl-unknown ;;
   1.116  	    sh3eb) machine=sh-unknown ;;
   1.117  	    sh5el) machine=sh5le-unknown ;;
   1.118 +	    earmv*)
   1.119 +		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
   1.120 +		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
   1.121 +		machine=${arch}${endian}-unknown
   1.122 +		;;
   1.123  	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
   1.124  	esac
   1.125  	# The Operating System including object format, if it has switched
   1.126 -	# to ELF recently, or will in the future.
   1.127 +	# to ELF recently (or will in the future) and ABI.
   1.128  	case "${UNAME_MACHINE_ARCH}" in
   1.129 +	    earm*)
   1.130 +		os=netbsdelf
   1.131 +		;;
   1.132  	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
   1.133  		eval $set_cc_for_build
   1.134  		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
   1.135 @@ -180,7 +204,14 @@
   1.136  		fi
   1.137  		;;
   1.138  	    *)
   1.139 -	        os=netbsd
   1.140 +		os=netbsd
   1.141 +		;;
   1.142 +	esac
   1.143 +	# Determine ABI tags.
   1.144 +	case "${UNAME_MACHINE_ARCH}" in
   1.145 +	    earm*)
   1.146 +		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
   1.147 +		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
   1.148  		;;
   1.149  	esac
   1.150  	# The OS release
   1.151 @@ -193,18 +224,26 @@
   1.152  		release='-gnu'
   1.153  		;;
   1.154  	    *)
   1.155 -		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
   1.156 +		release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
   1.157  		;;
   1.158  	esac
   1.159  	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
   1.160  	# contains redundant information, the shorter form:
   1.161  	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
   1.162 -	echo "${machine}-${os}${release}"
   1.163 +	echo "${machine}-${os}${release}${abi}"
   1.164 +	exit ;;
   1.165 +    *:Bitrig:*:*)
   1.166 +	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
   1.167 +	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
   1.168  	exit ;;
   1.169      *:OpenBSD:*:*)
   1.170  	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
   1.171  	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
   1.172  	exit ;;
   1.173 +    *:LibertyBSD:*:*)
   1.174 +	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
   1.175 +	echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
   1.176 +	exit ;;
   1.177      *:ekkoBSD:*:*)
   1.178  	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
   1.179  	exit ;;
   1.180 @@ -217,13 +256,19 @@
   1.181      *:MirBSD:*:*)
   1.182  	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
   1.183  	exit ;;
   1.184 +    *:Sortix:*:*)
   1.185 +	echo ${UNAME_MACHINE}-unknown-sortix
   1.186 +	exit ;;
   1.187 +    *:Redox:*:*)
   1.188 +	echo ${UNAME_MACHINE}-unknown-redox
   1.189 +	exit ;;
   1.190      alpha:OSF1:*:*)
   1.191  	case $UNAME_RELEASE in
   1.192  	*4.0)
   1.193  		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
   1.194  		;;
   1.195  	*5.*)
   1.196 -	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
   1.197 +		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
   1.198  		;;
   1.199  	esac
   1.200  	# According to Compaq, /usr/sbin/psrinfo has been available on
   1.201 @@ -233,43 +278,46 @@
   1.202  	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
   1.203  	case "$ALPHA_CPU_TYPE" in
   1.204  	    "EV4 (21064)")
   1.205 -		UNAME_MACHINE="alpha" ;;
   1.206 +		UNAME_MACHINE=alpha ;;
   1.207  	    "EV4.5 (21064)")
   1.208 -		UNAME_MACHINE="alpha" ;;
   1.209 +		UNAME_MACHINE=alpha ;;
   1.210  	    "LCA4 (21066/21068)")
   1.211 -		UNAME_MACHINE="alpha" ;;
   1.212 +		UNAME_MACHINE=alpha ;;
   1.213  	    "EV5 (21164)")
   1.214 -		UNAME_MACHINE="alphaev5" ;;
   1.215 +		UNAME_MACHINE=alphaev5 ;;
   1.216  	    "EV5.6 (21164A)")
   1.217 -		UNAME_MACHINE="alphaev56" ;;
   1.218 +		UNAME_MACHINE=alphaev56 ;;
   1.219  	    "EV5.6 (21164PC)")
   1.220 -		UNAME_MACHINE="alphapca56" ;;
   1.221 +		UNAME_MACHINE=alphapca56 ;;
   1.222  	    "EV5.7 (21164PC)")
   1.223 -		UNAME_MACHINE="alphapca57" ;;
   1.224 +		UNAME_MACHINE=alphapca57 ;;
   1.225  	    "EV6 (21264)")
   1.226 -		UNAME_MACHINE="alphaev6" ;;
   1.227 +		UNAME_MACHINE=alphaev6 ;;
   1.228  	    "EV6.7 (21264A)")
   1.229 -		UNAME_MACHINE="alphaev67" ;;
   1.230 +		UNAME_MACHINE=alphaev67 ;;
   1.231  	    "EV6.8CB (21264C)")
   1.232 -		UNAME_MACHINE="alphaev68" ;;
   1.233 +		UNAME_MACHINE=alphaev68 ;;
   1.234  	    "EV6.8AL (21264B)")
   1.235 -		UNAME_MACHINE="alphaev68" ;;
   1.236 +		UNAME_MACHINE=alphaev68 ;;
   1.237  	    "EV6.8CX (21264D)")
   1.238 -		UNAME_MACHINE="alphaev68" ;;
   1.239 +		UNAME_MACHINE=alphaev68 ;;
   1.240  	    "EV6.9A (21264/EV69A)")
   1.241 -		UNAME_MACHINE="alphaev69" ;;
   1.242 +		UNAME_MACHINE=alphaev69 ;;
   1.243  	    "EV7 (21364)")
   1.244 -		UNAME_MACHINE="alphaev7" ;;
   1.245 +		UNAME_MACHINE=alphaev7 ;;
   1.246  	    "EV7.9 (21364A)")
   1.247 -		UNAME_MACHINE="alphaev79" ;;
   1.248 +		UNAME_MACHINE=alphaev79 ;;
   1.249  	esac
   1.250  	# A Pn.n version is a patched version.
   1.251  	# A Vn.n version is a released version.
   1.252  	# A Tn.n version is a released field test version.
   1.253  	# A Xn.n version is an unreleased experimental baselevel.
   1.254  	# 1.2 uses "1.2" for uname -r.
   1.255 -	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
   1.256 -	exit ;;
   1.257 +	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
   1.258 +	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
   1.259 +	exitcode=$?
   1.260 +	trap '' 0
   1.261 +	exit $exitcode ;;
   1.262      Alpha\ *:Windows_NT*:*)
   1.263  	# How do we know it's Interix rather than the generic POSIX subsystem?
   1.264  	# Should we change UNAME_MACHINE based on the output of uname instead
   1.265 @@ -295,12 +343,12 @@
   1.266  	echo s390-ibm-zvmoe
   1.267  	exit ;;
   1.268      *:OS400:*:*)
   1.269 -        echo powerpc-ibm-os400
   1.270 +	echo powerpc-ibm-os400
   1.271  	exit ;;
   1.272      arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
   1.273  	echo arm-acorn-riscix${UNAME_RELEASE}
   1.274  	exit ;;
   1.275 -    arm:riscos:*:*|arm:RISCOS:*:*)
   1.276 +    arm*:riscos:*:*|arm*:RISCOS:*:*)
   1.277  	echo arm-unknown-riscos
   1.278  	exit ;;
   1.279      SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
   1.280 @@ -333,18 +381,21 @@
   1.281      sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
   1.282  	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
   1.283  	exit ;;
   1.284 +    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
   1.285 +	echo i386-pc-auroraux${UNAME_RELEASE}
   1.286 +	exit ;;
   1.287      i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
   1.288  	eval $set_cc_for_build
   1.289 -	SUN_ARCH="i386"
   1.290 +	SUN_ARCH=i386
   1.291  	# If there is a compiler, see if it is configured for 64-bit objects.
   1.292  	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
   1.293  	# This test works for both compilers.
   1.294 -	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
   1.295 +	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
   1.296  	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
   1.297 -		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
   1.298 +		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
   1.299  		grep IS_64BIT_ARCH >/dev/null
   1.300  	    then
   1.301 -		SUN_ARCH="x86_64"
   1.302 +		SUN_ARCH=x86_64
   1.303  	    fi
   1.304  	fi
   1.305  	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
   1.306 @@ -369,7 +420,7 @@
   1.307  	exit ;;
   1.308      sun*:*:4.2BSD:*)
   1.309  	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
   1.310 -	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
   1.311 +	test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
   1.312  	case "`/bin/arch`" in
   1.313  	    sun3)
   1.314  		echo m68k-sun-sunos${UNAME_RELEASE}
   1.315 @@ -391,23 +442,23 @@
   1.316      # MiNT.  But MiNT is downward compatible to TOS, so this should
   1.317      # be no problem.
   1.318      atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
   1.319 -        echo m68k-atari-mint${UNAME_RELEASE}
   1.320 +	echo m68k-atari-mint${UNAME_RELEASE}
   1.321  	exit ;;
   1.322      atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
   1.323  	echo m68k-atari-mint${UNAME_RELEASE}
   1.324 -        exit ;;
   1.325 +	exit ;;
   1.326      *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
   1.327 -        echo m68k-atari-mint${UNAME_RELEASE}
   1.328 +	echo m68k-atari-mint${UNAME_RELEASE}
   1.329  	exit ;;
   1.330      milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
   1.331 -        echo m68k-milan-mint${UNAME_RELEASE}
   1.332 -        exit ;;
   1.333 +	echo m68k-milan-mint${UNAME_RELEASE}
   1.334 +	exit ;;
   1.335      hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
   1.336 -        echo m68k-hades-mint${UNAME_RELEASE}
   1.337 -        exit ;;
   1.338 +	echo m68k-hades-mint${UNAME_RELEASE}
   1.339 +	exit ;;
   1.340      *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
   1.341 -        echo m68k-unknown-mint${UNAME_RELEASE}
   1.342 -        exit ;;
   1.343 +	echo m68k-unknown-mint${UNAME_RELEASE}
   1.344 +	exit ;;
   1.345      m68k:machten:*:*)
   1.346  	echo m68k-apple-machten${UNAME_RELEASE}
   1.347  	exit ;;
   1.348 @@ -477,8 +528,8 @@
   1.349  	echo m88k-motorola-sysv3
   1.350  	exit ;;
   1.351      AViiON:dgux:*:*)
   1.352 -        # DG/UX returns AViiON for all architectures
   1.353 -        UNAME_PROCESSOR=`/usr/bin/uname -p`
   1.354 +	# DG/UX returns AViiON for all architectures
   1.355 +	UNAME_PROCESSOR=`/usr/bin/uname -p`
   1.356  	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
   1.357  	then
   1.358  	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
   1.359 @@ -491,7 +542,7 @@
   1.360  	else
   1.361  	    echo i586-dg-dgux${UNAME_RELEASE}
   1.362  	fi
   1.363 - 	exit ;;
   1.364 +	exit ;;
   1.365      M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
   1.366  	echo m88k-dolphin-sysv3
   1.367  	exit ;;
   1.368 @@ -548,15 +599,16 @@
   1.369  		echo rs6000-ibm-aix3.2
   1.370  	fi
   1.371  	exit ;;
   1.372 -    *:AIX:*:[456])
   1.373 +    *:AIX:*:[4567])
   1.374  	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
   1.375  	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
   1.376  		IBM_ARCH=rs6000
   1.377  	else
   1.378  		IBM_ARCH=powerpc
   1.379  	fi
   1.380 -	if [ -x /usr/bin/oslevel ] ; then
   1.381 -		IBM_REV=`/usr/bin/oslevel`
   1.382 +	if [ -x /usr/bin/lslpp ] ; then
   1.383 +		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
   1.384 +			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
   1.385  	else
   1.386  		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
   1.387  	fi
   1.388 @@ -591,58 +643,58 @@
   1.389  	    9000/[678][0-9][0-9])
   1.390  		if [ -x /usr/bin/getconf ]; then
   1.391  		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
   1.392 -                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
   1.393 -                    case "${sc_cpu_version}" in
   1.394 -                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
   1.395 -                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
   1.396 -                      532)                      # CPU_PA_RISC2_0
   1.397 -                        case "${sc_kernel_bits}" in
   1.398 -                          32) HP_ARCH="hppa2.0n" ;;
   1.399 -                          64) HP_ARCH="hppa2.0w" ;;
   1.400 -			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
   1.401 -                        esac ;;
   1.402 -                    esac
   1.403 +		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
   1.404 +		    case "${sc_cpu_version}" in
   1.405 +		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
   1.406 +		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
   1.407 +		      532)                      # CPU_PA_RISC2_0
   1.408 +			case "${sc_kernel_bits}" in
   1.409 +			  32) HP_ARCH=hppa2.0n ;;
   1.410 +			  64) HP_ARCH=hppa2.0w ;;
   1.411 +			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
   1.412 +			esac ;;
   1.413 +		    esac
   1.414  		fi
   1.415  		if [ "${HP_ARCH}" = "" ]; then
   1.416  		    eval $set_cc_for_build
   1.417 -		    sed 's/^              //' << EOF >$dummy.c
   1.418 +		    sed 's/^		//' << EOF >$dummy.c
   1.419  
   1.420 -              #define _HPUX_SOURCE
   1.421 -              #include <stdlib.h>
   1.422 -              #include <unistd.h>
   1.423 +		#define _HPUX_SOURCE
   1.424 +		#include <stdlib.h>
   1.425 +		#include <unistd.h>
   1.426  
   1.427 -              int main ()
   1.428 -              {
   1.429 -              #if defined(_SC_KERNEL_BITS)
   1.430 -                  long bits = sysconf(_SC_KERNEL_BITS);
   1.431 -              #endif
   1.432 -                  long cpu  = sysconf (_SC_CPU_VERSION);
   1.433 +		int main ()
   1.434 +		{
   1.435 +		#if defined(_SC_KERNEL_BITS)
   1.436 +		    long bits = sysconf(_SC_KERNEL_BITS);
   1.437 +		#endif
   1.438 +		    long cpu  = sysconf (_SC_CPU_VERSION);
   1.439  
   1.440 -                  switch (cpu)
   1.441 -              	{
   1.442 -              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
   1.443 -              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
   1.444 -              	case CPU_PA_RISC2_0:
   1.445 -              #if defined(_SC_KERNEL_BITS)
   1.446 -              	    switch (bits)
   1.447 -              		{
   1.448 -              		case 64: puts ("hppa2.0w"); break;
   1.449 -              		case 32: puts ("hppa2.0n"); break;
   1.450 -              		default: puts ("hppa2.0"); break;
   1.451 -              		} break;
   1.452 -              #else  /* !defined(_SC_KERNEL_BITS) */
   1.453 -              	    puts ("hppa2.0"); break;
   1.454 -              #endif
   1.455 -              	default: puts ("hppa1.0"); break;
   1.456 -              	}
   1.457 -                  exit (0);
   1.458 -              }
   1.459 +		    switch (cpu)
   1.460 +			{
   1.461 +			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
   1.462 +			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
   1.463 +			case CPU_PA_RISC2_0:
   1.464 +		#if defined(_SC_KERNEL_BITS)
   1.465 +			    switch (bits)
   1.466 +				{
   1.467 +				case 64: puts ("hppa2.0w"); break;
   1.468 +				case 32: puts ("hppa2.0n"); break;
   1.469 +				default: puts ("hppa2.0"); break;
   1.470 +				} break;
   1.471 +		#else  /* !defined(_SC_KERNEL_BITS) */
   1.472 +			    puts ("hppa2.0"); break;
   1.473 +		#endif
   1.474 +			default: puts ("hppa1.0"); break;
   1.475 +			}
   1.476 +		    exit (0);
   1.477 +		}
   1.478  EOF
   1.479 -		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
   1.480 +		    (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
   1.481  		    test -z "$HP_ARCH" && HP_ARCH=hppa
   1.482  		fi ;;
   1.483  	esac
   1.484 -	if [ ${HP_ARCH} = "hppa2.0w" ]
   1.485 +	if [ ${HP_ARCH} = hppa2.0w ]
   1.486  	then
   1.487  	    eval $set_cc_for_build
   1.488  
   1.489 @@ -655,12 +707,12 @@
   1.490  	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
   1.491  	    # => hppa64-hp-hpux11.23
   1.492  
   1.493 -	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
   1.494 +	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
   1.495  		grep -q __LP64__
   1.496  	    then
   1.497 -		HP_ARCH="hppa2.0w"
   1.498 +		HP_ARCH=hppa2.0w
   1.499  	    else
   1.500 -		HP_ARCH="hppa64"
   1.501 +		HP_ARCH=hppa64
   1.502  	    fi
   1.503  	fi
   1.504  	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
   1.505 @@ -727,22 +779,22 @@
   1.506  	exit ;;
   1.507      C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
   1.508  	echo c1-convex-bsd
   1.509 -        exit ;;
   1.510 +	exit ;;
   1.511      C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
   1.512  	if getsysinfo -f scalar_acc
   1.513  	then echo c32-convex-bsd
   1.514  	else echo c2-convex-bsd
   1.515  	fi
   1.516 -        exit ;;
   1.517 +	exit ;;
   1.518      C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
   1.519  	echo c34-convex-bsd
   1.520 -        exit ;;
   1.521 +	exit ;;
   1.522      C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
   1.523  	echo c38-convex-bsd
   1.524 -        exit ;;
   1.525 +	exit ;;
   1.526      C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
   1.527  	echo c4-convex-bsd
   1.528 -        exit ;;
   1.529 +	exit ;;
   1.530      CRAY*Y-MP:*:*:*)
   1.531  	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   1.532  	exit ;;
   1.533 @@ -765,15 +817,15 @@
   1.534  	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   1.535  	exit ;;
   1.536      F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
   1.537 -	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
   1.538 -        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
   1.539 -        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
   1.540 -        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
   1.541 -        exit ;;
   1.542 +	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
   1.543 +	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
   1.544 +	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
   1.545 +	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
   1.546 +	exit ;;
   1.547      5000:UNIX_System_V:4.*:*)
   1.548 -        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
   1.549 -        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
   1.550 -        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
   1.551 +	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
   1.552 +	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
   1.553 +	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
   1.554  	exit ;;
   1.555      i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
   1.556  	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
   1.557 @@ -785,34 +837,40 @@
   1.558  	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
   1.559  	exit ;;
   1.560      *:FreeBSD:*:*)
   1.561 -	case ${UNAME_MACHINE} in
   1.562 -	    pc98)
   1.563 -		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
   1.564 +	UNAME_PROCESSOR=`/usr/bin/uname -p`
   1.565 +	case ${UNAME_PROCESSOR} in
   1.566  	    amd64)
   1.567 -		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
   1.568 -	    *)
   1.569 -		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
   1.570 +		UNAME_PROCESSOR=x86_64 ;;
   1.571 +	    i386)
   1.572 +		UNAME_PROCESSOR=i586 ;;
   1.573  	esac
   1.574 +	echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
   1.575  	exit ;;
   1.576      i*:CYGWIN*:*)
   1.577  	echo ${UNAME_MACHINE}-pc-cygwin
   1.578  	exit ;;
   1.579 +    *:MINGW64*:*)
   1.580 +	echo ${UNAME_MACHINE}-pc-mingw64
   1.581 +	exit ;;
   1.582      *:MINGW*:*)
   1.583  	echo ${UNAME_MACHINE}-pc-mingw32
   1.584  	exit ;;
   1.585 +    *:MSYS*:*)
   1.586 +	echo ${UNAME_MACHINE}-pc-msys
   1.587 +	exit ;;
   1.588      i*:windows32*:*)
   1.589 -    	# uname -m includes "-pc" on this system.
   1.590 -    	echo ${UNAME_MACHINE}-mingw32
   1.591 +	# uname -m includes "-pc" on this system.
   1.592 +	echo ${UNAME_MACHINE}-mingw32
   1.593  	exit ;;
   1.594      i*:PW*:*)
   1.595  	echo ${UNAME_MACHINE}-pc-pw32
   1.596  	exit ;;
   1.597 -    *:Interix*:[3456]*)
   1.598 -    	case ${UNAME_MACHINE} in
   1.599 +    *:Interix*:*)
   1.600 +	case ${UNAME_MACHINE} in
   1.601  	    x86)
   1.602  		echo i586-pc-interix${UNAME_RELEASE}
   1.603  		exit ;;
   1.604 -	    EM64T | authenticamd | genuineintel)
   1.605 +	    authenticamd | genuineintel | EM64T)
   1.606  		echo x86_64-unknown-interix${UNAME_RELEASE}
   1.607  		exit ;;
   1.608  	    IA64)
   1.609 @@ -845,15 +903,22 @@
   1.610  	exit ;;
   1.611      *:GNU:*:*)
   1.612  	# the GNU system
   1.613 -	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
   1.614 +	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
   1.615  	exit ;;
   1.616      *:GNU/*:*:*)
   1.617  	# other systems with GNU libc and userland
   1.618 -	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
   1.619 +	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
   1.620  	exit ;;
   1.621      i*86:Minix:*:*)
   1.622  	echo ${UNAME_MACHINE}-pc-minix
   1.623  	exit ;;
   1.624 +    aarch64:Linux:*:*)
   1.625 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.626 +	exit ;;
   1.627 +    aarch64_be:Linux:*:*)
   1.628 +	UNAME_MACHINE=aarch64_be
   1.629 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.630 +	exit ;;
   1.631      alpha:Linux:*:*)
   1.632  	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
   1.633  	  EV5)   UNAME_MACHINE=alphaev5 ;;
   1.634 @@ -863,44 +928,62 @@
   1.635  	  EV6)   UNAME_MACHINE=alphaev6 ;;
   1.636  	  EV67)  UNAME_MACHINE=alphaev67 ;;
   1.637  	  EV68*) UNAME_MACHINE=alphaev68 ;;
   1.638 -        esac
   1.639 +	esac
   1.640  	objdump --private-headers /bin/sh | grep -q ld.so.1
   1.641 -	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
   1.642 -	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
   1.643 +	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
   1.644 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.645 +	exit ;;
   1.646 +    arc:Linux:*:* | arceb:Linux:*:*)
   1.647 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.648  	exit ;;
   1.649      arm*:Linux:*:*)
   1.650  	eval $set_cc_for_build
   1.651  	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
   1.652  	    | grep -q __ARM_EABI__
   1.653  	then
   1.654 -	    echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.655 +	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.656  	else
   1.657 -	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
   1.658 +	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
   1.659 +		| grep -q __ARM_PCS_VFP
   1.660 +	    then
   1.661 +		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
   1.662 +	    else
   1.663 +		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
   1.664 +	    fi
   1.665  	fi
   1.666  	exit ;;
   1.667      avr32*:Linux:*:*)
   1.668 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.669 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.670  	exit ;;
   1.671      cris:Linux:*:*)
   1.672 -	echo cris-axis-linux-gnu
   1.673 +	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
   1.674  	exit ;;
   1.675      crisv32:Linux:*:*)
   1.676 -	echo crisv32-axis-linux-gnu
   1.677 +	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
   1.678 +	exit ;;
   1.679 +    e2k:Linux:*:*)
   1.680 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.681  	exit ;;
   1.682      frv:Linux:*:*)
   1.683 -    	echo frv-unknown-linux-gnu
   1.684 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.685 +	exit ;;
   1.686 +    hexagon:Linux:*:*)
   1.687 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.688  	exit ;;
   1.689      i*86:Linux:*:*)
   1.690 -	echo ${UNAME_MACHINE}-pc-linux-gnu
   1.691 +	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
   1.692  	exit ;;
   1.693      ia64:Linux:*:*)
   1.694 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.695 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.696 +	exit ;;
   1.697 +    k1om:Linux:*:*)
   1.698 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.699  	exit ;;
   1.700      m32r*:Linux:*:*)
   1.701 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.702 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.703  	exit ;;
   1.704      m68*:Linux:*:*)
   1.705 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.706 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.707  	exit ;;
   1.708      mips:Linux:*:* | mips64:Linux:*:*)
   1.709  	eval $set_cc_for_build
   1.710 @@ -918,56 +1001,70 @@
   1.711  	#endif
   1.712  	#endif
   1.713  EOF
   1.714 -	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
   1.715 -	    /^CPU/{
   1.716 -		s: ::g
   1.717 -		p
   1.718 -	    }'`"
   1.719 -	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
   1.720 +	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
   1.721 +	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
   1.722  	;;
   1.723 -    or32:Linux:*:*)
   1.724 -	echo or32-unknown-linux-gnu
   1.725 +    mips64el:Linux:*:*)
   1.726 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.727 +	exit ;;
   1.728 +    openrisc*:Linux:*:*)
   1.729 +	echo or1k-unknown-linux-${LIBC}
   1.730 +	exit ;;
   1.731 +    or32:Linux:*:* | or1k*:Linux:*:*)
   1.732 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.733  	exit ;;
   1.734      padre:Linux:*:*)
   1.735 -	echo sparc-unknown-linux-gnu
   1.736 +	echo sparc-unknown-linux-${LIBC}
   1.737  	exit ;;
   1.738      parisc64:Linux:*:* | hppa64:Linux:*:*)
   1.739 -	echo hppa64-unknown-linux-gnu
   1.740 +	echo hppa64-unknown-linux-${LIBC}
   1.741  	exit ;;
   1.742      parisc:Linux:*:* | hppa:Linux:*:*)
   1.743  	# Look for CPU level
   1.744  	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
   1.745 -	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
   1.746 -	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
   1.747 -	  *)    echo hppa-unknown-linux-gnu ;;
   1.748 +	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
   1.749 +	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
   1.750 +	  *)    echo hppa-unknown-linux-${LIBC} ;;
   1.751  	esac
   1.752  	exit ;;
   1.753      ppc64:Linux:*:*)
   1.754 -	echo powerpc64-unknown-linux-gnu
   1.755 +	echo powerpc64-unknown-linux-${LIBC}
   1.756  	exit ;;
   1.757      ppc:Linux:*:*)
   1.758 -	echo powerpc-unknown-linux-gnu
   1.759 +	echo powerpc-unknown-linux-${LIBC}
   1.760 +	exit ;;
   1.761 +    ppc64le:Linux:*:*)
   1.762 +	echo powerpc64le-unknown-linux-${LIBC}
   1.763 +	exit ;;
   1.764 +    ppcle:Linux:*:*)
   1.765 +	echo powerpcle-unknown-linux-${LIBC}
   1.766 +	exit ;;
   1.767 +    riscv32:Linux:*:* | riscv64:Linux:*:*)
   1.768 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.769  	exit ;;
   1.770      s390:Linux:*:* | s390x:Linux:*:*)
   1.771 -	echo ${UNAME_MACHINE}-ibm-linux
   1.772 +	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
   1.773  	exit ;;
   1.774      sh64*:Linux:*:*)
   1.775 -    	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.776 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.777  	exit ;;
   1.778      sh*:Linux:*:*)
   1.779 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.780 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.781  	exit ;;
   1.782      sparc:Linux:*:* | sparc64:Linux:*:*)
   1.783 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.784 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.785 +	exit ;;
   1.786 +    tile*:Linux:*:*)
   1.787 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.788  	exit ;;
   1.789      vax:Linux:*:*)
   1.790 -	echo ${UNAME_MACHINE}-dec-linux-gnu
   1.791 +	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
   1.792  	exit ;;
   1.793      x86_64:Linux:*:*)
   1.794 -	echo x86_64-unknown-linux-gnu
   1.795 +	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
   1.796  	exit ;;
   1.797      xtensa*:Linux:*:*)
   1.798 -    	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.799 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.800  	exit ;;
   1.801      i*86:DYNIX/ptx:4*:*)
   1.802  	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
   1.803 @@ -976,11 +1073,11 @@
   1.804  	echo i386-sequent-sysv4
   1.805  	exit ;;
   1.806      i*86:UNIX_SV:4.2MP:2.*)
   1.807 -        # Unixware is an offshoot of SVR4, but it has its own version
   1.808 -        # number series starting with 2...
   1.809 -        # I am not positive that other SVR4 systems won't match this,
   1.810 +	# Unixware is an offshoot of SVR4, but it has its own version
   1.811 +	# number series starting with 2...
   1.812 +	# I am not positive that other SVR4 systems won't match this,
   1.813  	# I just have to hope.  -- rms.
   1.814 -        # Use sysv4.2uw... so that sysv4* matches it.
   1.815 +	# Use sysv4.2uw... so that sysv4* matches it.
   1.816  	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
   1.817  	exit ;;
   1.818      i*86:OS/2:*:*)
   1.819 @@ -1012,7 +1109,7 @@
   1.820  	fi
   1.821  	exit ;;
   1.822      i*86:*:5:[678]*)
   1.823 -    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
   1.824 +	# UnixWare 7.x, OpenUNIX and OpenServer 6.
   1.825  	case `/bin/uname -X | grep "^Machine"` in
   1.826  	    *486*)	     UNAME_MACHINE=i486 ;;
   1.827  	    *Pentium)	     UNAME_MACHINE=i586 ;;
   1.828 @@ -1040,13 +1137,13 @@
   1.829  	exit ;;
   1.830      pc:*:*:*)
   1.831  	# Left here for compatibility:
   1.832 -        # uname -m prints for DJGPP always 'pc', but it prints nothing about
   1.833 -        # the processor, so we play safe by assuming i586.
   1.834 +	# uname -m prints for DJGPP always 'pc', but it prints nothing about
   1.835 +	# the processor, so we play safe by assuming i586.
   1.836  	# Note: whatever this is, it MUST be the same as what config.sub
   1.837 -	# prints for the "djgpp" host, or else GDB configury will decide that
   1.838 +	# prints for the "djgpp" host, or else GDB configure will decide that
   1.839  	# this is a cross-build.
   1.840  	echo i586-pc-msdosdjgpp
   1.841 -        exit ;;
   1.842 +	exit ;;
   1.843      Intel:Mach:3*:*)
   1.844  	echo i386-pc-mach3
   1.845  	exit ;;
   1.846 @@ -1081,8 +1178,8 @@
   1.847  	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
   1.848  	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
   1.849      3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
   1.850 -        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
   1.851 -          && { echo i486-ncr-sysv4; exit; } ;;
   1.852 +	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
   1.853 +	  && { echo i486-ncr-sysv4; exit; } ;;
   1.854      NCR*:*:4.2:* | MPRAS*:*:4.2:*)
   1.855  	OS_REL='.3'
   1.856  	test -r /etc/.relid \
   1.857 @@ -1125,10 +1222,10 @@
   1.858  		echo ns32k-sni-sysv
   1.859  	fi
   1.860  	exit ;;
   1.861 -    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
   1.862 -                      # says <Richard.M.Bartel@ccMail.Census.GOV>
   1.863 -        echo i586-unisys-sysv4
   1.864 -        exit ;;
   1.865 +    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
   1.866 +			# says <Richard.M.Bartel@ccMail.Census.GOV>
   1.867 +	echo i586-unisys-sysv4
   1.868 +	exit ;;
   1.869      *:UNIX_System_V:4*:FTX*)
   1.870  	# From Gerald Hewes <hewes@openmarket.com>.
   1.871  	# How about differentiating between stratus architectures? -djm
   1.872 @@ -1154,11 +1251,11 @@
   1.873  	exit ;;
   1.874      R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
   1.875  	if [ -d /usr/nec ]; then
   1.876 -	        echo mips-nec-sysv${UNAME_RELEASE}
   1.877 +		echo mips-nec-sysv${UNAME_RELEASE}
   1.878  	else
   1.879 -	        echo mips-unknown-sysv${UNAME_RELEASE}
   1.880 +		echo mips-unknown-sysv${UNAME_RELEASE}
   1.881  	fi
   1.882 -        exit ;;
   1.883 +	exit ;;
   1.884      BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
   1.885  	echo powerpc-be-beos
   1.886  	exit ;;
   1.887 @@ -1171,6 +1268,9 @@
   1.888      BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
   1.889  	echo i586-pc-haiku
   1.890  	exit ;;
   1.891 +    x86_64:Haiku:*:*)
   1.892 +	echo x86_64-unknown-haiku
   1.893 +	exit ;;
   1.894      SX-4:SUPER-UX:*:*)
   1.895  	echo sx4-nec-superux${UNAME_RELEASE}
   1.896  	exit ;;
   1.897 @@ -1189,6 +1289,9 @@
   1.898      SX-8R:SUPER-UX:*:*)
   1.899  	echo sx8r-nec-superux${UNAME_RELEASE}
   1.900  	exit ;;
   1.901 +    SX-ACE:SUPER-UX:*:*)
   1.902 +	echo sxace-nec-superux${UNAME_RELEASE}
   1.903 +	exit ;;
   1.904      Power*:Rhapsody:*:*)
   1.905  	echo powerpc-apple-rhapsody${UNAME_RELEASE}
   1.906  	exit ;;
   1.907 @@ -1197,24 +1300,43 @@
   1.908  	exit ;;
   1.909      *:Darwin:*:*)
   1.910  	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
   1.911 -	case $UNAME_PROCESSOR in
   1.912 -	    i386)
   1.913 -		eval $set_cc_for_build
   1.914 -		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
   1.915 -		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
   1.916 -		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
   1.917 -		      grep IS_64BIT_ARCH >/dev/null
   1.918 -		  then
   1.919 -		      UNAME_PROCESSOR="x86_64"
   1.920 -		  fi
   1.921 -		fi ;;
   1.922 -	    unknown) UNAME_PROCESSOR=powerpc ;;
   1.923 -	esac
   1.924 +	eval $set_cc_for_build
   1.925 +	if test "$UNAME_PROCESSOR" = unknown ; then
   1.926 +	    UNAME_PROCESSOR=powerpc
   1.927 +	fi
   1.928 +	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
   1.929 +	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
   1.930 +		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
   1.931 +		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
   1.932 +		       grep IS_64BIT_ARCH >/dev/null
   1.933 +		then
   1.934 +		    case $UNAME_PROCESSOR in
   1.935 +			i386) UNAME_PROCESSOR=x86_64 ;;
   1.936 +			powerpc) UNAME_PROCESSOR=powerpc64 ;;
   1.937 +		    esac
   1.938 +		fi
   1.939 +		# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
   1.940 +		if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
   1.941 +		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
   1.942 +		       grep IS_PPC >/dev/null
   1.943 +		then
   1.944 +		    UNAME_PROCESSOR=powerpc
   1.945 +		fi
   1.946 +	    fi
   1.947 +	elif test "$UNAME_PROCESSOR" = i386 ; then
   1.948 +	    # Avoid executing cc on OS X 10.9, as it ships with a stub
   1.949 +	    # that puts up a graphical alert prompting to install
   1.950 +	    # developer tools.  Any system running Mac OS X 10.7 or
   1.951 +	    # later (Darwin 11 and later) is required to have a 64-bit
   1.952 +	    # processor. This is not true of the ARM version of Darwin
   1.953 +	    # that Apple uses in portable devices.
   1.954 +	    UNAME_PROCESSOR=x86_64
   1.955 +	fi
   1.956  	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
   1.957  	exit ;;
   1.958      *:procnto*:*:* | *:QNX:[0123456789]*:*)
   1.959  	UNAME_PROCESSOR=`uname -p`
   1.960 -	if test "$UNAME_PROCESSOR" = "x86"; then
   1.961 +	if test "$UNAME_PROCESSOR" = x86; then
   1.962  		UNAME_PROCESSOR=i386
   1.963  		UNAME_MACHINE=pc
   1.964  	fi
   1.965 @@ -1223,12 +1345,18 @@
   1.966      *:QNX:*:4*)
   1.967  	echo i386-pc-qnx
   1.968  	exit ;;
   1.969 -    NSE-?:NONSTOP_KERNEL:*:*)
   1.970 +    NEO-*:NONSTOP_KERNEL:*:*)
   1.971 +	echo neo-tandem-nsk${UNAME_RELEASE}
   1.972 +	exit ;;
   1.973 +    NSE-*:NONSTOP_KERNEL:*:*)
   1.974  	echo nse-tandem-nsk${UNAME_RELEASE}
   1.975  	exit ;;
   1.976 -    NSR-?:NONSTOP_KERNEL:*:*)
   1.977 +    NSR-*:NONSTOP_KERNEL:*:*)
   1.978  	echo nsr-tandem-nsk${UNAME_RELEASE}
   1.979  	exit ;;
   1.980 +    NSX-*:NONSTOP_KERNEL:*:*)
   1.981 +	echo nsx-tandem-nsk${UNAME_RELEASE}
   1.982 +	exit ;;
   1.983      *:NonStop-UX:*:*)
   1.984  	echo mips-compaq-nonstopux
   1.985  	exit ;;
   1.986 @@ -1242,7 +1370,7 @@
   1.987  	# "uname -m" is not consistent, so use $cputype instead. 386
   1.988  	# is converted to i386 for consistency with other x86
   1.989  	# operating systems.
   1.990 -	if test "$cputype" = "386"; then
   1.991 +	if test "$cputype" = 386; then
   1.992  	    UNAME_MACHINE=i386
   1.993  	else
   1.994  	    UNAME_MACHINE="$cputype"
   1.995 @@ -1268,13 +1396,13 @@
   1.996  	echo pdp10-unknown-its
   1.997  	exit ;;
   1.998      SEI:*:*:SEIUX)
   1.999 -        echo mips-sei-seiux${UNAME_RELEASE}
  1.1000 +	echo mips-sei-seiux${UNAME_RELEASE}
  1.1001  	exit ;;
  1.1002      *:DragonFly:*:*)
  1.1003  	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
  1.1004  	exit ;;
  1.1005      *:*VMS:*:*)
  1.1006 -    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
  1.1007 +	UNAME_MACHINE=`(uname -p) 2>/dev/null`
  1.1008  	case "${UNAME_MACHINE}" in
  1.1009  	    A*) echo alpha-dec-vms ; exit ;;
  1.1010  	    I*) echo ia64-dec-vms ; exit ;;
  1.1011 @@ -1284,7 +1412,7 @@
  1.1012  	echo i386-pc-xenix
  1.1013  	exit ;;
  1.1014      i*86:skyos:*:*)
  1.1015 -	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
  1.1016 +	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
  1.1017  	exit ;;
  1.1018      i*86:rdos:*:*)
  1.1019  	echo ${UNAME_MACHINE}-pc-rdos
  1.1020 @@ -1292,174 +1420,28 @@
  1.1021      i*86:AROS:*:*)
  1.1022  	echo ${UNAME_MACHINE}-pc-aros
  1.1023  	exit ;;
  1.1024 +    x86_64:VMkernel:*:*)
  1.1025 +	echo ${UNAME_MACHINE}-unknown-esx
  1.1026 +	exit ;;
  1.1027 +    amd64:Isilon\ OneFS:*:*)
  1.1028 +	echo x86_64-unknown-onefs
  1.1029 +	exit ;;
  1.1030  esac
  1.1031  
  1.1032 -#echo '(No uname command or uname output not recognized.)' 1>&2
  1.1033 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
  1.1034 -
  1.1035 -eval $set_cc_for_build
  1.1036 -cat >$dummy.c <<EOF
  1.1037 -#ifdef _SEQUENT_
  1.1038 -# include <sys/types.h>
  1.1039 -# include <sys/utsname.h>
  1.1040 -#endif
  1.1041 -main ()
  1.1042 -{
  1.1043 -#if defined (sony)
  1.1044 -#if defined (MIPSEB)
  1.1045 -  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
  1.1046 -     I don't know....  */
  1.1047 -  printf ("mips-sony-bsd\n"); exit (0);
  1.1048 -#else
  1.1049 -#include <sys/param.h>
  1.1050 -  printf ("m68k-sony-newsos%s\n",
  1.1051 -#ifdef NEWSOS4
  1.1052 -          "4"
  1.1053 -#else
  1.1054 -	  ""
  1.1055 -#endif
  1.1056 -         ); exit (0);
  1.1057 -#endif
  1.1058 -#endif
  1.1059 -
  1.1060 -#if defined (__arm) && defined (__acorn) && defined (__unix)
  1.1061 -  printf ("arm-acorn-riscix\n"); exit (0);
  1.1062 -#endif
  1.1063 -
  1.1064 -#if defined (hp300) && !defined (hpux)
  1.1065 -  printf ("m68k-hp-bsd\n"); exit (0);
  1.1066 -#endif
  1.1067 -
  1.1068 -#if defined (NeXT)
  1.1069 -#if !defined (__ARCHITECTURE__)
  1.1070 -#define __ARCHITECTURE__ "m68k"
  1.1071 -#endif
  1.1072 -  int version;
  1.1073 -  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
  1.1074 -  if (version < 4)
  1.1075 -    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
  1.1076 -  else
  1.1077 -    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
  1.1078 -  exit (0);
  1.1079 -#endif
  1.1080 -
  1.1081 -#if defined (MULTIMAX) || defined (n16)
  1.1082 -#if defined (UMAXV)
  1.1083 -  printf ("ns32k-encore-sysv\n"); exit (0);
  1.1084 -#else
  1.1085 -#if defined (CMU)
  1.1086 -  printf ("ns32k-encore-mach\n"); exit (0);
  1.1087 -#else
  1.1088 -  printf ("ns32k-encore-bsd\n"); exit (0);
  1.1089 -#endif
  1.1090 -#endif
  1.1091 -#endif
  1.1092 -
  1.1093 -#if defined (__386BSD__)
  1.1094 -  printf ("i386-pc-bsd\n"); exit (0);
  1.1095 -#endif
  1.1096 -
  1.1097 -#if defined (sequent)
  1.1098 -#if defined (i386)
  1.1099 -  printf ("i386-sequent-dynix\n"); exit (0);
  1.1100 -#endif
  1.1101 -#if defined (ns32000)
  1.1102 -  printf ("ns32k-sequent-dynix\n"); exit (0);
  1.1103 -#endif
  1.1104 -#endif
  1.1105 -
  1.1106 -#if defined (_SEQUENT_)
  1.1107 -    struct utsname un;
  1.1108 -
  1.1109 -    uname(&un);
  1.1110 -
  1.1111 -    if (strncmp(un.version, "V2", 2) == 0) {
  1.1112 -	printf ("i386-sequent-ptx2\n"); exit (0);
  1.1113 -    }
  1.1114 -    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
  1.1115 -	printf ("i386-sequent-ptx1\n"); exit (0);
  1.1116 -    }
  1.1117 -    printf ("i386-sequent-ptx\n"); exit (0);
  1.1118 -
  1.1119 -#endif
  1.1120 -
  1.1121 -#if defined (vax)
  1.1122 -# if !defined (ultrix)
  1.1123 -#  include <sys/param.h>
  1.1124 -#  if defined (BSD)
  1.1125 -#   if BSD == 43
  1.1126 -      printf ("vax-dec-bsd4.3\n"); exit (0);
  1.1127 -#   else
  1.1128 -#    if BSD == 199006
  1.1129 -      printf ("vax-dec-bsd4.3reno\n"); exit (0);
  1.1130 -#    else
  1.1131 -      printf ("vax-dec-bsd\n"); exit (0);
  1.1132 -#    endif
  1.1133 -#   endif
  1.1134 -#  else
  1.1135 -    printf ("vax-dec-bsd\n"); exit (0);
  1.1136 -#  endif
  1.1137 -# else
  1.1138 -    printf ("vax-dec-ultrix\n"); exit (0);
  1.1139 -# endif
  1.1140 -#endif
  1.1141 -
  1.1142 -#if defined (alliant) && defined (i860)
  1.1143 -  printf ("i860-alliant-bsd\n"); exit (0);
  1.1144 -#endif
  1.1145 -
  1.1146 -  exit (1);
  1.1147 -}
  1.1148 -EOF
  1.1149 -
  1.1150 -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
  1.1151 -	{ echo "$SYSTEM_NAME"; exit; }
  1.1152 -
  1.1153 -# Apollos put the system type in the environment.
  1.1154 -
  1.1155 -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
  1.1156 -
  1.1157 -# Convex versions that predate uname can use getsysinfo(1)
  1.1158 -
  1.1159 -if [ -x /usr/convex/getsysinfo ]
  1.1160 -then
  1.1161 -    case `getsysinfo -f cpu_type` in
  1.1162 -    c1*)
  1.1163 -	echo c1-convex-bsd
  1.1164 -	exit ;;
  1.1165 -    c2*)
  1.1166 -	if getsysinfo -f scalar_acc
  1.1167 -	then echo c32-convex-bsd
  1.1168 -	else echo c2-convex-bsd
  1.1169 -	fi
  1.1170 -	exit ;;
  1.1171 -    c34*)
  1.1172 -	echo c34-convex-bsd
  1.1173 -	exit ;;
  1.1174 -    c38*)
  1.1175 -	echo c38-convex-bsd
  1.1176 -	exit ;;
  1.1177 -    c4*)
  1.1178 -	echo c4-convex-bsd
  1.1179 -	exit ;;
  1.1180 -    esac
  1.1181 -fi
  1.1182 -
  1.1183  cat >&2 <<EOF
  1.1184  $0: unable to guess system type
  1.1185  
  1.1186 -This script, last modified $timestamp, has failed to recognize
  1.1187 -the operating system you are using. It is advised that you
  1.1188 -download the most up to date version of the config scripts from
  1.1189 +This script (version $timestamp), has failed to recognize the
  1.1190 +operating system you are using. If your script is old, overwrite *all*
  1.1191 +copies of config.guess and config.sub with the latest versions from:
  1.1192  
  1.1193 -  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
  1.1194 +  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
  1.1195  and
  1.1196 -  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
  1.1197 +  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
  1.1198  
  1.1199 -If the version you run ($0) is already up to date, please
  1.1200 -send the following data and any information you think might be
  1.1201 -pertinent to <config-patches@gnu.org> in order to provide the needed
  1.1202 -information to handle your system.
  1.1203 +If $0 has already been updated, send the following data and any
  1.1204 +information you think might be pertinent to config-patches@gnu.org to
  1.1205 +provide the necessary information to handle your system.
  1.1206  
  1.1207  config.guess timestamp = $timestamp
  1.1208  
     2.1 --- a/build-scripts/config.sub	Sun Oct 07 14:00:50 2018 +0300
     2.2 +++ b/build-scripts/config.sub	Sun Oct 07 17:56:56 2018 +0300
     2.3 @@ -1,38 +1,31 @@
     2.4  #! /bin/sh
     2.5  # Configuration validation subroutine script.
     2.6 -#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
     2.7 -#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
     2.8 -#   Free Software Foundation, Inc.
     2.9 +#   Copyright 1992-2017 Free Software Foundation, Inc.
    2.10  
    2.11 -timestamp='2009-10-07'
    2.12 +timestamp='2017-04-02'
    2.13  
    2.14 -# This file is (in principle) common to ALL GNU software.
    2.15 -# The presence of a machine in this file suggests that SOME GNU software
    2.16 -# can handle that machine.  It does not imply ALL GNU software can.
    2.17 -#
    2.18 -# This file is free software; you can redistribute it and/or modify
    2.19 -# it under the terms of the GNU General Public License as published by
    2.20 -# the Free Software Foundation; either version 2 of the License, or
    2.21 +# This file is free software; you can redistribute it and/or modify it
    2.22 +# under the terms of the GNU General Public License as published by
    2.23 +# the Free Software Foundation; either version 3 of the License, or
    2.24  # (at your option) any later version.
    2.25  #
    2.26 -# This program is distributed in the hope that it will be useful,
    2.27 -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    2.28 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    2.29 -# GNU General Public License for more details.
    2.30 +# This program is distributed in the hope that it will be useful, but
    2.31 +# WITHOUT ANY WARRANTY; without even the implied warranty of
    2.32 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    2.33 +# General Public License for more details.
    2.34  #
    2.35  # You should have received a copy of the GNU General Public License
    2.36 -# along with this program; if not, write to the Free Software
    2.37 -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    2.38 -# 02110-1301, USA.
    2.39 +# along with this program; if not, see <http://www.gnu.org/licenses/>.
    2.40  #
    2.41  # As a special exception to the GNU General Public License, if you
    2.42  # distribute this file as part of a program that contains a
    2.43  # configuration script generated by Autoconf, you may include it under
    2.44 -# the same distribution terms that you use for the rest of that program.
    2.45 +# the same distribution terms that you use for the rest of that
    2.46 +# program.  This Exception is an additional permission under section 7
    2.47 +# of the GNU General Public License, version 3 ("GPLv3").
    2.48  
    2.49  
    2.50 -# Please send patches to <config-patches@gnu.org>.  Submit a context
    2.51 -# diff and a properly formatted GNU ChangeLog entry.
    2.52 +# Please send patches to <config-patches@gnu.org>.
    2.53  #
    2.54  # Configuration subroutine to validate and canonicalize a configuration type.
    2.55  # Supply the specified configuration type as an argument.
    2.56 @@ -40,7 +33,7 @@
    2.57  # Otherwise, we print the canonical config type on stdout and succeed.
    2.58  
    2.59  # You can get the latest version of this script from:
    2.60 -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
    2.61 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
    2.62  
    2.63  # This file is supposed to be the same for all GNU packages
    2.64  # and recognize all the CPU types, system types and aliases
    2.65 @@ -60,8 +53,7 @@
    2.66  me=`echo "$0" | sed -e 's,.*/,,'`
    2.67  
    2.68  usage="\
    2.69 -Usage: $0 [OPTION] CPU-MFR-OPSYS
    2.70 -       $0 [OPTION] ALIAS
    2.71 +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
    2.72  
    2.73  Canonicalize a configuration name.
    2.74  
    2.75 @@ -75,8 +67,7 @@
    2.76  version="\
    2.77  GNU config.sub ($timestamp)
    2.78  
    2.79 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
    2.80 -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
    2.81 +Copyright 1992-2017 Free Software Foundation, Inc.
    2.82  
    2.83  This is free software; see the source for copying conditions.  There is NO
    2.84  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    2.85 @@ -123,13 +114,18 @@
    2.86  # Here we must recognize all the valid KERNEL-OS combinations.
    2.87  maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
    2.88  case $maybe_os in
    2.89 -  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
    2.90 -  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
    2.91 -  kopensolaris*-gnu* | \
    2.92 +  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
    2.93 +  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
    2.94 +  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
    2.95 +  kopensolaris*-gnu* | cloudabi*-eabi* | \
    2.96    storm-chaos* | os2-emx* | rtmk-nova*)
    2.97      os=-$maybe_os
    2.98      basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
    2.99      ;;
   2.100 +  android-linux)
   2.101 +    os=-linux-android
   2.102 +    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
   2.103 +    ;;
   2.104    *)
   2.105      basic_machine=`echo $1 | sed 's/-[^-]*$//'`
   2.106      if [ $basic_machine != $1 ]
   2.107 @@ -152,12 +148,12 @@
   2.108  	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
   2.109  	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
   2.110  	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
   2.111 -	-apple | -axis | -knuth | -cray | -microblaze)
   2.112 +	-apple | -axis | -knuth | -cray | -microblaze*)
   2.113  		os=
   2.114  		basic_machine=$1
   2.115  		;;
   2.116 -        -bluegene*)
   2.117 -	        os=-cnk
   2.118 +	-bluegene*)
   2.119 +		os=-cnk
   2.120  		;;
   2.121  	-sim | -cisco | -oki | -wec | -winbond)
   2.122  		os=
   2.123 @@ -173,10 +169,10 @@
   2.124  		os=-chorusos
   2.125  		basic_machine=$1
   2.126  		;;
   2.127 - 	-chorusrdb)
   2.128 - 		os=-chorusrdb
   2.129 +	-chorusrdb)
   2.130 +		os=-chorusrdb
   2.131  		basic_machine=$1
   2.132 - 		;;
   2.133 +		;;
   2.134  	-hiux*)
   2.135  		os=-hiuxwe2
   2.136  		;;
   2.137 @@ -221,6 +217,12 @@
   2.138  	-isc*)
   2.139  		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
   2.140  		;;
   2.141 +	-lynx*178)
   2.142 +		os=-lynxos178
   2.143 +		;;
   2.144 +	-lynx*5)
   2.145 +		os=-lynxos5
   2.146 +		;;
   2.147  	-lynx*)
   2.148  		os=-lynxos
   2.149  		;;
   2.150 @@ -245,20 +247,29 @@
   2.151  	# Some are omitted here because they have special meanings below.
   2.152  	1750a | 580 \
   2.153  	| a29k \
   2.154 +	| aarch64 | aarch64_be \
   2.155  	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
   2.156  	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
   2.157  	| am33_2.0 \
   2.158 -	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
   2.159 +	| arc | arceb \
   2.160 +	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
   2.161 +	| avr | avr32 \
   2.162 +	| ba \
   2.163 +	| be32 | be64 \
   2.164  	| bfin \
   2.165 -	| c4x | clipper \
   2.166 +	| c4x | c8051 | clipper \
   2.167  	| d10v | d30v | dlx | dsp16xx \
   2.168 -	| fido | fr30 | frv \
   2.169 +	| e2k | epiphany \
   2.170 +	| fido | fr30 | frv | ft32 \
   2.171  	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
   2.172 -	| i370 | i860 | i960 | ia64 \
   2.173 +	| hexagon \
   2.174 +	| i370 | i860 | i960 | ia16 | ia64 \
   2.175  	| ip2k | iq2000 \
   2.176 +	| k1om \
   2.177 +	| le32 | le64 \
   2.178  	| lm32 \
   2.179  	| m32c | m32r | m32rle | m68000 | m68k | m88k \
   2.180 -	| maxq | mb | microblaze | mcore | mep | metag \
   2.181 +	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
   2.182  	| mips | mipsbe | mipseb | mipsel | mipsle \
   2.183  	| mips16 \
   2.184  	| mips64 | mips64el \
   2.185 @@ -272,37 +283,57 @@
   2.186  	| mips64vr5900 | mips64vr5900el \
   2.187  	| mipsisa32 | mipsisa32el \
   2.188  	| mipsisa32r2 | mipsisa32r2el \
   2.189 +	| mipsisa32r6 | mipsisa32r6el \
   2.190  	| mipsisa64 | mipsisa64el \
   2.191  	| mipsisa64r2 | mipsisa64r2el \
   2.192 +	| mipsisa64r6 | mipsisa64r6el \
   2.193  	| mipsisa64sb1 | mipsisa64sb1el \
   2.194  	| mipsisa64sr71k | mipsisa64sr71kel \
   2.195 +	| mipsr5900 | mipsr5900el \
   2.196  	| mipstx39 | mipstx39el \
   2.197  	| mn10200 | mn10300 \
   2.198  	| moxie \
   2.199  	| mt \
   2.200  	| msp430 \
   2.201 -	| nios | nios2 \
   2.202 +	| nds32 | nds32le | nds32be \
   2.203 +	| nios | nios2 | nios2eb | nios2el \
   2.204  	| ns16k | ns32k \
   2.205 -	| or32 \
   2.206 +	| open8 | or1k | or1knd | or32 \
   2.207  	| pdp10 | pdp11 | pj | pjl \
   2.208 -	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
   2.209 +	| powerpc | powerpc64 | powerpc64le | powerpcle \
   2.210 +	| pru \
   2.211  	| pyramid \
   2.212 -	| rx \
   2.213 +	| riscv32 | riscv64 \
   2.214 +	| rl78 | rx \
   2.215  	| score \
   2.216 -	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
   2.217 +	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
   2.218  	| sh64 | sh64le \
   2.219  	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
   2.220  	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
   2.221 -	| spu | strongarm \
   2.222 -	| tahoe | thumb | tic4x | tic80 | tron \
   2.223 -	| v850 | v850e \
   2.224 +	| spu \
   2.225 +	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
   2.226 +	| ubicom32 \
   2.227 +	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
   2.228 +	| visium \
   2.229 +	| wasm32 \
   2.230  	| we32k \
   2.231 -	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
   2.232 +	| x86 | xc16x | xstormy16 | xtensa \
   2.233  	| z8k | z80)
   2.234  		basic_machine=$basic_machine-unknown
   2.235  		;;
   2.236 -	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
   2.237 -		# Motorola 68HC11/12.
   2.238 +	c54x)
   2.239 +		basic_machine=tic54x-unknown
   2.240 +		;;
   2.241 +	c55x)
   2.242 +		basic_machine=tic55x-unknown
   2.243 +		;;
   2.244 +	c6x)
   2.245 +		basic_machine=tic6x-unknown
   2.246 +		;;
   2.247 +	leon|leon[3-9])
   2.248 +		basic_machine=sparc-$basic_machine
   2.249 +		;;
   2.250 +	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
   2.251  		basic_machine=$basic_machine-unknown
   2.252  		os=-none
   2.253  		;;
   2.254 @@ -312,6 +343,21 @@
   2.255  		basic_machine=mt-unknown
   2.256  		;;
   2.257  
   2.258 +	strongarm | thumb | xscale)
   2.259 +		basic_machine=arm-unknown
   2.260 +		;;
   2.261 +	xgate)
   2.262 +		basic_machine=$basic_machine-unknown
   2.263 +		os=-none
   2.264 +		;;
   2.265 +	xscaleeb)
   2.266 +		basic_machine=armeb-unknown
   2.267 +		;;
   2.268 +
   2.269 +	xscaleel)
   2.270 +		basic_machine=armel-unknown
   2.271 +		;;
   2.272 +
   2.273  	# We use `pc' rather than `unknown'
   2.274  	# because (1) that's what they normally are, and
   2.275  	# (2) the word "unknown" tends to confuse beginning users.
   2.276 @@ -326,25 +372,32 @@
   2.277  	# Recognize the basic CPU types with company name.
   2.278  	580-* \
   2.279  	| a29k-* \
   2.280 +	| aarch64-* | aarch64_be-* \
   2.281  	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
   2.282  	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
   2.283 -	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
   2.284 +	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
   2.285  	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
   2.286  	| avr-* | avr32-* \
   2.287 +	| ba-* \
   2.288 +	| be32-* | be64-* \
   2.289  	| bfin-* | bs2000-* \
   2.290 -	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
   2.291 -	| clipper-* | craynv-* | cydra-* \
   2.292 +	| c[123]* | c30-* | [cjt]90-* | c4x-* \
   2.293 +	| c8051-* | clipper-* | craynv-* | cydra-* \
   2.294  	| d10v-* | d30v-* | dlx-* \
   2.295 -	| elxsi-* \
   2.296 +	| e2k-* | elxsi-* \
   2.297  	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
   2.298  	| h8300-* | h8500-* \
   2.299  	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
   2.300 -	| i*86-* | i860-* | i960-* | ia64-* \
   2.301 +	| hexagon-* \
   2.302 +	| i*86-* | i860-* | i960-* | ia16-* | ia64-* \
   2.303  	| ip2k-* | iq2000-* \
   2.304 +	| k1om-* \
   2.305 +	| le32-* | le64-* \
   2.306  	| lm32-* \
   2.307  	| m32c-* | m32r-* | m32rle-* \
   2.308  	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
   2.309 -	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
   2.310 +	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
   2.311 +	| microblaze-* | microblazeel-* \
   2.312  	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
   2.313  	| mips16-* \
   2.314  	| mips64-* | mips64el-* \
   2.315 @@ -358,32 +411,45 @@
   2.316  	| mips64vr5900-* | mips64vr5900el-* \
   2.317  	| mipsisa32-* | mipsisa32el-* \
   2.318  	| mipsisa32r2-* | mipsisa32r2el-* \
   2.319 +	| mipsisa32r6-* | mipsisa32r6el-* \
   2.320  	| mipsisa64-* | mipsisa64el-* \
   2.321  	| mipsisa64r2-* | mipsisa64r2el-* \
   2.322 +	| mipsisa64r6-* | mipsisa64r6el-* \
   2.323  	| mipsisa64sb1-* | mipsisa64sb1el-* \
   2.324  	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
   2.325 +	| mipsr5900-* | mipsr5900el-* \
   2.326  	| mipstx39-* | mipstx39el-* \
   2.327  	| mmix-* \
   2.328  	| mt-* \
   2.329  	| msp430-* \
   2.330 -	| nios-* | nios2-* \
   2.331 +	| nds32-* | nds32le-* | nds32be-* \
   2.332 +	| nios-* | nios2-* | nios2eb-* | nios2el-* \
   2.333  	| none-* | np1-* | ns16k-* | ns32k-* \
   2.334 +	| open8-* \
   2.335 +	| or1k*-* \
   2.336  	| orion-* \
   2.337  	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
   2.338 -	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
   2.339 +	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
   2.340 +	| pru-* \
   2.341  	| pyramid-* \
   2.342 -	| romp-* | rs6000-* | rx-* \
   2.343 +	| riscv32-* | riscv64-* \
   2.344 +	| rl78-* | romp-* | rs6000-* | rx-* \
   2.345  	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
   2.346  	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
   2.347  	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
   2.348  	| sparclite-* \
   2.349 -	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
   2.350 -	| tahoe-* | thumb-* \
   2.351 -	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
   2.352 +	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
   2.353 +	| tahoe-* \
   2.354 +	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
   2.355 +	| tile*-* \
   2.356  	| tron-* \
   2.357 -	| v850-* | v850e-* | vax-* \
   2.358 +	| ubicom32-* \
   2.359 +	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
   2.360 +	| vax-* \
   2.361 +	| visium-* \
   2.362 +	| wasm32-* \
   2.363  	| we32k-* \
   2.364 -	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
   2.365 +	| x86-* | x86_64-* | xc16x-* | xps100-* \
   2.366  	| xstormy16-* | xtensa*-* \
   2.367  	| ymp-* \
   2.368  	| z8k-* | z80-*)
   2.369 @@ -408,7 +474,7 @@
   2.370  		basic_machine=a29k-amd
   2.371  		os=-udi
   2.372  		;;
   2.373 -    	abacus)
   2.374 +	abacus)
   2.375  		basic_machine=abacus-unknown
   2.376  		;;
   2.377  	adobe68k)
   2.378 @@ -458,6 +524,9 @@
   2.379  		basic_machine=i386-pc
   2.380  		os=-aros
   2.381  		;;
   2.382 +	asmjs)
   2.383 +		basic_machine=asmjs-unknown
   2.384 +		;;
   2.385  	aux)
   2.386  		basic_machine=m68k-apple
   2.387  		os=-aux
   2.388 @@ -478,11 +547,20 @@
   2.389  		basic_machine=powerpc-ibm
   2.390  		os=-cnk
   2.391  		;;
   2.392 +	c54x-*)
   2.393 +		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
   2.394 +		;;
   2.395 +	c55x-*)
   2.396 +		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
   2.397 +		;;
   2.398 +	c6x-*)
   2.399 +		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
   2.400 +		;;
   2.401  	c90)
   2.402  		basic_machine=c90-cray
   2.403  		os=-unicos
   2.404  		;;
   2.405 -        cegcc)
   2.406 +	cegcc)
   2.407  		basic_machine=arm-unknown
   2.408  		os=-cegcc
   2.409  		;;
   2.410 @@ -514,7 +592,7 @@
   2.411  		basic_machine=craynv-cray
   2.412  		os=-unicosmp
   2.413  		;;
   2.414 -	cr16)
   2.415 +	cr16 | cr16-*)
   2.416  		basic_machine=cr16-unknown
   2.417  		os=-elf
   2.418  		;;
   2.419 @@ -569,6 +647,14 @@
   2.420  		basic_machine=m68k-bull
   2.421  		os=-sysv3
   2.422  		;;
   2.423 +	e500v[12])
   2.424 +		basic_machine=powerpc-unknown
   2.425 +		os=$os"spe"
   2.426 +		;;
   2.427 +	e500v[12]-*)
   2.428 +		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
   2.429 +		os=$os"spe"
   2.430 +		;;
   2.431  	ebmon29k)
   2.432  		basic_machine=a29k-amd
   2.433  		os=-ebmon
   2.434 @@ -672,7 +758,6 @@
   2.435  	i370-ibm* | ibm*)
   2.436  		basic_machine=i370-ibm
   2.437  		;;
   2.438 -# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
   2.439  	i*86v32)
   2.440  		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
   2.441  		os=-sysv32
   2.442 @@ -711,6 +796,9 @@
   2.443  		basic_machine=m68k-isi
   2.444  		os=-sysv
   2.445  		;;
   2.446 +	leon-*|leon[3-9]-*)
   2.447 +		basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
   2.448 +		;;
   2.449  	m68knommu)
   2.450  		basic_machine=m68k-unknown
   2.451  		os=-linux
   2.452 @@ -730,11 +818,15 @@
   2.453  		basic_machine=ns32k-utek
   2.454  		os=-sysv
   2.455  		;;
   2.456 -        microblaze)
   2.457 +	microblaze*)
   2.458  		basic_machine=microblaze-xilinx
   2.459  		;;
   2.460 +	mingw64)
   2.461 +		basic_machine=x86_64-pc
   2.462 +		os=-mingw64
   2.463 +		;;
   2.464  	mingw32)
   2.465 -		basic_machine=i386-pc
   2.466 +		basic_machine=i686-pc
   2.467  		os=-mingw32
   2.468  		;;
   2.469  	mingw32ce)
   2.470 @@ -762,6 +854,10 @@
   2.471  		basic_machine=powerpc-unknown
   2.472  		os=-morphos
   2.473  		;;
   2.474 +	moxiebox)
   2.475 +		basic_machine=moxie-unknown
   2.476 +		os=-moxiebox
   2.477 +		;;
   2.478  	msdos)
   2.479  		basic_machine=i386-pc
   2.480  		os=-msdos
   2.481 @@ -769,10 +865,18 @@
   2.482  	ms1-*)
   2.483  		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
   2.484  		;;
   2.485 +	msys)
   2.486 +		basic_machine=i686-pc
   2.487 +		os=-msys
   2.488 +		;;
   2.489  	mvs)
   2.490  		basic_machine=i370-ibm
   2.491  		os=-mvs
   2.492  		;;
   2.493 +	nacl)
   2.494 +		basic_machine=le32-unknown
   2.495 +		os=-nacl
   2.496 +		;;
   2.497  	ncr3000)
   2.498  		basic_machine=i486-ncr
   2.499  		os=-sysv4
   2.500 @@ -837,9 +941,18 @@
   2.501  	np1)
   2.502  		basic_machine=np1-gould
   2.503  		;;
   2.504 +	neo-tandem)
   2.505 +		basic_machine=neo-tandem
   2.506 +		;;
   2.507 +	nse-tandem)
   2.508 +		basic_machine=nse-tandem
   2.509 +		;;
   2.510  	nsr-tandem)
   2.511  		basic_machine=nsr-tandem
   2.512  		;;
   2.513 +	nsx-tandem)
   2.514 +		basic_machine=nsx-tandem
   2.515 +		;;
   2.516  	op50n-* | op60c-*)
   2.517  		basic_machine=hppa1.1-oki
   2.518  		os=-proelf
   2.519 @@ -919,11 +1032,12 @@
   2.520  		;;
   2.521  	power)	basic_machine=power-ibm
   2.522  		;;
   2.523 -	ppc)	basic_machine=powerpc-unknown
   2.524 +	ppc | ppcbe)	basic_machine=powerpc-unknown
   2.525  		;;
   2.526 -	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
   2.527 +	ppc-* | ppcbe-*)
   2.528 +		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
   2.529  		;;
   2.530 -	ppcle | powerpclittle | ppc-le | powerpc-little)
   2.531 +	ppcle | powerpclittle)
   2.532  		basic_machine=powerpcle-unknown
   2.533  		;;
   2.534  	ppcle-* | powerpclittle-*)
   2.535 @@ -933,7 +1047,7 @@
   2.536  		;;
   2.537  	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
   2.538  		;;
   2.539 -	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
   2.540 +	ppc64le | powerpc64little)
   2.541  		basic_machine=powerpc64le-unknown
   2.542  		;;
   2.543  	ppc64le-* | powerpc64little-*)
   2.544 @@ -946,7 +1060,11 @@
   2.545  		basic_machine=i586-unknown
   2.546  		os=-pw32
   2.547  		;;
   2.548 -	rdos)
   2.549 +	rdos | rdos64)
   2.550 +		basic_machine=x86_64-pc
   2.551 +		os=-rdos
   2.552 +		;;
   2.553 +	rdos32)
   2.554  		basic_machine=i386-pc
   2.555  		os=-rdos
   2.556  		;;
   2.557 @@ -1015,6 +1133,9 @@
   2.558  		basic_machine=i860-stratus
   2.559  		os=-sysv4
   2.560  		;;
   2.561 +	strongarm-* | thumb-*)
   2.562 +		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
   2.563 +		;;
   2.564  	sun2)
   2.565  		basic_machine=m68000-sun
   2.566  		;;
   2.567 @@ -1071,20 +1192,8 @@
   2.568  		basic_machine=t90-cray
   2.569  		os=-unicos
   2.570  		;;
   2.571 -	tic54x | c54x*)
   2.572 -		basic_machine=tic54x-unknown
   2.573 -		os=-coff
   2.574 -		;;
   2.575 -	tic55x | c55x*)
   2.576 -		basic_machine=tic55x-unknown
   2.577 -		os=-coff
   2.578 -		;;
   2.579 -	tic6x | c6x*)
   2.580 -		basic_machine=tic6x-unknown
   2.581 -		os=-coff
   2.582 -		;;
   2.583  	tile*)
   2.584 -		basic_machine=tile-unknown
   2.585 +		basic_machine=$basic_machine-unknown
   2.586  		os=-linux-gnu
   2.587  		;;
   2.588  	tx39)
   2.589 @@ -1139,6 +1248,9 @@
   2.590  		basic_machine=a29k-wrs
   2.591  		os=-vxworks
   2.592  		;;
   2.593 +	wasm32)
   2.594 +		basic_machine=wasm32-unknown
   2.595 +		;;
   2.596  	w65*)
   2.597  		basic_machine=w65-wdc
   2.598  		os=-none
   2.599 @@ -1154,6 +1266,9 @@
   2.600  	xps | xps100)
   2.601  		basic_machine=xps100-honeywell
   2.602  		;;
   2.603 +	xscale-* | xscalee[bl]-*)
   2.604 +		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
   2.605 +		;;
   2.606  	ymp)
   2.607  		basic_machine=ymp-cray
   2.608  		os=-unicos
   2.609 @@ -1251,9 +1366,12 @@
   2.610  if [ x"$os" != x"" ]
   2.611  then
   2.612  case $os in
   2.613 -        # First match some system type aliases
   2.614 -        # that might get confused with valid system types.
   2.615 +	# First match some system type aliases
   2.616 +	# that might get confused with valid system types.
   2.617  	# -solaris* is a basic system type, with this one exception.
   2.618 +	-auroraux)
   2.619 +		os=-auroraux
   2.620 +		;;
   2.621  	-solaris1 | -solaris1.*)
   2.622  		os=`echo $os | sed -e 's|solaris1|sunos4|'`
   2.623  		;;
   2.624 @@ -1275,29 +1393,31 @@
   2.625  	# -sysv* is not here because it comes later, after sysvr4.
   2.626  	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
   2.627  	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
   2.628 -	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
   2.629 -	      | -kopensolaris* \
   2.630 +	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
   2.631 +	      | -sym* | -kopensolaris* | -plan9* \
   2.632  	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
   2.633 -	      | -aos* | -aros* \
   2.634 +	      | -aos* | -aros* | -cloudabi* | -sortix* \
   2.635  	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
   2.636  	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
   2.637  	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
   2.638 -	      | -openbsd* | -solidbsd* \
   2.639 +	      | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
   2.640  	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
   2.641  	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
   2.642  	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
   2.643  	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
   2.644 -	      | -chorusos* | -chorusrdb* | -cegcc* \
   2.645 -	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
   2.646 -	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
   2.647 -	      | -uxpv* | -beos* | -mpeix* | -udk* \
   2.648 +	      | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
   2.649 +	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
   2.650 +	      | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
   2.651 +	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
   2.652 +	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
   2.653  	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
   2.654  	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
   2.655  	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
   2.656  	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
   2.657  	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
   2.658  	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
   2.659 -	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
   2.660 +	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
   2.661 +	      | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
   2.662  	# Remember, each alternative MUST END IN *, to match a version number.
   2.663  		;;
   2.664  	-qnx*)
   2.665 @@ -1336,7 +1456,7 @@
   2.666  	-opened*)
   2.667  		os=-openedition
   2.668  		;;
   2.669 -        -os400*)
   2.670 +	-os400*)
   2.671  		os=-os400
   2.672  		;;
   2.673  	-wince*)
   2.674 @@ -1385,7 +1505,7 @@
   2.675  	-sinix*)
   2.676  		os=-sysv4
   2.677  		;;
   2.678 -        -tpf*)
   2.679 +	-tpf*)
   2.680  		os=-tpf
   2.681  		;;
   2.682  	-triton*)
   2.683 @@ -1421,15 +1541,16 @@
   2.684  	-aros*)
   2.685  		os=-aros
   2.686  		;;
   2.687 -	-kaos*)
   2.688 -		os=-kaos
   2.689 -		;;
   2.690  	-zvmoe)
   2.691  		os=-zvmoe
   2.692  		;;
   2.693  	-dicos*)
   2.694  		os=-dicos
   2.695  		;;
   2.696 +	-nacl*)
   2.697 +		;;
   2.698 +	-ios)
   2.699 +		;;
   2.700  	-none)
   2.701  		;;
   2.702  	*)
   2.703 @@ -1452,10 +1573,10 @@
   2.704  # system, and we'll never get to this point.
   2.705  
   2.706  case $basic_machine in
   2.707 -        score-*)
   2.708 +	score-*)
   2.709  		os=-elf
   2.710  		;;
   2.711 -        spu-*)
   2.712 +	spu-*)
   2.713  		os=-elf
   2.714  		;;
   2.715  	*-acorn)
   2.716 @@ -1467,8 +1588,23 @@
   2.717  	arm*-semi)
   2.718  		os=-aout
   2.719  		;;
   2.720 -        c4x-* | tic4x-*)
   2.721 -        	os=-coff
   2.722 +	c4x-* | tic4x-*)
   2.723 +		os=-coff
   2.724 +		;;
   2.725 +	c8051-*)
   2.726 +		os=-elf
   2.727 +		;;
   2.728 +	hexagon-*)
   2.729 +		os=-elf
   2.730 +		;;
   2.731 +	tic54x-*)
   2.732 +		os=-coff
   2.733 +		;;
   2.734 +	tic55x-*)
   2.735 +		os=-coff
   2.736 +		;;
   2.737 +	tic6x-*)
   2.738 +		os=-coff
   2.739  		;;
   2.740  	# This must come before the *-dec entry.
   2.741  	pdp10-*)
   2.742 @@ -1488,14 +1624,11 @@
   2.743  		;;
   2.744  	m68000-sun)
   2.745  		os=-sunos3
   2.746 -		# This also exists in the configure program, but was not the
   2.747 -		# default.
   2.748 -		# os=-sunos4
   2.749  		;;
   2.750  	m68*-cisco)
   2.751  		os=-aout
   2.752  		;;
   2.753 -        mep-*)
   2.754 +	mep-*)
   2.755  		os=-elf
   2.756  		;;
   2.757  	mips*-cisco)
   2.758 @@ -1513,6 +1646,9 @@
   2.759  	sparc-* | *-sun)
   2.760  		os=-sunos4.1.1
   2.761  		;;
   2.762 +	pru-*)
   2.763 +		os=-elf
   2.764 +		;;
   2.765  	*-be)
   2.766  		os=-beos
   2.767  		;;
   2.768 @@ -1522,7 +1658,7 @@
   2.769  	*-ibm)
   2.770  		os=-aix
   2.771  		;;
   2.772 -    	*-knuth)
   2.773 +	*-knuth)
   2.774  		os=-mmixware
   2.775  		;;
   2.776  	*-wec)