Commit 2038d79747f7f32b00181e19f8c06345cd25ea01

Authored by Perry Werneck
1 parent 998dbbc7

Atualizando config.guess e config.sub direto de https://www.gnu.org/software/get…

…text/manual/html_node/config_002eguess.html
Showing 2 changed files with 574 additions and 557 deletions   Show diff stats
scripts/config.guess
1 #! /bin/sh 1 #! /bin/sh
2 # Attempt to guess a canonical system name. 2 # Attempt to guess a canonical system name.
3 -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,  
4 -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008  
5 -# Free Software Foundation, Inc. 3 +# Copyright 1992-2016 Free Software Foundation, Inc.
6 4
7 -timestamp='2009-04-27' 5 +timestamp='2016-02-11'
8 6
9 # This file is free software; you can redistribute it and/or modify it 7 # This file is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by 8 # under the terms of the GNU General Public License as published by
11 -# the Free Software Foundation; either version 2 of the License, or 9 +# the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version. 10 # (at your option) any later version.
13 # 11 #
14 # This program is distributed in the hope that it will be useful, but 12 # This program is distributed in the hope that it will be useful, but
@@ -17,26 +15,22 @@ timestamp='2009-04-27' @@ -17,26 +15,22 @@ timestamp='2009-04-27'
17 # General Public License for more details. 15 # General Public License for more details.
18 # 16 #
19 # You should have received a copy of the GNU General Public License 17 # You should have received a copy of the GNU General Public License
20 -# along with this program; if not, write to the Free Software  
21 -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA  
22 -# 02110-1301, USA. 18 +# along with this program; if not, see <http://www.gnu.org/licenses/>.
23 # 19 #
24 # As a special exception to the GNU General Public License, if you 20 # As a special exception to the GNU General Public License, if you
25 # distribute this file as part of a program that contains a 21 # distribute this file as part of a program that contains a
26 # configuration script generated by Autoconf, you may include it under 22 # configuration script generated by Autoconf, you may include it under
27 -# the same distribution terms that you use for the rest of that program.  
28 -  
29 -  
30 -# Originally written by Per Bothner <per@bothner.com>.  
31 -# Please send patches to <config-patches@gnu.org>. Submit a context  
32 -# diff and a properly formatted ChangeLog entry. 23 +# the same distribution terms that you use for the rest of that
  24 +# program. This Exception is an additional permission under section 7
  25 +# of the GNU General Public License, version 3 ("GPLv3").
33 # 26 #
34 -# This script attempts to guess a canonical system name similar to  
35 -# config.sub. If it succeeds, it prints the system name on stdout, and  
36 -# exits with 0. Otherwise, it exits with 1. 27 +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
37 # 28 #
38 -# The plan is that this can be called by configure scripts if you  
39 -# don't specify an explicit build system type. 29 +# You can get the latest version of this script from:
  30 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
  31 +#
  32 +# Please send patches to <config-patches@gnu.org>.
  33 +
