11#! /bin/sh
22# Attempt to guess a canonical system name.
3- # Copyright 1992-2016 Free Software Foundation, Inc.
3+ # Copyright 1992-2017 Free Software Foundation, Inc.
44
5- timestamp=' 2016 -01-01'
5+ timestamp=' 2017 -01-01'
66
77# This file is free software; you can redistribute it and/or modify it
88# under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ version="\
5050GNU config.guess ($timestamp )
5151
5252Originally written by Per Bothner.
53- Copyright 1992-2016 Free Software Foundation, Inc.
53+ Copyright 1992-2017 Free Software Foundation, Inc.
5454
5555This is free software; see the source for copying conditions. There is NO
5656warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -186,9 +186,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
186186 * ) machine=${UNAME_MACHINE_ARCH} -unknown ;;
187187 esac
188188 # The Operating System including object format, if it has switched
189- # to ELF recently, or will in the future.
189+ # to ELF recently ( or will in the future) and ABI .
190190 case " ${UNAME_MACHINE_ARCH} " in
191- arm* |earm* |i386|m68k|ns32k|sh3* |sparc|vax)
191+ earm* )
192+ os=netbsdelf
193+ ;;
194+ arm* |i386|m68k|ns32k|sh3* |sparc|vax)
192195 eval $set_cc_for_build
193196 if echo __ELF__ | $CC_FOR_BUILD -E - 2> /dev/null \
194197 | grep -q __ELF__
@@ -237,6 +240,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
237240 UNAME_MACHINE_ARCH=` arch | sed ' s/OpenBSD.//' `
238241 echo ${UNAME_MACHINE_ARCH} -unknown-openbsd${UNAME_RELEASE}
239242 exit ;;
243+ * :LibertyBSD:* :* )
244+ UNAME_MACHINE_ARCH=` arch | sed ' s/^.*BSD\.//' `
245+ echo ${UNAME_MACHINE_ARCH} -unknown-libertybsd${UNAME_RELEASE}
246+ exit ;;
240247 * :ekkoBSD:* :* )
241248 echo ${UNAME_MACHINE} -unknown-ekkobsd${UNAME_RELEASE}
242249 exit ;;
@@ -268,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
268275 ALPHA_CPU_TYPE=` /usr/sbin/psrinfo -v | sed -n -e ' s/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
269276 case " $ALPHA_CPU_TYPE " in
270277 " EV4 (21064)" )
271- UNAME_MACHINE=" alpha" ;;
278+ UNAME_MACHINE=alpha ;;
272279 " EV4.5 (21064)" )
273- UNAME_MACHINE=" alpha" ;;
280+ UNAME_MACHINE=alpha ;;
274281 " LCA4 (21066/21068)" )
275- UNAME_MACHINE=" alpha" ;;
282+ UNAME_MACHINE=alpha ;;
276283 " EV5 (21164)" )
277- UNAME_MACHINE=" alphaev5" ;;
284+ UNAME_MACHINE=alphaev5 ;;
278285 " EV5.6 (21164A)" )
279- UNAME_MACHINE=" alphaev56" ;;
286+ UNAME_MACHINE=alphaev56 ;;
280287 " EV5.6 (21164PC)" )
281- UNAME_MACHINE=" alphapca56" ;;
288+ UNAME_MACHINE=alphapca56 ;;
282289 " EV5.7 (21164PC)" )
283- UNAME_MACHINE=" alphapca57" ;;
290+ UNAME_MACHINE=alphapca57 ;;
284291 " EV6 (21264)" )
285- UNAME_MACHINE=" alphaev6" ;;
292+ UNAME_MACHINE=alphaev6 ;;
286293 " EV6.7 (21264A)" )
287- UNAME_MACHINE=" alphaev67" ;;
294+ UNAME_MACHINE=alphaev67 ;;
288295 " EV6.8CB (21264C)" )
289- UNAME_MACHINE=" alphaev68" ;;
296+ UNAME_MACHINE=alphaev68 ;;
290297 " EV6.8AL (21264B)" )
291- UNAME_MACHINE=" alphaev68" ;;
298+ UNAME_MACHINE=alphaev68 ;;
292299 " EV6.8CX (21264D)" )
293- UNAME_MACHINE=" alphaev68" ;;
300+ UNAME_MACHINE=alphaev68 ;;
294301 " EV6.9A (21264/EV69A)" )
295- UNAME_MACHINE=" alphaev69" ;;
302+ UNAME_MACHINE=alphaev69 ;;
296303 " EV7 (21364)" )
297- UNAME_MACHINE=" alphaev7" ;;
304+ UNAME_MACHINE=alphaev7 ;;
298305 " EV7.9 (21364A)" )
299- UNAME_MACHINE=" alphaev79" ;;
306+ UNAME_MACHINE=alphaev79 ;;
300307 esac
301308 # A Pn.n version is a patched version.
302309 # A Vn.n version is a released version.
303310 # A Tn.n version is a released field test version.
304311 # A Xn.n version is an unreleased experimental baselevel.
305312 # 1.2 uses "1.2" for uname -r.
306- echo ${UNAME_MACHINE} -dec-osf` echo ${UNAME_RELEASE} | sed -e ' s/^[PVTX]//' | tr ' ABCDEFGHIJKLMNOPQRSTUVWXYZ' ' abcdefghijklmnopqrstuvwxyz' `
313+ echo ${UNAME_MACHINE} -dec-osf` echo ${UNAME_RELEASE} | sed -e ' s/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
307314 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
308315 exitcode=$?
309316 trap ' ' 0
@@ -376,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
376383 exit ;;
377384 i86pc:SunOS:5.* :* | i86xen:SunOS:5.* :* )
378385 eval $set_cc_for_build
379- SUN_ARCH=" i386"
386+ SUN_ARCH=i386
380387 # If there is a compiler, see if it is configured for 64-bit objects.
381388 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
382389 # This test works for both compilers.
383- if [ " $CC_FOR_BUILD " != ' no_compiler_found' ]; then
390+ if [ " $CC_FOR_BUILD " != no_compiler_found ]; then
384391 if (echo ' #ifdef __amd64' ; echo IS_64BIT_ARCH; echo ' #endif' ) | \
385- (CCOPTS= $CC_FOR_BUILD -E - 2> /dev/null) | \
392+ (CCOPTS=" " $CC_FOR_BUILD -E - 2> /dev/null) | \
386393 grep IS_64BIT_ARCH > /dev/null
387394 then
388- SUN_ARCH=" x86_64"
395+ SUN_ARCH=x86_64
389396 fi
390397 fi
391398 echo ${SUN_ARCH} -pc-solaris2` echo ${UNAME_RELEASE} | sed -e ' s/[^.]*//' `
@@ -410,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
410417 exit ;;
411418 sun* :* :4.2BSD:* )
412419 UNAME_RELEASE=` (sed 1q /etc/motd | awk ' {print substr($5,1,3)}' ) 2> /dev/null`
413- test " x${UNAME_RELEASE} " = " x " && UNAME_RELEASE=3
420+ test " x${UNAME_RELEASE} " = x && UNAME_RELEASE=3
414421 case " ` /bin/arch` " in
415422 sun3)
416423 echo m68k-sun-sunos${UNAME_RELEASE}
@@ -635,13 +642,13 @@ EOF
635642 sc_cpu_version=` /usr/bin/getconf SC_CPU_VERSION 2> /dev/null`
636643 sc_kernel_bits=` /usr/bin/getconf SC_KERNEL_BITS 2> /dev/null`
637644 case " ${sc_cpu_version} " in
638- 523) HP_ARCH=" hppa1.0" ;; # CPU_PA_RISC1_0
639- 528) HP_ARCH=" hppa1.1" ;; # CPU_PA_RISC1_1
645+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
646+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
640647 532) # CPU_PA_RISC2_0
641648 case " ${sc_kernel_bits} " in
642- 32) HP_ARCH=" hppa2.0n" ;;
643- 64) HP_ARCH=" hppa2.0w" ;;
644- ' ' ) HP_ARCH=" hppa2.0" ;; # HP-UX 10.20
649+ 32) HP_ARCH=hppa2.0n ;;
650+ 64) HP_ARCH=hppa2.0w ;;
651+ ' ' ) HP_ARCH=hppa2.0 ;; # HP-UX 10.20
645652 esac ;;
646653 esac
647654 fi
@@ -680,11 +687,11 @@ EOF
680687 exit (0);
681688 }
682689EOF
683- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy .c 2> /dev/null) && HP_ARCH=` $dummy `
690+ (CCOPTS=" " $CC_FOR_BUILD -o $dummy $dummy .c 2> /dev/null) && HP_ARCH=` $dummy `
684691 test -z " $HP_ARCH " && HP_ARCH=hppa
685692 fi ;;
686693 esac
687- if [ ${HP_ARCH} = " hppa2.0w" ]
694+ if [ ${HP_ARCH} = hppa2.0w ]
688695 then
689696 eval $set_cc_for_build
690697
@@ -697,12 +704,12 @@ EOF
697704 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
698705 # => hppa64-hp-hpux11.23
699706
700- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2> /dev/null) |
707+ if echo __LP64__ | (CCOPTS=" " $CC_FOR_BUILD -E - 2> /dev/null) |
701708 grep -q __LP64__
702709 then
703- HP_ARCH=" hppa2.0w"
710+ HP_ARCH=hppa2.0w
704711 else
705- HP_ARCH=" hppa64"
712+ HP_ARCH=hppa64
706713 fi
707714 fi
708715 echo ${HP_ARCH} -hp-hpux${HPUX_REV}
@@ -807,14 +814,14 @@ EOF
807814 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e ' s/\.[^.]*$/.X/'
808815 exit ;;
809816 F30[01]:UNIX_System_V:* :* | F700:UNIX_System_V:* :* )
810- FUJITSU_PROC=` uname -m | tr ' ABCDEFGHIJKLMNOPQRSTUVWXYZ' ' abcdefghijklmnopqrstuvwxyz' `
811- FUJITSU_SYS=` uname -p | tr ' ABCDEFGHIJKLMNOPQRSTUVWXYZ' ' abcdefghijklmnopqrstuvwxyz' | sed -e ' s/\///' `
817+ FUJITSU_PROC=` uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
818+ FUJITSU_SYS=` uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e ' s/\///' `
812819 FUJITSU_REL=` echo ${UNAME_RELEASE} | sed -e ' s/ /_/' `
813820 echo " ${FUJITSU_PROC} -fujitsu-${FUJITSU_SYS}${FUJITSU_REL} "
814821 exit ;;
815822 5000:UNIX_System_V:4.* :* )
816- FUJITSU_SYS=` uname -p | tr ' ABCDEFGHIJKLMNOPQRSTUVWXYZ' ' abcdefghijklmnopqrstuvwxyz' | sed -e ' s/\///' `
817- FUJITSU_REL=` echo ${UNAME_RELEASE} | tr ' ABCDEFGHIJKLMNOPQRSTUVWXYZ' ' abcdefghijklmnopqrstuvwxyz' | sed -e ' s/ /_/' `
823+ FUJITSU_SYS=` uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e ' s/\///' `
824+ FUJITSU_REL=` echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e ' s/ /_/' `
818825 echo " sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} "
819826 exit ;;
820827 i* 86:BSD/386:* :* | i* 86:BSD/OS:* :* | * :Ascend\ Embedded/OS:* :* )
896903 exit ;;
897904 * :GNU/* :* :* )
898905 # other systems with GNU libc and userland
899- echo ${UNAME_MACHINE} -unknown-` echo ${UNAME_SYSTEM} | sed ' s,^[^/]*/,,' | tr ' [A-Z] ' ' [a-z] ' ` ` echo ${UNAME_RELEASE} | sed -e ' s/[-(].*//' ` -${LIBC}
906+ echo ${UNAME_MACHINE} -unknown-` echo ${UNAME_SYSTEM} | sed ' s,^[^/]*/,,' | tr " [:upper:] " " [:lower:] " ` ` echo ${UNAME_RELEASE} | sed -e ' s/[-(].*//' ` -${LIBC}
900907 exit ;;
901908 i* 86:Minix:* :* )
902909 echo ${UNAME_MACHINE} -pc-minix
919926 EV68* ) UNAME_MACHINE=alphaev68 ;;
920927 esac
921928 objdump --private-headers /bin/sh | grep -q ld.so.1
922- if test " $? " = 0 ; then LIBC=" gnulibc1" ; fi
929+ if test " $? " = 0 ; then LIBC=gnulibc1 ; fi
923930 echo ${UNAME_MACHINE} -unknown-linux-${LIBC}
924931 exit ;;
925932 arc:Linux:* :* | arceb:Linux:* :* )
9931000 eval ` $CC_FOR_BUILD -E $dummy .c 2> /dev/null | grep ' ^CPU' `
9941001 test x" ${CPU} " ! = x && { echo " ${CPU} -unknown-linux-${LIBC} " ; exit ; }
9951002 ;;
1003+ mips64el:Linux:* :* )
1004+ echo ${UNAME_MACHINE} -unknown-linux-${LIBC}
1005+ exit ;;
9961006 openrisc* :Linux:* :* )
9971007 echo or1k-unknown-linux-${LIBC}
9981008 exit ;;
@@ -1025,6 +1035,9 @@ EOF
10251035 ppcle:Linux:* :* )
10261036 echo powerpcle-unknown-linux-${LIBC}
10271037 exit ;;
1038+ riscv32:Linux:* :* | riscv64:Linux:* :* )
1039+ echo ${UNAME_MACHINE} -unknown-linux-${LIBC}
1040+ exit ;;
10281041 s390:Linux:* :* | s390x:Linux:* :* )
10291042 echo ${UNAME_MACHINE} -ibm-linux-${LIBC}
10301043 exit ;;
@@ -1272,6 +1285,9 @@ EOF
12721285 SX-8R:SUPER-UX:* :* )
12731286 echo sx8r-nec-superux${UNAME_RELEASE}
12741287 exit ;;
1288+ SX-ACE:SUPER-UX:* :* )
1289+ echo sxace-nec-superux${UNAME_RELEASE}
1290+ exit ;;
12751291 Power* :Rhapsody:* :* )
12761292 echo powerpc-apple-rhapsody${UNAME_RELEASE}
12771293 exit ;;
@@ -1285,9 +1301,9 @@ EOF
12851301 UNAME_PROCESSOR=powerpc
12861302 fi
12871303 if test ` echo " $UNAME_RELEASE " | sed -e ' s/\..*//' ` -le 10 ; then
1288- if [ " $CC_FOR_BUILD " != ' no_compiler_found' ]; then
1304+ if [ " $CC_FOR_BUILD " != no_compiler_found ]; then
12891305 if (echo ' #ifdef __LP64__' ; echo IS_64BIT_ARCH; echo ' #endif' ) | \
1290- (CCOPTS= $CC_FOR_BUILD -E - 2> /dev/null) | \
1306+ (CCOPTS=" " $CC_FOR_BUILD -E - 2> /dev/null) | \
12911307 grep IS_64BIT_ARCH > /dev/null
12921308 then
12931309 case $UNAME_PROCESSOR in
@@ -1309,7 +1325,7 @@ EOF
13091325 exit ;;
13101326 * :procnto* :* :* | * :QNX:[0123456789]* :* )
13111327 UNAME_PROCESSOR=` uname -p`
1312- if test " $UNAME_PROCESSOR " = " x86" ; then
1328+ if test " $UNAME_PROCESSOR " = x86; then
13131329 UNAME_PROCESSOR=i386
13141330 UNAME_MACHINE=pc
13151331 fi
@@ -1340,7 +1356,7 @@ EOF
13401356 # "uname -m" is not consistent, so use $cputype instead. 386
13411357 # is converted to i386 for consistency with other x86
13421358 # operating systems.
1343- if test " $cputype " = " 386" ; then
1359+ if test " $cputype " = 386; then
13441360 UNAME_MACHINE=i386
13451361 else
13461362 UNAME_MACHINE=" $cputype "
@@ -1382,7 +1398,7 @@ EOF
13821398 echo i386-pc-xenix
13831399 exit ;;
13841400 i* 86:skyos:* :* )
1385- echo ${UNAME_MACHINE} -pc-skyos` echo ${UNAME_RELEASE} ` | sed -e ' s/ .*$//'
1401+ echo ${UNAME_MACHINE} -pc-skyos` echo ${UNAME_RELEASE} | sed -e ' s/ .*$//' `
13861402 exit ;;
13871403 i* 86:rdos:* :* )
13881404 echo ${UNAME_MACHINE} -pc-rdos
@@ -1401,18 +1417,17 @@ esac
14011417cat >&2 << EOF
14021418$0 : unable to guess system type
14031419
1404- This script, last modified $timestamp , has failed to recognize
1405- the operating system you are using. It is advised that you
1406- download the most up to date version of the config scripts from
1420+ This script (version $timestamp ) , has failed to recognize the
1421+ operating system you are using. If your script is old, overwrite
1422+ config.guess and config.sub with the latest versions from:
14071423
14081424 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
14091425and
14101426 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
14111427
1412- If the version you run ($0 ) is already up to date, please
1413- send the following data and any information you think might be
1414- pertinent to <[email protected] > in order to provide the needed 1415- information to handle your system.
1428+ If $0 has already been updated, send the following data and any
1429+ information you think might be pertinent to [email protected] to 1430+ provide the necessary information to handle your system.
14161431
14171432config.guess timestamp = $timestamp
14181433
0 commit comments