1.1 --- a/scripts/config.guess Wed Jan 09 18:52:00 2013 +0100
1.2 +++ b/scripts/config.guess Tue Dec 31 13:02:57 2013 +0100
1.3 @@ -1,10 +1,8 @@
1.4 #! /bin/sh
1.5 # Attempt to guess a canonical system name.
1.6 -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
1.7 -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
1.8 -# 2011, 2012, 2013 Free Software Foundation, Inc.
1.9 +# Copyright 1992-2013 Free Software Foundation, Inc.
1.10
1.11 -timestamp='2012-12-30'
1.12 +timestamp='2013-11-29'
1.13
1.14 # This file is free software; you can redistribute it and/or modify it
1.15 # under the terms of the GNU General Public License as published by
1.16 @@ -52,9 +50,7 @@
1.17 GNU config.guess ($timestamp)
1.18
1.19 Originally written by Per Bothner.
1.20 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
1.21 -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
1.22 -2012, 2013 Free Software Foundation, Inc.
1.23 +Copyright 1992-2013 Free Software Foundation, Inc.
1.24
1.25 This is free software; see the source for copying conditions. There is NO
1.26 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
1.27 @@ -136,6 +132,27 @@
1.28 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
1.29 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
1.30
1.31 +case "${UNAME_SYSTEM}" in
1.32 +Linux|GNU|GNU/*)
1.33 + # If the system lacks a compiler, then just pick glibc.
1.34 + # We could probably try harder.
1.35 + LIBC=gnu
1.36 +
1.37 + eval $set_cc_for_build
1.38 + cat <<-EOF > $dummy.c
1.39 + #include <features.h>
1.40 + #if defined(__UCLIBC__)
1.41 + LIBC=uclibc
1.42 + #elif defined(__dietlibc__)
1.43 + LIBC=dietlibc
1.44 + #else
1.45 + LIBC=gnu
1.46 + #endif
1.47 + EOF
1.48 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
1.49 + ;;
1.50 +esac
1.51 +
1.52 # Note: order is significant - the case branches are not exclusive.
1.53
1.54 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
1.55 @@ -857,21 +874,21 @@
1.56 exit ;;
1.57 *:GNU:*:*)
1.58 # the GNU system
1.59 - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
1.60 + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
1.61 exit ;;
1.62 *:GNU/*:*:*)
1.63 # other systems with GNU libc and userland
1.64 - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
1.65 + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
1.66 exit ;;
1.67 i*86:Minix:*:*)
1.68 echo ${UNAME_MACHINE}-pc-minix
1.69 exit ;;
1.70 aarch64:Linux:*:*)
1.71 - echo ${UNAME_MACHINE}-unknown-linux-gnu
1.72 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1.73 exit ;;
1.74 aarch64_be:Linux:*:*)
1.75 UNAME_MACHINE=aarch64_be
1.76 - echo ${UNAME_MACHINE}-unknown-linux-gnu
1.77 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1.78 exit ;;
1.79 alpha:Linux:*:*)
1.80 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
1.81 @@ -884,59 +901,54 @@
1.82 EV68*) UNAME_MACHINE=alphaev68 ;;
1.83 esac
1.84 objdump --private-headers /bin/sh | grep -q ld.so.1
1.85 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
1.86 - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
1.87 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
1.88 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1.89 + exit ;;
1.90 + arc:Linux:*:* | arceb:Linux:*:*)
1.91 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1.92 exit ;;
1.93 arm*:Linux:*:*)
1.94 eval $set_cc_for_build
1.95 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
1.96 | grep -q __ARM_EABI__
1.97 then
1.98 - echo ${UNAME_MACHINE}-unknown-linux-gnu
1.99 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1.100 else
1.101 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
1.102 | grep -q __ARM_PCS_VFP
1.103 then
1.104 - echo ${UNAME_MACHINE}-unknown-linux-gnueabi
1.105 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
1.106 else
1.107 - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
1.108 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
1.109 fi
1.110 fi
1.111 exit ;;
1.112 avr32*:Linux:*:*)
1.113 - echo ${UNAME_MACHINE}-unknown-linux-gnu
1.114 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1.115 exit ;;
1.116 cris:Linux:*:*)
1.117 - echo ${UNAME_MACHINE}-axis-linux-gnu
1.118 + echo ${UNAME_MACHINE}-axis-linux-${LIBC}
1.119 exit ;;
1.120 crisv32:Linux:*:*)
1.121 - echo ${UNAME_MACHINE}-axis-linux-gnu
1.122 + echo ${UNAME_MACHINE}-axis-linux-${LIBC}
1.123 exit ;;
1.124 frv:Linux:*:*)
1.125 - echo ${UNAME_MACHINE}-unknown-linux-gnu
1.126 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1.127 exit ;;
1.128 hexagon:Linux:*:*)
1.129 - echo ${UNAME_MACHINE}-unknown-linux-gnu
1.130 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1.131 exit ;;
1.132 i*86:Linux:*:*)
1.133 - LIBC=gnu
1.134 - eval $set_cc_for_build
1.135 - sed 's/^ //' << EOF >$dummy.c
1.136 - #ifdef __dietlibc__
1.137 - LIBC=dietlibc
1.138 - #endif
1.139 -EOF
1.140 - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
1.141 - echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1.142 + echo ${UNAME_MACHINE}-pc-linux-${LIBC}
1.143 exit ;;
1.144 ia64:Linux:*:*)
1.145 - echo ${UNAME_MACHINE}-unknown-linux-gnu
1.146 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1.147 exit ;;
1.148 m32r*:Linux:*:*)
1.149 - echo ${UNAME_MACHINE}-unknown-linux-gnu
1.150 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1.151 exit ;;
1.152 m68*:Linux:*:*)
1.153 - echo ${UNAME_MACHINE}-unknown-linux-gnu
1.154 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1.155 exit ;;
1.156 mips:Linux:*:* | mips64:Linux:*:*)
1.157 eval $set_cc_for_build
1.158 @@ -955,54 +967,63 @@
1.159 #endif
1.160 EOF
1.161 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
1.162 - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
1.163 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
1.164 ;;
1.165 + or1k:Linux:*:*)
1.166 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1.167 + exit ;;
1.168 or32:Linux:*:*)
1.169 - echo ${UNAME_MACHINE}-unknown-linux-gnu
1.170 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1.171 exit ;;
1.172 padre:Linux:*:*)
1.173 - echo sparc-unknown-linux-gnu
1.174 + echo sparc-unknown-linux-${LIBC}
1.175 exit ;;
1.176 parisc64:Linux:*:* | hppa64:Linux:*:*)
1.177 - echo hppa64-unknown-linux-gnu
1.178 + echo hppa64-unknown-linux-${LIBC}
1.179 exit ;;
1.180 parisc:Linux:*:* | hppa:Linux:*:*)
1.181 # Look for CPU level
1.182 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1.183 - PA7*) echo hppa1.1-unknown-linux-gnu ;;
1.184 - PA8*) echo hppa2.0-unknown-linux-gnu ;;
1.185 - *) echo hppa-unknown-linux-gnu ;;
1.186 + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
1.187 + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
1.188 + *) echo hppa-unknown-linux-${LIBC} ;;
1.189 esac
1.190 exit ;;
1.191 ppc64:Linux:*:*)
1.192 - echo powerpc64-unknown-linux-gnu
1.193 + echo powerpc64-unknown-linux-${LIBC}
1.194 exit ;;
1.195 ppc:Linux:*:*)
1.196 - echo powerpc-unknown-linux-gnu
1.197 + echo powerpc-unknown-linux-${LIBC}
1.198 + exit ;;
1.199 + ppc64le:Linux:*:*)
1.200 + echo powerpc64le-unknown-linux-${LIBC}
1.201 + exit ;;
1.202 + ppcle:Linux:*:*)
1.203 + echo powerpcle-unknown-linux-${LIBC}
1.204 exit ;;
1.205 s390:Linux:*:* | s390x:Linux:*:*)
1.206 - echo ${UNAME_MACHINE}-ibm-linux
1.207 + echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
1.208 exit ;;
1.209 sh64*:Linux:*:*)
1.210 - echo ${UNAME_MACHINE}-unknown-linux-gnu
1.211 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1.212 exit ;;
1.213 sh*:Linux:*:*)
1.214 - echo ${UNAME_MACHINE}-unknown-linux-gnu
1.215 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1.216 exit ;;
1.217 sparc:Linux:*:* | sparc64:Linux:*:*)
1.218 - echo ${UNAME_MACHINE}-unknown-linux-gnu
1.219 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1.220 exit ;;
1.221 tile*:Linux:*:*)
1.222 - echo ${UNAME_MACHINE}-unknown-linux-gnu
1.223 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1.224 exit ;;
1.225 vax:Linux:*:*)
1.226 - echo ${UNAME_MACHINE}-dec-linux-gnu
1.227 + echo ${UNAME_MACHINE}-dec-linux-${LIBC}
1.228 exit ;;
1.229 x86_64:Linux:*:*)
1.230 - echo ${UNAME_MACHINE}-unknown-linux-gnu
1.231 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1.232 exit ;;
1.233 xtensa*:Linux:*:*)
1.234 - echo ${UNAME_MACHINE}-unknown-linux-gnu
1.235 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1.236 exit ;;
1.237 i*86:DYNIX/ptx:4*:*)
1.238 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1.239 @@ -1235,19 +1256,31 @@
1.240 exit ;;
1.241 *:Darwin:*:*)
1.242 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1.243 - case $UNAME_PROCESSOR in
1.244 - i386)
1.245 - eval $set_cc_for_build
1.246 - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1.247 - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1.248 - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1.249 - grep IS_64BIT_ARCH >/dev/null
1.250 - then
1.251 - UNAME_PROCESSOR="x86_64"
1.252 - fi
1.253 - fi ;;
1.254 - unknown) UNAME_PROCESSOR=powerpc ;;
1.255 - esac
1.256 + eval $set_cc_for_build
1.257 + if test "$UNAME_PROCESSOR" = unknown ; then
1.258 + UNAME_PROCESSOR=powerpc
1.259 + fi
1.260 + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1.261 + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1.262 + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1.263 + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1.264 + grep IS_64BIT_ARCH >/dev/null
1.265 + then
1.266 + case $UNAME_PROCESSOR in
1.267 + i386) UNAME_PROCESSOR=x86_64 ;;
1.268 + powerpc) UNAME_PROCESSOR=powerpc64 ;;
1.269 + esac
1.270 + fi
1.271 + fi
1.272 + elif test "$UNAME_PROCESSOR" = i386 ; then
1.273 + # Avoid executing cc on OS X 10.9, as it ships with a stub
1.274 + # that puts up a graphical alert prompting to install
1.275 + # developer tools. Any system running Mac OS X 10.7 or
1.276 + # later (Darwin 11 and later) is required to have a 64-bit
1.277 + # processor. This is not true of the ARM version of Darwin
1.278 + # that Apple uses in portable devices.
1.279 + UNAME_PROCESSOR=x86_64
1.280 + fi
1.281 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1.282 exit ;;
1.283 *:procnto*:*:* | *:QNX:[0123456789]*:*)