40 34
41 me=`echo "$0" | sed -e 's,.*/,,'` 35 me=`echo "$0" | sed -e 's,.*/,,'`
42 36
@@ -56,8 +50,7 @@ version=&quot;\ @@ -56,8 +50,7 @@ version=&quot;\
56 GNU config.guess ($timestamp) 50 GNU config.guess ($timestamp)
57 51
58 Originally written by Per Bothner. 52 Originally written by Per Bothner.
59 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,  
60 -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 53 +Copyright 1992-2016 Free Software Foundation, Inc.
61 54
62 This is free software; see the source for copying conditions. There is NO 55 This is free software; see the source for copying conditions. There is NO
63 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 56 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -139,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2&gt;/dev/null` || UNAME_RELEASE=unknown @@ -139,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2&gt;/dev/null` || UNAME_RELEASE=unknown
139 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 132 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
140 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 133 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
141 134
  135 +case "${UNAME_SYSTEM}" in
  136 +Linux|GNU|GNU/*)
  137 + # If the system lacks a compiler, then just pick glibc.
  138 + # We could probably try harder.
  139 + LIBC=gnu
  140 +
  141 + eval $set_cc_for_build
  142 + cat <<-EOF > $dummy.c
  143 + #include <features.h>
  144 + #if defined(__UCLIBC__)
  145 + LIBC=uclibc
  146 + #elif defined(__dietlibc__)
  147 + LIBC=dietlibc
  148 + #else
  149 + LIBC=gnu
  150 + #endif
  151 + EOF
  152 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
  153 + ;;
  154 +esac
  155 +
142 # Note: order is significant - the case branches are not exclusive. 156 # Note: order is significant - the case branches are not exclusive.
143 157
144 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 158 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
145 *:NetBSD:*:*) 159 *:NetBSD:*:*)
146 # NetBSD (nbsd) targets should (where applicable) match one or 160 # NetBSD (nbsd) targets should (where applicable) match one or
147 - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 161 + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
148 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 162 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
149 # switched to ELF, *-*-netbsd* would select the old 163 # switched to ELF, *-*-netbsd* would select the old
150 # object file format. This provides both forward 164 # object file format. This provides both forward
@@ -154,23 +168,30 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in @@ -154,23 +168,30 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in
154 # Note: NetBSD doesn't particularly care about the vendor 168 # Note: NetBSD doesn't particularly care about the vendor
155 # portion of the name. We always set it to "unknown". 169 # portion of the name. We always set it to "unknown".
156 sysctl="sysctl -n hw.machine_arch" 170 sysctl="sysctl -n hw.machine_arch"
157 - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \  
158 - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 171 + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
  172 + /sbin/$sysctl 2>/dev/null || \
  173 + /usr/sbin/$sysctl 2>/dev/null || \
  174 + echo unknown)`
159 case "${UNAME_MACHINE_ARCH}" in 175 case "${UNAME_MACHINE_ARCH}" in
160 armeb) machine=armeb-unknown ;; 176 armeb) machine=armeb-unknown ;;
161 arm*) machine=arm-unknown ;; 177 arm*) machine=arm-unknown ;;
162 sh3el) machine=shl-unknown ;; 178 sh3el) machine=shl-unknown ;;
163 sh3eb) machine=sh-unknown ;; 179 sh3eb) machine=sh-unknown ;;
164 sh5el) machine=sh5le-unknown ;; 180 sh5el) machine=sh5le-unknown ;;
  181 + earmv*)
  182 + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
  183 + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
  184 + machine=${arch}${endian}-unknown
  185 + ;;
165 *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 186 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
166 esac 187 esac
167 # The Operating System including object format, if it has switched 188 # The Operating System including object format, if it has switched
168 # to ELF recently, or will in the future. 189 # to ELF recently, or will in the future.
169 case "${UNAME_MACHINE_ARCH}" in 190 case "${UNAME_MACHINE_ARCH}" in
170 - arm*|i386|m68k|ns32k|sh3*|sparc|vax) 191 + arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
171 eval $set_cc_for_build 192 eval $set_cc_for_build
172 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 193 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
173 - | grep __ELF__ >/dev/null 194 + | grep -q __ELF__
174 then 195 then
175 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 196 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
176 # Return netbsd for either. FIX? 197 # Return netbsd for either. FIX?
@@ -180,7 +201,14 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in @@ -180,7 +201,14 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in
180 fi 201 fi
181 ;; 202 ;;
182 *) 203 *)
183 - os=netbsd 204 + os=netbsd
  205 + ;;
  206 + esac
  207 + # Determine ABI tags.
  208 + case "${UNAME_MACHINE_ARCH}" in
  209 + earm*)
  210 + expr='s/^earmv[0-9]/-eabi/;s/eb$//'
  211 + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
184 ;; 212 ;;
185 esac 213 esac
186 # The OS release 214 # The OS release
@@ -193,18 +221,26 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in @@ -193,18 +221,26 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in
193 release='-gnu' 221 release='-gnu'
194 ;; 222 ;;
195 *) 223 *)
196 - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 224 + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
197 ;; 225 ;;
198 esac 226 esac
199 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 227 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
200 # contains redundant information, the shorter form: 228 # contains redundant information, the shorter form:
201 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 229 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
202 - echo "${machine}-${os}${release}" 230 + echo "${machine}-${os}${release}${abi}"
  231 + exit ;;
  232 + *:Bitrig:*:*)
  233 + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
  234 + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
203 exit ;; 235 exit ;;
204 *:OpenBSD:*:*) 236 *:OpenBSD:*:*)
205 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 237 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
206 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 238 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
207 exit ;; 239 exit ;;
  240 + *:LibertyBSD:*:*)
  241 + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
  242 + echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
  243 + exit ;;
208 *:ekkoBSD:*:*) 244 *:ekkoBSD:*:*)
209 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 245 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
210 exit ;; 246 exit ;;
@@ -217,13 +253,16 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in @@ -217,13 +253,16 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in
217 *:MirBSD:*:*) 253 *:MirBSD:*:*)
218 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 254 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
219 exit ;; 255 exit ;;
  256 + *:Sortix:*:*)
  257 + echo ${UNAME_MACHINE}-unknown-sortix
  258 + exit ;;
220 alpha:OSF1:*:*) 259 alpha:OSF1:*:*)
221 case $UNAME_RELEASE in 260 case $UNAME_RELEASE in
222 *4.0) 261 *4.0)
223 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 262 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
224 ;; 263 ;;
225 *5.*) 264 *5.*)
226 - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 265 + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
227 ;; 266 ;;
228 esac 267 esac
229 # According to Compaq, /usr/sbin/psrinfo has been available on 268 # According to Compaq, /usr/sbin/psrinfo has been available on
@@ -233,43 +272,46 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in @@ -233,43 +272,46 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in
233 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 272 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
234 case "$ALPHA_CPU_TYPE" in 273 case "$ALPHA_CPU_TYPE" in
235 "EV4 (21064)") 274 "EV4 (21064)")
236 - UNAME_MACHINE="alpha" ;; 275 + UNAME_MACHINE=alpha ;;
237 "EV4.5 (21064)") 276 "EV4.5 (21064)")
238 - UNAME_MACHINE="alpha" ;; 277 + UNAME_MACHINE=alpha ;;
239 "LCA4 (21066/21068)") 278 "LCA4 (21066/21068)")
240 - UNAME_MACHINE="alpha" ;; 279 + UNAME_MACHINE=alpha ;;
241 "EV5 (21164)") 280 "EV5 (21164)")
242 - UNAME_MACHINE="alphaev5" ;; 281 + UNAME_MACHINE=alphaev5 ;;
243 "EV5.6 (21164A)") 282 "EV5.6 (21164A)")
244 - UNAME_MACHINE="alphaev56" ;; 283 + UNAME_MACHINE=alphaev56 ;;
245 "EV5.6 (21164PC)") 284 "EV5.6 (21164PC)")
246 - UNAME_MACHINE="alphapca56" ;; 285 + UNAME_MACHINE=alphapca56 ;;
247 "EV5.7 (21164PC)") 286 "EV5.7 (21164PC)")
248 - UNAME_MACHINE="alphapca57" ;; 287 + UNAME_MACHINE=alphapca57 ;;
249 "EV6 (21264)") 288 "EV6 (21264)")
250 - UNAME_MACHINE="alphaev6" ;; 289 + UNAME_MACHINE=alphaev6 ;;
251 "EV6.7 (21264A)") 290 "EV6.7 (21264A)")
252 - UNAME_MACHINE="alphaev67" ;; 291 + UNAME_MACHINE=alphaev67 ;;
253 "EV6.8CB (21264C)") 292 "EV6.8CB (21264C)")
254 - UNAME_MACHINE="alphaev68" ;; 293 + UNAME_MACHINE=alphaev68 ;;
255 "EV6.8AL (21264B)") 294 "EV6.8AL (21264B)")
256 - UNAME_MACHINE="alphaev68" ;; 295 + UNAME_MACHINE=alphaev68 ;;
257 "EV6.8CX (21264D)") 296 "EV6.8CX (21264D)")
258 - UNAME_MACHINE="alphaev68" ;; 297 + UNAME_MACHINE=alphaev68 ;;
259 "EV6.9A (21264/EV69A)") 298 "EV6.9A (21264/EV69A)")
260 - UNAME_MACHINE="alphaev69" ;; 299 + UNAME_MACHINE=alphaev69 ;;
261 "EV7 (21364)") 300 "EV7 (21364)")
262 - UNAME_MACHINE="alphaev7" ;; 301 + UNAME_MACHINE=alphaev7 ;;
263 "EV7.9 (21364A)") 302 "EV7.9 (21364A)")
264 - UNAME_MACHINE="alphaev79" ;; 303 + UNAME_MACHINE=alphaev79 ;;
265 esac 304 esac
266 # A Pn.n version is a patched version. 305 # A Pn.n version is a patched version.
267 # A Vn.n version is a released version. 306 # A Vn.n version is a released version.
268 # A Tn.n version is a released field test version. 307 # A Tn.n version is a released field test version.
269 # A Xn.n version is an unreleased experimental baselevel. 308 # A Xn.n version is an unreleased experimental baselevel.
270 # 1.2 uses "1.2" for uname -r. 309 # 1.2 uses "1.2" for uname -r.
271 - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`  
272 - exit ;; 310 + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
  311 + # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
  312 + exitcode=$?
  313 + trap '' 0
  314 + exit $exitcode ;;
273 Alpha\ *:Windows_NT*:*) 315 Alpha\ *:Windows_NT*:*)
274 # How do we know it's Interix rather than the generic POSIX subsystem? 316 # How do we know it's Interix rather than the generic POSIX subsystem?
275 # Should we change UNAME_MACHINE based on the output of uname instead 317 # Should we change UNAME_MACHINE based on the output of uname instead
@@ -295,12 +337,12 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in @@ -295,12 +337,12 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in
295 echo s390-ibm-zvmoe 337 echo s390-ibm-zvmoe
296 exit ;; 338 exit ;;
297 *:OS400:*:*) 339 *:OS400:*:*)
298 - echo powerpc-ibm-os400 340 + echo powerpc-ibm-os400
299 exit ;; 341 exit ;;
300 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 342 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
301 echo arm-acorn-riscix${UNAME_RELEASE} 343 echo arm-acorn-riscix${UNAME_RELEASE}
302 exit ;; 344 exit ;;
303 - arm:riscos:*:*|arm:RISCOS:*:*) 345 + arm*:riscos:*:*|arm*:RISCOS:*:*)
304 echo arm-unknown-riscos 346 echo arm-unknown-riscos
305 exit ;; 347 exit ;;
306 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 348 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -333,18 +375,21 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in @@ -333,18 +375,21 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in
333 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 375 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
334 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 376 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335 exit ;; 377 exit ;;
  378 + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
  379 + echo i386-pc-auroraux${UNAME_RELEASE}
  380 + exit ;;
336 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 381 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
337 eval $set_cc_for_build 382 eval $set_cc_for_build
338 - SUN_ARCH="i386" 383 + SUN_ARCH=i386
339 # If there is a compiler, see if it is configured for 64-bit objects. 384 # If there is a compiler, see if it is configured for 64-bit objects.
340 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 385 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
341 # This test works for both compilers. 386 # This test works for both compilers.
342 - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 387 + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
343 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 388 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
344 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 389 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
345 grep IS_64BIT_ARCH >/dev/null 390 grep IS_64BIT_ARCH >/dev/null
346 then 391 then
347 - SUN_ARCH="x86_64" 392 + SUN_ARCH=x86_64
348 fi 393 fi
349 fi 394 fi
350 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 395 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -369,7 +414,7 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in @@ -369,7 +414,7 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in
369 exit ;; 414 exit ;;
370 sun*:*:4.2BSD:*) 415 sun*:*:4.2BSD:*)
371 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 416 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
372 - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 417 + test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
373 case "`/bin/arch`" in 418 case "`/bin/arch`" in
374 sun3) 419 sun3)
375 echo m68k-sun-sunos${UNAME_RELEASE} 420 echo m68k-sun-sunos${UNAME_RELEASE}
@@ -391,23 +436,23 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in @@ -391,23 +436,23 @@ case &quot;${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}&quot; in
391 # MiNT. But MiNT is downward compatible to TOS, so this should 436 # MiNT. But MiNT is downward compatible to TOS, so this should
392 # be no problem. 437 # be no problem.
393 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 438 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
394 - echo m68k-atari-mint${UNAME_RELEASE} 439 + echo m68k-atari-mint${UNAME_RELEASE}
395 exit ;; 440 exit ;;
396 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 441 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
397 echo m68k-atari-mint${UNAME_RELEASE} 442 echo m68k-atari-mint${UNAME_RELEASE}
398 - exit ;; 443 + exit ;;
399 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 444 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
400 - echo m68k-atari-mint${UNAME_RELEASE} 445 + echo m68k-atari-mint${UNAME_RELEASE}
401 exit ;; 446 exit ;;
402 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 447 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
403 - echo m68k-milan-mint${UNAME_RELEASE}  
404 - exit ;; 448 + echo m68k-milan-mint${UNAME_RELEASE}
  449 + exit ;;
405 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 450 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
406 - echo m68k-hades-mint${UNAME_RELEASE}  
407 - exit ;; 451 + echo m68k-hades-mint${UNAME_RELEASE}
  452 + exit ;;
408 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 453 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
409 - echo m68k-unknown-mint${UNAME_RELEASE}  
410 - exit ;; 454 + echo m68k-unknown-mint${UNAME_RELEASE}
  455 + exit ;;
411 m68k:machten:*:*) 456 m68k:machten:*:*)
412 echo m68k-apple-machten${UNAME_RELEASE} 457 echo m68k-apple-machten${UNAME_RELEASE}
413 exit ;; 458 exit ;;
@@ -477,8 +522,8 @@ EOF @@ -477,8 +522,8 @@ EOF
477 echo m88k-motorola-sysv3 522 echo m88k-motorola-sysv3
478 exit ;; 523 exit ;;
479 AViiON:dgux:*:*) 524 AViiON:dgux:*:*)
480 - # DG/UX returns AViiON for all architectures  
481 - UNAME_PROCESSOR=`/usr/bin/uname -p` 525 + # DG/UX returns AViiON for all architectures
  526 + UNAME_PROCESSOR=`/usr/bin/uname -p`
482 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 527 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
483 then 528 then
484 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 529 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -491,7 +536,7 @@ EOF @@ -491,7 +536,7 @@ EOF
491 else 536 else
492 echo i586-dg-dgux${UNAME_RELEASE} 537 echo i586-dg-dgux${UNAME_RELEASE}
493 fi 538 fi
494 - exit ;; 539 + exit ;;
495 M88*:DolphinOS:*:*) # DolphinOS (SVR3) 540 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
496 echo m88k-dolphin-sysv3 541 echo m88k-dolphin-sysv3
497 exit ;; 542 exit ;;
@@ -548,15 +593,16 @@ EOF @@ -548,15 +593,16 @@ EOF
548 echo rs6000-ibm-aix3.2 593 echo rs6000-ibm-aix3.2
549 fi 594 fi
550 exit ;; 595 exit ;;
551 - *:AIX:*:[456]) 596 + *:AIX:*:[4567])
552 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 597 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
553 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 598 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
554 IBM_ARCH=rs6000 599 IBM_ARCH=rs6000
555 else 600 else
556 IBM_ARCH=powerpc 601 IBM_ARCH=powerpc
557 fi 602 fi
558 - if [ -x /usr/bin/oslevel ] ; then  
559 - IBM_REV=`/usr/bin/oslevel` 603 + if [ -x /usr/bin/lslpp ] ; then
  604 + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
  605 + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
560 else 606 else
561 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 607 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
562 fi 608 fi
@@ -591,58 +637,58 @@ EOF @@ -591,58 +637,58 @@ EOF
591 9000/[678][0-9][0-9]) 637 9000/[678][0-9][0-9])
592 if [ -x /usr/bin/getconf ]; then 638 if [ -x /usr/bin/getconf ]; then
593 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 639 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
594 - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`  
595 - case "${sc_cpu_version}" in  
596 - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0  
597 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1  
598 - 532) # CPU_PA_RISC2_0  
599 - case "${sc_kernel_bits}" in  
600 - 32) HP_ARCH="hppa2.0n" ;;  
601 - 64) HP_ARCH="hppa2.0w" ;;  
602 - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20  
603 - esac ;;  
604 - esac 640 + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
  641 + case "${sc_cpu_version}" in
  642 + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
  643 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
  644 + 532) # CPU_PA_RISC2_0
  645 + case "${sc_kernel_bits}" in
  646 + 32) HP_ARCH=hppa2.0n ;;
  647 + 64) HP_ARCH=hppa2.0w ;;
  648 + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
  649 + esac ;;
  650 + esac
605 fi 651 fi
606 if [ "${HP_ARCH}" = "" ]; then 652 if [ "${HP_ARCH}" = "" ]; then
607 eval $set_cc_for_build 653 eval $set_cc_for_build
608 - sed 's/^ //' << EOF >$dummy.c 654 + sed 's/^ //' << EOF >$dummy.c
609 655
610 - #define _HPUX_SOURCE  
611 - #include <stdlib.h>  
612 - #include <unistd.h> 656 + #define _HPUX_SOURCE
  657 + #include <stdlib.h>
  658 + #include <unistd.h>
613 659
614 - int main ()  
615 - {  
616 - #if defined(_SC_KERNEL_BITS)  
617 - long bits = sysconf(_SC_KERNEL_BITS);  
618 - #endif  
619 - long cpu = sysconf (_SC_CPU_VERSION); 660 + int main ()
  661 + {
  662 + #if defined(_SC_KERNEL_BITS)
  663 + long bits = sysconf(_SC_KERNEL_BITS);
  664 + #endif
  665 + long cpu = sysconf (_SC_CPU_VERSION);
620 666
621 - switch (cpu)  
622 - {  
623 - case CPU_PA_RISC1_0: puts ("hppa1.0"); break;  
624 - case CPU_PA_RISC1_1: puts ("hppa1.1"); break;  
625 - case CPU_PA_RISC2_0:  
626 - #if defined(_SC_KERNEL_BITS)  
627 - switch (bits)  
628 - {  
629 - case 64: puts ("hppa2.0w"); break;  
630 - case 32: puts ("hppa2.0n"); break;  
631 - default: puts ("hppa2.0"); break;  
632 - } break;  
633 - #else /* !defined(_SC_KERNEL_BITS) */  
634 - puts ("hppa2.0"); break;  
635 - #endif  
636 - default: puts ("hppa1.0"); break;  
637 - }  
638 - exit (0);  
639 - } 667 + switch (cpu)
  668 + {
  669 + case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
  670 + case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
  671 + case CPU_PA_RISC2_0:
  672 + #if defined(_SC_KERNEL_BITS)
  673 + switch (bits)
  674 + {
  675 + case 64: puts ("hppa2.0w"); break;
  676 + case 32: puts ("hppa2.0n"); break;
  677 + default: puts ("hppa2.0"); break;
  678 + } break;
  679 + #else /* !defined(_SC_KERNEL_BITS) */
  680 + puts ("hppa2.0"); break;
  681 + #endif
  682 + default: puts ("hppa1.0"); break;
  683 + }
  684 + exit (0);
  685 + }
