1 --- config/config.guess
2 +++ config/config.guess
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, 2007, 2008, 2009, 2010,
8 -# 2011, 2012 Free Software Foundation, Inc.
9 +# Copyright 1992-2014 Free Software Foundation, Inc.
11 -timestamp='2012-02-10'
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.
20 # This program is distributed in the hope that it will be useful, but
22 # As a special exception to the GNU General Public License, if you
23 # distribute this file as part of a program that contains a
24 # configuration script generated by Autoconf, you may include it under
25 -# the same distribution terms that you use for the rest of that program.
28 -# Originally written by Per Bothner. Please send patches (context
29 -# diff format) to <config-patches@gnu.org> and include a ChangeLog
31 +# the same distribution terms that you use for the rest of that
32 +# program. This Exception is an additional permission under section 7
33 +# of the GNU General Public License, version 3 ("GPLv3").
35 -# This script attempts to guess a canonical system name similar to
36 -# config.sub. If it succeeds, it prints the system name on stdout, and
37 -# exits with 0. Otherwise, it exits with 1.
38 +# Originally written by Per Bothner.
40 # You can get the latest version of this script from:
41 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
43 +# Please send patches with a ChangeLog entry to config-patches@gnu.org.
46 me=`echo "$0" | sed -e 's,.*/,,'`
49 GNU config.guess ($timestamp)
51 Originally written by Per Bothner.
52 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
53 -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
54 -Free Software Foundation, Inc.
55 +Copyright 1992-2014 Free Software Foundation, Inc.
57 This is free software; see the source for copying conditions. There is NO
58 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
60 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
61 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
63 +case "${UNAME_SYSTEM}" in
65 + # If the system lacks a compiler, then just pick glibc.
66 + # We could probably try harder.
69 + eval $set_cc_for_build
70 + cat <<-EOF > $dummy.c
71 + #include <features.h>
72 + #if defined(__UCLIBC__)
74 + #elif defined(__dietlibc__)
80 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
84 # Note: order is significant - the case branches are not exclusive.
86 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
88 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
89 echo "${machine}-${os}${release}"
92 + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
93 + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
96 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
97 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
99 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
100 echo arm-acorn-riscix${UNAME_RELEASE}
102 - arm:riscos:*:*|arm:RISCOS:*:*)
103 + arm*:riscos:*:*|arm*:RISCOS:*:*)
104 echo arm-unknown-riscos
106 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
107 @@ -801,10 +820,13 @@
109 echo ${UNAME_MACHINE}-pc-cygwin
112 + echo ${UNAME_MACHINE}-pc-mingw64
115 echo ${UNAME_MACHINE}-pc-mingw32
119 echo ${UNAME_MACHINE}-pc-msys
122 @@ -852,15 +874,22 @@
126 - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
127 + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
130 # other systems with GNU libc and userland
131 - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
132 + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
135 echo ${UNAME_MACHINE}-pc-minix
138 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
140 + aarch64_be:Linux:*:*)
141 + UNAME_MACHINE=aarch64_be
142 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
145 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
146 EV5) UNAME_MACHINE=alphaev5 ;;
147 @@ -872,59 +901,54 @@
148 EV68*) UNAME_MACHINE=alphaev68 ;;
150 objdump --private-headers /bin/sh | grep -q ld.so.1
151 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
152 - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
153 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
154 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
156 + arc:Linux:*:* | arceb:Linux:*:*)
157 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
160 eval $set_cc_for_build
161 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
162 | grep -q __ARM_EABI__
164 - echo ${UNAME_MACHINE}-unknown-linux-gnu
165 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
167 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
168 | grep -q __ARM_PCS_VFP
170 - echo ${UNAME_MACHINE}-unknown-linux-gnueabi
171 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
173 - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
174 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
179 - echo ${UNAME_MACHINE}-unknown-linux-gnu
180 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
183 - echo ${UNAME_MACHINE}-axis-linux-gnu
184 + echo ${UNAME_MACHINE}-axis-linux-${LIBC}
187 - echo ${UNAME_MACHINE}-axis-linux-gnu
188 + echo ${UNAME_MACHINE}-axis-linux-${LIBC}
191 - echo ${UNAME_MACHINE}-unknown-linux-gnu
192 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
195 - echo ${UNAME_MACHINE}-unknown-linux-gnu
196 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
200 - eval $set_cc_for_build
201 - sed 's/^ //' << EOF >$dummy.c
202 - #ifdef __dietlibc__
206 - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
207 - echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
208 + echo ${UNAME_MACHINE}-pc-linux-${LIBC}
211 - echo ${UNAME_MACHINE}-unknown-linux-gnu
212 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
215 - echo ${UNAME_MACHINE}-unknown-linux-gnu
216 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
219 - echo ${UNAME_MACHINE}-unknown-linux-gnu
220 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
222 mips:Linux:*:* | mips64:Linux:*:*)
223 eval $set_cc_for_build
224 @@ -943,54 +967,63 @@
227 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
228 - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
229 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
232 - echo ${UNAME_MACHINE}-unknown-linux-gnu
233 + openrisc*:Linux:*:*)
234 + echo or1k-unknown-linux-${LIBC}
236 + or32:Linux:*:* | or1k*:Linux:*:*)
237 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
240 - echo sparc-unknown-linux-gnu
241 + echo sparc-unknown-linux-${LIBC}
243 parisc64:Linux:*:* | hppa64:Linux:*:*)
244 - echo hppa64-unknown-linux-gnu
245 + echo hppa64-unknown-linux-${LIBC}
247 parisc:Linux:*:* | hppa:Linux:*:*)
249 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
250 - PA7*) echo hppa1.1-unknown-linux-gnu ;;
251 - PA8*) echo hppa2.0-unknown-linux-gnu ;;
252 - *) echo hppa-unknown-linux-gnu ;;
253 + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
254 + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
255 + *) echo hppa-unknown-linux-${LIBC} ;;
259 - echo powerpc64-unknown-linux-gnu
260 + echo powerpc64-unknown-linux-${LIBC}
263 - echo powerpc-unknown-linux-gnu
264 + echo powerpc-unknown-linux-${LIBC}
267 + echo powerpc64le-unknown-linux-${LIBC}
270 + echo powerpcle-unknown-linux-${LIBC}
272 s390:Linux:*:* | s390x:Linux:*:*)
273 - echo ${UNAME_MACHINE}-ibm-linux
274 + echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
277 - echo ${UNAME_MACHINE}-unknown-linux-gnu
278 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
281 - echo ${UNAME_MACHINE}-unknown-linux-gnu
282 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
284 sparc:Linux:*:* | sparc64:Linux:*:*)
285 - echo ${UNAME_MACHINE}-unknown-linux-gnu
286 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
289 - echo ${UNAME_MACHINE}-unknown-linux-gnu
290 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
293 - echo ${UNAME_MACHINE}-dec-linux-gnu
294 + echo ${UNAME_MACHINE}-dec-linux-${LIBC}
297 - echo ${UNAME_MACHINE}-unknown-linux-gnu
298 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
301 - echo ${UNAME_MACHINE}-unknown-linux-gnu
302 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
305 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
306 @@ -1194,6 +1227,9 @@
307 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
311 + echo x86_64-unknown-haiku
314 echo sx4-nec-superux${UNAME_RELEASE}
316 @@ -1220,19 +1256,31 @@
319 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
320 - case $UNAME_PROCESSOR in
322 - eval $set_cc_for_build
323 - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
324 - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
325 - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
326 - grep IS_64BIT_ARCH >/dev/null
328 - UNAME_PROCESSOR="x86_64"
331 - unknown) UNAME_PROCESSOR=powerpc ;;
333 + eval $set_cc_for_build
334 + if test "$UNAME_PROCESSOR" = unknown ; then
335 + UNAME_PROCESSOR=powerpc
337 + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
338 + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
339 + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
340 + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
341 + grep IS_64BIT_ARCH >/dev/null
343 + case $UNAME_PROCESSOR in
344 + i386) UNAME_PROCESSOR=x86_64 ;;
345 + powerpc) UNAME_PROCESSOR=powerpc64 ;;
349 + elif test "$UNAME_PROCESSOR" = i386 ; then
350 + # Avoid executing cc on OS X 10.9, as it ships with a stub
351 + # that puts up a graphical alert prompting to install
352 + # developer tools. Any system running Mac OS X 10.7 or
353 + # later (Darwin 11 and later) is required to have a 64-bit
354 + # processor. This is not true of the ARM version of Darwin
355 + # that Apple uses in portable devices.
356 + UNAME_PROCESSOR=x86_64
358 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
360 *:procnto*:*:* | *:QNX:[0123456789]*:*)
361 @@ -1249,7 +1297,7 @@
362 NEO-?:NONSTOP_KERNEL:*:*)
363 echo neo-tandem-nsk${UNAME_RELEASE}
365 - NSE-?:NONSTOP_KERNEL:*:*)
366 + NSE-*:NONSTOP_KERNEL:*:*)
367 echo nse-tandem-nsk${UNAME_RELEASE}
369 NSR-?:NONSTOP_KERNEL:*:*)
370 @@ -1323,157 +1371,6 @@
374 -#echo '(No uname command or uname output not recognized.)' 1>&2
375 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
377 -eval $set_cc_for_build
380 -# include <sys/types.h>
381 -# include <sys/utsname.h>
386 -#if defined (MIPSEB)
387 - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
388 - I don't know.... */
389 - printf ("mips-sony-bsd\n"); exit (0);
391 -#include <sys/param.h>
392 - printf ("m68k-sony-newsos%s\n",
402 -#if defined (__arm) && defined (__acorn) && defined (__unix)
403 - printf ("arm-acorn-riscix\n"); exit (0);
406 -#if defined (hp300) && !defined (hpux)
407 - printf ("m68k-hp-bsd\n"); exit (0);
411 -#if !defined (__ARCHITECTURE__)
412 -#define __ARCHITECTURE__ "m68k"
415 - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
417 - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
419 - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
423 -#if defined (MULTIMAX) || defined (n16)
425 - printf ("ns32k-encore-sysv\n"); exit (0);
428 - printf ("ns32k-encore-mach\n"); exit (0);
430 - printf ("ns32k-encore-bsd\n"); exit (0);
435 -#if defined (__386BSD__)
436 - printf ("i386-pc-bsd\n"); exit (0);
439 -#if defined (sequent)
441 - printf ("i386-sequent-dynix\n"); exit (0);
443 -#if defined (ns32000)
444 - printf ("ns32k-sequent-dynix\n"); exit (0);
448 -#if defined (_SEQUENT_)
453 - if (strncmp(un.version, "V2", 2) == 0) {
454 - printf ("i386-sequent-ptx2\n"); exit (0);
456 - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
457 - printf ("i386-sequent-ptx1\n"); exit (0);
459 - printf ("i386-sequent-ptx\n"); exit (0);
464 -# if !defined (ultrix)
465 -# include <sys/param.h>
468 - printf ("vax-dec-bsd4.3\n"); exit (0);
471 - printf ("vax-dec-bsd4.3reno\n"); exit (0);
473 - printf ("vax-dec-bsd\n"); exit (0);
477 - printf ("vax-dec-bsd\n"); exit (0);
480 - printf ("vax-dec-ultrix\n"); exit (0);
484 -#if defined (alliant) && defined (i860)
485 - printf ("i860-alliant-bsd\n"); exit (0);
492 -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
493 - { echo "$SYSTEM_NAME"; exit; }
495 -# Apollos put the system type in the environment.
497 -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
499 -# Convex versions that predate uname can use getsysinfo(1)
501 -if [ -x /usr/convex/getsysinfo ]
503 - case `getsysinfo -f cpu_type` in
508 - if getsysinfo -f scalar_acc
509 - then echo c32-convex-bsd
510 - else echo c2-convex-bsd
514 - echo c34-convex-bsd
517 - echo c38-convex-bsd
526 $0: unable to guess system type