Updated config.guess and config.sub
authorSam Lantinga <slouken@libsdl.org>
Sat, 09 Sep 2017 18:57:05 -0700
changeset 498af656a0a0fb5
parent 497 8402819e7bb2
child 499 d3e819a08733
Updated config.guess and config.sub
config.guess
config.sub
     1.1 --- a/config.guess	Sat Aug 12 12:27:53 2017 -0700
     1.2 +++ b/config.guess	Sat Sep 09 18:57:05 2017 -0700
     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, 2010,
     1.8 -#   2011, 2012 Free Software Foundation, Inc.
     1.9 +#   Copyright 1992-2017 Free Software Foundation, Inc.
    1.10  
    1.11 -timestamp='2012-08-14'
    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 @@ -22,19 +20,17 @@
    1.22  # As a special exception to the GNU General Public License, if you
    1.23  # distribute this file as part of a program that contains a
    1.24  # configuration script generated by Autoconf, you may include it under
    1.25 -# the same distribution terms that you use for the rest of that program.
    1.26 -
    1.27 -
    1.28 -# Originally written by Per Bothner.  Please send patches (context
    1.29 -# diff format) to <config-patches@gnu.org> and include a ChangeLog
    1.30 -# entry.
    1.31 +# the same distribution terms that you use for the rest of that
    1.32 +# program.  This Exception is an additional permission under section 7
    1.33 +# of the GNU General Public License, version 3 ("GPLv3").
    1.34  #
    1.35 -# This script attempts to guess a canonical system name similar to
    1.36 -# config.sub.  If it succeeds, it prints the system name on stdout, and
    1.37 -# exits with 0.  Otherwise, it exits with 1.
    1.38 +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
    1.39  #
    1.40  # You can get the latest version of this script from:
    1.41 -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
    1.42 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
    1.43 +#
    1.44 +# Please send patches to <config-patches@gnu.org>.
    1.45 +
    1.46  
    1.47  me=`echo "$0" | sed -e 's,.*/,,'`
    1.48  
    1.49 @@ -54,9 +50,7 @@
    1.50  GNU config.guess ($timestamp)
    1.51  
    1.52  Originally written by Per Bothner.
    1.53 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
    1.54 -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
    1.55 -Free Software Foundation, Inc.
    1.56 +Copyright 1992-2017 Free Software Foundation, Inc.
    1.57  
    1.58  This is free software; see the source for copying conditions.  There is NO
    1.59  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    1.60 @@ -138,6 +132,27 @@
    1.61  UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
    1.62  UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
    1.63  
    1.64 +case "${UNAME_SYSTEM}" in
    1.65 +Linux|GNU|GNU/*)
    1.66 +	# If the system lacks a compiler, then just pick glibc.
    1.67 +	# We could probably try harder.
    1.68 +	LIBC=gnu
    1.69 +
    1.70 +	eval $set_cc_for_build
    1.71 +	cat <<-EOF > $dummy.c
    1.72 +	#include <features.h>
    1.73 +	#if defined(__UCLIBC__)
    1.74 +	LIBC=uclibc
    1.75 +	#elif defined(__dietlibc__)
    1.76 +	LIBC=dietlibc
    1.77 +	#else
    1.78 +	LIBC=gnu
    1.79 +	#endif
    1.80 +	EOF
    1.81 +	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
    1.82 +	;;
    1.83 +esac
    1.84 +
    1.85  # Note: order is significant - the case branches are not exclusive.
    1.86  
    1.87  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
    1.88 @@ -153,19 +168,29 @@
    1.89  	# Note: NetBSD doesn't particularly care about the vendor
    1.90  	# portion of the name.  We always set it to "unknown".
    1.91  	sysctl="sysctl -n hw.machine_arch"
    1.92 -	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
    1.93 -	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
    1.94 +	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
    1.95 +	    /sbin/$sysctl 2>/dev/null || \
    1.96 +	    /usr/sbin/$sysctl 2>/dev/null || \
    1.97 +	    echo unknown)`
    1.98  	case "${UNAME_MACHINE_ARCH}" in
    1.99  	    armeb) machine=armeb-unknown ;;
   1.100  	    arm*) machine=arm-unknown ;;
   1.101  	    sh3el) machine=shl-unknown ;;
   1.102  	    sh3eb) machine=sh-unknown ;;
   1.103  	    sh5el) machine=sh5le-unknown ;;
   1.104 +	    earmv*)
   1.105 +		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
   1.106 +		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
   1.107 +		machine=${arch}${endian}-unknown
   1.108 +		;;
   1.109  	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
   1.110  	esac
   1.111  	# The Operating System including object format, if it has switched
   1.112 -	# to ELF recently, or will in the future.
   1.113 +	# to ELF recently (or will in the future) and ABI.
   1.114  	case "${UNAME_MACHINE_ARCH}" in
   1.115 +	    earm*)
   1.116 +		os=netbsdelf
   1.117 +		;;
   1.118  	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
   1.119  		eval $set_cc_for_build
   1.120  		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
   1.121 @@ -182,6 +207,13 @@
   1.122  		os=netbsd
   1.123  		;;
   1.124  	esac
   1.125 +	# Determine ABI tags.
   1.126 +	case "${UNAME_MACHINE_ARCH}" in
   1.127 +	    earm*)
   1.128 +		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
   1.129 +		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
   1.130 +		;;
   1.131 +	esac
   1.132  	# The OS release
   1.133  	# Debian GNU/NetBSD machines have a different userland, and
   1.134  	# thus, need a distinct triplet. However, they do not need
   1.135 @@ -192,13 +224,13 @@
   1.136  		release='-gnu'
   1.137  		;;
   1.138  	    *)
   1.139 -		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
   1.140 +		release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
   1.141  		;;
   1.142  	esac
   1.143  	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
   1.144  	# contains redundant information, the shorter form:
   1.145  	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
   1.146 -	echo "${machine}-${os}${release}"
   1.147 +	echo "${machine}-${os}${release}${abi}"
   1.148  	exit ;;
   1.149      *:Bitrig:*:*)
   1.150  	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
   1.151 @@ -208,6 +240,10 @@
   1.152  	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
   1.153  	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
   1.154  	exit ;;
   1.155 +    *:LibertyBSD:*:*)
   1.156 +	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
   1.157 +	echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
   1.158 +	exit ;;
   1.159      *:ekkoBSD:*:*)
   1.160  	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
   1.161  	exit ;;
   1.162 @@ -220,6 +256,12 @@
   1.163      *:MirBSD:*:*)
   1.164  	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
   1.165  	exit ;;
   1.166 +    *:Sortix:*:*)
   1.167 +	echo ${UNAME_MACHINE}-unknown-sortix
   1.168 +	exit ;;
   1.169 +    *:Redox:*:*)
   1.170 +	echo ${UNAME_MACHINE}-unknown-redox
   1.171 +	exit ;;
   1.172      alpha:OSF1:*:*)
   1.173  	case $UNAME_RELEASE in
   1.174  	*4.0)
   1.175 @@ -236,42 +278,42 @@
   1.176  	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
   1.177  	case "$ALPHA_CPU_TYPE" in
   1.178  	    "EV4 (21064)")
   1.179 -		UNAME_MACHINE="alpha" ;;
   1.180 +		UNAME_MACHINE=alpha ;;
   1.181  	    "EV4.5 (21064)")
   1.182 -		UNAME_MACHINE="alpha" ;;
   1.183 +		UNAME_MACHINE=alpha ;;
   1.184  	    "LCA4 (21066/21068)")
   1.185 -		UNAME_MACHINE="alpha" ;;
   1.186 +		UNAME_MACHINE=alpha ;;
   1.187  	    "EV5 (21164)")
   1.188 -		UNAME_MACHINE="alphaev5" ;;
   1.189 +		UNAME_MACHINE=alphaev5 ;;
   1.190  	    "EV5.6 (21164A)")
   1.191 -		UNAME_MACHINE="alphaev56" ;;
   1.192 +		UNAME_MACHINE=alphaev56 ;;
   1.193  	    "EV5.6 (21164PC)")
   1.194 -		UNAME_MACHINE="alphapca56" ;;
   1.195 +		UNAME_MACHINE=alphapca56 ;;
   1.196  	    "EV5.7 (21164PC)")
   1.197 -		UNAME_MACHINE="alphapca57" ;;
   1.198 +		UNAME_MACHINE=alphapca57 ;;
   1.199  	    "EV6 (21264)")
   1.200 -		UNAME_MACHINE="alphaev6" ;;
   1.201 +		UNAME_MACHINE=alphaev6 ;;
   1.202  	    "EV6.7 (21264A)")
   1.203 -		UNAME_MACHINE="alphaev67" ;;
   1.204 +		UNAME_MACHINE=alphaev67 ;;
   1.205  	    "EV6.8CB (21264C)")
   1.206 -		UNAME_MACHINE="alphaev68" ;;
   1.207 +		UNAME_MACHINE=alphaev68 ;;
   1.208  	    "EV6.8AL (21264B)")
   1.209 -		UNAME_MACHINE="alphaev68" ;;
   1.210 +		UNAME_MACHINE=alphaev68 ;;
   1.211  	    "EV6.8CX (21264D)")
   1.212 -		UNAME_MACHINE="alphaev68" ;;
   1.213 +		UNAME_MACHINE=alphaev68 ;;
   1.214  	    "EV6.9A (21264/EV69A)")
   1.215 -		UNAME_MACHINE="alphaev69" ;;
   1.216 +		UNAME_MACHINE=alphaev69 ;;
   1.217  	    "EV7 (21364)")
   1.218 -		UNAME_MACHINE="alphaev7" ;;
   1.219 +		UNAME_MACHINE=alphaev7 ;;
   1.220  	    "EV7.9 (21364A)")
   1.221 -		UNAME_MACHINE="alphaev79" ;;
   1.222 +		UNAME_MACHINE=alphaev79 ;;
   1.223  	esac
   1.224  	# A Pn.n version is a patched version.
   1.225  	# A Vn.n version is a released version.
   1.226  	# A Tn.n version is a released field test version.
   1.227  	# A Xn.n version is an unreleased experimental baselevel.
   1.228  	# 1.2 uses "1.2" for uname -r.
   1.229 -	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
   1.230 +	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
   1.231  	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
   1.232  	exitcode=$?
   1.233  	trap '' 0
   1.234 @@ -306,7 +348,7 @@
   1.235      arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
   1.236  	echo arm-acorn-riscix${UNAME_RELEASE}
   1.237  	exit ;;
   1.238 -    arm:riscos:*:*|arm:RISCOS:*:*)
   1.239 +    arm*:riscos:*:*|arm*:RISCOS:*:*)
   1.240  	echo arm-unknown-riscos
   1.241  	exit ;;
   1.242      SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
   1.243 @@ -344,16 +386,16 @@
   1.244  	exit ;;
   1.245      i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
   1.246  	eval $set_cc_for_build
   1.247 -	SUN_ARCH="i386"
   1.248 +	SUN_ARCH=i386
   1.249  	# If there is a compiler, see if it is configured for 64-bit objects.
   1.250  	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
   1.251  	# This test works for both compilers.
   1.252 -	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
   1.253 +	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
   1.254  	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
   1.255 -		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
   1.256 +		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
   1.257  		grep IS_64BIT_ARCH >/dev/null
   1.258  	    then
   1.259 -		SUN_ARCH="x86_64"
   1.260 +		SUN_ARCH=x86_64
   1.261  	    fi
   1.262  	fi
   1.263  	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
   1.264 @@ -378,7 +420,7 @@
   1.265  	exit ;;
   1.266      sun*:*:4.2BSD:*)
   1.267  	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
   1.268 -	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
   1.269 +	test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
   1.270  	case "`/bin/arch`" in
   1.271  	    sun3)
   1.272  		echo m68k-sun-sunos${UNAME_RELEASE}
   1.273 @@ -564,8 +606,9 @@
   1.274  	else
   1.275  		IBM_ARCH=powerpc
   1.276  	fi
   1.277 -	if [ -x /usr/bin/oslevel ] ; then
   1.278 -		IBM_REV=`/usr/bin/oslevel`
   1.279 +	if [ -x /usr/bin/lslpp ] ; then
   1.280 +		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
   1.281 +			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
   1.282  	else
   1.283  		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
   1.284  	fi
   1.285 @@ -602,13 +645,13 @@
   1.286  		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
   1.287  		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
   1.288  		    case "${sc_cpu_version}" in
   1.289 -		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
   1.290 -		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
   1.291 +		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
   1.292 +		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
   1.293  		      532)                      # CPU_PA_RISC2_0
   1.294  			case "${sc_kernel_bits}" in
   1.295 -			  32) HP_ARCH="hppa2.0n" ;;
   1.296 -			  64) HP_ARCH="hppa2.0w" ;;
   1.297 -			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
   1.298 +			  32) HP_ARCH=hppa2.0n ;;
   1.299 +			  64) HP_ARCH=hppa2.0w ;;
   1.300 +			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
   1.301  			esac ;;
   1.302  		    esac
   1.303  		fi
   1.304 @@ -647,11 +690,11 @@
   1.305  		    exit (0);
   1.306  		}
   1.307  EOF
   1.308 -		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
   1.309 +		    (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
   1.310  		    test -z "$HP_ARCH" && HP_ARCH=hppa
   1.311  		fi ;;
   1.312  	esac
   1.313 -	if [ ${HP_ARCH} = "hppa2.0w" ]
   1.314 +	if [ ${HP_ARCH} = hppa2.0w ]
   1.315  	then
   1.316  	    eval $set_cc_for_build
   1.317  
   1.318 @@ -664,12 +707,12 @@
   1.319  	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
   1.320  	    # => hppa64-hp-hpux11.23
   1.321  
   1.322 -	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
   1.323 +	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
   1.324  		grep -q __LP64__
   1.325  	    then
   1.326 -		HP_ARCH="hppa2.0w"
   1.327 +		HP_ARCH=hppa2.0w
   1.328  	    else
   1.329 -		HP_ARCH="hppa64"
   1.330 +		HP_ARCH=hppa64
   1.331  	    fi
   1.332  	fi
   1.333  	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
   1.334 @@ -774,14 +817,14 @@
   1.335  	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   1.336  	exit ;;
   1.337      F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
   1.338 -	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
   1.339 -	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
   1.340 +	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
   1.341 +	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
   1.342  	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
   1.343  	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
   1.344  	exit ;;
   1.345      5000:UNIX_System_V:4.*:*)
   1.346 -	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
   1.347 -	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
   1.348 +	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
   1.349 +	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
   1.350  	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
   1.351  	exit ;;
   1.352      i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
   1.353 @@ -797,10 +840,11 @@
   1.354  	UNAME_PROCESSOR=`/usr/bin/uname -p`
   1.355  	case ${UNAME_PROCESSOR} in
   1.356  	    amd64)
   1.357 -		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
   1.358 -	    *)
   1.359 -		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
   1.360 +		UNAME_PROCESSOR=x86_64 ;;
   1.361 +	    i386)
   1.362 +		UNAME_PROCESSOR=i586 ;;
   1.363  	esac
   1.364 +	echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
   1.365  	exit ;;
   1.366      i*:CYGWIN*:*)
   1.367  	echo ${UNAME_MACHINE}-pc-cygwin
   1.368 @@ -811,7 +855,7 @@
   1.369      *:MINGW*:*)
   1.370  	echo ${UNAME_MACHINE}-pc-mingw32
   1.371  	exit ;;
   1.372 -    i*:MSYS*:*)
   1.373 +    *:MSYS*:*)
   1.374  	echo ${UNAME_MACHINE}-pc-msys
   1.375  	exit ;;
   1.376      i*:windows32*:*)
   1.377 @@ -859,21 +903,21 @@
   1.378  	exit ;;
   1.379      *:GNU:*:*)
   1.380  	# the GNU system
   1.381 -	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
   1.382 +	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
   1.383  	exit ;;
   1.384      *:GNU/*:*:*)
   1.385  	# other systems with GNU libc and userland
   1.386 -	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
   1.387 +	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
   1.388  	exit ;;
   1.389      i*86:Minix:*:*)
   1.390  	echo ${UNAME_MACHINE}-pc-minix
   1.391  	exit ;;
   1.392      aarch64:Linux:*:*)
   1.393 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.394 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.395  	exit ;;
   1.396      aarch64_be:Linux:*:*)
   1.397  	UNAME_MACHINE=aarch64_be
   1.398 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.399 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.400  	exit ;;
   1.401      alpha:Linux:*:*)
   1.402  	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
   1.403 @@ -886,63 +930,60 @@
   1.404  	  EV68*) UNAME_MACHINE=alphaev68 ;;
   1.405  	esac
   1.406  	objdump --private-headers /bin/sh | grep -q ld.so.1
   1.407 -	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
   1.408 -	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
   1.409 +	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
   1.410 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.411 +	exit ;;
   1.412 +    arc:Linux:*:* | arceb:Linux:*:*)
   1.413 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.414  	exit ;;
   1.415      arm*:Linux:*:*)
   1.416  	eval $set_cc_for_build
   1.417  	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
   1.418  	    | grep -q __ARM_EABI__
   1.419  	then
   1.420 -	    echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.421 +	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.422  	else
   1.423 -        case `sed -n '/^Hardware/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
   1.424 -        BCM2708) MANUFACTURER=raspberry;;
   1.425 -        *) MANUFACTURER=unknown;;
   1.426 -        esac
   1.427  	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
   1.428  		| grep -q __ARM_PCS_VFP
   1.429  	    then
   1.430 -		echo ${UNAME_MACHINE}-${MANUFACTURER}-linux-gnueabi
   1.431 +		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
   1.432  	    else
   1.433 -		echo ${UNAME_MACHINE}-${MANUFACTURER}-linux-gnueabihf
   1.434 +		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
   1.435  	    fi
   1.436  	fi
   1.437  	exit ;;
   1.438      avr32*:Linux:*:*)
   1.439 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.440 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.441  	exit ;;
   1.442      cris:Linux:*:*)
   1.443 -	echo ${UNAME_MACHINE}-axis-linux-gnu
   1.444 +	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
   1.445  	exit ;;
   1.446      crisv32:Linux:*:*)
   1.447 -	echo ${UNAME_MACHINE}-axis-linux-gnu
   1.448 +	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
   1.449 +	exit ;;
   1.450 +    e2k:Linux:*:*)
   1.451 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.452  	exit ;;
   1.453      frv:Linux:*:*)
   1.454 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.455 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.456  	exit ;;
   1.457      hexagon:Linux:*:*)
   1.458 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.459 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.460  	exit ;;
   1.461      i*86:Linux:*:*)
   1.462 -	LIBC=gnu
   1.463 -	eval $set_cc_for_build
   1.464 -	sed 's/^	//' << EOF >$dummy.c
   1.465 -	#ifdef __dietlibc__
   1.466 -	LIBC=dietlibc
   1.467 -	#endif
   1.468 -EOF
   1.469 -	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
   1.470 -	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
   1.471 +	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
   1.472  	exit ;;
   1.473      ia64:Linux:*:*)
   1.474 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.475 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.476 +	exit ;;
   1.477 +    k1om:Linux:*:*)
   1.478 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.479  	exit ;;
   1.480      m32r*:Linux:*:*)
   1.481 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.482 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.483  	exit ;;
   1.484      m68*:Linux:*:*)
   1.485 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.486 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.487  	exit ;;
   1.488      mips:Linux:*:* | mips64:Linux:*:*)
   1.489  	eval $set_cc_for_build
   1.490 @@ -961,54 +1002,69 @@
   1.491  	#endif
   1.492  EOF
   1.493  	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
   1.494 -	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
   1.495 +	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
   1.496  	;;
   1.497 -    or32:Linux:*:*)
   1.498 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.499 +    mips64el:Linux:*:*)
   1.500 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.501 +	exit ;;
   1.502 +    openrisc*:Linux:*:*)
   1.503 +	echo or1k-unknown-linux-${LIBC}
   1.504 +	exit ;;
   1.505 +    or32:Linux:*:* | or1k*:Linux:*:*)
   1.506 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.507  	exit ;;
   1.508      padre:Linux:*:*)
   1.509 -	echo sparc-unknown-linux-gnu
   1.510 +	echo sparc-unknown-linux-${LIBC}
   1.511  	exit ;;
   1.512      parisc64:Linux:*:* | hppa64:Linux:*:*)
   1.513 -	echo hppa64-unknown-linux-gnu
   1.514 +	echo hppa64-unknown-linux-${LIBC}
   1.515  	exit ;;
   1.516      parisc:Linux:*:* | hppa:Linux:*:*)
   1.517  	# Look for CPU level
   1.518  	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
   1.519 -	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
   1.520 -	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
   1.521 -	  *)    echo hppa-unknown-linux-gnu ;;
   1.522 +	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
   1.523 +	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
   1.524 +	  *)    echo hppa-unknown-linux-${LIBC} ;;
   1.525  	esac
   1.526  	exit ;;
   1.527      ppc64:Linux:*:*)
   1.528 -	echo powerpc64-unknown-linux-gnu
   1.529 +	echo powerpc64-unknown-linux-${LIBC}
   1.530  	exit ;;
   1.531      ppc:Linux:*:*)
   1.532 -	echo powerpc-unknown-linux-gnu
   1.533 +	echo powerpc-unknown-linux-${LIBC}
   1.534 +	exit ;;
   1.535 +    ppc64le:Linux:*:*)
   1.536 +	echo powerpc64le-unknown-linux-${LIBC}
   1.537 +	exit ;;
   1.538 +    ppcle:Linux:*:*)
   1.539 +	echo powerpcle-unknown-linux-${LIBC}
   1.540 +	exit ;;
   1.541 +    riscv32:Linux:*:* | riscv64:Linux:*:*)
   1.542 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.543  	exit ;;
   1.544      s390:Linux:*:* | s390x:Linux:*:*)
   1.545 -	echo ${UNAME_MACHINE}-ibm-linux
   1.546 +	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
   1.547  	exit ;;
   1.548      sh64*:Linux:*:*)
   1.549 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.550 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.551  	exit ;;
   1.552      sh*:Linux:*:*)
   1.553 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.554 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.555  	exit ;;
   1.556      sparc:Linux:*:* | sparc64:Linux:*:*)
   1.557 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.558 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.559  	exit ;;
   1.560      tile*:Linux:*:*)
   1.561 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.562 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.563  	exit ;;
   1.564      vax:Linux:*:*)
   1.565 -	echo ${UNAME_MACHINE}-dec-linux-gnu
   1.566 +	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
   1.567  	exit ;;
   1.568      x86_64:Linux:*:*)
   1.569 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.570 +	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
   1.571  	exit ;;
   1.572      xtensa*:Linux:*:*)
   1.573 -	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.574 +	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1.575  	exit ;;
   1.576      i*86:DYNIX/ptx:4*:*)
   1.577  	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
   1.578 @@ -1084,7 +1140,7 @@
   1.579  	# uname -m prints for DJGPP always 'pc', but it prints nothing about
   1.580  	# the processor, so we play safe by assuming i586.
   1.581  	# Note: whatever this is, it MUST be the same as what config.sub
   1.582 -	# prints for the "djgpp" host, or else GDB configury will decide that
   1.583 +	# prints for the "djgpp" host, or else GDB configure will decide that
   1.584  	# this is a cross-build.
   1.585  	echo i586-pc-msdosdjgpp
   1.586  	exit ;;
   1.587 @@ -1233,6 +1289,9 @@
   1.588      SX-8R:SUPER-UX:*:*)
   1.589  	echo sx8r-nec-superux${UNAME_RELEASE}
   1.590  	exit ;;
   1.591 +    SX-ACE:SUPER-UX:*:*)
   1.592 +	echo sxace-nec-superux${UNAME_RELEASE}
   1.593 +	exit ;;
   1.594      Power*:Rhapsody:*:*)
   1.595  	echo powerpc-apple-rhapsody${UNAME_RELEASE}
   1.596  	exit ;;
   1.597 @@ -1241,24 +1300,43 @@
   1.598  	exit ;;
   1.599      *:Darwin:*:*)
   1.600  	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
   1.601 -	case $UNAME_PROCESSOR in
   1.602 -	    i386)
   1.603 -		eval $set_cc_for_build
   1.604 -		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
   1.605 -		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
   1.606 -		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
   1.607 -		      grep IS_64BIT_ARCH >/dev/null
   1.608 -		  then
   1.609 -		      UNAME_PROCESSOR="x86_64"
   1.610 -		  fi
   1.611 -		fi ;;
   1.612 -	    unknown) UNAME_PROCESSOR=powerpc ;;
   1.613 -	esac
   1.614 +	eval $set_cc_for_build
   1.615 +	if test "$UNAME_PROCESSOR" = unknown ; then
   1.616 +	    UNAME_PROCESSOR=powerpc
   1.617 +	fi
   1.618 +	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
   1.619 +	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
   1.620 +		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
   1.621 +		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
   1.622 +		       grep IS_64BIT_ARCH >/dev/null
   1.623 +		then
   1.624 +		    case $UNAME_PROCESSOR in
   1.625 +			i386) UNAME_PROCESSOR=x86_64 ;;
   1.626 +			powerpc) UNAME_PROCESSOR=powerpc64 ;;
   1.627 +		    esac
   1.628 +		fi
   1.629 +		# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
   1.630 +		if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
   1.631 +		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
   1.632 +		       grep IS_PPC >/dev/null
   1.633 +		then
   1.634 +		    UNAME_PROCESSOR=powerpc
   1.635 +		fi
   1.636 +	    fi
   1.637 +	elif test "$UNAME_PROCESSOR" = i386 ; then
   1.638 +	    # Avoid executing cc on OS X 10.9, as it ships with a stub
   1.639 +	    # that puts up a graphical alert prompting to install
   1.640 +	    # developer tools.  Any system running Mac OS X 10.7 or
   1.641 +	    # later (Darwin 11 and later) is required to have a 64-bit
   1.642 +	    # processor. This is not true of the ARM version of Darwin
   1.643 +	    # that Apple uses in portable devices.
   1.644 +	    UNAME_PROCESSOR=x86_64
   1.645 +	fi
   1.646  	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
   1.647  	exit ;;
   1.648      *:procnto*:*:* | *:QNX:[0123456789]*:*)
   1.649  	UNAME_PROCESSOR=`uname -p`
   1.650 -	if test "$UNAME_PROCESSOR" = "x86"; then
   1.651 +	if test "$UNAME_PROCESSOR" = x86; then
   1.652  		UNAME_PROCESSOR=i386
   1.653  		UNAME_MACHINE=pc
   1.654  	fi
   1.655 @@ -1267,15 +1345,18 @@
   1.656      *:QNX:*:4*)
   1.657  	echo i386-pc-qnx
   1.658  	exit ;;
   1.659 -    NEO-?:NONSTOP_KERNEL:*:*)
   1.660 +    NEO-*:NONSTOP_KERNEL:*:*)
   1.661  	echo neo-tandem-nsk${UNAME_RELEASE}
   1.662  	exit ;;
   1.663      NSE-*:NONSTOP_KERNEL:*:*)
   1.664  	echo nse-tandem-nsk${UNAME_RELEASE}
   1.665  	exit ;;
   1.666 -    NSR-?:NONSTOP_KERNEL:*:*)
   1.667 +    NSR-*:NONSTOP_KERNEL:*:*)
   1.668  	echo nsr-tandem-nsk${UNAME_RELEASE}
   1.669  	exit ;;
   1.670 +    NSX-*:NONSTOP_KERNEL:*:*)
   1.671 +	echo nsx-tandem-nsk${UNAME_RELEASE}
   1.672 +	exit ;;
   1.673      *:NonStop-UX:*:*)
   1.674  	echo mips-compaq-nonstopux
   1.675  	exit ;;
   1.676 @@ -1289,7 +1370,7 @@
   1.677  	# "uname -m" is not consistent, so use $cputype instead. 386
   1.678  	# is converted to i386 for consistency with other x86
   1.679  	# operating systems.
   1.680 -	if test "$cputype" = "386"; then
   1.681 +	if test "$cputype" = 386; then
   1.682  	    UNAME_MACHINE=i386
   1.683  	else
   1.684  	    UNAME_MACHINE="$cputype"
   1.685 @@ -1331,7 +1412,7 @@
   1.686  	echo i386-pc-xenix
   1.687  	exit ;;
   1.688      i*86:skyos:*:*)
   1.689 -	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
   1.690 +	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
   1.691  	exit ;;
   1.692      i*86:rdos:*:*)
   1.693  	echo ${UNAME_MACHINE}-pc-rdos
   1.694 @@ -1342,171 +1423,25 @@
   1.695      x86_64:VMkernel:*:*)
   1.696  	echo ${UNAME_MACHINE}-unknown-esx
   1.697  	exit ;;
   1.698 +    amd64:Isilon\ OneFS:*:*)
   1.699 +	echo x86_64-unknown-onefs
   1.700 +	exit ;;
   1.701  esac
   1.702  
   1.703 -eval $set_cc_for_build
   1.704 -cat >$dummy.c <<EOF
   1.705 -#ifdef _SEQUENT_
   1.706 -# include <sys/types.h>
   1.707 -# include <sys/utsname.h>
   1.708 -#endif
   1.709 -main ()
   1.710 -{
   1.711 -#if defined (sony)
   1.712 -#if defined (MIPSEB)
   1.713 -  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
   1.714 -     I don't know....  */
   1.715 -  printf ("mips-sony-bsd\n"); exit (0);
   1.716 -#else
   1.717 -#include <sys/param.h>
   1.718 -  printf ("m68k-sony-newsos%s\n",
   1.719 -#ifdef NEWSOS4
   1.720 -	"4"
   1.721 -#else
   1.722 -	""
   1.723 -#endif
   1.724 -	); exit (0);
   1.725 -#endif
   1.726 -#endif
   1.727 -
   1.728 -#if defined (__arm) && defined (__acorn) && defined (__unix)
   1.729 -  printf ("arm-acorn-riscix\n"); exit (0);
   1.730 -#endif
   1.731 -
   1.732 -#if defined (hp300) && !defined (hpux)
   1.733 -  printf ("m68k-hp-bsd\n"); exit (0);
   1.734 -#endif
   1.735 -
   1.736 -#if defined (NeXT)
   1.737 -#if !defined (__ARCHITECTURE__)
   1.738 -#define __ARCHITECTURE__ "m68k"
   1.739 -#endif
   1.740 -  int version;
   1.741 -  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
   1.742 -  if (version < 4)
   1.743 -    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
   1.744 -  else
   1.745 -    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
   1.746 -  exit (0);
   1.747 -#endif
   1.748 -
   1.749 -#if defined (MULTIMAX) || defined (n16)
   1.750 -#if defined (UMAXV)
   1.751 -  printf ("ns32k-encore-sysv\n"); exit (0);
   1.752 -#else
   1.753 -#if defined (CMU)
   1.754 -  printf ("ns32k-encore-mach\n"); exit (0);
   1.755 -#else
   1.756 -  printf ("ns32k-encore-bsd\n"); exit (0);
   1.757 -#endif
   1.758 -#endif
   1.759 -#endif
   1.760 -
   1.761 -#if defined (__386BSD__)
   1.762 -  printf ("i386-pc-bsd\n"); exit (0);
   1.763 -#endif
   1.764 -
   1.765 -#if defined (sequent)
   1.766 -#if defined (i386)
   1.767 -  printf ("i386-sequent-dynix\n"); exit (0);
   1.768 -#endif
   1.769 -#if defined (ns32000)
   1.770 -  printf ("ns32k-sequent-dynix\n"); exit (0);
   1.771 -#endif
   1.772 -#endif
   1.773 -
   1.774 -#if defined (_SEQUENT_)
   1.775 -    struct utsname un;
   1.776 -
   1.777 -    uname(&un);
   1.778 -
   1.779 -    if (strncmp(un.version, "V2", 2) == 0) {
   1.780 -	printf ("i386-sequent-ptx2\n"); exit (0);
   1.781 -    }
   1.782 -    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
   1.783 -	printf ("i386-sequent-ptx1\n"); exit (0);
   1.784 -    }
   1.785 -    printf ("i386-sequent-ptx\n"); exit (0);
   1.786 -
   1.787 -#endif
   1.788 -
   1.789 -#if defined (vax)
   1.790 -# if !defined (ultrix)
   1.791 -#  include <sys/param.h>
   1.792 -#  if defined (BSD)
   1.793 -#   if BSD == 43
   1.794 -      printf ("vax-dec-bsd4.3\n"); exit (0);
   1.795 -#   else
   1.796 -#    if BSD == 199006
   1.797 -      printf ("vax-dec-bsd4.3reno\n"); exit (0);
   1.798 -#    else
   1.799 -      printf ("vax-dec-bsd\n"); exit (0);
   1.800 -#    endif
   1.801 -#   endif
   1.802 -#  else
   1.803 -    printf ("vax-dec-bsd\n"); exit (0);
   1.804 -#  endif
   1.805 -# else
   1.806 -    printf ("vax-dec-ultrix\n"); exit (0);
   1.807 -# endif
   1.808 -#endif
   1.809 -
   1.810 -#if defined (alliant) && defined (i860)
   1.811 -  printf ("i860-alliant-bsd\n"); exit (0);
   1.812 -#endif
   1.813 -
   1.814 -  exit (1);
   1.815 -}
   1.816 -EOF
   1.817 -
   1.818 -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
   1.819 -	{ echo "$SYSTEM_NAME"; exit; }
   1.820 -
   1.821 -# Apollos put the system type in the environment.
   1.822 -
   1.823 -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
   1.824 -
   1.825 -# Convex versions that predate uname can use getsysinfo(1)
   1.826 -
   1.827 -if [ -x /usr/convex/getsysinfo ]
   1.828 -then
   1.829 -    case `getsysinfo -f cpu_type` in
   1.830 -    c1*)
   1.831 -	echo c1-convex-bsd
   1.832 -	exit ;;
   1.833 -    c2*)
   1.834 -	if getsysinfo -f scalar_acc
   1.835 -	then echo c32-convex-bsd
   1.836 -	else echo c2-convex-bsd
   1.837 -	fi
   1.838 -	exit ;;
   1.839 -    c34*)
   1.840 -	echo c34-convex-bsd
   1.841 -	exit ;;
   1.842 -    c38*)
   1.843 -	echo c38-convex-bsd
   1.844 -	exit ;;
   1.845 -    c4*)
   1.846 -	echo c4-convex-bsd
   1.847 -	exit ;;
   1.848 -    esac
   1.849 -fi
   1.850 -
   1.851  cat >&2 <<EOF
   1.852  $0: unable to guess system type
   1.853  
   1.854 -This script, last modified $timestamp, has failed to recognize
   1.855 -the operating system you are using. It is advised that you
   1.856 -download the most up to date version of the config scripts from
   1.857 +This script (version $timestamp), has failed to recognize the
   1.858 +operating system you are using. If your script is old, overwrite *all*
   1.859 +copies of config.guess and config.sub with the latest versions from:
   1.860  
   1.861 -  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
   1.862 +  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
   1.863  and
   1.864 -  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
   1.865 +  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
   1.866  
   1.867 -If the version you run ($0) is already up to date, please
   1.868 -send the following data and any information you think might be
   1.869 -pertinent to <config-patches@gnu.org> in order to provide the needed
   1.870 -information to handle your system.
   1.871 +If $0 has already been updated, send the following data and any
   1.872 +information you think might be pertinent to config-patches@gnu.org to
   1.873 +provide the necessary information to handle your system.
   1.874  
   1.875  config.guess timestamp = $timestamp
   1.876  
     2.1 --- a/config.sub	Sat Aug 12 12:27:53 2017 -0700
     2.2 +++ b/config.sub	Sat Sep 09 18:57:05 2017 -0700
     2.3 @@ -1,24 +1,18 @@
     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, 2010,
     2.8 -#   2011, 2012 Free Software Foundation, Inc.
     2.9 +#   Copyright 1992-2017 Free Software Foundation, Inc.
    2.10  
    2.11 -timestamp='2012-08-18'
    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, see <http://www.gnu.org/licenses/>.
    2.37 @@ -26,11 +20,12 @@
    2.38  # As a special exception to the GNU General Public License, if you
    2.39  # distribute this file as part of a program that contains a
    2.40  # configuration script generated by Autoconf, you may include it under
    2.41 -# the same distribution terms that you use for the rest of that program.
    2.42 +# the same distribution terms that you use for the rest of that
    2.43 +# program.  This Exception is an additional permission under section 7
    2.44 +# of the GNU General Public License, version 3 ("GPLv3").
    2.45  
    2.46  
    2.47 -# Please send patches to <config-patches@gnu.org>.  Submit a context
    2.48 -# diff and a properly formatted GNU ChangeLog entry.
    2.49 +# Please send patches to <config-patches@gnu.org>.
    2.50  #
    2.51  # Configuration subroutine to validate and canonicalize a configuration type.
    2.52  # Supply the specified configuration type as an argument.
    2.53 @@ -38,7 +33,7 @@
    2.54  # Otherwise, we print the canonical config type on stdout and succeed.
    2.55  
    2.56  # You can get the latest version of this script from:
    2.57 -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
    2.58 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
    2.59  
    2.60  # This file is supposed to be the same for all GNU packages
    2.61  # and recognize all the CPU types, system types and aliases
    2.62 @@ -58,8 +53,7 @@
    2.63  me=`echo "$0" | sed -e 's,.*/,,'`
    2.64  
    2.65  usage="\
    2.66 -Usage: $0 [OPTION] CPU-MFR-OPSYS
    2.67 -       $0 [OPTION] ALIAS
    2.68 +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
    2.69  
    2.70  Canonicalize a configuration name.
    2.71  
    2.72 @@ -73,9 +67,7 @@
    2.73  version="\
    2.74  GNU config.sub ($timestamp)
    2.75  
    2.76 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
    2.77 -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
    2.78 -Free Software Foundation, Inc.
    2.79 +Copyright 1992-2017 Free Software Foundation, Inc.
    2.80  
    2.81  This is free software; see the source for copying conditions.  There is NO
    2.82  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    2.83 @@ -124,8 +116,8 @@
    2.84  case $maybe_os in
    2.85    nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
    2.86    linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
    2.87 -  knetbsd*-gnu* | netbsd*-gnu* | \
    2.88 -  kopensolaris*-gnu* | \
    2.89 +  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
    2.90 +  kopensolaris*-gnu* | cloudabi*-eabi* | \
    2.91    storm-chaos* | os2-emx* | rtmk-nova*)
    2.92      os=-$maybe_os
    2.93      basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
    2.94 @@ -156,7 +148,7 @@
    2.95  	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
    2.96  	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
    2.97  	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
    2.98 -	-apple | -axis | -knuth | -cray | -microblaze)
    2.99 +	-apple | -axis | -knuth | -cray | -microblaze*)
   2.100  		os=
   2.101  		basic_machine=$1
   2.102  		;;
   2.103 @@ -259,21 +251,25 @@
   2.104  	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
   2.105  	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
   2.106  	| am33_2.0 \
   2.107 -	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
   2.108 -        | be32 | be64 \
   2.109 +	| arc | arceb \
   2.110 +	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
   2.111 +	| avr | avr32 \
   2.112 +	| ba \
   2.113 +	| be32 | be64 \
   2.114  	| bfin \
   2.115 -	| c4x | clipper \
   2.116 +	| c4x | c8051 | clipper \
   2.117  	| d10v | d30v | dlx | dsp16xx \
   2.118 -	| epiphany \
   2.119 -	| fido | fr30 | frv \
   2.120 +	| e2k | epiphany \
   2.121 +	| fido | fr30 | frv | ft32 \
   2.122  	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
   2.123  	| hexagon \
   2.124 -	| i370 | i860 | i960 | ia64 \
   2.125 +	| i370 | i860 | i960 | ia16 | ia64 \
   2.126  	| ip2k | iq2000 \
   2.127 +	| k1om \
   2.128  	| le32 | le64 \
   2.129  	| lm32 \
   2.130  	| m32c | m32r | m32rle | m68000 | m68k | m88k \
   2.131 -	| maxq | mb | microblaze | mcore | mep | metag \
   2.132 +	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
   2.133  	| mips | mipsbe | mipseb | mipsel | mipsle \
   2.134  	| mips16 \
   2.135  	| mips64 | mips64el \
   2.136 @@ -287,26 +283,30 @@
   2.137  	| mips64vr5900 | mips64vr5900el \
   2.138  	| mipsisa32 | mipsisa32el \
   2.139  	| mipsisa32r2 | mipsisa32r2el \
   2.140 +	| mipsisa32r6 | mipsisa32r6el \
   2.141  	| mipsisa64 | mipsisa64el \
   2.142  	| mipsisa64r2 | mipsisa64r2el \
   2.143 +	| mipsisa64r6 | mipsisa64r6el \
   2.144  	| mipsisa64sb1 | mipsisa64sb1el \
   2.145  	| mipsisa64sr71k | mipsisa64sr71kel \
   2.146 +	| mipsr5900 | mipsr5900el \
   2.147  	| mipstx39 | mipstx39el \
   2.148  	| mn10200 | mn10300 \
   2.149  	| moxie \
   2.150  	| mt \
   2.151  	| msp430 \
   2.152  	| nds32 | nds32le | nds32be \
   2.153 -	| nios | nios2 \
   2.154 +	| nios | nios2 | nios2eb | nios2el \
   2.155  	| ns16k | ns32k \
   2.156 -	| open8 \
   2.157 -	| or32 \
   2.158 +	| open8 | or1k | or1knd | or32 \
   2.159  	| pdp10 | pdp11 | pj | pjl \
   2.160  	| powerpc | powerpc64 | powerpc64le | powerpcle \
   2.161 +	| pru \
   2.162  	| pyramid \
   2.163 +	| riscv32 | riscv64 \
   2.164  	| rl78 | rx \
   2.165  	| score \
   2.166 -	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
   2.167 +	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
   2.168  	| sh64 | sh64le \
   2.169  	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
   2.170  	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
   2.171 @@ -314,6 +314,8 @@
   2.172  	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
   2.173  	| ubicom32 \
   2.174  	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
   2.175 +	| visium \
   2.176 +	| wasm32 \
   2.177  	| we32k \
   2.178  	| x86 | xc16x | xstormy16 | xtensa \
   2.179  	| z8k | z80)
   2.180 @@ -328,7 +330,10 @@
   2.181  	c6x)
   2.182  		basic_machine=tic6x-unknown
   2.183  		;;
   2.184 -	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
   2.185 +	leon|leon[3-9])
   2.186 +		basic_machine=sparc-$basic_machine
   2.187 +		;;
   2.188 +	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
   2.189  		basic_machine=$basic_machine-unknown
   2.190  		os=-none
   2.191  		;;
   2.192 @@ -383,26 +388,29 @@
   2.193  	| aarch64-* | aarch64_be-* \
   2.194  	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
   2.195  	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
   2.196 -	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
   2.197 +	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
   2.198  	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
   2.199  	| avr-* | avr32-* \
   2.200 +	| ba-* \
   2.201  	| be32-* | be64-* \
   2.202  	| bfin-* | bs2000-* \
   2.203  	| c[123]* | c30-* | [cjt]90-* | c4x-* \
   2.204 -	| clipper-* | craynv-* | cydra-* \
   2.205 +	| c8051-* | clipper-* | craynv-* | cydra-* \
   2.206  	| d10v-* | d30v-* | dlx-* \
   2.207 -	| elxsi-* \
   2.208 +	| e2k-* | elxsi-* \
   2.209  	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
   2.210  	| h8300-* | h8500-* \
   2.211  	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
   2.212  	| hexagon-* \
   2.213 -	| i*86-* | i860-* | i960-* | ia64-* \
   2.214 +	| i*86-* | i860-* | i960-* | ia16-* | ia64-* \
   2.215  	| ip2k-* | iq2000-* \
   2.216 +	| k1om-* \
   2.217  	| le32-* | le64-* \
   2.218  	| lm32-* \
   2.219  	| m32c-* | m32r-* | m32rle-* \
   2.220  	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
   2.221 -	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
   2.222 +	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
   2.223 +	| microblaze-* | microblazeel-* \
   2.224  	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
   2.225  	| mips16-* \
   2.226  	| mips64-* | mips64el-* \
   2.227 @@ -416,28 +424,34 @@
   2.228  	| mips64vr5900-* | mips64vr5900el-* \
   2.229  	| mipsisa32-* | mipsisa32el-* \
   2.230  	| mipsisa32r2-* | mipsisa32r2el-* \
   2.231 +	| mipsisa32r6-* | mipsisa32r6el-* \
   2.232  	| mipsisa64-* | mipsisa64el-* \
   2.233  	| mipsisa64r2-* | mipsisa64r2el-* \
   2.234 +	| mipsisa64r6-* | mipsisa64r6el-* \
   2.235  	| mipsisa64sb1-* | mipsisa64sb1el-* \
   2.236  	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
   2.237 +	| mipsr5900-* | mipsr5900el-* \
   2.238  	| mipstx39-* | mipstx39el-* \
   2.239  	| mmix-* \
   2.240  	| mt-* \
   2.241  	| msp430-* \
   2.242  	| nds32-* | nds32le-* | nds32be-* \
   2.243 -	| nios-* | nios2-* \
   2.244 +	| nios-* | nios2-* | nios2eb-* | nios2el-* \
   2.245  	| none-* | np1-* | ns16k-* | ns32k-* \
   2.246  	| open8-* \
   2.247 +	| or1k*-* \
   2.248  	| orion-* \
   2.249  	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
   2.250  	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
   2.251 +	| pru-* \
   2.252  	| pyramid-* \
   2.253 +	| riscv32-* | riscv64-* \
   2.254  	| rl78-* | romp-* | rs6000-* | rx-* \
   2.255  	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
   2.256  	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
   2.257  	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
   2.258  	| sparclite-* \
   2.259 -	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
   2.260 +	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
   2.261  	| tahoe-* \
   2.262  	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
   2.263  	| tile*-* \
   2.264 @@ -445,6 +459,8 @@
   2.265  	| ubicom32-* \
   2.266  	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
   2.267  	| vax-* \
   2.268 +	| visium-* \
   2.269 +	| wasm32-* \
   2.270  	| we32k-* \
   2.271  	| x86-* | x86_64-* | xc16x-* | xps100-* \
   2.272  	| xstormy16-* | xtensa*-* \
   2.273 @@ -521,6 +537,9 @@
   2.274  		basic_machine=i386-pc
   2.275  		os=-aros
   2.276  		;;
   2.277 +	asmjs)
   2.278 +		basic_machine=asmjs-unknown
   2.279 +		;;
   2.280  	aux)
   2.281  		basic_machine=m68k-apple
   2.282  		os=-aux
   2.283 @@ -641,6 +660,14 @@
   2.284  		basic_machine=m68k-bull
   2.285  		os=-sysv3
   2.286  		;;
   2.287 +	e500v[12])
   2.288 +		basic_machine=powerpc-unknown
   2.289 +		os=$os"spe"
   2.290 +		;;
   2.291 +	e500v[12]-*)
   2.292 +		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
   2.293 +		os=$os"spe"
   2.294 +		;;
   2.295  	ebmon29k)
   2.296  		basic_machine=a29k-amd
   2.297  		os=-ebmon
   2.298 @@ -782,6 +809,9 @@
   2.299  		basic_machine=m68k-isi
   2.300  		os=-sysv
   2.301  		;;
   2.302 +	leon-*|leon[3-9]-*)
   2.303 +		basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
   2.304 +		;;
   2.305  	m68knommu)
   2.306  		basic_machine=m68k-unknown
   2.307  		os=-linux
   2.308 @@ -801,7 +831,7 @@
   2.309  		basic_machine=ns32k-utek
   2.310  		os=-sysv
   2.311  		;;
   2.312 -	microblaze)
   2.313 +	microblaze*)
   2.314  		basic_machine=microblaze-xilinx
   2.315  		;;
   2.316  	mingw64)
   2.317 @@ -809,7 +839,7 @@
   2.318  		os=-mingw64
   2.319  		;;
   2.320  	mingw32)
   2.321 -		basic_machine=i386-pc
   2.322 +		basic_machine=i686-pc
   2.323  		os=-mingw32
   2.324  		;;
   2.325  	mingw32ce)
   2.326 @@ -837,6 +867,10 @@
   2.327  		basic_machine=powerpc-unknown
   2.328  		os=-morphos
   2.329  		;;
   2.330 +	moxiebox)
   2.331 +		basic_machine=moxie-unknown
   2.332 +		os=-moxiebox
   2.333 +		;;
   2.334  	msdos)
   2.335  		basic_machine=i386-pc
   2.336  		os=-msdos
   2.337 @@ -845,7 +879,7 @@
   2.338  		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
   2.339  		;;
   2.340  	msys)
   2.341 -		basic_machine=i386-pc
   2.342 +		basic_machine=i686-pc
   2.343  		os=-msys
   2.344  		;;
   2.345  	mvs)
   2.346 @@ -933,6 +967,9 @@
   2.347  	nsr-tandem)
   2.348  		basic_machine=nsr-tandem
   2.349  		;;
   2.350 +	nsx-tandem)
   2.351 +		basic_machine=nsx-tandem
   2.352 +		;;
   2.353  	op50n-* | op60c-*)
   2.354  		basic_machine=hppa1.1-oki
   2.355  		os=-proelf
   2.356 @@ -1017,7 +1054,7 @@
   2.357  	ppc-* | ppcbe-*)
   2.358  		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
   2.359  		;;
   2.360 -	ppcle | powerpclittle | ppc-le | powerpc-little)
   2.361 +	ppcle | powerpclittle)
   2.362  		basic_machine=powerpcle-unknown
   2.363  		;;
   2.364  	ppcle-* | powerpclittle-*)
   2.365 @@ -1027,7 +1064,7 @@
   2.366  		;;
   2.367  	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
   2.368  		;;
   2.369 -	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
   2.370 +	ppc64le | powerpc64little)
   2.371  		basic_machine=powerpc64le-unknown
   2.372  		;;
   2.373  	ppc64le-* | powerpc64little-*)
   2.374 @@ -1040,7 +1077,11 @@
   2.375  		basic_machine=i586-unknown
   2.376  		os=-pw32
   2.377  		;;
   2.378 -	rdos)
   2.379 +	rdos | rdos64)
   2.380 +		basic_machine=x86_64-pc
   2.381 +		os=-rdos
   2.382 +		;;
   2.383 +	rdos32)
   2.384  		basic_machine=i386-pc
   2.385  		os=-rdos
   2.386  		;;
   2.387 @@ -1224,6 +1265,9 @@
   2.388  		basic_machine=a29k-wrs
   2.389  		os=-vxworks
   2.390  		;;
   2.391 +	wasm32)
   2.392 +		basic_machine=wasm32-unknown
   2.393 +		;;
   2.394  	w65*)
   2.395  		basic_machine=w65-wdc
   2.396  		os=-none
   2.397 @@ -1367,29 +1411,30 @@
   2.398  	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
   2.399  	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
   2.400  	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
   2.401 -	      | -sym* | -kopensolaris* \
   2.402 +	      | -sym* | -kopensolaris* | -plan9* \
   2.403  	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
   2.404 -	      | -aos* | -aros* \
   2.405 +	      | -aos* | -aros* | -cloudabi* | -sortix* \
   2.406  	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
   2.407  	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
   2.408  	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
   2.409 -	      | -bitrig* | -openbsd* | -solidbsd* \
   2.410 +	      | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
   2.411  	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
   2.412  	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
   2.413  	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
   2.414  	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
   2.415 -	      | -chorusos* | -chorusrdb* | -cegcc* \
   2.416 +	      | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
   2.417  	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
   2.418 -	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
   2.419 +	      | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
   2.420  	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
   2.421 -	      | -uxpv* | -beos* | -mpeix* | -udk* \
   2.422 +	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
   2.423  	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
   2.424  	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
   2.425  	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
   2.426  	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
   2.427  	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
   2.428  	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
   2.429 -	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
   2.430 +	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
   2.431 +	      | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
   2.432  	# Remember, each alternative MUST END IN *, to match a version number.
   2.433  		;;
   2.434  	-qnx*)
   2.435 @@ -1437,6 +1482,9 @@
   2.436  	-os400*)
   2.437  		os=-os400
   2.438  		;;
   2.439 +	-cegcc*)
   2.440 +		os=-cegcc
   2.441 +		;;
   2.442  	-wince*)
   2.443  		os=-wince
   2.444  		;;
   2.445 @@ -1519,9 +1567,6 @@
   2.446  	-aros*)
   2.447  		os=-aros
   2.448  		;;
   2.449 -	-kaos*)
   2.450 -		os=-kaos
   2.451 -		;;
   2.452  	-zvmoe)
   2.453  		os=-zvmoe
   2.454  		;;
   2.455 @@ -1534,6 +1579,10 @@
   2.456  	-pnacl*)
   2.457  		os=-pnacl
   2.458  		;;
   2.459 +	-ios)
   2.460 +		;;
   2.461 +	-emscripten*)
   2.462 +		;;
   2.463  	-none)
   2.464  		;;
   2.465  	*)
   2.466 @@ -1574,6 +1623,9 @@
   2.467  	c4x-* | tic4x-*)
   2.468  		os=-coff
   2.469  		;;
   2.470 +	c8051-*)
   2.471 +		os=-elf
   2.472 +		;;
   2.473  	hexagon-*)
   2.474  		os=-elf
   2.475  		;;
   2.476 @@ -1626,6 +1678,9 @@
   2.477  	sparc-* | *-sun)
   2.478  		os=-sunos4.1.1
   2.479  		;;
   2.480 +	pru-*)
   2.481 +		os=-elf
   2.482 +		;;
   2.483  	*-be)
   2.484  		os=-beos
   2.485  		;;