640 EOF 686 EOF
641 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 687 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
642 test -z "$HP_ARCH" && HP_ARCH=hppa 688 test -z "$HP_ARCH" && HP_ARCH=hppa
643 fi ;; 689 fi ;;
644 esac 690 esac
645 - if [ ${HP_ARCH} = "hppa2.0w" ] 691 + if [ ${HP_ARCH} = hppa2.0w ]
646 then 692 then
647 eval $set_cc_for_build 693 eval $set_cc_for_build
648 694
@@ -656,11 +702,11 @@ EOF @@ -656,11 +702,11 @@ EOF
656 # => hppa64-hp-hpux11.23 702 # => hppa64-hp-hpux11.23
657 703
658 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 704 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
659 - grep __LP64__ >/dev/null 705 + grep -q __LP64__
660 then 706 then
661 - HP_ARCH="hppa2.0w" 707 + HP_ARCH=hppa2.0w
662 else 708 else
663 - HP_ARCH="hppa64" 709 + HP_ARCH=hppa64
664 fi 710 fi
665 fi 711 fi
666 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 712 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -727,22 +773,22 @@ EOF @@ -727,22 +773,22 @@ EOF
727 exit ;; 773 exit ;;
728 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 774 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
729 echo c1-convex-bsd 775 echo c1-convex-bsd
730 - exit ;; 776 + exit ;;
731 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 777 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
732 if getsysinfo -f scalar_acc 778 if getsysinfo -f scalar_acc
733 then echo c32-convex-bsd 779 then echo c32-convex-bsd
734 else echo c2-convex-bsd 780 else echo c2-convex-bsd
735 fi 781 fi
736 - exit ;; 782 + exit ;;
737 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 783 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
738 echo c34-convex-bsd 784 echo c34-convex-bsd
739 - exit ;; 785 + exit ;;
740 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 786 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
741 echo c38-convex-bsd 787 echo c38-convex-bsd
742 - exit ;; 788 + exit ;;
743 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 789 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
744 echo c4-convex-bsd 790 echo c4-convex-bsd
745 - exit ;; 791 + exit ;;
746 CRAY*Y-MP:*:*:*) 792 CRAY*Y-MP:*:*:*)
747 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 793 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
748 exit ;; 794 exit ;;
@@ -765,15 +811,15 @@ EOF @@ -765,15 +811,15 @@ EOF
765 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 811 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
766 exit ;; 812 exit ;;
767 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 813 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
768 - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`  
769 - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`  
770 - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`  
771 - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"  
772 - exit ;; 814 + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
  815 + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
  816 + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
  817 + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  818 + exit ;;
773 5000:UNIX_System_V:4.*:*) 819 5000:UNIX_System_V:4.*:*)
774 - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`  
775 - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`  
776 - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 820 + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
  821 + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
  822 + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
777 exit ;; 823 exit ;;
778 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 824 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
779 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 825 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@@ -785,34 +831,39 @@ EOF @@ -785,34 +831,39 @@ EOF
785 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 831 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
786 exit ;; 832 exit ;;
787 *:FreeBSD:*:*) 833 *:FreeBSD:*:*)
788 - case ${UNAME_MACHINE} in  
789 - pc98)  
790 - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 834 + UNAME_PROCESSOR=`/usr/bin/uname -p`
  835 + case ${UNAME_PROCESSOR} in
791 amd64) 836 amd64)
792 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 837 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
793 *) 838 *)
794 - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 839 + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
795 esac 840 esac
796 exit ;; 841 exit ;;
797 i*:CYGWIN*:*) 842 i*:CYGWIN*:*)
798 echo ${UNAME_MACHINE}-pc-cygwin 843 echo ${UNAME_MACHINE}-pc-cygwin
799 exit ;; 844 exit ;;
  845 + *:MINGW64*:*)
  846 + echo ${UNAME_MACHINE}-pc-mingw64
  847 + exit ;;
800 *:MINGW*:*) 848 *:MINGW*:*)
801 echo ${UNAME_MACHINE}-pc-mingw32 849 echo ${UNAME_MACHINE}-pc-mingw32
802 exit ;; 850 exit ;;
  851 + *:MSYS*:*)
  852 + echo ${UNAME_MACHINE}-pc-msys
  853 + exit ;;
803 i*:windows32*:*) 854 i*:windows32*:*)
804 - # uname -m includes "-pc" on this system.  
805 - echo ${UNAME_MACHINE}-mingw32 855 + # uname -m includes "-pc" on this system.
  856 + echo ${UNAME_MACHINE}-mingw32
806 exit ;; 857 exit ;;
807 i*:PW*:*) 858 i*:PW*:*)
808 echo ${UNAME_MACHINE}-pc-pw32 859 echo ${UNAME_MACHINE}-pc-pw32
809 exit ;; 860 exit ;;
810 - *:Interix*:[3456]*)  
811 - case ${UNAME_MACHINE} in 861 + *:Interix*:*)
  862 + case ${UNAME_MACHINE} in
812 x86) 863 x86)
813 echo i586-pc-interix${UNAME_RELEASE} 864 echo i586-pc-interix${UNAME_RELEASE}
814 exit ;; 865 exit ;;
815 - EM64T | authenticamd | genuineintel) 866 + authenticamd | genuineintel | EM64T)
816 echo x86_64-unknown-interix${UNAME_RELEASE} 867 echo x86_64-unknown-interix${UNAME_RELEASE}
817 exit ;; 868 exit ;;
818 IA64) 869 IA64)
@@ -822,6 +873,9 @@ EOF @@ -822,6 +873,9 @@ EOF
822 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 873 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
823 echo i${UNAME_MACHINE}-pc-mks 874 echo i${UNAME_MACHINE}-pc-mks
824 exit ;; 875 exit ;;
  876 + 8664:Windows_NT:*)
  877 + echo x86_64-pc-mks
  878 + exit ;;
825 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 879 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
826 # How do we know it's Interix rather than the generic POSIX subsystem? 880 # How do we know it's Interix rather than the generic POSIX subsystem?
827 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 881 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -842,210 +896,163 @@ EOF @@ -842,210 +896,163 @@ EOF
842 exit ;; 896 exit ;;
843 *:GNU:*:*) 897 *:GNU:*:*)
844 # the GNU system 898 # the GNU system
845 - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 899 + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
846 exit ;; 900 exit ;;
847 *:GNU/*:*:*) 901 *:GNU/*:*:*)
848 # other systems with GNU libc and userland 902 # other systems with GNU libc and userland
849 - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 903 + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
850 exit ;; 904 exit ;;
851 i*86:Minix:*:*) 905 i*86:Minix:*:*)
852 echo ${UNAME_MACHINE}-pc-minix 906 echo ${UNAME_MACHINE}-pc-minix
853 exit ;; 907 exit ;;
  908 + aarch64:Linux:*:*)
  909 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  910 + exit ;;
  911 + aarch64_be:Linux:*:*)
  912 + UNAME_MACHINE=aarch64_be
  913 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  914 + exit ;;
  915 + alpha:Linux:*:*)
  916 + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
  917 + EV5) UNAME_MACHINE=alphaev5 ;;
  918 + EV56) UNAME_MACHINE=alphaev56 ;;
  919 + PCA56) UNAME_MACHINE=alphapca56 ;;
  920 + PCA57) UNAME_MACHINE=alphapca56 ;;
  921 + EV6) UNAME_MACHINE=alphaev6 ;;
  922 + EV67) UNAME_MACHINE=alphaev67 ;;
  923 + EV68*) UNAME_MACHINE=alphaev68 ;;
  924 + esac
  925 + objdump --private-headers /bin/sh | grep -q ld.so.1
  926 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
  927 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  928 + exit ;;
  929 + arc:Linux:*:* | arceb:Linux:*:*)
  930 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  931 + exit ;;
854 arm*:Linux:*:*) 932 arm*:Linux:*:*)
855 eval $set_cc_for_build 933 eval $set_cc_for_build
856 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 934 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
857 | grep -q __ARM_EABI__ 935 | grep -q __ARM_EABI__
858 then 936 then
859 - echo ${UNAME_MACHINE}-unknown-linux-gnu 937 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
860 else 938 else
861 - echo ${UNAME_MACHINE}-unknown-linux-gnueabi 939 + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
  940 + | grep -q __ARM_PCS_VFP
  941 + then
  942 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
  943 + else
  944 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
  945 + fi
862 fi 946 fi
863 exit ;; 947 exit ;;
864 avr32*:Linux:*:*) 948 avr32*:Linux:*:*)
865 - echo ${UNAME_MACHINE}-unknown-linux-gnu 949 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
866 exit ;; 950 exit ;;
867 cris:Linux:*:*) 951 cris:Linux:*:*)
868 - echo cris-axis-linux-gnu 952 + echo ${UNAME_MACHINE}-axis-linux-${LIBC}
869 exit ;; 953 exit ;;
870 crisv32:Linux:*:*) 954 crisv32:Linux:*:*)
871 - echo crisv32-axis-linux-gnu 955 + echo ${UNAME_MACHINE}-axis-linux-${LIBC}
  956 + exit ;;
  957 + e2k:Linux:*:*)
  958 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
872 exit ;; 959 exit ;;
873 frv:Linux:*:*) 960 frv:Linux:*:*)
874 - echo frv-unknown-linux-gnu 961 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  962 + exit ;;
  963 + hexagon:Linux:*:*)
  964 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  965 + exit ;;
  966 + i*86:Linux:*:*)
  967 + echo ${UNAME_MACHINE}-pc-linux-${LIBC}
875 exit ;; 968 exit ;;
876 ia64:Linux:*:*) 969 ia64:Linux:*:*)
877 - echo ${UNAME_MACHINE}-unknown-linux-gnu 970 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  971 + exit ;;
  972 + k1om:Linux:*:*)
  973 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
878 exit ;; 974 exit ;;
879 m32r*:Linux:*:*) 975 m32r*:Linux:*:*)
880 - echo ${UNAME_MACHINE}-unknown-linux-gnu 976 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
881 exit ;; 977 exit ;;
882 m68*:Linux:*:*) 978 m68*:Linux:*:*)
883 - echo ${UNAME_MACHINE}-unknown-linux-gnu 979 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
884 exit ;; 980 exit ;;
885 - mips:Linux:*:*)  
886 - eval $set_cc_for_build  
887 - sed 's/^ //' << EOF >$dummy.c  
888 - #undef CPU  
889 - #undef mips  
890 - #undef mipsel  
891 - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)  
892 - CPU=mipsel  
893 - #else  
894 - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)  
895 - CPU=mips  
896 - #else  
897 - CPU=  
898 - #endif  
899 - #endif  
900 -EOF  
901 - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '  
902 - /^CPU/{  
903 - s: ::g  
904 - p  
905 - }'`"  
906 - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }  
907 - ;;  
908 - mips64:Linux:*:*) 981 + mips:Linux:*:* | mips64:Linux:*:*)
909 eval $set_cc_for_build 982 eval $set_cc_for_build
910 sed 's/^ //' << EOF >$dummy.c 983 sed 's/^ //' << EOF >$dummy.c
911 #undef CPU 984 #undef CPU
912 - #undef mips64  
913 - #undef mips64el 985 + #undef ${UNAME_MACHINE}
  986 + #undef ${UNAME_MACHINE}el
914 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 987 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
915 - CPU=mips64el 988 + CPU=${UNAME_MACHINE}el
916 #else 989 #else
917 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 990 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
918 - CPU=mips64 991 + CPU=${UNAME_MACHINE}
919 #else 992 #else
920 CPU= 993 CPU=
921 #endif 994 #endif
922 #endif 995 #endif
923 EOF 996 EOF
924 - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '  
925 - /^CPU/{  
926 - s: ::g  
927 - p  
928 - }'`"  
929 - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 997 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
  998 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
930 ;; 999 ;;
931 - or32:Linux:*:*)  
932 - echo or32-unknown-linux-gnu  
933 - exit ;;  
934 - ppc:Linux:*:*)  
935 - echo powerpc-unknown-linux-gnu  
936 - exit ;;  
937 - ppc64:Linux:*:*)  
938 - echo powerpc64-unknown-linux-gnu 1000 + openrisc*:Linux:*:*)
  1001 + echo or1k-unknown-linux-${LIBC}
939 exit ;; 1002 exit ;;
940 - alpha:Linux:*:*)  
941 - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in  
942 - EV5) UNAME_MACHINE=alphaev5 ;;  
943 - EV56) UNAME_MACHINE=alphaev56 ;;  
944 - PCA56) UNAME_MACHINE=alphapca56 ;;  
945 - PCA57) UNAME_MACHINE=alphapca56 ;;  
946 - EV6) UNAME_MACHINE=alphaev6 ;;  
947 - EV67) UNAME_MACHINE=alphaev67 ;;  
948 - EV68*) UNAME_MACHINE=alphaev68 ;;  
949 - esac  
950 - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null  
951 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi  
952 - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 1003 + or32:Linux:*:* | or1k*:Linux:*:*)
  1004 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
