|
@ -1,8 +1,8 @@ |
|
|
#! /bin/sh |
|
|
#! /bin/sh |
|
|
# Attempt to guess a canonical system name. |
|
|
# Attempt to guess a canonical system name. |
|
|
# Copyright 1992-2016 Free Software Foundation, Inc. |
|
|
|
|
|
|
|
|
# Copyright 1992-2017 Free Software Foundation, Inc. |
|
|
|
|
|
|
|
|
timestamp='2016-03-24' |
|
|
|
|
|
|
|
|
timestamp='2017-05-27' |
|
|
|
|
|
|
|
|
# This file is free software; you can redistribute it and/or modify it |
|
|
# This file is free software; you can redistribute it and/or modify it |
|
|
# under the terms of the GNU General Public License as published by |
|
|
# under the terms of the GNU General Public License as published by |
|
@ -50,7 +50,7 @@ version="\ |
|
|
GNU config.guess ($timestamp) |
|
|
GNU config.guess ($timestamp) |
|
|
|
|
|
|
|
|
Originally written by Per Bothner. |
|
|
Originally written by Per Bothner. |
|
|
Copyright 1992-2016 Free Software Foundation, Inc. |
|
|
|
|
|
|
|
|
Copyright 1992-2017 Free Software Foundation, Inc. |
|
|
|
|
|
|
|
|
This is free software; see the source for copying conditions. There is NO |
|
|
This is free software; see the source for copying conditions. There is NO |
|
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
|
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
|
@ -186,9 +186,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
|
|
*) machine=${UNAME_MACHINE_ARCH}-unknown ;; |
|
|
*) machine=${UNAME_MACHINE_ARCH}-unknown ;; |
|
|
esac |
|
|
esac |
|
|
# The Operating System including object format, if it has switched |
|
|
# The Operating System including object format, if it has switched |
|
|
# to ELF recently, or will in the future. |
|
|
|
|
|
|
|
|
# to ELF recently (or will in the future) and ABI. |
|
|
case "${UNAME_MACHINE_ARCH}" in |
|
|
case "${UNAME_MACHINE_ARCH}" in |
|
|
arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) |
|
|
|
|
|
|
|
|
earm*) |
|
|
|
|
|
os=netbsdelf |
|
|
|
|
|
;; |
|
|
|
|
|
arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
|
|
eval $set_cc_for_build |
|
|
eval $set_cc_for_build |
|
|
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
|
|
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
|
|
| grep -q __ELF__ |
|
|
| grep -q __ELF__ |
|
@ -386,7 +389,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in |
|
|
# This test works for both compilers. |
|
|
# This test works for both compilers. |
|
|
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then |
|
|
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then |
|
|
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ |
|
|
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ |
|
|
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ |
|
|
|
|
|
|
|
|
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
|
|
grep IS_64BIT_ARCH >/dev/null |
|
|
grep IS_64BIT_ARCH >/dev/null |
|
|
then |
|
|
then |
|
|
SUN_ARCH=x86_64 |
|
|
SUN_ARCH=x86_64 |
|
@ -684,7 +687,7 @@ EOF |
|
|
exit (0); |
|
|
exit (0); |
|
|
} |
|
|
} |
|
|
EOF |
|
|
EOF |
|
|
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` |
|
|
|
|
|
|
|
|
(CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` |
|
|
test -z "$HP_ARCH" && HP_ARCH=hppa |
|
|
test -z "$HP_ARCH" && HP_ARCH=hppa |
|
|
fi ;; |
|
|
fi ;; |
|
|
esac |
|
|
esac |
|
@ -701,7 +704,7 @@ EOF |
|
|
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess |
|
|
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess |
|
|
# => hppa64-hp-hpux11.23 |
|
|
# => hppa64-hp-hpux11.23 |
|
|
|
|
|
|
|
|
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | |
|
|
|
|
|
|
|
|
if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | |
|
|
grep -q __LP64__ |
|
|
grep -q __LP64__ |
|
|
then |
|
|
then |
|
|
HP_ARCH=hppa2.0w |
|
|
HP_ARCH=hppa2.0w |
|
@ -834,10 +837,11 @@ EOF |
|
|
UNAME_PROCESSOR=`/usr/bin/uname -p` |
|
|
UNAME_PROCESSOR=`/usr/bin/uname -p` |
|
|
case ${UNAME_PROCESSOR} in |
|
|
case ${UNAME_PROCESSOR} in |
|
|
amd64) |
|
|
amd64) |
|
|
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; |
|
|
|
|
|
*) |
|
|
|
|
|
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; |
|
|
|
|
|
|
|
|
UNAME_PROCESSOR=x86_64 ;; |
|
|
|
|
|
i386) |
|
|
|
|
|
UNAME_PROCESSOR=i586 ;; |
|
|
esac |
|
|
esac |
|
|
|
|
|
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` |
|
|
exit ;; |
|
|
exit ;; |
|
|
i*:CYGWIN*:*) |
|
|
i*:CYGWIN*:*) |
|
|
echo ${UNAME_MACHINE}-pc-cygwin |
|
|
echo ${UNAME_MACHINE}-pc-cygwin |
|
@ -900,7 +904,7 @@ EOF |
|
|
exit ;; |
|
|
exit ;; |
|
|
*:GNU/*:*:*) |
|
|
*:GNU/*:*:*) |
|
|
# other systems with GNU libc and userland |
|
|
# other systems with GNU libc and userland |
|
|
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} |
|
|
|
|
|
|
|
|
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} |
|
|
exit ;; |
|
|
exit ;; |
|
|
i*86:Minix:*:*) |
|
|
i*86:Minix:*:*) |
|
|
echo ${UNAME_MACHINE}-pc-minix |
|
|
echo ${UNAME_MACHINE}-pc-minix |
|
@ -997,6 +1001,9 @@ EOF |
|
|
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` |
|
|
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` |
|
|
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } |
|
|
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } |
|
|
;; |
|
|
;; |
|
|
|
|
|
mips64el:Linux:*:*) |
|
|
|
|
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
|
|
|
|
|
exit ;; |
|
|
openrisc*:Linux:*:*) |
|
|
openrisc*:Linux:*:*) |
|
|
echo or1k-unknown-linux-${LIBC} |
|
|
echo or1k-unknown-linux-${LIBC} |
|
|
exit ;; |
|
|
exit ;; |
|
@ -1029,6 +1036,9 @@ EOF |
|
|
ppcle:Linux:*:*) |
|
|
ppcle:Linux:*:*) |
|
|
echo powerpcle-unknown-linux-${LIBC} |
|
|
echo powerpcle-unknown-linux-${LIBC} |
|
|
exit ;; |
|
|
exit ;; |
|
|
|
|
|
riscv32:Linux:*:* | riscv64:Linux:*:*) |
|
|
|
|
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
|
|
|
|
|
exit ;; |
|
|
s390:Linux:*:* | s390x:Linux:*:*) |
|
|
s390:Linux:*:* | s390x:Linux:*:*) |
|
|
echo ${UNAME_MACHINE}-ibm-linux-${LIBC} |
|
|
echo ${UNAME_MACHINE}-ibm-linux-${LIBC} |
|
|
exit ;; |
|
|
exit ;; |
|
@ -1294,14 +1304,21 @@ EOF |
|
|
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then |
|
|
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then |
|
|
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then |
|
|
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then |
|
|
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ |
|
|
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ |
|
|
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ |
|
|
|
|
|
grep IS_64BIT_ARCH >/dev/null |
|
|
|
|
|
|
|
|
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
|
|
|
|
|
grep IS_64BIT_ARCH >/dev/null |
|
|
then |
|
|
then |
|
|
case $UNAME_PROCESSOR in |
|
|
case $UNAME_PROCESSOR in |
|
|
i386) UNAME_PROCESSOR=x86_64 ;; |
|
|
i386) UNAME_PROCESSOR=x86_64 ;; |
|
|
powerpc) UNAME_PROCESSOR=powerpc64 ;; |
|
|
powerpc) UNAME_PROCESSOR=powerpc64 ;; |
|
|
esac |
|
|
esac |
|
|
fi |
|
|
fi |
|
|
|
|
|
# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc |
|
|
|
|
|
if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ |
|
|
|
|
|
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
|
|
|
|
|
grep IS_PPC >/dev/null |
|
|
|
|
|
then |
|
|
|
|
|
UNAME_PROCESSOR=powerpc |
|
|
|
|
|
fi |
|
|
fi |
|
|
fi |
|
|
elif test "$UNAME_PROCESSOR" = i386 ; then |
|
|
elif test "$UNAME_PROCESSOR" = i386 ; then |
|
|
# Avoid executing cc on OS X 10.9, as it ships with a stub |
|
|
# Avoid executing cc on OS X 10.9, as it ships with a stub |
|
@ -1325,15 +1342,18 @@ EOF |
|
|
*:QNX:*:4*) |
|
|
*:QNX:*:4*) |
|
|
echo i386-pc-qnx |
|
|
echo i386-pc-qnx |
|
|
exit ;; |
|
|
exit ;; |
|
|
NEO-?:NONSTOP_KERNEL:*:*) |
|
|
|
|
|
|
|
|
NEO-*:NONSTOP_KERNEL:*:*) |
|
|
echo neo-tandem-nsk${UNAME_RELEASE} |
|
|
echo neo-tandem-nsk${UNAME_RELEASE} |
|
|
exit ;; |
|
|
exit ;; |
|
|
NSE-*:NONSTOP_KERNEL:*:*) |
|
|
NSE-*:NONSTOP_KERNEL:*:*) |
|
|
echo nse-tandem-nsk${UNAME_RELEASE} |
|
|
echo nse-tandem-nsk${UNAME_RELEASE} |
|
|
exit ;; |
|
|
exit ;; |
|
|
NSR-?:NONSTOP_KERNEL:*:*) |
|
|
|
|
|
|
|
|
NSR-*:NONSTOP_KERNEL:*:*) |
|
|
echo nsr-tandem-nsk${UNAME_RELEASE} |
|
|
echo nsr-tandem-nsk${UNAME_RELEASE} |
|
|
exit ;; |
|
|
exit ;; |
|
|
|
|
|
NSX-*:NONSTOP_KERNEL:*:*) |
|
|
|
|
|
echo nsx-tandem-nsk${UNAME_RELEASE} |
|
|
|
|
|
exit ;; |
|
|
*:NonStop-UX:*:*) |
|
|
*:NonStop-UX:*:*) |
|
|
echo mips-compaq-nonstopux |
|
|
echo mips-compaq-nonstopux |
|
|
exit ;; |
|
|
exit ;; |
|
@ -1389,7 +1409,7 @@ EOF |
|
|
echo i386-pc-xenix |
|
|
echo i386-pc-xenix |
|
|
exit ;; |
|
|
exit ;; |
|
|
i*86:skyos:*:*) |
|
|
i*86:skyos:*:*) |
|
|
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' |
|
|
|
|
|
|
|
|
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` |
|
|
exit ;; |
|
|
exit ;; |
|
|
i*86:rdos:*:*) |
|
|
i*86:rdos:*:*) |
|
|
echo ${UNAME_MACHINE}-pc-rdos |
|
|
echo ${UNAME_MACHINE}-pc-rdos |
|
@ -1408,18 +1428,17 @@ esac |
|
|
cat >&2 <<EOF |
|
|
cat >&2 <<EOF |
|
|
$0: unable to guess system type |
|
|
$0: unable to guess system type |
|
|
|
|
|
|
|
|
This script, last modified $timestamp, has failed to recognize |
|
|
|
|
|
the operating system you are using. It is advised that you |
|
|
|
|
|
download the most up to date version of the config scripts from |
|
|
|
|
|
|
|
|
This script (version $timestamp), has failed to recognize the |
|
|
|
|
|
operating system you are using. If your script is old, overwrite |
|
|
|
|
|
config.guess and config.sub with the latest versions from: |
|
|
|
|
|
|
|
|
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess |
|
|
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess |
|
|
and |
|
|
and |
|
|
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub |
|
|
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub |
|
|
|
|
|
|
|
|
If the version you run ($0) is already up to date, please |
|
|
|
|
|
send the following data and any information you think might be |
|
|
|
|
|
pertinent to <config-patches@gnu.org> in order to provide the needed |
|
|
|
|
|
information to handle your system. |
|
|
|
|
|
|
|
|
If $0 has already been updated, send the following data and any |
|
|
|
|
|
information you think might be pertinent to config-patches@gnu.org to |
|
|
|
|
|
provide the necessary information to handle your system. |
|
|
|
|
|
|
|
|
config.guess timestamp = $timestamp |
|
|
config.guess timestamp = $timestamp |
|
|
|
|
|
|
|
|