fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / external / libxslt / libxslt-config-guess.patch.0
blob69b26f10134352cd0e3039a83520a55bd25d5a44
1 --- config.guess
2 +++ config.guess
3 @@ -1,14 +1,12 @@
4  #! /bin/sh
5  # Attempt to guess a canonical system name.
6 -#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
7 -#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
8 -#   Inc.
9 +#   Copyright 1992-2014 Free Software Foundation, Inc.
11 -timestamp='2007-05-17'
12 +timestamp='2014-03-23'
14  # This file is free software; you can redistribute it and/or modify it
15  # under the terms of the GNU General Public License as published by
16 -# the Free Software Foundation; either version 2 of the License, or
17 +# the Free Software Foundation; either version 3 of the License, or
18  # (at your option) any later version.
19  #
20  # This program is distributed in the hope that it will be useful, but
21 @@ -17,26 +15,22 @@
22  # General Public License for more details.
23  #
24  # You should have received a copy of the GNU General Public License
25 -# along with this program; if not, write to the Free Software
26 -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
27 -# 02110-1301, USA.
28 +# along with this program; if not, see <http://www.gnu.org/licenses/>.
29  #
30  # As a special exception to the GNU General Public License, if you
31  # distribute this file as part of a program that contains a
32  # configuration script generated by Autoconf, you may include it under
33 -# the same distribution terms that you use for the rest of that program.
36 -# Originally written by Per Bothner <per@bothner.com>.
37 -# Please send patches to <config-patches@gnu.org>.  Submit a context
38 -# diff and a properly formatted ChangeLog entry.
39 +# the same distribution terms that you use for the rest of that
40 +# program.  This Exception is an additional permission under section 7
41 +# of the GNU General Public License, version 3 ("GPLv3").
42  #
43 -# This script attempts to guess a canonical system name similar to
44 -# config.sub.  If it succeeds, it prints the system name on stdout, and
45 -# exits with 0.  Otherwise, it exits with 1.
46 +# Originally written by Per Bothner.
47  #
48 -# The plan is that this can be called by configure scripts if you
49 -# don't specify an explicit build system type.
50 +# You can get the latest version of this script from:
51 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
53 +# Please send patches with a ChangeLog entry to config-patches@gnu.org.
56  me=`echo "$0" | sed -e 's,.*/,,'`
58 @@ -56,8 +50,7 @@
59  GNU config.guess ($timestamp)
61  Originally written by Per Bothner.
62 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
63 -Free Software Foundation, Inc.
64 +Copyright 1992-2014 Free Software Foundation, Inc.
66  This is free software; see the source for copying conditions.  There is NO
67  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
68 @@ -139,12 +132,33 @@
69  UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
70  UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
72 +case "${UNAME_SYSTEM}" in
73 +Linux|GNU|GNU/*)
74 +       # If the system lacks a compiler, then just pick glibc.
75 +       # We could probably try harder.
76 +       LIBC=gnu
78 +       eval $set_cc_for_build
79 +       cat <<-EOF > $dummy.c
80 +       #include <features.h>
81 +       #if defined(__UCLIBC__)
82 +       LIBC=uclibc
83 +       #elif defined(__dietlibc__)
84 +       LIBC=dietlibc
85 +       #else
86 +       LIBC=gnu
87 +       #endif
88 +       EOF
89 +       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
90 +       ;;
91 +esac
93  # Note: order is significant - the case branches are not exclusive.
95  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
96      *:NetBSD:*:*)
97         # NetBSD (nbsd) targets should (where applicable) match one or
98 -       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
99 +       # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
100         # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
101         # switched to ELF, *-*-netbsd* would select the old
102         # object file format.  This provides both forward
103 @@ -170,7 +184,7 @@
104             arm*|i386|m68k|ns32k|sh3*|sparc|vax)
105                 eval $set_cc_for_build
106                 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
107 -                       | grep __ELF__ >/dev/null
108 +                       | grep -q __ELF__
109                 then
110                     # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
111                     # Return netbsd for either.  FIX?
112 @@ -180,7 +194,7 @@
113                 fi
114                 ;;
115             *)
116 -               os=netbsd
117 +               os=netbsd
118                 ;;
119         esac
120         # The OS release
121 @@ -201,6 +215,10 @@
122         # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
123         echo "${machine}-${os}${release}"
124         exit ;;
125 +    *:Bitrig:*:*)
126 +       UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
127 +       echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
128 +       exit ;;
129      *:OpenBSD:*:*)
130         UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
131         echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
132 @@ -223,7 +241,7 @@
133                 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
134                 ;;
135         *5.*)
136 -               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
137 +               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
138                 ;;
139         esac
140         # According to Compaq, /usr/sbin/psrinfo has been available on
141 @@ -269,7 +287,10 @@
142         # A Xn.n version is an unreleased experimental baselevel.
143         # 1.2 uses "1.2" for uname -r.
144         echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
145 -       exit ;;
146 +       # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
147 +       exitcode=$?
148 +       trap '' 0
149 +       exit $exitcode ;;
150      Alpha\ *:Windows_NT*:*)
151         # How do we know it's Interix rather than the generic POSIX subsystem?
152         # Should we change UNAME_MACHINE based on the output of uname instead
153 @@ -295,12 +316,12 @@
154         echo s390-ibm-zvmoe
155         exit ;;
156      *:OS400:*:*)
157 -        echo powerpc-ibm-os400
158 +       echo powerpc-ibm-os400
159         exit ;;
160      arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
161         echo arm-acorn-riscix${UNAME_RELEASE}
162         exit ;;
163 -    arm:riscos:*:*|arm:RISCOS:*:*)
164 +    arm*:riscos:*:*|arm*:RISCOS:*:*)
165         echo arm-unknown-riscos
166         exit ;;
167      SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
168 @@ -324,14 +345,33 @@
169         case `/usr/bin/uname -p` in
170             sparc) echo sparc-icl-nx7; exit ;;
171         esac ;;
172 +    s390x:SunOS:*:*)
173 +       echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
174 +       exit ;;
175      sun4H:SunOS:5.*:*)
176         echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
177         exit ;;
178      sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
179         echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
180         exit ;;
181 -    i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*)
182 -       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
183 +    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
184 +       echo i386-pc-auroraux${UNAME_RELEASE}
185 +       exit ;;
186 +    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
187 +       eval $set_cc_for_build
188 +       SUN_ARCH="i386"
189 +       # If there is a compiler, see if it is configured for 64-bit objects.
190 +       # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
191 +       # This test works for both compilers.
192 +       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
193 +           if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
194 +               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
195 +               grep IS_64BIT_ARCH >/dev/null
196 +           then
197 +               SUN_ARCH="x86_64"
198 +           fi
199 +       fi
200 +       echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
201         exit ;;
202      sun4*:SunOS:6*:*)
203         # According to config.sub, this is the proper way to canonicalize
204 @@ -375,23 +415,23 @@
205      # MiNT.  But MiNT is downward compatible to TOS, so this should
206      # be no problem.
207      atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
208 -        echo m68k-atari-mint${UNAME_RELEASE}
209 +       echo m68k-atari-mint${UNAME_RELEASE}
210         exit ;;
211      atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
212         echo m68k-atari-mint${UNAME_RELEASE}
213 -        exit ;;
214 +       exit ;;
215      *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
216 -        echo m68k-atari-mint${UNAME_RELEASE}
217 +       echo m68k-atari-mint${UNAME_RELEASE}
218         exit ;;
219      milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
220 -        echo m68k-milan-mint${UNAME_RELEASE}
221 -        exit ;;
222 +       echo m68k-milan-mint${UNAME_RELEASE}
223 +       exit ;;
224      hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
225 -        echo m68k-hades-mint${UNAME_RELEASE}
226 -        exit ;;
227 +       echo m68k-hades-mint${UNAME_RELEASE}
228 +       exit ;;
229      *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
230 -        echo m68k-unknown-mint${UNAME_RELEASE}
231 -        exit ;;
232 +       echo m68k-unknown-mint${UNAME_RELEASE}
233 +       exit ;;
234      m68k:machten:*:*)
235         echo m68k-apple-machten${UNAME_RELEASE}
236         exit ;;
237 @@ -461,8 +501,8 @@
238         echo m88k-motorola-sysv3
239         exit ;;
240      AViiON:dgux:*:*)
241 -        # DG/UX returns AViiON for all architectures
242 -        UNAME_PROCESSOR=`/usr/bin/uname -p`
243 +       # DG/UX returns AViiON for all architectures
244 +       UNAME_PROCESSOR=`/usr/bin/uname -p`
245         if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
246         then
247             if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
248 @@ -475,7 +515,7 @@
249         else
250             echo i586-dg-dgux${UNAME_RELEASE}
251         fi
252 -       exit ;;
253 +       exit ;;
254      M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
255         echo m88k-dolphin-sysv3
256         exit ;;
257 @@ -532,7 +572,7 @@
258                 echo rs6000-ibm-aix3.2
259         fi
260         exit ;;
261 -    *:AIX:*:[45])
262 +    *:AIX:*:[4567])
263         IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
264         if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
265                 IBM_ARCH=rs6000
266 @@ -575,52 +615,52 @@
267             9000/[678][0-9][0-9])
268                 if [ -x /usr/bin/getconf ]; then
269                     sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
270 -                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
271 -                    case "${sc_cpu_version}" in
272 -                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
273 -                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
274 -                      532)                      # CPU_PA_RISC2_0
275 -                        case "${sc_kernel_bits}" in
276 -                          32) HP_ARCH="hppa2.0n" ;;
277 -                          64) HP_ARCH="hppa2.0w" ;;
278 +                   sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
279 +                   case "${sc_cpu_version}" in
280 +                     523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
281 +                     528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
282 +                     532)                      # CPU_PA_RISC2_0
283 +                       case "${sc_kernel_bits}" in
284 +                         32) HP_ARCH="hppa2.0n" ;;
285 +                         64) HP_ARCH="hppa2.0w" ;;
286                           '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
287 -                        esac ;;
288 -                    esac
289 +                       esac ;;
290 +                   esac
291                 fi
292                 if [ "${HP_ARCH}" = "" ]; then
293                     eval $set_cc_for_build
294 -                   sed 's/^              //' << EOF >$dummy.c
295 +                   sed 's/^            //' << EOF >$dummy.c
297 +               #define _HPUX_SOURCE
298 +               #include <stdlib.h>
299 +               #include <unistd.h>
301 -              #define _HPUX_SOURCE
302 -              #include <stdlib.h>
303 -              #include <unistd.h>
305 -              int main ()
306 -              {
307 -              #if defined(_SC_KERNEL_BITS)
308 -                  long bits = sysconf(_SC_KERNEL_BITS);
309 -              #endif
310 -                  long cpu  = sysconf (_SC_CPU_VERSION);
312 -                  switch (cpu)
313 -               {
314 -               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
315 -               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
316 -               case CPU_PA_RISC2_0:
317 -              #if defined(_SC_KERNEL_BITS)
318 -                   switch (bits)
319 -                       {
320 -                       case 64: puts ("hppa2.0w"); break;
321 -                       case 32: puts ("hppa2.0n"); break;
322 -                       default: puts ("hppa2.0"); break;
323 -                       } break;
324 -              #else  /* !defined(_SC_KERNEL_BITS) */
325 -                   puts ("hppa2.0"); break;
326 -              #endif
327 -               default: puts ("hppa1.0"); break;
328 -               }
329 -                  exit (0);
330 -              }
331 +               int main ()
332 +               {
333 +               #if defined(_SC_KERNEL_BITS)
334 +                   long bits = sysconf(_SC_KERNEL_BITS);
335 +               #endif
336 +                   long cpu  = sysconf (_SC_CPU_VERSION);
338 +                   switch (cpu)
339 +                       {
340 +                       case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
341 +                       case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
342 +                       case CPU_PA_RISC2_0:
343 +               #if defined(_SC_KERNEL_BITS)
344 +                           switch (bits)
345 +                               {
346 +                               case 64: puts ("hppa2.0w"); break;
347 +                               case 32: puts ("hppa2.0n"); break;
348 +                               default: puts ("hppa2.0"); break;
349 +                               } break;
350 +               #else  /* !defined(_SC_KERNEL_BITS) */
351 +                           puts ("hppa2.0"); break;
352 +               #endif
353 +                       default: puts ("hppa1.0"); break;
354 +                       }
355 +                   exit (0);
356 +               }
357  EOF
358                     (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
359                     test -z "$HP_ARCH" && HP_ARCH=hppa
360 @@ -640,7 +680,7 @@
361             # => hppa64-hp-hpux11.23
363             if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
364 -               grep __LP64__ >/dev/null
365 +               grep -q __LP64__
366             then
367                 HP_ARCH="hppa2.0w"
368             else
369 @@ -711,22 +751,22 @@
370         exit ;;
371      C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
372         echo c1-convex-bsd
373 -        exit ;;
374 +       exit ;;
375      C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
376         if getsysinfo -f scalar_acc
377         then echo c32-convex-bsd
378         else echo c2-convex-bsd
379         fi
380 -        exit ;;
381 +       exit ;;
382      C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
383         echo c34-convex-bsd
384 -        exit ;;
385 +       exit ;;
386      C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
387         echo c38-convex-bsd
388 -        exit ;;
389 +       exit ;;
390      C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
391         echo c4-convex-bsd
392 -        exit ;;
393 +       exit ;;
394      CRAY*Y-MP:*:*:*)
395         echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
396         exit ;;
397 @@ -750,14 +790,14 @@
398         exit ;;
399      F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
400         FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
401 -        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
402 -        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
403 -        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
404 -        exit ;;
405 +       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
406 +       FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
407 +       echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
408 +       exit ;;
409      5000:UNIX_System_V:4.*:*)
410 -        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
411 -        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
412 -        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
413 +       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
414 +       FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
415 +       echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
416         exit ;;
417      i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
418         echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
419 @@ -769,40 +809,51 @@
420         echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
421         exit ;;
422      *:FreeBSD:*:*)
423 -       case ${UNAME_MACHINE} in
424 -           pc98)
425 -               echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
426 +       UNAME_PROCESSOR=`/usr/bin/uname -p`
427 +       case ${UNAME_PROCESSOR} in
428             amd64)
429                 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
430             *)
431 -               echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
432 +               echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
433         esac
434         exit ;;
435      i*:CYGWIN*:*)
436         echo ${UNAME_MACHINE}-pc-cygwin
437         exit ;;
438 +    *:MINGW64*:*)
439 +       echo ${UNAME_MACHINE}-pc-mingw64
440 +       exit ;;
441      *:MINGW*:*)
442         echo ${UNAME_MACHINE}-pc-mingw32
443         exit ;;
444 +    *:MSYS*:*)
445 +       echo ${UNAME_MACHINE}-pc-msys
446 +       exit ;;
447      i*:windows32*:*)
448 -       # uname -m includes "-pc" on this system.
449 -       echo ${UNAME_MACHINE}-mingw32
450 +       # uname -m includes "-pc" on this system.
451 +       echo ${UNAME_MACHINE}-mingw32
452         exit ;;
453      i*:PW*:*)
454         echo ${UNAME_MACHINE}-pc-pw32
455         exit ;;
456 -    *:Interix*:[3456]*)
457 -       case ${UNAME_MACHINE} in
458 -           x86) 
459 +    *:Interix*:*)
460 +       case ${UNAME_MACHINE} in
461 +           x86)
462                 echo i586-pc-interix${UNAME_RELEASE}
463                 exit ;;
464 -           EM64T | authenticamd)
465 +           authenticamd | genuineintel | EM64T)
466                 echo x86_64-unknown-interix${UNAME_RELEASE}
467                 exit ;;
468 +           IA64)
469 +               echo ia64-unknown-interix${UNAME_RELEASE}
470 +               exit ;;
471         esac ;;
472      [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
473         echo i${UNAME_MACHINE}-pc-mks
474         exit ;;
475 +    8664:Windows_NT:*)
476 +       echo x86_64-pc-mks
477 +       exit ;;
478      i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
479         # How do we know it's Interix rather than the generic POSIX subsystem?
480         # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
481 @@ -823,203 +874,157 @@
482         exit ;;
483      *:GNU:*:*)
484         # the GNU system
485 -       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
486 +       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
487         exit ;;
488      *:GNU/*:*:*)
489         # other systems with GNU libc and userland
490 -       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
491 +       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
492         exit ;;
493      i*86:Minix:*:*)
494         echo ${UNAME_MACHINE}-pc-minix
495         exit ;;
496 +    aarch64:Linux:*:*)
497 +       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
498 +       exit ;;
499 +    aarch64_be:Linux:*:*)
500 +       UNAME_MACHINE=aarch64_be
501 +       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
502 +       exit ;;
503 +    alpha:Linux:*:*)
504 +       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
505 +         EV5)   UNAME_MACHINE=alphaev5 ;;
506 +         EV56)  UNAME_MACHINE=alphaev56 ;;
507 +         PCA56) UNAME_MACHINE=alphapca56 ;;
508 +         PCA57) UNAME_MACHINE=alphapca56 ;;
509 +         EV6)   UNAME_MACHINE=alphaev6 ;;
510 +         EV67)  UNAME_MACHINE=alphaev67 ;;
511 +         EV68*) UNAME_MACHINE=alphaev68 ;;
512 +       esac
513 +       objdump --private-headers /bin/sh | grep -q ld.so.1
514 +       if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
515 +       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
516 +       exit ;;
517 +    arc:Linux:*:* | arceb:Linux:*:*)
518 +       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
519 +       exit ;;
520      arm*:Linux:*:*)
521 -       echo ${UNAME_MACHINE}-unknown-linux-gnu
522 +       eval $set_cc_for_build
523 +       if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
524 +           | grep -q __ARM_EABI__
525 +       then
526 +           echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
527 +       else
528 +           if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
529 +               | grep -q __ARM_PCS_VFP
530 +           then
531 +               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
532 +           else
533 +               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
534 +           fi
535 +       fi
536         exit ;;
537      avr32*:Linux:*:*)
538 -       echo ${UNAME_MACHINE}-unknown-linux-gnu
539 +       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
540         exit ;;
541      cris:Linux:*:*)
542 -       echo cris-axis-linux-gnu
543 +       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
544         exit ;;
545      crisv32:Linux:*:*)
546 -       echo crisv32-axis-linux-gnu
547 +       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
548         exit ;;
549      frv:Linux:*:*)
550 -       echo frv-unknown-linux-gnu
551 +       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
552 +       exit ;;
553 +    hexagon:Linux:*:*)
554 +       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
555 +       exit ;;
556 +    i*86:Linux:*:*)
557 +       echo ${UNAME_MACHINE}-pc-linux-${LIBC}
558         exit ;;
559      ia64:Linux:*:*)
560 -       echo ${UNAME_MACHINE}-unknown-linux-gnu
561 +       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
562         exit ;;
563      m32r*:Linux:*:*)
564 -       echo ${UNAME_MACHINE}-unknown-linux-gnu
565 +       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
566         exit ;;
567      m68*:Linux:*:*)
568 -       echo ${UNAME_MACHINE}-unknown-linux-gnu
569 +       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
570         exit ;;
571 -    mips:Linux:*:*)
572 +    mips:Linux:*:* | mips64:Linux:*:*)
573         eval $set_cc_for_build
574         sed 's/^        //' << EOF >$dummy.c
575         #undef CPU
576 -       #undef mips
577 -       #undef mipsel
578 +       #undef ${UNAME_MACHINE}
579 +       #undef ${UNAME_MACHINE}el
580         #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
581 -       CPU=mipsel
582 +       CPU=${UNAME_MACHINE}el
583         #else
584         #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
585 -       CPU=mips
586 +       CPU=${UNAME_MACHINE}
587         #else
588         CPU=
589         #endif
590         #endif
591  EOF
592 -       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
593 -           /^CPU/{
594 -               s: ::g
595 -               p
596 -           }'`"
597 -       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
598 +       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
599 +       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
600         ;;
601 -    mips64:Linux:*:*)
602 -       eval $set_cc_for_build
603 -       sed 's/^        //' << EOF >$dummy.c
604 -       #undef CPU
605 -       #undef mips64
606 -       #undef mips64el
607 -       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
608 -       CPU=mips64el
609 -       #else
610 -       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
611 -       CPU=mips64
612 -       #else
613 -       CPU=
614 -       #endif
615 -       #endif
616 -EOF
617 -       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
618 -           /^CPU/{
619 -               s: ::g
620 -               p
621 -           }'`"
622 -       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
623 -       ;;
624 -    or32:Linux:*:*)
625 -       echo or32-unknown-linux-gnu
626 +    openrisc*:Linux:*:*)
627 +       echo or1k-unknown-linux-${LIBC}
628         exit ;;
629 -    ppc:Linux:*:*)
630 -       echo powerpc-unknown-linux-gnu
631 +    or32:Linux:*:* | or1k*:Linux:*:*)
632 +       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
633         exit ;;
634 -    ppc64:Linux:*:*)
635 -       echo powerpc64-unknown-linux-gnu
636 +    padre:Linux:*:*)
637 +       echo sparc-unknown-linux-${LIBC}
638         exit ;;
639 -    alpha:Linux:*:*)
640 -       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
641 -         EV5)   UNAME_MACHINE=alphaev5 ;;
642 -         EV56)  UNAME_MACHINE=alphaev56 ;;
643 -         PCA56) UNAME_MACHINE=alphapca56 ;;
644 -         PCA57) UNAME_MACHINE=alphapca56 ;;
645 -         EV6)   UNAME_MACHINE=alphaev6 ;;
646 -         EV67)  UNAME_MACHINE=alphaev67 ;;
647 -         EV68*) UNAME_MACHINE=alphaev68 ;;
648 -        esac
649 -       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
650 -       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
651 -       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
652 +    parisc64:Linux:*:* | hppa64:Linux:*:*)
653 +       echo hppa64-unknown-linux-${LIBC}
654         exit ;;
655      parisc:Linux:*:* | hppa:Linux:*:*)
656         # Look for CPU level
657         case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
658 -         PA7*) echo hppa1.1-unknown-linux-gnu ;;
659 -         PA8*) echo hppa2.0-unknown-linux-gnu ;;
660 -         *)    echo hppa-unknown-linux-gnu ;;
661 +         PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
662 +         PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
663 +         *)    echo hppa-unknown-linux-${LIBC} ;;
664         esac
665         exit ;;
666 -    parisc64:Linux:*:* | hppa64:Linux:*:*)
667 -       echo hppa64-unknown-linux-gnu
668 +    ppc64:Linux:*:*)
669 +       echo powerpc64-unknown-linux-${LIBC}
670 +       exit ;;
671 +    ppc:Linux:*:*)
672 +       echo powerpc-unknown-linux-${LIBC}
673 +       exit ;;
674 +    ppc64le:Linux:*:*)
675 +       echo powerpc64le-unknown-linux-${LIBC}
676 +       exit ;;
677 +    ppcle:Linux:*:*)
678 +       echo powerpcle-unknown-linux-${LIBC}
679         exit ;;
680      s390:Linux:*:* | s390x:Linux:*:*)
681 -       echo ${UNAME_MACHINE}-ibm-linux
682 +       echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
683         exit ;;
684      sh64*:Linux:*:*)
685 -       echo ${UNAME_MACHINE}-unknown-linux-gnu
686 +       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
687         exit ;;
688      sh*:Linux:*:*)
689 -       echo ${UNAME_MACHINE}-unknown-linux-gnu
690 +       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
691         exit ;;
692      sparc:Linux:*:* | sparc64:Linux:*:*)
693 -       echo ${UNAME_MACHINE}-unknown-linux-gnu
694 +       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
695 +       exit ;;
696 +    tile*:Linux:*:*)
697 +       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
698         exit ;;
699      vax:Linux:*:*)
700 -       echo ${UNAME_MACHINE}-dec-linux-gnu
701 +       echo ${UNAME_MACHINE}-dec-linux-${LIBC}
702         exit ;;
703      x86_64:Linux:*:*)
704 -       echo x86_64-unknown-linux-gnu
705 +       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
706         exit ;;
707 -    xtensa:Linux:*:*)
708 -       echo xtensa-unknown-linux-gnu
709 +    xtensa*:Linux:*:*)
710 +       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
711         exit ;;
712 -    i*86:Linux:*:*)
713 -       # The BFD linker knows what the default object file format is, so
714 -       # first see if it will tell us. cd to the root directory to prevent
715 -       # problems with other programs or directories called `ld' in the path.
716 -       # Set LC_ALL=C to ensure ld outputs messages in English.
717 -       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
718 -                        | sed -ne '/supported targets:/!d
719 -                                   s/[         ][      ]*/ /g
720 -                                   s/.*supported targets: *//
721 -                                   s/ .*//
722 -                                   p'`
723 -        case "$ld_supported_targets" in
724 -         elf32-i386)
725 -               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
726 -               ;;
727 -         a.out-i386-linux)
728 -               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
729 -               exit ;;
730 -         coff-i386)
731 -               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
732 -               exit ;;
733 -         "")
734 -               # Either a pre-BFD a.out linker (linux-gnuoldld) or
735 -               # one that does not give us useful --help.
736 -               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
737 -               exit ;;
738 -       esac
739 -       # Determine whether the default compiler is a.out or elf
740 -       eval $set_cc_for_build
741 -       sed 's/^        //' << EOF >$dummy.c
742 -       #include <features.h>
743 -       #ifdef __ELF__
744 -       # ifdef __GLIBC__
745 -       #  if __GLIBC__ >= 2
746 -       LIBC=gnu
747 -       #  else
748 -       LIBC=gnulibc1
749 -       #  endif
750 -       # else
751 -       LIBC=gnulibc1
752 -       # endif
753 -       #else
754 -       #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
755 -       LIBC=gnu
756 -       #else
757 -       LIBC=gnuaout
758 -       #endif
759 -       #endif
760 -       #ifdef __dietlibc__
761 -       LIBC=dietlibc
762 -       #endif
763 -EOF
764 -       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
765 -           /^LIBC/{
766 -               s: ::g
767 -               p
768 -           }'`"
769 -       test x"${LIBC}" != x && {
770 -               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
771 -               exit
772 -       }
773 -       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
774 -       ;;
775      i*86:DYNIX/ptx:4*:*)
776         # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
777         # earlier versions are messed up and put the nodename in both
778 @@ -1027,11 +1032,11 @@
779         echo i386-sequent-sysv4
780         exit ;;
781      i*86:UNIX_SV:4.2MP:2.*)
782 -        # Unixware is an offshoot of SVR4, but it has its own version
783 -        # number series starting with 2...
784 -        # I am not positive that other SVR4 systems won't match this,
785 +       # Unixware is an offshoot of SVR4, but it has its own version
786 +       # number series starting with 2...
787 +       # I am not positive that other SVR4 systems won't match this,
788         # I just have to hope.  -- rms.
789 -        # Use sysv4.2uw... so that sysv4* matches it.
790 +       # Use sysv4.2uw... so that sysv4* matches it.
791         echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
792         exit ;;
793      i*86:OS/2:*:*)
794 @@ -1048,7 +1053,7 @@
795      i*86:syllable:*:*)
796         echo ${UNAME_MACHINE}-pc-syllable
797         exit ;;
798 -    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
799 +    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
800         echo i386-unknown-lynxos${UNAME_RELEASE}
801         exit ;;
802      i*86:*DOS:*:*)
803 @@ -1063,7 +1068,7 @@
804         fi
805         exit ;;
806      i*86:*:5:[678]*)
807 -       # UnixWare 7.x, OpenUNIX and OpenServer 6.
808 +       # UnixWare 7.x, OpenUNIX and OpenServer 6.
809         case `/bin/uname -X | grep "^Machine"` in
810             *486*)           UNAME_MACHINE=i486 ;;
811             *Pentium)        UNAME_MACHINE=i586 ;;
812 @@ -1091,10 +1096,13 @@
813         exit ;;
814      pc:*:*:*)
815         # Left here for compatibility:
816 -        # uname -m prints for DJGPP always 'pc', but it prints nothing about
817 -        # the processor, so we play safe by assuming i386.
818 -       echo i386-pc-msdosdjgpp
819 -        exit ;;
820 +       # uname -m prints for DJGPP always 'pc', but it prints nothing about
821 +       # the processor, so we play safe by assuming i586.
822 +       # Note: whatever this is, it MUST be the same as what config.sub
823 +       # prints for the "djgpp" host, or else GDB configury will decide that
824 +       # this is a cross-build.
825 +       echo i586-pc-msdosdjgpp
826 +       exit ;;
827      Intel:Mach:3*:*)
828         echo i386-pc-mach3
829         exit ;;
830 @@ -1129,8 +1137,18 @@
831         /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
832           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
833      3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
834 -        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
835 -          && { echo i486-ncr-sysv4; exit; } ;;
836 +       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
837 +         && { echo i486-ncr-sysv4; exit; } ;;
838 +    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
839 +       OS_REL='.3'
840 +       test -r /etc/.relid \
841 +           && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
842 +       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
843 +           && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
844 +       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
845 +           && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
846 +       /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
847 +           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
848      m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
849         echo m68k-unknown-lynxos${UNAME_RELEASE}
850         exit ;;
851 @@ -1143,7 +1161,7 @@
852      rs6000:LynxOS:2.*:*)
853         echo rs6000-unknown-lynxos${UNAME_RELEASE}
854         exit ;;
855 -    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
856 +    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
857         echo powerpc-unknown-lynxos${UNAME_RELEASE}
858         exit ;;
859      SM[BE]S:UNIX_SV:*:*)
860 @@ -1163,10 +1181,10 @@
861                 echo ns32k-sni-sysv
862         fi
863         exit ;;
864 -    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
865 -                      # says <Richard.M.Bartel@ccMail.Census.GOV>
866 -        echo i586-unisys-sysv4
867 -        exit ;;
868 +    PENTIUM:*:4.0*:*)  # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
869 +                       # says <Richard.M.Bartel@ccMail.Census.GOV>
870 +       echo i586-unisys-sysv4
871 +       exit ;;
872      *:UNIX_System_V:4*:FTX*)
873         # From Gerald Hewes <hewes@openmarket.com>.
874         # How about differentiating between stratus architectures? -djm
875 @@ -1192,11 +1210,11 @@
876         exit ;;
877      R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
878         if [ -d /usr/nec ]; then
879 -               echo mips-nec-sysv${UNAME_RELEASE}
880 +               echo mips-nec-sysv${UNAME_RELEASE}
881         else
882 -               echo mips-unknown-sysv${UNAME_RELEASE}
883 +               echo mips-unknown-sysv${UNAME_RELEASE}
884         fi
885 -        exit ;;
886 +       exit ;;
887      BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
888         echo powerpc-be-beos
889         exit ;;
890 @@ -1206,6 +1224,12 @@
891      BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
892         echo i586-pc-beos
893         exit ;;
894 +    BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
895 +       echo i586-pc-haiku
896 +       exit ;;
897 +    x86_64:Haiku:*:*)
898 +       echo x86_64-unknown-haiku
899 +       exit ;;
900      SX-4:SUPER-UX:*:*)
901         echo sx4-nec-superux${UNAME_RELEASE}
902         exit ;;
903 @@ -1232,9 +1256,31 @@
904         exit ;;
905      *:Darwin:*:*)
906         UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
907 -       case $UNAME_PROCESSOR in
908 -           unknown) UNAME_PROCESSOR=powerpc ;;
909 -       esac
910 +       eval $set_cc_for_build
911 +       if test "$UNAME_PROCESSOR" = unknown ; then
912 +           UNAME_PROCESSOR=powerpc
913 +       fi
914 +       if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
915 +           if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
916 +               if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
917 +                   (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
918 +                   grep IS_64BIT_ARCH >/dev/null
919 +               then
920 +                   case $UNAME_PROCESSOR in
921 +                       i386) UNAME_PROCESSOR=x86_64 ;;
922 +                       powerpc) UNAME_PROCESSOR=powerpc64 ;;
923 +                   esac
924 +               fi
925 +           fi
926 +       elif test "$UNAME_PROCESSOR" = i386 ; then
927 +           # Avoid executing cc on OS X 10.9, as it ships with a stub
928 +           # that puts up a graphical alert prompting to install
929 +           # developer tools.  Any system running Mac OS X 10.7 or
930 +           # later (Darwin 11 and later) is required to have a 64-bit
931 +           # processor. This is not true of the ARM version of Darwin
932 +           # that Apple uses in portable devices.
933 +           UNAME_PROCESSOR=x86_64
934 +       fi
935         echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
936         exit ;;
937      *:procnto*:*:* | *:QNX:[0123456789]*:*)
938 @@ -1248,7 +1294,10 @@
939      *:QNX:*:4*)
940         echo i386-pc-qnx
941         exit ;;
942 -    NSE-?:NONSTOP_KERNEL:*:*)
943 +    NEO-?:NONSTOP_KERNEL:*:*)
944 +       echo neo-tandem-nsk${UNAME_RELEASE}
945 +       exit ;;
946 +    NSE-*:NONSTOP_KERNEL:*:*)
947         echo nse-tandem-nsk${UNAME_RELEASE}
948         exit ;;
949      NSR-?:NONSTOP_KERNEL:*:*)
950 @@ -1293,13 +1342,13 @@
951         echo pdp10-unknown-its
952         exit ;;
953      SEI:*:*:SEIUX)
954 -        echo mips-sei-seiux${UNAME_RELEASE}
955 +       echo mips-sei-seiux${UNAME_RELEASE}
956         exit ;;
957      *:DragonFly:*:*)
958         echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
959         exit ;;
960      *:*VMS:*:*)
961 -       UNAME_MACHINE=`(uname -p) 2>/dev/null`
962 +       UNAME_MACHINE=`(uname -p) 2>/dev/null`
963         case "${UNAME_MACHINE}" in
964             A*) echo alpha-dec-vms ; exit ;;
965             I*) echo ia64-dec-vms ; exit ;;
966 @@ -1314,158 +1363,13 @@
967      i*86:rdos:*:*)
968         echo ${UNAME_MACHINE}-pc-rdos
969         exit ;;
970 -esac
972 -#echo '(No uname command or uname output not recognized.)' 1>&2
973 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
975 -eval $set_cc_for_build
976 -cat >$dummy.c <<EOF
977 -#ifdef _SEQUENT_
978 -# include <sys/types.h>
979 -# include <sys/utsname.h>
980 -#endif
981 -main ()
983 -#if defined (sony)
984 -#if defined (MIPSEB)
985 -  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
986 -     I don't know....  */
987 -  printf ("mips-sony-bsd\n"); exit (0);
988 -#else
989 -#include <sys/param.h>
990 -  printf ("m68k-sony-newsos%s\n",
991 -#ifdef NEWSOS4
992 -          "4"
993 -#else
994 -         ""
995 -#endif
996 -         ); exit (0);
997 -#endif
998 -#endif
1000 -#if defined (__arm) && defined (__acorn) && defined (__unix)
1001 -  printf ("arm-acorn-riscix\n"); exit (0);
1002 -#endif
1004 -#if defined (hp300) && !defined (hpux)
1005 -  printf ("m68k-hp-bsd\n"); exit (0);
1006 -#endif
1008 -#if defined (NeXT)
1009 -#if !defined (__ARCHITECTURE__)
1010 -#define __ARCHITECTURE__ "m68k"
1011 -#endif
1012 -  int version;
1013 -  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1014 -  if (version < 4)
1015 -    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1016 -  else
1017 -    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1018 -  exit (0);
1019 -#endif
1021 -#if defined (MULTIMAX) || defined (n16)
1022 -#if defined (UMAXV)
1023 -  printf ("ns32k-encore-sysv\n"); exit (0);
1024 -#else
1025 -#if defined (CMU)
1026 -  printf ("ns32k-encore-mach\n"); exit (0);
1027 -#else
1028 -  printf ("ns32k-encore-bsd\n"); exit (0);
1029 -#endif
1030 -#endif
1031 -#endif
1033 -#if defined (__386BSD__)
1034 -  printf ("i386-pc-bsd\n"); exit (0);
1035 -#endif
1037 -#if defined (sequent)
1038 -#if defined (i386)
1039 -  printf ("i386-sequent-dynix\n"); exit (0);
1040 -#endif
1041 -#if defined (ns32000)
1042 -  printf ("ns32k-sequent-dynix\n"); exit (0);
1043 -#endif
1044 -#endif
1046 -#if defined (_SEQUENT_)
1047 -    struct utsname un;
1049 -    uname(&un);
1051 -    if (strncmp(un.version, "V2", 2) == 0) {
1052 -       printf ("i386-sequent-ptx2\n"); exit (0);
1053 -    }
1054 -    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1055 -       printf ("i386-sequent-ptx1\n"); exit (0);
1056 -    }
1057 -    printf ("i386-sequent-ptx\n"); exit (0);
1059 -#endif
1061 -#if defined (vax)
1062 -# if !defined (ultrix)
1063 -#  include <sys/param.h>
1064 -#  if defined (BSD)
1065 -#   if BSD == 43
1066 -      printf ("vax-dec-bsd4.3\n"); exit (0);
1067 -#   else
1068 -#    if BSD == 199006
1069 -      printf ("vax-dec-bsd4.3reno\n"); exit (0);
1070 -#    else
1071 -      printf ("vax-dec-bsd\n"); exit (0);
1072 -#    endif
1073 -#   endif
1074 -#  else
1075 -    printf ("vax-dec-bsd\n"); exit (0);
1076 -#  endif
1077 -# else
1078 -    printf ("vax-dec-ultrix\n"); exit (0);
1079 -# endif
1080 -#endif
1082 -#if defined (alliant) && defined (i860)
1083 -  printf ("i860-alliant-bsd\n"); exit (0);
1084 -#endif
1086 -  exit (1);
1088 -EOF
1090 -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1091 -       { echo "$SYSTEM_NAME"; exit; }
1093 -# Apollos put the system type in the environment.
1095 -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1097 -# Convex versions that predate uname can use getsysinfo(1)
1099 -if [ -x /usr/convex/getsysinfo ]
1100 -then
1101 -    case `getsysinfo -f cpu_type` in
1102 -    c1*)
1103 -       echo c1-convex-bsd
1104 -       exit ;;
1105 -    c2*)
1106 -       if getsysinfo -f scalar_acc
1107 -       then echo c32-convex-bsd
1108 -       else echo c2-convex-bsd
1109 -       fi
1110 -       exit ;;
1111 -    c34*)
1112 -       echo c34-convex-bsd
1113 -       exit ;;
1114 -    c38*)
1115 -       echo c38-convex-bsd
1116 +    i*86:AROS:*:*)
1117 +       echo ${UNAME_MACHINE}-pc-aros
1118         exit ;;
1119 -    c4*)
1120 -       echo c4-convex-bsd
1121 +    x86_64:VMkernel:*:*)
1122 +       echo ${UNAME_MACHINE}-unknown-esx
1123         exit ;;
1124 -    esac
1126 +esac
1128  cat >&2 <<EOF
1129  $0: unable to guess system type
1130 @@ -1474,9 +1378,9 @@
1131  the operating system you are using. It is advised that you
1132  download the most up to date version of the config scripts from
1134 -  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
1135 +  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1136  and
1137 -  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
1138 +  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1140  If the version you run ($0) is already up to date, please
1141  send the following data and any information you think might be
1142 --- config.sub
1143 +++ config.sub
1144 @@ -1,44 +1,40 @@
1145  #! /bin/sh
1146  # Configuration validation subroutine script.
1147 -#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
1148 -#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
1149 -#   Inc.
1151 -timestamp='2007-04-29'
1153 -# This file is (in principle) common to ALL GNU software.
1154 -# The presence of a machine in this file suggests that SOME GNU software
1155 -# can handle that machine.  It does not imply ALL GNU software can.
1157 -# This file is free software; you can redistribute it and/or modify
1158 -# it under the terms of the GNU General Public License as published by
1159 -# the Free Software Foundation; either version 2 of the License, or
1160 +#   Copyright 1992-2014 Free Software Foundation, Inc.
1162 +timestamp='2014-05-01'
1164 +# This file is free software; you can redistribute it and/or modify it
1165 +# under the terms of the GNU General Public License as published by
1166 +# the Free Software Foundation; either version 3 of the License, or
1167  # (at your option) any later version.
1169 -# This program is distributed in the hope that it will be useful,
1170 -# but WITHOUT ANY WARRANTY; without even the implied warranty of
1171 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1172 -# GNU General Public License for more details.
1173 +# This program is distributed in the hope that it will be useful, but
1174 +# WITHOUT ANY WARRANTY; without even the implied warranty of
1175 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1176 +# General Public License for more details.
1178  # You should have received a copy of the GNU General Public License
1179 -# along with this program; if not, write to the Free Software
1180 -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
1181 -# 02110-1301, USA.
1182 +# along with this program; if not, see <http://www.gnu.org/licenses/>.
1184  # As a special exception to the GNU General Public License, if you
1185  # distribute this file as part of a program that contains a
1186  # configuration script generated by Autoconf, you may include it under
1187 -# the same distribution terms that you use for the rest of that program.
1188 +# the same distribution terms that you use for the rest of that
1189 +# program.  This Exception is an additional permission under section 7
1190 +# of the GNU General Public License, version 3 ("GPLv3").
1193 -# Please send patches to <config-patches@gnu.org>.  Submit a context
1194 -# diff and a properly formatted ChangeLog entry.
1195 +# Please send patches with a ChangeLog entry to config-patches@gnu.org.
1197  # Configuration subroutine to validate and canonicalize a configuration type.
1198  # Supply the specified configuration type as an argument.
1199  # If it is invalid, we print an error message on stderr and exit with code 1.
1200  # Otherwise, we print the canonical config type on stdout and succeed.
1202 +# You can get the latest version of this script from:
1203 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1205  # This file is supposed to be the same for all GNU packages
1206  # and recognize all the CPU types, system types and aliases
1207  # that are meaningful with *any* GNU software.
1208 @@ -72,8 +68,7 @@
1209  version="\
1210  GNU config.sub ($timestamp)
1212 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
1213 -Free Software Foundation, Inc.
1214 +Copyright 1992-2014 Free Software Foundation, Inc.
1216  This is free software; see the source for copying conditions.  There is NO
1217  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
1218 @@ -120,12 +115,18 @@
1219  # Here we must recognize all the valid KERNEL-OS combinations.
1220  maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
1221  case $maybe_os in
1222 -  nto-qnx* | linux-androideabi* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
1223 -  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
1224 +  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
1225 +  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
1226 +  knetbsd*-gnu* | netbsd*-gnu* | \
1227 +  kopensolaris*-gnu* | \
1228    storm-chaos* | os2-emx* | rtmk-nova*)
1229      os=-$maybe_os
1230      basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
1231      ;;
1232 +  android-linux)
1233 +    os=-linux-android
1234 +    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
1235 +    ;;
1236    *)
1237      basic_machine=`echo $1 | sed 's/-[^-]*$//'`
1238      if [ $basic_machine != $1 ]
1239 @@ -148,10 +149,13 @@
1240         -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
1241         -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
1242         -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
1243 -       -apple | -axis | -knuth | -cray)
1244 +       -apple | -axis | -knuth | -cray | -microblaze*)
1245                 os=
1246                 basic_machine=$1
1247                 ;;
1248 +       -bluegene*)
1249 +               os=-cnk
1250 +               ;;
1251         -sim | -cisco | -oki | -wec | -winbond)
1252                 os=
1253                 basic_machine=$1
1254 @@ -166,10 +170,10 @@
1255                 os=-chorusos
1256                 basic_machine=$1
1257                 ;;
1258 -       -chorusrdb)
1259 -               os=-chorusrdb
1260 +       -chorusrdb)
1261 +               os=-chorusrdb
1262                 basic_machine=$1
1263 -               ;;
1264 +               ;;
1265         -hiux*)
1266                 os=-hiuxwe2
1267                 ;;
1268 @@ -214,6 +218,12 @@
1269         -isc*)
1270                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1271                 ;;
1272 +       -lynx*178)
1273 +               os=-lynxos178
1274 +               ;;
1275 +       -lynx*5)
1276 +               os=-lynxos5
1277 +               ;;
1278         -lynx*)
1279                 os=-lynxos
1280                 ;;
1281 @@ -238,59 +248,85 @@
1282         # Some are omitted here because they have special meanings below.
1283         1750a | 580 \
1284         | a29k \
1285 +       | aarch64 | aarch64_be \
1286         | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
1287         | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
1288         | am33_2.0 \
1289 -       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
1290 +       | arc | arceb \
1291 +       | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
1292 +       | avr | avr32 \
1293 +       | be32 | be64 \
1294         | bfin \
1295 -       | c4x | clipper \
1296 +       | c4x | c8051 | clipper \
1297         | d10v | d30v | dlx | dsp16xx \
1298 +       | epiphany \
1299         | fido | fr30 | frv \
1300         | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
1301 +       | hexagon \
1302         | i370 | i860 | i960 | ia64 \
1303         | ip2k | iq2000 \
1304 +       | k1om \
1305 +       | le32 | le64 \
1306 +       | lm32 \
1307         | m32c | m32r | m32rle | m68000 | m68k | m88k \
1308 -       | maxq | mb | microblaze | mcore | mep \
1309 +       | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
1310         | mips | mipsbe | mipseb | mipsel | mipsle \
1311         | mips16 \
1312         | mips64 | mips64el \
1313 -       | mips64vr | mips64vrel \
1314 +       | mips64octeon | mips64octeonel \
1315         | mips64orion | mips64orionel \
1316 +       | mips64r5900 | mips64r5900el \
1317 +       | mips64vr | mips64vrel \
1318         | mips64vr4100 | mips64vr4100el \
1319         | mips64vr4300 | mips64vr4300el \
1320         | mips64vr5000 | mips64vr5000el \
1321         | mips64vr5900 | mips64vr5900el \
1322         | mipsisa32 | mipsisa32el \
1323         | mipsisa32r2 | mipsisa32r2el \
1324 +       | mipsisa32r6 | mipsisa32r6el \
1325         | mipsisa64 | mipsisa64el \
1326         | mipsisa64r2 | mipsisa64r2el \
1327 +       | mipsisa64r6 | mipsisa64r6el \
1328         | mipsisa64sb1 | mipsisa64sb1el \
1329         | mipsisa64sr71k | mipsisa64sr71kel \
1330 +       | mipsr5900 | mipsr5900el \
1331         | mipstx39 | mipstx39el \
1332         | mn10200 | mn10300 \
1333 +       | moxie \
1334         | mt \
1335         | msp430 \
1336 -       | nios | nios2 \
1337 +       | nds32 | nds32le | nds32be \
1338 +       | nios | nios2 | nios2eb | nios2el \
1339         | ns16k | ns32k \
1340 -       | or32 \
1341 +       | open8 | or1k | or1knd | or32 \
1342         | pdp10 | pdp11 | pj | pjl \
1343 -       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
1344 +       | powerpc | powerpc64 | powerpc64le | powerpcle \
1345         | pyramid \
1346 +       | rl78 | rx \
1347         | score \
1348 -       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
1349 +       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
1350         | sh64 | sh64le \
1351         | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
1352         | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
1353 -       | spu | strongarm \
1354 -       | tahoe | thumb | tic4x | tic80 | tron \
1355 -       | v850 | v850e \
1356 +       | spu \
1357 +       | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
1358 +       | ubicom32 \
1359 +       | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
1360         | we32k \
1361 -       | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
1362 -       | z8k)
1363 +       | x86 | xc16x | xstormy16 | xtensa \
1364 +       | z8k | z80)
1365                 basic_machine=$basic_machine-unknown
1366                 ;;
1367 -       m6811 | m68hc11 | m6812 | m68hc12)
1368 -               # Motorola 68HC11/12.
1369 +       c54x)
1370 +               basic_machine=tic54x-unknown
1371 +               ;;
1372 +       c55x)
1373 +               basic_machine=tic55x-unknown
1374 +               ;;
1375 +       c6x)
1376 +               basic_machine=tic6x-unknown
1377 +               ;;
1378 +       m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
1379                 basic_machine=$basic_machine-unknown
1380                 os=-none
1381                 ;;
1382 @@ -300,6 +336,21 @@
1383                 basic_machine=mt-unknown
1384                 ;;
1386 +       strongarm | thumb | xscale)
1387 +               basic_machine=arm-unknown
1388 +               ;;
1389 +       xgate)
1390 +               basic_machine=$basic_machine-unknown
1391 +               os=-none
1392 +               ;;
1393 +       xscaleeb)
1394 +               basic_machine=armeb-unknown
1395 +               ;;
1397 +       xscaleel)
1398 +               basic_machine=armel-unknown
1399 +               ;;
1401         # We use `pc' rather than `unknown'
1402         # because (1) that's what they normally are, and
1403         # (2) the word "unknown" tends to confuse beginning users.
1404 @@ -314,64 +365,86 @@
1405         # Recognize the basic CPU types with company name.
1406         580-* \
1407         | a29k-* \
1408 +       | aarch64-* | aarch64_be-* \
1409         | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
1410         | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
1411 -       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
1412 +       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
1413         | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
1414         | avr-* | avr32-* \
1415 +       | be32-* | be64-* \
1416         | bfin-* | bs2000-* \
1417 -       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
1418 -       | clipper-* | craynv-* | cydra-* \
1419 +       | c[123]* | c30-* | [cjt]90-* | c4x-* \
1420 +       | c8051-* | clipper-* | craynv-* | cydra-* \
1421         | d10v-* | d30v-* | dlx-* \
1422         | elxsi-* \
1423         | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
1424         | h8300-* | h8500-* \
1425         | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
1426 +       | hexagon-* \
1427         | i*86-* | i860-* | i960-* | ia64-* \
1428         | ip2k-* | iq2000-* \
1429 +       | k1om-* \
1430 +       | le32-* | le64-* \
1431 +       | lm32-* \
1432         | m32c-* | m32r-* | m32rle-* \
1433         | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
1434 -       | m88110-* | m88k-* | maxq-* | mcore-* \
1435 +       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
1436 +       | microblaze-* | microblazeel-* \
1437         | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
1438         | mips16-* \
1439         | mips64-* | mips64el-* \
1440 -       | mips64vr-* | mips64vrel-* \
1441 +       | mips64octeon-* | mips64octeonel-* \
1442         | mips64orion-* | mips64orionel-* \
1443 +       | mips64r5900-* | mips64r5900el-* \
1444 +       | mips64vr-* | mips64vrel-* \
1445         | mips64vr4100-* | mips64vr4100el-* \
1446         | mips64vr4300-* | mips64vr4300el-* \
1447         | mips64vr5000-* | mips64vr5000el-* \
1448         | mips64vr5900-* | mips64vr5900el-* \
1449         | mipsisa32-* | mipsisa32el-* \
1450         | mipsisa32r2-* | mipsisa32r2el-* \
1451 +       | mipsisa32r6-* | mipsisa32r6el-* \
1452         | mipsisa64-* | mipsisa64el-* \
1453         | mipsisa64r2-* | mipsisa64r2el-* \
1454 +       | mipsisa64r6-* | mipsisa64r6el-* \
1455         | mipsisa64sb1-* | mipsisa64sb1el-* \
1456         | mipsisa64sr71k-* | mipsisa64sr71kel-* \
1457 +       | mipsr5900-* | mipsr5900el-* \
1458         | mipstx39-* | mipstx39el-* \
1459         | mmix-* \
1460         | mt-* \
1461         | msp430-* \
1462 -       | nios-* | nios2-* \
1463 +       | nds32-* | nds32le-* | nds32be-* \
1464 +       | nios-* | nios2-* | nios2eb-* | nios2el-* \
1465         | none-* | np1-* | ns16k-* | ns32k-* \
1466 +       | open8-* \
1467 +       | or1k*-* \
1468         | orion-* \
1469         | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
1470 -       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
1471 +       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
1472         | pyramid-* \
1473 -       | romp-* | rs6000-* \
1474 -       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
1475 +       | rl78-* | romp-* | rs6000-* | rx-* \
1476 +       | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
1477         | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
1478         | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
1479         | sparclite-* \
1480 -       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
1481 -       | tahoe-* | thumb-* \
1482 +       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
1483 +       | tahoe-* \
1484         | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
1485 +       | tile*-* \
1486         | tron-* \
1487 -       | v850-* | v850e-* | vax-* \
1488 +       | ubicom32-* \
1489 +       | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
1490 +       | vax-* \
1491         | we32k-* \
1492 -       | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
1493 -       | xstormy16-* | xtensa-* \
1494 +       | x86-* | x86_64-* | xc16x-* | xps100-* \
1495 +       | xstormy16-* | xtensa*-* \
1496         | ymp-* \
1497 -       | z8k-*)
1498 +       | z8k-* | z80-*)
1499 +               ;;
1500 +       # Recognize the basic CPU types without company name, with glob match.
1501 +       xtensa*)
1502 +               basic_machine=$basic_machine-unknown
1503                 ;;
1504         # Recognize the various machine names and aliases which stand
1505         # for a CPU type and a company and sometimes even an OS.
1506 @@ -389,7 +462,7 @@
1507                 basic_machine=a29k-amd
1508                 os=-udi
1509                 ;;
1510 -       abacus)
1511 +       abacus)
1512                 basic_machine=abacus-unknown
1513                 ;;
1514         adobe68k)
1515 @@ -435,6 +508,10 @@
1516                 basic_machine=m68k-apollo
1517                 os=-bsd
1518                 ;;
1519 +       aros)
1520 +               basic_machine=i386-pc
1521 +               os=-aros
1522 +               ;;
1523         aux)
1524                 basic_machine=m68k-apple
1525                 os=-aux
1526 @@ -443,10 +520,35 @@
1527                 basic_machine=ns32k-sequent
1528                 os=-dynix
1529                 ;;
1530 +       blackfin)
1531 +               basic_machine=bfin-unknown
1532 +               os=-linux
1533 +               ;;
1534 +       blackfin-*)
1535 +               basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
1536 +               os=-linux
1537 +               ;;
1538 +       bluegene*)
1539 +               basic_machine=powerpc-ibm
1540 +               os=-cnk
1541 +               ;;
1542 +       c54x-*)
1543 +               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
1544 +               ;;
1545 +       c55x-*)
1546 +               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
1547 +               ;;
1548 +       c6x-*)
1549 +               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
1550 +               ;;
1551         c90)
1552                 basic_machine=c90-cray
1553                 os=-unicos
1554                 ;;
1555 +       cegcc)
1556 +               basic_machine=arm-unknown
1557 +               os=-cegcc
1558 +               ;;
1559         convex-c1)
1560                 basic_machine=c1-convex
1561                 os=-bsd
1562 @@ -475,8 +577,8 @@
1563                 basic_machine=craynv-cray
1564                 os=-unicosmp
1565                 ;;
1566 -       cr16c)
1567 -               basic_machine=cr16c-unknown
1568 +       cr16 | cr16-*)
1569 +               basic_machine=cr16-unknown
1570                 os=-elf
1571                 ;;
1572         crds | unos)
1573 @@ -514,6 +616,10 @@
1574                 basic_machine=m88k-motorola
1575                 os=-sysv3
1576                 ;;
1577 +       dicos)
1578 +               basic_machine=i686-pc
1579 +               os=-dicos
1580 +               ;;
1581         djgpp)
1582                 basic_machine=i586-pc
1583                 os=-msdosdjgpp
1584 @@ -629,7 +735,6 @@
1585         i370-ibm* | ibm*)
1586                 basic_machine=i370-ibm
1587                 ;;
1588 -# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
1589         i*86v32)
1590                 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
1591                 os=-sysv32
1592 @@ -668,6 +773,14 @@
1593                 basic_machine=m68k-isi
1594                 os=-sysv
1595                 ;;
1596 +       m68knommu)
1597 +               basic_machine=m68k-unknown
1598 +               os=-linux
1599 +               ;;
1600 +       m68knommu-*)
1601 +               basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
1602 +               os=-linux
1603 +               ;;
1604         m88k-omron*)
1605                 basic_machine=m88k-omron
1606                 ;;
1607 @@ -679,8 +792,15 @@
1608                 basic_machine=ns32k-utek
1609                 os=-sysv
1610                 ;;
1611 +       microblaze*)
1612 +               basic_machine=microblaze-xilinx
1613 +               ;;
1614 +       mingw64)
1615 +               basic_machine=x86_64-pc
1616 +               os=-mingw64
1617 +               ;;
1618         mingw32)
1619 -               basic_machine=i386-pc
1620 +               basic_machine=i686-pc
1621                 os=-mingw32
1622                 ;;
1623         mingw32ce)
1624 @@ -715,10 +835,18 @@
1625         ms1-*)
1626                 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
1627                 ;;
1628 +       msys)
1629 +               basic_machine=i686-pc
1630 +               os=-msys
1631 +               ;;
1632         mvs)
1633                 basic_machine=i370-ibm
1634                 os=-mvs
1635                 ;;
1636 +       nacl)
1637 +               basic_machine=le32-unknown
1638 +               os=-nacl
1639 +               ;;
1640         ncr3000)
1641                 basic_machine=i486-ncr
1642                 os=-sysv4
1643 @@ -783,6 +911,12 @@
1644         np1)
1645                 basic_machine=np1-gould
1646                 ;;
1647 +       neo-tandem)
1648 +               basic_machine=neo-tandem
1649 +               ;;
1650 +       nse-tandem)
1651 +               basic_machine=nse-tandem
1652 +               ;;
1653         nsr-tandem)
1654                 basic_machine=nsr-tandem
1655                 ;;
1656 @@ -813,6 +947,14 @@
1657                 basic_machine=i860-intel
1658                 os=-osf
1659                 ;;
1660 +       parisc)
1661 +               basic_machine=hppa-unknown
1662 +               os=-linux
1663 +               ;;
1664 +       parisc-*)
1665 +               basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
1666 +               os=-linux
1667 +               ;;
1668         pbd)
1669                 basic_machine=sparc-tti
1670                 ;;
1671 @@ -857,9 +999,10 @@
1672                 ;;
1673         power)  basic_machine=power-ibm
1674                 ;;
1675 -       ppc)    basic_machine=powerpc-unknown
1676 +       ppc | ppcbe)    basic_machine=powerpc-unknown
1677                 ;;
1678 -       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1679 +       ppc-* | ppcbe-*)
1680 +               basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1681                 ;;
1682         ppcle | powerpclittle | ppc-le | powerpc-little)
1683                 basic_machine=powerpcle-unknown
1684 @@ -884,7 +1027,11 @@
1685                 basic_machine=i586-unknown
1686                 os=-pw32
1687                 ;;
1688 -       rdos)
1689 +       rdos | rdos64)
1690 +               basic_machine=x86_64-pc
1691 +               os=-rdos
1692 +               ;;
1693 +       rdos32)
1694                 basic_machine=i386-pc
1695                 os=-rdos
1696                 ;;
1697 @@ -953,6 +1100,9 @@
1698                 basic_machine=i860-stratus
1699                 os=-sysv4
1700                 ;;
1701 +       strongarm-* | thumb-*)
1702 +               basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1703 +               ;;
1704         sun2)
1705                 basic_machine=m68000-sun
1706                 ;;
1707 @@ -1009,17 +1159,9 @@
1708                 basic_machine=t90-cray
1709                 os=-unicos
1710                 ;;
1711 -       tic54x | c54x*)
1712 -               basic_machine=tic54x-unknown
1713 -               os=-coff
1714 -               ;;
1715 -       tic55x | c55x*)
1716 -               basic_machine=tic55x-unknown
1717 -               os=-coff
1718 -               ;;
1719 -       tic6x | c6x*)
1720 -               basic_machine=tic6x-unknown
1721 -               os=-coff
1722 +       tile*)
1723 +               basic_machine=$basic_machine-unknown
1724 +               os=-linux-gnu
1725                 ;;
1726         tx39)
1727                 basic_machine=mipstx39-unknown
1728 @@ -1088,6 +1230,9 @@
1729         xps | xps100)
1730                 basic_machine=xps100-honeywell
1731                 ;;
1732 +       xscale-* | xscalee[bl]-*)
1733 +               basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1734 +               ;;
1735         ymp)
1736                 basic_machine=ymp-cray
1737                 os=-unicos
1738 @@ -1096,6 +1241,10 @@
1739                 basic_machine=z8k-unknown
1740                 os=-sim
1741                 ;;
1742 +       z80-*-coff)
1743 +               basic_machine=z80-unknown
1744 +               os=-sim
1745 +               ;;
1746         none)
1747                 basic_machine=none-none
1748                 os=-none
1749 @@ -1134,7 +1283,7 @@
1750         we32k)
1751                 basic_machine=we32k-att
1752                 ;;
1753 -       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
1754 +       sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1755                 basic_machine=sh-unknown
1756                 ;;
1757         sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1758 @@ -1181,9 +1330,12 @@
1759  if [ x"$os" != x"" ]
1760  then
1761  case $os in
1762 -        # First match some system type aliases
1763 -        # that might get confused with valid system types.
1764 +       # First match some system type aliases
1765 +       # that might get confused with valid system types.
1766         # -solaris* is a basic system type, with this one exception.
1767 +       -auroraux)
1768 +               os=-auroraux
1769 +               ;;
1770         -solaris1 | -solaris1.*)
1771                 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1772                 ;;
1773 @@ -1204,21 +1356,23 @@
1774         # Each alternative MUST END IN A *, to match a version number.
1775         # -sysv* is not here because it comes later, after sysvr4.
1776         -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1777 -             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1778 -             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1779 +             | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1780 +             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1781 +             | -sym* | -kopensolaris* | -plan9* \
1782               | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1783 -             | -aos* \
1784 +             | -aos* | -aros* \
1785               | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1786               | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1787               | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1788 -             | -openbsd* | -solidbsd* \
1789 +             | -bitrig* | -openbsd* | -solidbsd* \
1790               | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1791               | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1792               | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1793               | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1794 -             | -chorusos* | -chorusrdb* \
1795 -             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1796 -             | -mingw32* | -linux-androideabi | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1797 +             | -chorusos* | -chorusrdb* | -cegcc* \
1798 +             | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1799 +             | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1800 +             | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1801               | -uxpv* | -beos* | -mpeix* | -udk* \
1802               | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1803               | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1804 @@ -1226,7 +1380,7 @@
1805               | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1806               | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1807               | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1808 -             | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
1809 +             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
1810         # Remember, each alternative MUST END IN *, to match a version number.
1811                 ;;
1812         -qnx*)
1813 @@ -1265,7 +1419,7 @@
1814         -opened*)
1815                 os=-openedition
1816                 ;;
1817 -        -os400*)
1818 +       -os400*)
1819                 os=-os400
1820                 ;;
1821         -wince*)
1822 @@ -1314,7 +1468,7 @@
1823         -sinix*)
1824                 os=-sysv4
1825                 ;;
1826 -        -tpf*)
1827 +       -tpf*)
1828                 os=-tpf
1829                 ;;
1830         -triton*)
1831 @@ -1350,12 +1504,14 @@
1832         -aros*)
1833                 os=-aros
1834                 ;;
1835 -       -kaos*)
1836 -               os=-kaos
1837 -               ;;
1838         -zvmoe)
1839                 os=-zvmoe
1840                 ;;
1841 +       -dicos*)
1842 +               os=-dicos
1843 +               ;;
1844 +       -nacl*)
1845 +               ;;
1846         -none)
1847                 ;;
1848         *)
1849 @@ -1378,10 +1534,10 @@
1850  # system, and we'll never get to this point.
1852  case $basic_machine in
1853 -        score-*)
1854 +       score-*)
1855                 os=-elf
1856                 ;;
1857 -        spu-*)
1858 +       spu-*)
1859                 os=-elf
1860                 ;;
1861         *-acorn)
1862 @@ -1393,8 +1549,23 @@
1863         arm*-semi)
1864                 os=-aout
1865                 ;;
1866 -        c4x-* | tic4x-*)
1867 -               os=-coff
1868 +       c4x-* | tic4x-*)
1869 +               os=-coff
1870 +               ;;
1871 +       c8051-*)
1872 +               os=-elf
1873 +               ;;
1874 +       hexagon-*)
1875 +               os=-elf
1876 +               ;;
1877 +       tic54x-*)
1878 +               os=-coff
1879 +               ;;
1880 +       tic55x-*)
1881 +               os=-coff
1882 +               ;;
1883 +       tic6x-*)
1884 +               os=-coff
1885                 ;;
1886         # This must come before the *-dec entry.
1887         pdp10-*)
1888 @@ -1414,14 +1585,11 @@
1889                 ;;
1890         m68000-sun)
1891                 os=-sunos3
1892 -               # This also exists in the configure program, but was not the
1893 -               # default.
1894 -               # os=-sunos4
1895                 ;;
1896         m68*-cisco)
1897                 os=-aout
1898                 ;;
1899 -        mep-*)
1900 +       mep-*)
1901                 os=-elf
1902                 ;;
1903         mips*-cisco)
1904 @@ -1448,7 +1616,7 @@
1905         *-ibm)
1906                 os=-aix
1907                 ;;
1908 -       *-knuth)
1909 +       *-knuth)
1910                 os=-mmixware
1911                 ;;
1912         *-wec)
1913 @@ -1553,7 +1721,7 @@
1914                         -sunos*)
1915                                 vendor=sun
1916                                 ;;
1917 -                       -aix*)
1918 +                       -cnk*|-aix*)
1919                                 vendor=ibm
1920                                 ;;
1921                         -beos*)