953 exit ;; 1005 exit ;;
954 padre:Linux:*:*) 1006 padre:Linux:*:*)
955 - echo sparc-unknown-linux-gnu 1007 + echo sparc-unknown-linux-${LIBC}
  1008 + exit ;;
  1009 + parisc64:Linux:*:* | hppa64:Linux:*:*)
  1010 + echo hppa64-unknown-linux-${LIBC}
956 exit ;; 1011 exit ;;
957 parisc:Linux:*:* | hppa:Linux:*:*) 1012 parisc:Linux:*:* | hppa:Linux:*:*)
958 # Look for CPU level 1013 # Look for CPU level
959 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 1014 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
960 - PA7*) echo hppa1.1-unknown-linux-gnu ;;  
961 - PA8*) echo hppa2.0-unknown-linux-gnu ;;  
962 - *) echo hppa-unknown-linux-gnu ;; 1015 + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
  1016 + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
  1017 + *) echo hppa-unknown-linux-${LIBC} ;;
963 esac 1018 esac
964 exit ;; 1019 exit ;;
965 - parisc64:Linux:*:* | hppa64:Linux:*:*)  
966 - echo hppa64-unknown-linux-gnu 1020 + ppc64:Linux:*:*)
  1021 + echo powerpc64-unknown-linux-${LIBC}
  1022 + exit ;;
  1023 + ppc:Linux:*:*)
  1024 + echo powerpc-unknown-linux-${LIBC}
  1025 + exit ;;
  1026 + ppc64le:Linux:*:*)
  1027 + echo powerpc64le-unknown-linux-${LIBC}
  1028 + exit ;;
  1029 + ppcle:Linux:*:*)
  1030 + echo powerpcle-unknown-linux-${LIBC}
967 exit ;; 1031 exit ;;
968 s390:Linux:*:* | s390x:Linux:*:*) 1032 s390:Linux:*:* | s390x:Linux:*:*)
969 - echo ${UNAME_MACHINE}-ibm-linux 1033 + echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
970 exit ;; 1034 exit ;;
971 sh64*:Linux:*:*) 1035 sh64*:Linux:*:*)
972 - echo ${UNAME_MACHINE}-unknown-linux-gnu 1036 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
973 exit ;; 1037 exit ;;
974 sh*:Linux:*:*) 1038 sh*:Linux:*:*)
975 - echo ${UNAME_MACHINE}-unknown-linux-gnu 1039 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
976 exit ;; 1040 exit ;;
977 sparc:Linux:*:* | sparc64:Linux:*:*) 1041 sparc:Linux:*:* | sparc64:Linux:*:*)
978 - echo ${UNAME_MACHINE}-unknown-linux-gnu 1042 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  1043 + exit ;;
  1044 + tile*:Linux:*:*)
  1045 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
979 exit ;; 1046 exit ;;
980 vax:Linux:*:*) 1047 vax:Linux:*:*)
981 - echo ${UNAME_MACHINE}-dec-linux-gnu 1048 + echo ${UNAME_MACHINE}-dec-linux-${LIBC}
982 exit ;; 1049 exit ;;
983 x86_64:Linux:*:*) 1050 x86_64:Linux:*:*)
984 - echo x86_64-unknown-linux-gnu 1051 + echo ${UNAME_MACHINE}-pc-linux-${LIBC}
985 exit ;; 1052 exit ;;
986 xtensa*:Linux:*:*) 1053 xtensa*:Linux:*:*)
987 - echo ${UNAME_MACHINE}-unknown-linux-gnu 1054 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
988 exit ;; 1055 exit ;;
989 - i*86:Linux:*:*)  
990 - # The BFD linker knows what the default object file format is, so  
991 - # first see if it will tell us. cd to the root directory to prevent  
992 - # problems with other programs or directories called `ld' in the path.  
993 - # Set LC_ALL=C to ensure ld outputs messages in English.  
994 - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \  
995 - | sed -ne '/supported targets:/!d  
996 - s/[ ][ ]*/ /g  
997 - s/.*supported targets: *//  
998 - s/ .*//  
999 - p'`  
1000 - case "$ld_supported_targets" in  
1001 - elf32-i386)  
1002 - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"  
1003 - ;;  
1004 - a.out-i386-linux)  
1005 - echo "${UNAME_MACHINE}-pc-linux-gnuaout"  
1006 - exit ;;  
1007 - "")  
1008 - # Either a pre-BFD a.out linker (linux-gnuoldld) or  
1009 - # one that does not give us useful --help.  
1010 - echo "${UNAME_MACHINE}-pc-linux-gnuoldld"  
1011 - exit ;;  
1012 - esac  
1013 - # Determine whether the default compiler is a.out or elf  
1014 - eval $set_cc_for_build  
1015 - sed 's/^ //' << EOF >$dummy.c  
1016 - #include <features.h>  
1017 - #ifdef __ELF__  
1018 - # ifdef __GLIBC__  
1019 - # if __GLIBC__ >= 2  
1020 - LIBC=gnu  
1021 - # else  
1022 - LIBC=gnulibc1  
1023 - # endif  
1024 - # else  
1025 - LIBC=gnulibc1  
1026 - # endif  
1027 - #else  
1028 - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)  
1029 - LIBC=gnu  
1030 - #else  
1031 - LIBC=gnuaout  
1032 - #endif  
1033 - #endif  
1034 - #ifdef __dietlibc__  
1035 - LIBC=dietlibc  
1036 - #endif  
1037 -EOF  
1038 - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '  
1039 - /^LIBC/{  
1040 - s: ::g  
1041 - p  
1042 - }'`"  
1043 - test x"${LIBC}" != x && {  
1044 - echo "${UNAME_MACHINE}-pc-linux-${LIBC}"  
1045 - exit  
1046 - }  
1047 - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }  
1048 - ;;  
1049 i*86:DYNIX/ptx:4*:*) 1056 i*86:DYNIX/ptx:4*:*)
1050 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1057 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1051 # earlier versions are messed up and put the nodename in both 1058 # earlier versions are messed up and put the nodename in both
@@ -1053,11 +1060,11 @@ EOF @@ -1053,11 +1060,11 @@ EOF
1053 echo i386-sequent-sysv4 1060 echo i386-sequent-sysv4
1054 exit ;; 1061 exit ;;
1055 i*86:UNIX_SV:4.2MP:2.*) 1062 i*86:UNIX_SV:4.2MP:2.*)
1056 - # Unixware is an offshoot of SVR4, but it has its own version  
1057 - # number series starting with 2...  
1058 - # I am not positive that other SVR4 systems won't match this, 1063 + # Unixware is an offshoot of SVR4, but it has its own version
  1064 + # number series starting with 2...
  1065 + # I am not positive that other SVR4 systems won't match this,
1059 # I just have to hope. -- rms. 1066 # I just have to hope. -- rms.
1060 - # Use sysv4.2uw... so that sysv4* matches it. 1067 + # Use sysv4.2uw... so that sysv4* matches it.
1061 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1068 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1062 exit ;; 1069 exit ;;
1063 i*86:OS/2:*:*) 1070 i*86:OS/2:*:*)
@@ -1074,7 +1081,7 @@ EOF @@ -1074,7 +1081,7 @@ EOF
1074 i*86:syllable:*:*) 1081 i*86:syllable:*:*)
1075 echo ${UNAME_MACHINE}-pc-syllable 1082 echo ${UNAME_MACHINE}-pc-syllable
1076 exit ;; 1083 exit ;;
1077 - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 1084 + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1078 echo i386-unknown-lynxos${UNAME_RELEASE} 1085 echo i386-unknown-lynxos${UNAME_RELEASE}
1079 exit ;; 1086 exit ;;
1080 i*86:*DOS:*:*) 1087 i*86:*DOS:*:*)
@@ -1089,7 +1096,7 @@ EOF @@ -1089,7 +1096,7 @@ EOF
1089 fi 1096 fi
1090 exit ;; 1097 exit ;;
1091 i*86:*:5:[678]*) 1098 i*86:*:5:[678]*)
1092 - # UnixWare 7.x, OpenUNIX and OpenServer 6. 1099 + # UnixWare 7.x, OpenUNIX and OpenServer 6.
1093 case `/bin/uname -X | grep "^Machine"` in 1100 case `/bin/uname -X | grep "^Machine"` in
1094 *486*) UNAME_MACHINE=i486 ;; 1101 *486*) UNAME_MACHINE=i486 ;;
1095 *Pentium) UNAME_MACHINE=i586 ;; 1102 *Pentium) UNAME_MACHINE=i586 ;;
@@ -1117,13 +1124,13 @@ EOF @@ -1117,13 +1124,13 @@ EOF
1117 exit ;; 1124 exit ;;
1118 pc:*:*:*) 1125 pc:*:*:*)
1119 # Left here for compatibility: 1126 # Left here for compatibility:
1120 - # uname -m prints for DJGPP always 'pc', but it prints nothing about  
1121 - # the processor, so we play safe by assuming i586. 1127 + # uname -m prints for DJGPP always 'pc', but it prints nothing about
  1128 + # the processor, so we play safe by assuming i586.
1122 # Note: whatever this is, it MUST be the same as what config.sub 1129 # Note: whatever this is, it MUST be the same as what config.sub
1123 - # prints for the "djgpp" host, or else GDB configury will decide that 1130 + # prints for the "djgpp" host, or else GDB configure will decide that
1124 # this is a cross-build. 1131 # this is a cross-build.
1125 echo i586-pc-msdosdjgpp 1132 echo i586-pc-msdosdjgpp
1126 - exit ;; 1133 + exit ;;
1127 Intel:Mach:3*:*) 1134 Intel:Mach:3*:*)
1128 echo i386-pc-mach3 1135 echo i386-pc-mach3
1129 exit ;; 1136 exit ;;
@@ -1158,8 +1165,8 @@ EOF @@ -1158,8 +1165,8 @@ EOF
1158 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1165 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1159 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1166 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1160 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1167 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1161 - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \  
1162 - && { echo i486-ncr-sysv4; exit; } ;; 1168 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1169 + && { echo i486-ncr-sysv4; exit; } ;;
1163 NCR*:*:4.2:* | MPRAS*:*:4.2:*) 1170 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1164 OS_REL='.3' 1171 OS_REL='.3'
1165 test -r /etc/.relid \ 1172 test -r /etc/.relid \
@@ -1182,7 +1189,7 @@ EOF @@ -1182,7 +1189,7 @@ EOF
1182 rs6000:LynxOS:2.*:*) 1189 rs6000:LynxOS:2.*:*)
1183 echo rs6000-unknown-lynxos${UNAME_RELEASE} 1190 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1184 exit ;; 1191 exit ;;
1185 - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 1192 + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1186 echo powerpc-unknown-lynxos${UNAME_RELEASE} 1193 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1187 exit ;; 1194 exit ;;
1188 SM[BE]S:UNIX_SV:*:*) 1195 SM[BE]S:UNIX_SV:*:*)
@@ -1202,10 +1209,10 @@ EOF @@ -1202,10 +1209,10 @@ EOF
1202 echo ns32k-sni-sysv 1209 echo ns32k-sni-sysv
1203 fi 1210 fi
1204 exit ;; 1211 exit ;;
1205 - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort  
1206 - # says <Richard.M.Bartel@ccMail.Census.GOV>  
1207 - echo i586-unisys-sysv4  
1208 - exit ;; 1212 + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
  1213 + # says <Richard.M.Bartel@ccMail.Census.GOV>
  1214 + echo i586-unisys-sysv4
  1215 + exit ;;
