2012-11-15 07:13:14 +01:00
|
|
|
From eee83aa62993b15b7f460cca9583cd69a15b5357 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
|
|
Date: Thu, 15 Nov 2012 17:01:13 +0100
|
|
|
|
Subject: [PATCH 1/2] config: add support for uClibc
|
|
|
|
|
|
|
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
|
|
---
|
|
|
|
config.guess | 70 ++++++++++++++++++++++++++++++++++++----------------------
|
|
|
|
1 file changed, 43 insertions(+), 27 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/config.guess b/config.guess
|
|
|
|
index 872b96a..9509179 100755
|
|
|
|
--- a/config.guess
|
|
|
|
+++ b/config.guess
|
|
|
|
@@ -138,6 +138,23 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
2005-08-05 00:42:34 +02:00
|
|
|
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
|
|
|
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
|
|
|
|
|
|
|
+if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
|
|
|
|
+ eval $set_cc_for_build
|
|
|
|
+ cat << EOF > $dummy.c
|
|
|
|
+ #include <features.h>
|
|
|
|
+ #ifdef __UCLIBC__
|
|
|
|
+ # ifdef __UCLIBC_CONFIG_VERSION__
|
|
|
|
+ LIBC=uclibc __UCLIBC_CONFIG_VERSION__
|
|
|
|
+ # else
|
|
|
|
+ LIBC=uclibc
|
|
|
|
+ # endif
|
|
|
|
+ #else
|
|
|
|
+ LIBC=gnu
|
|
|
|
+ #endif
|
|
|
|
+EOF
|
|
|
|
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
# Note: order is significant - the case branches are not exclusive.
|
|
|
|
|
|
|
|
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
2012-11-15 07:13:14 +01:00
|
|
|
@@ -869,11 +886,11 @@ EOF
|
|
|
|
echo ${UNAME_MACHINE}-pc-minix
|
|
|
|
exit ;;
|
|
|
|
aarch64:Linux:*:*)
|
|
|
|
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
|
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
|
exit ;;
|
|
|
|
aarch64_be:Linux:*:*)
|
|
|
|
UNAME_MACHINE=aarch64_be
|
|
|
|
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
|
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
|
exit ;;
|
|
|
|
alpha:Linux:*:*)
|
|
|
|
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
|
|
|
@@ -886,15 +903,15 @@ EOF
|
2011-02-25 18:15:32 +01:00
|
|
|
EV68*) UNAME_MACHINE=alphaev68 ;;
|
|
|
|
esac
|
|
|
|
objdump --private-headers /bin/sh | grep -q ld.so.1
|
|
|
|
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
|
|
|
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
|
|
|
|
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
|
|
|
|
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
2005-08-05 00:42:34 +02:00
|
|
|
exit ;;
|
|
|
|
arm*:Linux:*:*)
|
2011-02-25 18:15:32 +01:00
|
|
|
eval $set_cc_for_build
|
|
|
|
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
|
|
|
| grep -q __ARM_EABI__
|
|
|
|
then
|
|
|
|
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
|
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
|
else
|
2012-11-15 07:13:14 +01:00
|
|
|
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
|
|
|
|
| grep -q __ARM_PCS_VFP
|
|
|
|
@@ -906,22 +923,21 @@ EOF
|
2011-02-25 18:15:32 +01:00
|
|
|
fi
|
2007-07-09 19:59:19 +02:00
|
|
|
exit ;;
|
|
|
|
avr32*:Linux:*:*)
|
|
|
|
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
2005-08-05 00:42:34 +02:00
|
|
|
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
|
exit ;;
|
|
|
|
cris:Linux:*:*)
|
2012-11-15 07:13:14 +01:00
|
|
|
- echo ${UNAME_MACHINE}-axis-linux-gnu
|
|
|
|
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
|
2005-08-05 00:42:34 +02:00
|
|
|
exit ;;
|
|
|
|
crisv32:Linux:*:*)
|
2012-11-15 07:13:14 +01:00
|
|
|
- echo ${UNAME_MACHINE}-axis-linux-gnu
|
|
|
|
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
|
2005-08-05 00:42:34 +02:00
|
|
|
exit ;;
|
|
|
|
frv:Linux:*:*)
|
2012-11-15 07:13:14 +01:00
|
|
|
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
|
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
|
exit ;;
|
|
|
|
hexagon:Linux:*:*)
|
|
|
|
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
|
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
2011-02-25 18:15:32 +01:00
|
|
|
exit ;;
|
|
|
|
i*86:Linux:*:*)
|
|
|
|
- LIBC=gnu
|
|
|
|
eval $set_cc_for_build
|
|
|
|
sed 's/^ //' << EOF >$dummy.c
|
|
|
|
#ifdef __dietlibc__
|
2012-11-15 07:13:14 +01:00
|
|
|
@@ -932,13 +948,13 @@ EOF
|
2011-02-25 18:15:32 +01:00
|
|
|
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
|
2005-08-05 00:42:34 +02:00
|
|
|
exit ;;
|
|
|
|
ia64:Linux:*:*)
|
|
|
|
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
|
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
|
exit ;;
|
|
|
|
m32r*:Linux:*:*)
|
|
|
|
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
|
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
|
exit ;;
|
|
|
|
m68*:Linux:*:*)
|
|
|
|
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
|
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
|
exit ;;
|
2011-02-25 18:15:32 +01:00
|
|
|
mips:Linux:*:* | mips64:Linux:*:*)
|
2005-08-05 00:42:34 +02:00
|
|
|
eval $set_cc_for_build
|
2012-11-15 07:13:14 +01:00
|
|
|
@@ -957,10 +973,10 @@ EOF
|
2011-02-25 18:15:32 +01:00
|
|
|
#endif
|
|
|
|
EOF
|
|
|
|
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
|
2005-08-05 00:42:34 +02:00
|
|
|
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
|
|
|
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
|
|
|
|
;;
|
|
|
|
or32:Linux:*:*)
|
2012-11-15 07:13:14 +01:00
|
|
|
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
|
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
2005-08-05 00:42:34 +02:00
|
|
|
exit ;;
|
2011-02-25 18:15:32 +01:00
|
|
|
padre:Linux:*:*)
|
|
|
|
echo sparc-unknown-linux-gnu
|
2012-11-15 07:13:14 +01:00
|
|
|
@@ -971,40 +987,40 @@ EOF
|
2005-08-05 00:42:34 +02:00
|
|
|
parisc:Linux:*:* | hppa:Linux:*:*)
|
|
|
|
# Look for CPU level
|
|
|
|
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
|
|
|
|
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
|
|
|
|
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
|
|
|
|
- *) echo hppa-unknown-linux-gnu ;;
|
|
|
|
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
|
|
|
|
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
|
|
|
|
+ *) echo hppa-unknown-linux-${LIBC} ;;
|
|
|
|
esac
|
|
|
|
exit ;;
|
2011-02-25 18:15:32 +01:00
|
|
|
ppc64:Linux:*:*)
|
|
|
|
- echo powerpc64-unknown-linux-gnu
|
|
|
|
+ echo powerpc64-unknown-linux-${LIBC}
|
|
|
|
exit ;;
|
|
|
|
ppc:Linux:*:*)
|
|
|
|
- echo powerpc-unknown-linux-gnu
|
|
|
|
+ echo powerpc-unknown-linux-${LIBC}
|
2005-08-05 00:42:34 +02:00
|
|
|
exit ;;
|
|
|
|
s390:Linux:*:* | s390x:Linux:*:*)
|
|
|
|
echo ${UNAME_MACHINE}-ibm-linux
|
|
|
|
exit ;;
|
|
|
|
sh64*:Linux:*:*)
|
2011-02-25 18:15:32 +01:00
|
|
|
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
2006-01-04 05:05:05 +01:00
|
|
|
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
2005-08-05 00:42:34 +02:00
|
|
|
exit ;;
|
|
|
|
sh*:Linux:*:*)
|
|
|
|
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
|
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
|
exit ;;
|
|
|
|
sparc:Linux:*:* | sparc64:Linux:*:*)
|
|
|
|
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
|
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
|
|
|
exit ;;
|
2011-02-25 18:15:32 +01:00
|
|
|
tile*:Linux:*:*)
|
2012-11-15 07:13:14 +01:00
|
|
|
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
2011-02-25 18:15:32 +01:00
|
|
|
exit ;;
|
2006-01-04 05:05:05 +01:00
|
|
|
vax:Linux:*:*)
|
|
|
|
- echo ${UNAME_MACHINE}-dec-linux-gnu
|
|
|
|
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
|
|
|
|
exit ;;
|
2005-08-05 00:42:34 +02:00
|
|
|
x86_64:Linux:*:*)
|
2012-11-15 07:13:14 +01:00
|
|
|
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
|
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
2005-08-05 00:42:34 +02:00
|
|
|
exit ;;
|
2011-02-25 18:15:32 +01:00
|
|
|
xtensa*:Linux:*:*)
|
|
|
|
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
|
|
|
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
2007-07-09 19:59:19 +02:00
|
|
|
exit ;;
|
2011-02-25 18:15:32 +01:00
|
|
|
i*86:DYNIX/ptx:4*:*)
|
|
|
|
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
|
2012-11-15 07:13:14 +01:00
|
|
|
--
|
|
|
|
1.7.9.5
|
|
|
|
|