1209 *:UNIX_System_V:4*:FTX*) 1216 *:UNIX_System_V:4*:FTX*)
1210 # From Gerald Hewes <hewes@openmarket.com>. 1217 # From Gerald Hewes <hewes@openmarket.com>.
1211 # How about differentiating between stratus architectures? -djm 1218 # How about differentiating between stratus architectures? -djm
@@ -1231,11 +1238,11 @@ EOF @@ -1231,11 +1238,11 @@ EOF
1231 exit ;; 1238 exit ;;
1232 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1239 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1233 if [ -d /usr/nec ]; then 1240 if [ -d /usr/nec ]; then
1234 - echo mips-nec-sysv${UNAME_RELEASE} 1241 + echo mips-nec-sysv${UNAME_RELEASE}
1235 else 1242 else
1236 - echo mips-unknown-sysv${UNAME_RELEASE} 1243 + echo mips-unknown-sysv${UNAME_RELEASE}
1237 fi 1244 fi
1238 - exit ;; 1245 + exit ;;
1239 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1246 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1240 echo powerpc-be-beos 1247 echo powerpc-be-beos
1241 exit ;; 1248 exit ;;
@@ -1248,6 +1255,9 @@ EOF @@ -1248,6 +1255,9 @@ EOF
1248 BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1255 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1249 echo i586-pc-haiku 1256 echo i586-pc-haiku
1250 exit ;; 1257 exit ;;
  1258 + x86_64:Haiku:*:*)
  1259 + echo x86_64-unknown-haiku
  1260 + exit ;;
1251 SX-4:SUPER-UX:*:*) 1261 SX-4:SUPER-UX:*:*)
1252 echo sx4-nec-superux${UNAME_RELEASE} 1262 echo sx4-nec-superux${UNAME_RELEASE}
1253 exit ;; 1263 exit ;;
@@ -1274,14 +1284,36 @@ EOF @@ -1274,14 +1284,36 @@ EOF
1274 exit ;; 1284 exit ;;
1275 *:Darwin:*:*) 1285 *:Darwin:*:*)
1276 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1286 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1277 - case $UNAME_PROCESSOR in  
1278 - unknown) UNAME_PROCESSOR=powerpc ;;  
1279 - esac 1287 + eval $set_cc_for_build
  1288 + if test "$UNAME_PROCESSOR" = unknown ; then
  1289 + UNAME_PROCESSOR=powerpc
  1290 + fi
  1291 + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
  1292 + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
  1293 + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
  1294 + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
  1295 + grep IS_64BIT_ARCH >/dev/null
  1296 + then
  1297 + case $UNAME_PROCESSOR in
  1298 + i386) UNAME_PROCESSOR=x86_64 ;;
  1299 + powerpc) UNAME_PROCESSOR=powerpc64 ;;
  1300 + esac
  1301 + fi
  1302 + fi
  1303 + elif test "$UNAME_PROCESSOR" = i386 ; then
  1304 + # Avoid executing cc on OS X 10.9, as it ships with a stub
  1305 + # that puts up a graphical alert prompting to install
  1306 + # developer tools. Any system running Mac OS X 10.7 or
  1307 + # later (Darwin 11 and later) is required to have a 64-bit
  1308 + # processor. This is not true of the ARM version of Darwin
  1309 + # that Apple uses in portable devices.
  1310 + UNAME_PROCESSOR=x86_64
  1311 + fi
1280 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1312 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1281 exit ;; 1313 exit ;;
1282 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1314 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1283 UNAME_PROCESSOR=`uname -p` 1315 UNAME_PROCESSOR=`uname -p`
1284 - if test "$UNAME_PROCESSOR" = "x86"; then 1316 + if test "$UNAME_PROCESSOR" = x86; then
1285 UNAME_PROCESSOR=i386 1317 UNAME_PROCESSOR=i386
1286 UNAME_MACHINE=pc 1318 UNAME_MACHINE=pc
1287 fi 1319 fi
@@ -1290,7 +1322,10 @@ EOF @@ -1290,7 +1322,10 @@ EOF
1290 *:QNX:*:4*) 1322 *:QNX:*:4*)
1291 echo i386-pc-qnx 1323 echo i386-pc-qnx
1292 exit ;; 1324 exit ;;
1293 - NSE-?:NONSTOP_KERNEL:*:*) 1325 + NEO-?:NONSTOP_KERNEL:*:*)
  1326 + echo neo-tandem-nsk${UNAME_RELEASE}
  1327 + exit ;;
  1328 + NSE-*:NONSTOP_KERNEL:*:*)
1294 echo nse-tandem-nsk${UNAME_RELEASE} 1329 echo nse-tandem-nsk${UNAME_RELEASE}
1295 exit ;; 1330 exit ;;
1296 NSR-?:NONSTOP_KERNEL:*:*) 1331 NSR-?:NONSTOP_KERNEL:*:*)
@@ -1309,7 +1344,7 @@ EOF @@ -1309,7 +1344,7 @@ EOF
1309 # "uname -m" is not consistent, so use $cputype instead. 386 1344 # "uname -m" is not consistent, so use $cputype instead. 386
1310 # is converted to i386 for consistency with other x86 1345 # is converted to i386 for consistency with other x86
1311 # operating systems. 1346 # operating systems.
1312 - if test "$cputype" = "386"; then 1347 + if test "$cputype" = 386; then
1313 UNAME_MACHINE=i386 1348 UNAME_MACHINE=i386
1314 else 1349 else
1315 UNAME_MACHINE="$cputype" 1350 UNAME_MACHINE="$cputype"
@@ -1335,13 +1370,13 @@ EOF @@ -1335,13 +1370,13 @@ EOF
1335 echo pdp10-unknown-its 1370 echo pdp10-unknown-its
1336 exit ;; 1371 exit ;;
1337 SEI:*:*:SEIUX) 1372 SEI:*:*:SEIUX)
1338 - echo mips-sei-seiux${UNAME_RELEASE} 1373 + echo mips-sei-seiux${UNAME_RELEASE}
1339 exit ;; 1374 exit ;;
1340 *:DragonFly:*:*) 1375 *:DragonFly:*:*)
1341 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1376 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1342 exit ;; 1377 exit ;;
1343 *:*VMS:*:*) 1378 *:*VMS:*:*)
1344 - UNAME_MACHINE=`(uname -p) 2>/dev/null` 1379 + UNAME_MACHINE=`(uname -p) 2>/dev/null`
1345 case "${UNAME_MACHINE}" in 1380 case "${UNAME_MACHINE}" in
1346 A*) echo alpha-dec-vms ; exit ;; 1381 A*) echo alpha-dec-vms ; exit ;;
1347 I*) echo ia64-dec-vms ; exit ;; 1382 I*) echo ia64-dec-vms ; exit ;;
@@ -1359,158 +1394,13 @@ EOF @@ -1359,158 +1394,13 @@ EOF
1359 i*86:AROS:*:*) 1394 i*86:AROS:*:*)
1360 echo ${UNAME_MACHINE}-pc-aros 1395 echo ${UNAME_MACHINE}-pc-aros
1361 exit ;; 1396 exit ;;
1362 -esac  
1363 -  
1364 -#echo '(No uname command or uname output not recognized.)' 1>&2  
1365 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2  
1366 -  
1367 -eval $set_cc_for_build  
1368 -cat >$dummy.c <<EOF  
1369 -#ifdef _SEQUENT_  
1370 -# include <sys/types.h>  
1371 -# include <sys/utsname.h>  
1372 -#endif  
1373 -main ()  
1374 -{  
1375 -#if defined (sony)  
1376 -#if defined (MIPSEB)  
1377 - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,  
1378 - I don't know.... */  
1379 - printf ("mips-sony-bsd\n"); exit (0);  
1380 -#else  
1381 -#include <sys/param.h>  
1382 - printf ("m68k-sony-newsos%s\n",  
1383 -#ifdef NEWSOS4  
1384 - "4"  
1385 -#else  
1386 - ""  
1387 -#endif  
1388 - ); exit (0);  
1389 -#endif  
1390 -#endif  
1391 -  
1392 -#if defined (__arm) && defined (__acorn) && defined (__unix)  
1393 - printf ("arm-acorn-riscix\n"); exit (0);  
1394 -#endif  
1395 -  
1396 -#if defined (hp300) && !defined (hpux)  
1397 - printf ("m68k-hp-bsd\n"); exit (0);  
1398 -#endif  
1399 -  
1400 -#if defined (NeXT)  
1401 -#if !defined (__ARCHITECTURE__)  
1402 -#define __ARCHITECTURE__ "m68k"  
1403 -#endif  
1404 - int version;  
1405 - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;  
1406 - if (version < 4)  
1407 - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);  
1408 - else  
1409 - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);  
1410 - exit (0);  
1411 -#endif  
1412 -  
1413 -#if defined (MULTIMAX) || defined (n16)  
1414 -#if defined (UMAXV)  
1415 - printf ("ns32k-encore-sysv\n"); exit (0);  
1416 -#else  
1417 -#if defined (CMU)  
1418 - printf ("ns32k-encore-mach\n"); exit (0);  
1419 -#else  
1420 - printf ("ns32k-encore-bsd\n"); exit (0);  
1421 -#endif  
1422 -#endif  
1423 -#endif  
1424 -  
1425 -#if defined (__386BSD__)  
1426 - printf ("i386-pc-bsd\n"); exit (0);  
1427 -#endif  
1428 -  
1429 -#if defined (sequent)  
1430 -#if defined (i386)  
1431 - printf ("i386-sequent-dynix\n"); exit (0);  
1432 -#endif  
1433 -#if defined (ns32000)  
1434 - printf ("ns32k-sequent-dynix\n"); exit (0);  
1435 -#endif  
1436 -#endif  
1437 -  
1438 -#if defined (_SEQUENT_)  
1439 - struct utsname un;  
1440 -  
1441 - uname(&un);  
1442 -  
1443 - if (strncmp(un.version, "V2", 2) == 0) {  
1444 - printf ("i386-sequent-ptx2\n"); exit (0);  
1445 - }  
1446 - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */  
1447 - printf ("i386-sequent-ptx1\n"); exit (0);  
1448 - }  
1449 - printf ("i386-sequent-ptx\n"); exit (0);  
1450 -  
1451 -#endif  
1452 -  
1453 -#if defined (vax)  
1454 -# if !defined (ultrix)  
1455 -# include <sys/param.h>  
1456 -# if defined (BSD)  
1457 -# if BSD == 43  
1458 - printf ("vax-dec-bsd4.3\n"); exit (0);  
1459 -# else  
1460 -# if BSD == 199006  
1461 - printf ("vax-dec-bsd4.3reno\n"); exit (0);  
1462 -# else  
1463 - printf ("vax-dec-bsd\n"); exit (0);  
1464 -# endif  
1465 -# endif  
1466 -# else  
1467 - printf ("vax-dec-bsd\n"); exit (0);  
1468 -# endif  
1469 -# else  
1470 - printf ("vax-dec-ultrix\n"); exit (0);  
1471 -# endif  
1472 -#endif  
1473 -  
1474 -#if defined (alliant) && defined (i860)  
1475 - printf ("i860-alliant-bsd\n"); exit (0);  
1476 -#endif  
1477 -  
1478 - exit (1);  
1479 -}  
1480 -EOF  
1481 -  
1482 -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&  
1483 - { echo "$SYSTEM_NAME"; exit; }  
1484 -  
1485 -# Apollos put the system type in the environment.  
1486 -  
1487 -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }  
1488 -  
1489 -# Convex versions that predate uname can use getsysinfo(1)  
1490 -  
1491 -if [ -x /usr/convex/getsysinfo ]  
1492 -then  
1493 - case `getsysinfo -f cpu_type` in  
1494 - c1*)  
1495 - echo c1-convex-bsd  
1496 - exit ;;  
1497 - c2*)  
1498 - if getsysinfo -f scalar_acc  
1499 - then echo c32-convex-bsd  
1500 - else echo c2-convex-bsd  
1501 - fi  
1502 - exit ;;  
1503 - c34*)  
1504 - echo c34-convex-bsd  
1505 - exit ;;  
1506 - c38*)  
1507 - echo c38-convex-bsd 1397 + x86_64:VMkernel:*:*)
  1398 + echo ${UNAME_MACHINE}-unknown-esx
1508 exit ;; 1399 exit ;;
1509 - c4*)  
1510 - echo c4-convex-bsd 1400 + amd64:Isilon\ OneFS:*:*)
  1401 + echo x86_64-unknown-onefs
1511 exit ;; 1402 exit ;;
1512 - esac  
1513 -fi 1403 +esac
1514 1404
1515 cat >&2 <<EOF 1405 cat >&2 <<EOF
1516 $0: unable to guess system type 1406 $0: unable to guess system type
@@ -1519,9 +1409,9 @@ This script, last modified $timestamp, has failed to recognize @@ -1519,9 +1409,9 @@ This script, last modified $timestamp, has failed to recognize
1519 the operating system you are using. It is advised that you 1409 the operating system you are using. It is advised that you
1520 download the most up to date version of the config scripts from 1410 download the most up to date version of the config scripts from
1521 1411
1522 - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 1412 + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1523 and 1413 and
1524 - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1414 + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1525 1415
1526 If the version you run ($0) is already up to date, please 1416 If the version you run ($0) is already up to date, please
1527 send the following data and any information you think might be 1417 send the following data and any information you think might be
scripts/config.sub
1 #! /bin/sh 1 #! /bin/sh
2 # Configuration validation subroutine script. 2 # Configuration validation subroutine script.
3 -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,  
4 -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008  
5 -# Free Software Foundation, Inc. 3 +# Copyright 1992-2016 Free Software Foundation, Inc.
6 4
7 -timestamp='2009-04-17' 5 +timestamp='2016-01-01'
8 6
9 -# This file is (in principle) common to ALL GNU software.  
10 -# The presence of a machine in this file suggests that SOME GNU software  
11 -# can handle that machine. It does not imply ALL GNU software can.  
12 -#  
13 -# This file is free software; you can redistribute it and/or modify  
14 -# it under the terms of the GNU General Public License as published by  
15 -# the Free Software Foundation; either version 2 of the License, or 7 +# This file is free software; you can redistribute it and/or modify it
  8 +# under the terms of the GNU General Public License as published by
  9 +# the Free Software Foundation; either version 3 of the License, or
16 # (at your option) any later version. 10 # (at your option) any later version.
17 # 11 #
18 -# This program is distributed in the hope that it will be useful,  
19 -# but WITHOUT ANY WARRANTY; without even the implied warranty of  
20 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the  
21 -# GNU General Public License for more details. 12 +# This program is distributed in the hope that it will be useful, but
  13 +# WITHOUT ANY WARRANTY; without even the implied warranty of
  14 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15 +# General Public License for more details.
22 # 16 #
23 # You should have received a copy of the GNU General Public License 17 # You should have received a copy of the GNU General Public License
24 -# along with this program; if not, write to the Free Software  
25 -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA  
26 -# 02110-1301, USA. 18 +# along with this program; if not, see <http://www.gnu.org/licenses/>.
27 # 19 #
28 # As a special exception to the GNU General Public License, if you 20 # As a special exception to the GNU General Public License, if you
29 # distribute this file as part of a program that contains a 21 # distribute this file as part of a program that contains a
30 # configuration script generated by Autoconf, you may include it under 22 # configuration script generated by Autoconf, you may include it under
31 -# the same distribution terms that you use for the rest of that program. 23 +# the same distribution terms that you use for the rest of that
  24 +# program. This Exception is an additional permission under section 7
  25 +# of the GNU General Public License, version 3 ("GPLv3").
32 26
33 27
34 -# Please send patches to <config-patches@gnu.org>. Submit a context  
35 -# diff and a properly formatted ChangeLog entry. 28 +# Please send patches to <config-patches@gnu.org>.
36 # 29 #
37 # Configuration subroutine to validate and canonicalize a configuration type. 30 # Configuration subroutine to validate and canonicalize a configuration type.
38 # Supply the specified configuration type as an argument. 31 # Supply the specified configuration type as an argument.
39 # If it is invalid, we print an error message on stderr and exit with code 1. 32 # If it is invalid, we print an error message on stderr and exit with code 1.
40 # Otherwise, we print the canonical config type on stdout and succeed. 33 # Otherwise, we print the canonical config type on stdout and succeed.
41 34
  35 +# You can get the latest version of this script from:
  36 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
  37 +
42 # This file is supposed to be the same for all GNU packages 38 # This file is supposed to be the same for all GNU packages
43 # and recognize all the CPU types, system types and aliases 39 # and recognize all the CPU types, system types and aliases
44 # that are meaningful with *any* GNU software. 40 # that are meaningful with *any* GNU software.
@@ -57,8 +53,7 @@ timestamp=&#39;2009-04-17&#39; @@ -57,8 +53,7 @@ timestamp=&#39;2009-04-17&#39;
57 me=`echo "$0" | sed -e 's,.*/,,'` 53 me=`echo "$0" | sed -e 's,.*/,,'`
58 54
59 usage="\ 55 usage="\
60 -Usage: $0 [OPTION] CPU-MFR-OPSYS  
61 - $0 [OPTION] ALIAS 56 +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
62 57
63 Canonicalize a configuration name. 58 Canonicalize a configuration name.
64 59
@@ -72,8 +67,7 @@ Report bugs and patches to &lt;config-patches@gnu.org&gt;.&quot; @@ -72,8 +67,7 @@ Report bugs and patches to &lt;config-patches@gnu.org&gt;.&quot;
72 version="\ 67 version="\
73 GNU config.sub ($timestamp) 68 GNU config.sub ($timestamp)
74 69
75 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,  
76 -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 70 +Copyright 1992-2016 Free Software Foundation, Inc.
77 71
78 This is free software; see the source for copying conditions. There is NO 72 This is free software; see the source for copying conditions. There is NO
79 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 73 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -120,13 +114,18 @@ esac @@ -120,13 +114,18 @@ esac
120 # Here we must recognize all the valid KERNEL-OS combinations. 114 # Here we must recognize all the valid KERNEL-OS combinations.
121 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 115 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
122 case $maybe_os in 116 case $maybe_os in
123 - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \  
124 - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ 117 + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
  118 + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
  119 + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
125 kopensolaris*-gnu* | \ 120 kopensolaris*-gnu* | \
126 storm-chaos* | os2-emx* | rtmk-nova*) 121 storm-chaos* | os2-emx* | rtmk-nova*)
127 os=-$maybe_os 122 os=-$maybe_os
128 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 123 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
129 ;; 124 ;;
  125 + android-linux)
  126 + os=-linux-android
  127 + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
  128 + ;;
130 *) 129 *)
131 basic_machine=`echo $1 | sed 's/-[^-]*$//'` 130 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
132 if [ $basic_machine != $1 ] 131 if [ $basic_machine != $1 ]
@@ -149,10 +148,13 @@ case $os in @@ -149,10 +148,13 @@ case $os in
149 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 148 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
150 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 149 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
151 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 150 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
152 - -apple | -axis | -knuth | -cray) 151 + -apple | -axis | -knuth | -cray | -microblaze*)
153 os= 152 os=
154 basic_machine=$1 153 basic_machine=$1
155 ;; 154 ;;
  155 + -bluegene*)
  156 + os=-cnk
  157 + ;;
156 -sim | -cisco | -oki | -wec | -winbond) 158 -sim | -cisco | -oki | -wec | -winbond)
157 os= 159 os=
158 basic_machine=$1 160 basic_machine=$1
@@ -167,10 +169,10 @@ case $os in @@ -167,10 +169,10 @@ case $os in
167 os=-chorusos 169 os=-chorusos
168 basic_machine=$1 170 basic_machine=$1
169 ;; 171 ;;
170 - -chorusrdb)  
171 - os=-chorusrdb 172 + -chorusrdb)
  173 + os=-chorusrdb
172 basic_machine=$1 174 basic_machine=$1
173 - ;; 175 + ;;
174 -hiux*) 176 -hiux*)
175 os=-hiuxwe2 177 os=-hiuxwe2
176 ;; 178 ;;
@@ -215,6 +217,12 @@ case $os in @@ -215,6 +217,12 @@ case $os in
215 -isc*) 217 -isc*)
216 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 218 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
217 ;; 219 ;;
  220 + -lynx*178)
  221 + os=-lynxos178
  222 + ;;
  223 + -lynx*5)
  224 + os=-lynxos5
  225 + ;;
218 -lynx*) 226 -lynx*)
219 os=-lynxos 227 os=-lynxos
220 ;; 228 ;;
@@ -239,20 +247,29 @@ case $basic_machine in @@ -239,20 +247,29 @@ case $basic_machine in
239 # Some are omitted here because they have special meanings below. 247 # Some are omitted here because they have special meanings below.
240 1750a | 580 \ 248 1750a | 580 \
241 | a29k \ 249 | a29k \
  250 + | aarch64 | aarch64_be \
242 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 251 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
243 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 252 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
244 | am33_2.0 \ 253 | am33_2.0 \
245 - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ 254 + | arc | arceb \
  255 + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
  256 + | avr | avr32 \
  257 + | ba \
  258 + | be32 | be64 \
246 | bfin \ 259 | bfin \
247 - | c4x | clipper \ 260 + | c4x | c8051 | clipper \
248 | d10v | d30v | dlx | dsp16xx \ 261 | d10v | d30v | dlx | dsp16xx \
249 - | fido | fr30 | frv \ 262 + | e2k | epiphany \
  263 + | fido | fr30 | frv | ft32 \
250 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 264 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
  265 + | hexagon \
251 | i370 | i860 | i960 | ia64 \ 266 | i370 | i860 | i960 | ia64 \
252 | ip2k | iq2000 \ 267 | ip2k | iq2000 \
  268 + | k1om \
  269 + | le32 | le64 \
253 | lm32 \ 270 | lm32 \
254 | m32c | m32r | m32rle | m68000 | m68k | m88k \ 271 | m32c | m32r | m32rle | m68000 | m68k | m88k \
255 - | maxq | mb | microblaze | mcore | mep | metag \ 272 + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
256 | mips | mipsbe | mipseb | mipsel | mipsle \ 273 | mips | mipsbe | mipseb | mipsel | mipsle \
257 | mips16 \ 274 | mips16 \
258 | mips64 | mips64el \ 275 | mips64 | mips64el \
@@ -266,36 +283,55 @@ case $basic_machine in @@ -266,36 +283,55 @@ case $basic_machine in
266 | mips64vr5900 | mips64vr5900el \ 283 | mips64vr5900 | mips64vr5900el \
267 | mipsisa32 | mipsisa32el \ 284 | mipsisa32 | mipsisa32el \
268 | mipsisa32r2 | mipsisa32r2el \ 285 | mipsisa32r2 | mipsisa32r2el \
  286 + | mipsisa32r6 | mipsisa32r6el \
269 | mipsisa64 | mipsisa64el \ 287 | mipsisa64 | mipsisa64el \
270 | mipsisa64r2 | mipsisa64r2el \ 288 | mipsisa64r2 | mipsisa64r2el \
  289 + | mipsisa64r6 | mipsisa64r6el \
271 | mipsisa64sb1 | mipsisa64sb1el \ 290 | mipsisa64sb1 | mipsisa64sb1el \
272 | mipsisa64sr71k | mipsisa64sr71kel \ 291 | mipsisa64sr71k | mipsisa64sr71kel \
  292 + | mipsr5900 | mipsr5900el \
273 | mipstx39 | mipstx39el \ 293 | mipstx39 | mipstx39el \
274 | mn10200 | mn10300 \ 294 | mn10200 | mn10300 \
275 | moxie \ 295 | moxie \
276 | mt \ 296 | mt \
277 | msp430 \ 297 | msp430 \
278 - | nios | nios2 \ 298 + | nds32 | nds32le | nds32be \
  299 + | nios | nios2 | nios2eb | nios2el \
279 | ns16k | ns32k \ 300 | ns16k | ns32k \
280 - | or32 \ 301 + | open8 | or1k | or1knd | or32 \
281 | pdp10 | pdp11 | pj | pjl \ 302 | pdp10 | pdp11 | pj | pjl \
282 - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 303 + | powerpc | powerpc64 | powerpc64le | powerpcle \
283 | pyramid \ 304 | pyramid \
  305 + | riscv32 | riscv64 \
  306 + | rl78 | rx \
284 | score \ 307 | score \
285 - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 308 + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
286 | sh64 | sh64le \ 309 | sh64 | sh64le \
287 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 310 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
288 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 311 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
289 - | spu | strongarm \  
290 - | tahoe | thumb | tic4x | tic80 | tron \  
291 - | v850 | v850e \ 312 + | spu \
  313 + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
  314 + | ubicom32 \
  315 + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
  316 + | visium \
292 | we32k \ 317 | we32k \
293 - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ 318 + | x86 | xc16x | xstormy16 | xtensa \
294 | z8k | z80) 319 | z8k | z80)
295 basic_machine=$basic_machine-unknown 320 basic_machine=$basic_machine-unknown
296 ;; 321 ;;
297 - m6811 | m68hc11 | m6812 | m68hc12)  
298 - # Motorola 68HC11/12. 322 + c54x)
  323 + basic_machine=tic54x-unknown
  324 + ;;
  325 + c55x)
  326 + basic_machine=tic55x-unknown
  327 + ;;
  328 + c6x)
  329 + basic_machine=tic6x-unknown
  330 + ;;
  331 + leon|leon[3-9])
  332 + basic_machine=sparc-$basic_machine
  333 + ;;
  334 + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
299 basic_machine=$basic_machine-unknown 335 basic_machine=$basic_machine-unknown
300 os=-none 336 os=-none
301 ;; 337 ;;
@@ -305,6 +341,21 @@ case $basic_machine in @@ -305,6 +341,21 @@ case $basic_machine in
305 basic_machine=mt-unknown 341 basic_machine=mt-unknown
306 ;; 342 ;;
307 343
  344 + strongarm | thumb | xscale)
  345 + basic_machine=arm-unknown
  346 + ;;
  347 + xgate)
  348 + basic_machine=$basic_machine-unknown
  349 + os=-none
  350 + ;;
  351 + xscaleeb)
  352 + basic_machine=armeb-unknown
  353 + ;;
  354 +
  355 + xscaleel)
  356 + basic_machine=armel-unknown
  357 + ;;
  358 +
308 # We use `pc' rather than `unknown' 359 # We use `pc' rather than `unknown'
309 # because (1) that's what they normally are, and 360 # because (1) that's what they normally are, and
310 # (2) the word "unknown" tends to confuse beginning users. 361 # (2) the word "unknown" tends to confuse beginning users.
@@ -319,25 +370,32 @@ case $basic_machine in @@ -319,25 +370,32 @@ case $basic_machine in
319 # Recognize the basic CPU types with company name. 370 # Recognize the basic CPU types with company name.
320 580-* \ 371 580-* \
321 | a29k-* \ 372 | a29k-* \
  373 + | aarch64-* | aarch64_be-* \
322 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 374 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
323 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 375 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
324 - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ 376 + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
325 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 377 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
326 | avr-* | avr32-* \ 378 | avr-* | avr32-* \
  379 + | ba-* \
  380 + | be32-* | be64-* \
327 | bfin-* | bs2000-* \ 381 | bfin-* | bs2000-* \
328 - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \  
329 - | clipper-* | craynv-* | cydra-* \ 382 + | c[123]* | c30-* | [cjt]90-* | c4x-* \
  383 + | c8051-* | clipper-* | craynv-* | cydra-* \
330 | d10v-* | d30v-* | dlx-* \ 384 | d10v-* | d30v-* | dlx-* \
331 - | elxsi-* \ 385 + | e2k-* | elxsi-* \
332 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 386 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
333 | h8300-* | h8500-* \ 387 | h8300-* | h8500-* \
334 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 388 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
  389 + | hexagon-* \
335 | i*86-* | i860-* | i960-* | ia64-* \ 390 | i*86-* | i860-* | i960-* | ia64-* \
336 | ip2k-* | iq2000-* \ 391 | ip2k-* | iq2000-* \
  392 + | k1om-* \
  393 + | le32-* | le64-* \
337 | lm32-* \ 394 | lm32-* \
338 | m32c-* | m32r-* | m32rle-* \ 395 | m32c-* | m32r-* | m32rle-* \
339 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 396 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
340 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ 397 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
  398 + | microblaze-* | microblazeel-* \
341 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 399 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
342 | mips16-* \ 400 | mips16-* \
343 | mips64-* | mips64el-* \ 401 | mips64-* | mips64el-* \
@@ -351,32 +409,43 @@ case $basic_machine in @@ -351,32 +409,43 @@ case $basic_machine in
351 | mips64vr5900-* | mips64vr5900el-* \ 409 | mips64vr5900-* | mips64vr5900el-* \
352 | mipsisa32-* | mipsisa32el-* \ 410 | mipsisa32-* | mipsisa32el-* \
353 | mipsisa32r2-* | mipsisa32r2el-* \ 411 | mipsisa32r2-* | mipsisa32r2el-* \
  412 + | mipsisa32r6-* | mipsisa32r6el-* \
354 | mipsisa64-* | mipsisa64el-* \ 413 | mipsisa64-* | mipsisa64el-* \
355 | mipsisa64r2-* | mipsisa64r2el-* \ 414 | mipsisa64r2-* | mipsisa64r2el-* \
  415 + | mipsisa64r6-* | mipsisa64r6el-* \
356 | mipsisa64sb1-* | mipsisa64sb1el-* \ 416 | mipsisa64sb1-* | mipsisa64sb1el-* \
357 | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 417 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
  418 + | mipsr5900-* | mipsr5900el-* \
358 | mipstx39-* | mipstx39el-* \ 419 | mipstx39-* | mipstx39el-* \
359 | mmix-* \ 420 | mmix-* \
360 | mt-* \ 421 | mt-* \
361 | msp430-* \ 422 | msp430-* \
362 - | nios-* | nios2-* \ 423 + | nds32-* | nds32le-* | nds32be-* \
  424 + | nios-* | nios2-* | nios2eb-* | nios2el-* \
363 | none-* | np1-* | ns16k-* | ns32k-* \ 425 | none-* | np1-* | ns16k-* | ns32k-* \
  426 + | open8-* \
  427 + | or1k*-* \
364 | orion-* \ 428 | orion-* \
365 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 429 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
366 - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ 430 + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
367 | pyramid-* \ 431 | pyramid-* \
368 - | romp-* | rs6000-* \ 432 + | riscv32-* | riscv64-* \
  433 + | rl78-* | romp-* | rs6000-* | rx-* \
369 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 434 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
370 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 435 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
371 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 436 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
372 | sparclite-* \ 437 | sparclite-* \
373 - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \  
374 - | tahoe-* | thumb-* \  
375 - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ 438 + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
  439 + | tahoe-* \
  440 + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
  441 + | tile*-* \
376 | tron-* \ 442 | tron-* \
377 - | v850-* | v850e-* | vax-* \ 443 + | ubicom32-* \
  444 + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
  445 + | vax-* \
  446 + | visium-* \
378 | we32k-* \ 447 | we32k-* \
379 - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ 448 + | x86-* | x86_64-* | xc16x-* | xps100-* \
380 | xstormy16-* | xtensa*-* \ 449 | xstormy16-* | xtensa*-* \
381 | ymp-* \ 450 | ymp-* \
382 | z8k-* | z80-*) 451 | z8k-* | z80-*)
@@ -401,7 +470,7 @@ case $basic_machine in @@ -401,7 +470,7 @@ case $basic_machine in
401 basic_machine=a29k-amd 470 basic_machine=a29k-amd
402 os=-udi 471 os=-udi
403 ;; 472 ;;
404 - abacus) 473 + abacus)
405 basic_machine=abacus-unknown 474 basic_machine=abacus-unknown
406 ;; 475 ;;
407 adobe68k) 476 adobe68k)
@@ -451,6 +520,9 @@ case $basic_machine in @@ -451,6 +520,9 @@ case $basic_machine in
451 basic_machine=i386-pc 520 basic_machine=i386-pc
452 os=-aros 521 os=-aros
453 ;; 522 ;;
  523 + asmjs)
  524 + basic_machine=asmjs-unknown
  525 + ;;
454 aux) 526 aux)
455 basic_machine=m68k-apple 527 basic_machine=m68k-apple
456 os=-aux 528 os=-aux
@@ -467,11 +539,24 @@ case $basic_machine in @@ -467,11 +539,24 @@ case $basic_machine in
467 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` 539 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
468 os=-linux 540 os=-linux
469 ;; 541 ;;
  542 + bluegene*)
  543 + basic_machine=powerpc-ibm
  544 + os=-cnk
  545 + ;;
  546 + c54x-*)
  547 + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
  548 + ;;
  549 + c55x-*)
  550 + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
  551 + ;;
  552 + c6x-*)
  553 + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
  554 + ;;
470 c90) 555 c90)
471 basic_machine=c90-cray 556 basic_machine=c90-cray
472 os=-unicos 557 os=-unicos
473 ;; 558 ;;
474 - cegcc) 559 + cegcc)
475 basic_machine=arm-unknown 560 basic_machine=arm-unknown
476 os=-cegcc 561 os=-cegcc
477 ;; 562 ;;
@@ -503,7 +588,7 @@ case $basic_machine in @@ -503,7 +588,7 @@ case $basic_machine in
503 basic_machine=craynv-cray 588 basic_machine=craynv-cray
504 os=-unicosmp 589 os=-unicosmp
505 ;; 590 ;;
506 - cr16) 591 + cr16 | cr16-*)
507 basic_machine=cr16-unknown 592 basic_machine=cr16-unknown
508 os=-elf 593 os=-elf
509 ;; 594 ;;
@@ -661,7 +746,6 @@ case $basic_machine in @@ -661,7 +746,6 @@ case $basic_machine in
661 i370-ibm* | ibm*) 746 i370-ibm* | ibm*)
662 basic_machine=i370-ibm 747 basic_machine=i370-ibm
663 ;; 748 ;;
664 -# I'm not sure what "Sysv32" means. Should this be sysv3.2?  
665 i*86v32) 749 i*86v32)
666 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 750 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
667 os=-sysv32 751 os=-sysv32
@@ -700,6 +784,9 @@ case $basic_machine in @@ -700,6 +784,9 @@ case $basic_machine in
700 basic_machine=m68k-isi 784 basic_machine=m68k-isi
701 os=-sysv 785 os=-sysv
702 ;; 786 ;;
  787 + leon-*|leon[3-9]-*)
  788 + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
  789 + ;;
703 m68knommu) 790 m68knommu)
704 basic_machine=m68k-unknown 791 basic_machine=m68k-unknown
705 os=-linux 792 os=-linux
@@ -719,8 +806,15 @@ case $basic_machine in @@ -719,8 +806,15 @@ case $basic_machine in
719 basic_machine=ns32k-utek 806 basic_machine=ns32k-utek
720 os=-sysv 807 os=-sysv
721 ;; 808 ;;
  809 + microblaze*)
  810 + basic_machine=microblaze-xilinx
  811 + ;;
  812 + mingw64)
  813 + basic_machine=x86_64-pc
  814 + os=-mingw64
  815 + ;;
722 mingw32) 816 mingw32)
723 - basic_machine=i386-pc 817 + basic_machine=i686-pc
724 os=-mingw32 818 os=-mingw32
725 ;; 819 ;;
726 mingw32ce) 820 mingw32ce)
@@ -748,6 +842,10 @@ case $basic_machine in @@ -748,6 +842,10 @@ case $basic_machine in
748 basic_machine=powerpc-unknown 842 basic_machine=powerpc-unknown
749 os=-morphos 843 os=-morphos
750 ;; 844 ;;
  845 + moxiebox)
  846 + basic_machine=moxie-unknown
  847 + os=-moxiebox
  848 + ;;
751 msdos) 849 msdos)
752 basic_machine=i386-pc 850 basic_machine=i386-pc
753 os=-msdos 851 os=-msdos
@@ -755,10 +853,18 @@ case $basic_machine in @@ -755,10 +853,18 @@ case $basic_machine in
755 ms1-*) 853 ms1-*)
756 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` 854 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
757 ;; 855 ;;
  856 + msys)
  857 + basic_machine=i686-pc
  858 + os=-msys
  859 + ;;
758 mvs) 860 mvs)
759 basic_machine=i370-ibm 861 basic_machine=i370-ibm
760 os=-mvs 862 os=-mvs
761 ;; 863 ;;
  864 + nacl)
  865 + basic_machine=le32-unknown
  866 + os=-nacl
  867 + ;;
762 ncr3000) 868 ncr3000)
763 basic_machine=i486-ncr 869 basic_machine=i486-ncr
764 os=-sysv4 870 os=-sysv4
@@ -823,6 +929,12 @@ case $basic_machine in @@ -823,6 +929,12 @@ case $basic_machine in
823 np1) 929 np1)
824 basic_machine=np1-gould 930 basic_machine=np1-gould
825 ;; 931 ;;
  932 + neo-tandem)
  933 + basic_machine=neo-tandem
  934 + ;;
  935 + nse-tandem)
  936 + basic_machine=nse-tandem
  937 + ;;
826 nsr-tandem) 938 nsr-tandem)
827 basic_machine=nsr-tandem 939 basic_machine=nsr-tandem
828 ;; 940 ;;
@@ -905,9 +1017,10 @@ case $basic_machine in @@ -905,9 +1017,10 @@ case $basic_machine in
905 ;; 1017 ;;
906 power) basic_machine=power-ibm 1018 power) basic_machine=power-ibm
907 ;; 1019 ;;
908 - ppc) basic_machine=powerpc-unknown 1020 + ppc | ppcbe) basic_machine=powerpc-unknown
909 ;; 1021 ;;
910 - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 1022 + ppc-* | ppcbe-*)
  1023 + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
911 ;; 1024 ;;
912 ppcle | powerpclittle | ppc-le | powerpc-little) 1025 ppcle | powerpclittle | ppc-le | powerpc-little)
913 basic_machine=powerpcle-unknown 1026 basic_machine=powerpcle-unknown
@@ -932,7 +1045,11 @@ case $basic_machine in @@ -932,7 +1045,11 @@ case $basic_machine in
932 basic_machine=i586-unknown 1045 basic_machine=i586-unknown
933 os=-pw32 1046 os=-pw32
934 ;; 1047 ;;
935 - rdos) 1048 + rdos | rdos64)
  1049 + basic_machine=x86_64-pc
  1050 + os=-rdos
  1051 + ;;
  1052 + rdos32)
936 basic_machine=i386-pc 1053 basic_machine=i386-pc
937 os=-rdos 1054 os=-rdos
938 ;; 1055 ;;
@@ -1001,6 +1118,9 @@ case $basic_machine in @@ -1001,6 +1118,9 @@ case $basic_machine in
1001 basic_machine=i860-stratus 1118 basic_machine=i860-stratus
1002 os=-sysv4 1119 os=-sysv4
1003 ;; 1120 ;;
  1121 + strongarm-* | thumb-*)
  1122 + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
  1123 + ;;
1004 sun2) 1124 sun2)
1005 basic_machine=m68000-sun 1125 basic_machine=m68000-sun
1006 ;; 1126 ;;
@@ -1057,20 +1177,8 @@ case $basic_machine in @@ -1057,20 +1177,8 @@ case $basic_machine in
1057 basic_machine=t90-cray 1177 basic_machine=t90-cray
1058 os=-unicos 1178 os=-unicos
1059 ;; 1179 ;;
1060 - tic54x | c54x*)  
1061 - basic_machine=tic54x-unknown  
1062 - os=-coff  
1063 - ;;  
1064 - tic55x | c55x*)  
1065 - basic_machine=tic55x-unknown  
1066 - os=-coff  
1067 - ;;  
1068 - tic6x | c6x*)  
1069 - basic_machine=tic6x-unknown  
1070 - os=-coff  
1071 - ;;  
1072 tile*) 1180 tile*)
1073 - basic_machine=tile-unknown 1181 + basic_machine=$basic_machine-unknown
1074 os=-linux-gnu 1182 os=-linux-gnu
1075 ;; 1183 ;;
1076 tx39) 1184 tx39)
@@ -1140,6 +1248,9 @@ case $basic_machine in @@ -1140,6 +1248,9 @@ case $basic_machine in
1140 xps | xps100) 1248 xps | xps100)
1141 basic_machine=xps100-honeywell 1249 basic_machine=xps100-honeywell
1142 ;; 1250 ;;
  1251 + xscale-* | xscalee[bl]-*)
  1252 + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
  1253 + ;;
1143 ymp) 1254 ymp)
1144 basic_machine=ymp-cray 1255 basic_machine=ymp-cray
1145 os=-unicos 1256 os=-unicos
@@ -1237,9 +1348,12 @@ esac @@ -1237,9 +1348,12 @@ esac
1237 if [ x"$os" != x"" ] 1348 if [ x"$os" != x"" ]
1238 then 1349 then
1239 case $os in 1350 case $os in
1240 - # First match some system type aliases  
1241 - # that might get confused with valid system types. 1351 + # First match some system type aliases
  1352 + # that might get confused with valid system types.
1242 # -solaris* is a basic system type, with this one exception. 1353 # -solaris* is a basic system type, with this one exception.
  1354 + -auroraux)
  1355 + os=-auroraux
  1356 + ;;
1243 -solaris1 | -solaris1.*) 1357 -solaris1 | -solaris1.*)
1244 os=`echo $os | sed -e 's|solaris1|sunos4|'` 1358 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1245 ;; 1359 ;;
@@ -1260,30 +1374,32 @@ case $os in @@ -1260,30 +1374,32 @@ case $os in
1260 # Each alternative MUST END IN A *, to match a version number. 1374 # Each alternative MUST END IN A *, to match a version number.
1261 # -sysv* is not here because it comes later, after sysvr4. 1375 # -sysv* is not here because it comes later, after sysvr4.
1262 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 1376 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1263 - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\  
1264 - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \  
1265 - | -kopensolaris* \ 1377 + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
  1378 + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
  1379 + | -sym* | -kopensolaris* | -plan9* \
1266 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 1380 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1267 - | -aos* | -aros* \ 1381 + | -aos* | -aros* | -cloudabi* | -sortix* \
1268 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 1382 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1269 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 1383 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1270 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 1384 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1271 - | -openbsd* | -solidbsd* \ 1385 + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
1272 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 1386 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1273 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 1387 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1274 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 1388 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1275 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1389 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1276 | -chorusos* | -chorusrdb* | -cegcc* \ 1390 | -chorusos* | -chorusrdb* | -cegcc* \
1277 - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \  
1278 - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \  
1279 - | -uxpv* | -beos* | -mpeix* | -udk* \ 1391 + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  1392 + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
  1393 + | -linux-newlib* | -linux-musl* | -linux-uclibc* \
  1394 + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
1280 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 1395 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1281 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 1396 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1282 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 1397 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1283 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1398 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1284 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 1399 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1285 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1400 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1286 - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) 1401 + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
  1402 + | -onefs* | -tirtos*)
1287 # Remember, each alternative MUST END IN *, to match a version number. 1403 # Remember, each alternative MUST END IN *, to match a version number.
1288 ;; 1404 ;;
1289 -qnx*) 1405 -qnx*)
@@ -1322,7 +1438,7 @@ case $os in @@ -1322,7 +1438,7 @@ case $os in
1322 -opened*) 1438 -opened*)
1323 os=-openedition 1439 os=-openedition
1324 ;; 1440 ;;
1325 - -os400*) 1441 + -os400*)
1326 os=-os400 1442 os=-os400
1327 ;; 1443 ;;
1328 -wince*) 1444 -wince*)
@@ -1371,7 +1487,7 @@ case $os in @@ -1371,7 +1487,7 @@ case $os in
1371 -sinix*) 1487 -sinix*)
1372 os=-sysv4 1488 os=-sysv4
1373 ;; 1489 ;;
1374 - -tpf*) 1490 + -tpf*)
1375 os=-tpf 1491 os=-tpf
1376 ;; 1492 ;;
1377 -triton*) 1493 -triton*)
@@ -1407,15 +1523,14 @@ case $os in @@ -1407,15 +1523,14 @@ case $os in
1407 -aros*) 1523 -aros*)
1408 os=-aros 1524 os=-aros
1409 ;; 1525 ;;
1410 - -kaos*)  
1411 - os=-kaos  
1412 - ;;  
1413 -zvmoe) 1526 -zvmoe)
1414 os=-zvmoe 1527 os=-zvmoe
1415 ;; 1528 ;;
1416 -dicos*) 1529 -dicos*)
1417 os=-dicos 1530 os=-dicos
1418 ;; 1531 ;;
  1532 + -nacl*)
  1533 + ;;
1419 -none) 1534 -none)
1420 ;; 1535 ;;
1421 *) 1536 *)
@@ -1438,10 +1553,10 @@ else @@ -1438,10 +1553,10 @@ else
1438 # system, and we'll never get to this point. 1553 # system, and we'll never get to this point.
1439 1554
1440 case $basic_machine in 1555 case $basic_machine in
1441 - score-*) 1556 + score-*)
1442 os=-elf 1557 os=-elf
1443 ;; 1558 ;;
1444 - spu-*) 1559 + spu-*)
1445 os=-elf 1560 os=-elf
1446 ;; 1561 ;;
1447 *-acorn) 1562 *-acorn)
@@ -1453,8 +1568,23 @@ case $basic_machine in @@ -1453,8 +1568,23 @@ case $basic_machine in
1453 arm*-semi) 1568 arm*-semi)
1454 os=-aout 1569 os=-aout
1455 ;; 1570 ;;
1456 - c4x-* | tic4x-*)  
1457 - os=-coff 1571 + c4x-* | tic4x-*)
  1572 + os=-coff
  1573 + ;;
  1574 + c8051-*)
  1575 + os=-elf
  1576 + ;;
  1577 + hexagon-*)
  1578 + os=-elf
  1579 + ;;
  1580 + tic54x-*)
  1581 + os=-coff
  1582 + ;;
  1583 + tic55x-*)
  1584 + os=-coff
  1585 + ;;
  1586 + tic6x-*)
  1587 + os=-coff
1458 ;; 1588 ;;
1459 # This must come before the *-dec entry. 1589 # This must come before the *-dec entry.
1460 pdp10-*) 1590 pdp10-*)
@@ -1474,14 +1604,11 @@ case $basic_machine in @@ -1474,14 +1604,11 @@ case $basic_machine in
1474 ;; 1604 ;;
1475 m68000-sun) 1605 m68000-sun)
1476 os=-sunos3 1606 os=-sunos3
1477 - # This also exists in the configure program, but was not the  
1478 - # default.  
1479 - # os=-sunos4  
1480 ;; 1607 ;;
1481 m68*-cisco) 1608 m68*-cisco)
1482 os=-aout 1609 os=-aout
1483 ;; 1610 ;;
1484 - mep-*) 1611 + mep-*)
1485 os=-elf 1612 os=-elf
1486 ;; 1613 ;;
1487 mips*-cisco) 1614 mips*-cisco)
@@ -1508,7 +1635,7 @@ case $basic_machine in @@ -1508,7 +1635,7 @@ case $basic_machine in
1508 *-ibm) 1635 *-ibm)
1509 os=-aix 1636 os=-aix
1510 ;; 1637 ;;
1511 - *-knuth) 1638 + *-knuth)
1512 os=-mmixware 1639 os=-mmixware
1513 ;; 1640 ;;
1514 *-wec) 1641 *-wec)
@@ -1613,7 +1740,7 @@ case $basic_machine in @@ -1613,7 +1740,7 @@ case $basic_machine in
1613 -sunos*) 1740 -sunos*)
1614 vendor=sun 1741 vendor=sun
1615 ;; 1742 ;;
1616 - -aix*) 1743 + -cnk*|-aix*)
1617 vendor=ibm 1744 vendor=ibm
1618 ;; 1745 ;;
1619 -beos*) 1746 -beos*)