summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch')
-rw-r--r--meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch170
1 files changed, 170 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch b/meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch
new file mode 100644
index 0000000..2094116
--- /dev/null
+++ b/meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch
@@ -0,0 +1,170 @@
1Upstream-Status: Pending
2
3Patch courtesy gentoo-portage/sys-devel/gnuconfig/files/automake-1.8.5-config-guess-uclibc.patch.
4
5updated to 20050516 by Marcin 'Hrw' Juszkiewicz (by hand)
6updated to 20080123 by Nitin A Kamble (by hand)
7updated to 20111001 by Saul Wold (by hand)
8updated to 20120818 by Marcin 'Hrw' Juszkiewicz (by hand)
9
10Signed-off-by: Saul Wold <sgw@linux.intel.com>
11Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
12
13---
14 config.guess | 67 +++++++++++++++++++++++++++++++++++------------------------
15 1 file changed, 40 insertions(+), 27 deletions(-)
16
17--- git.orig/config.guess
18+++ git/config.guess
19@@ -138,6 +138,19 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` |
20 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
21 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
22
23+# Detect uclibc systems.
24+
25+LIBC="gnu"
26+if [ -f /usr/include/bits/uClibc_config.h ]
27+then
28+ LIBC=uclibc
29+ if [ -n `grep "#define __UCLIBC_CONFIG_VERSION__" /usr/include/bits/uClibc_config.h` ]
30+ then
31+ UCLIBC_SUBVER=`sed -n "/#define __UCLIBC_CONFIG_VERSION__ /s///p" /usr/include/bits/uClibc_config.h`
32+ LIBC=$LIBC$UCLIBC_SUBVER
33+ fi
34+fi
35+
36 # Note: order is significant - the case branches are not exclusive.
37
38 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
39@@ -886,15 +899,15 @@ EOF
40 EV68*) UNAME_MACHINE=alphaev68 ;;
41 esac
42 objdump --private-headers /bin/sh | grep -q ld.so.1
43- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
44- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
45+ if test "$?" = 0 ; then LIBC="gnulibc1" ; else LIBC="" ; fi
46+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
47 exit ;;
48 arm*:Linux:*:*)
49 eval $set_cc_for_build
50 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
51 | grep -q __ARM_EABI__
52 then
53- echo ${UNAME_MACHINE}-unknown-linux-gnu
54+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
55 else
56 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
57 | grep -q __ARM_PCS_VFP
58@@ -906,19 +919,19 @@ EOF
59 fi
60 exit ;;
61 avr32*:Linux:*:*)
62- echo ${UNAME_MACHINE}-unknown-linux-gnu
63+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
64 exit ;;
65 cris:Linux:*:*)
66- echo ${UNAME_MACHINE}-axis-linux-gnu
67+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
68 exit ;;
69 crisv32:Linux:*:*)
70- echo ${UNAME_MACHINE}-axis-linux-gnu
71+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
72 exit ;;
73 frv:Linux:*:*)
74- echo ${UNAME_MACHINE}-unknown-linux-gnu
75+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
76 exit ;;
77 hexagon:Linux:*:*)
78- echo ${UNAME_MACHINE}-unknown-linux-gnu
79+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
80 exit ;;
81 i*86:Linux:*:*)
82 LIBC=gnu
83@@ -932,13 +945,13 @@ EOF
84 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
85 exit ;;
86 ia64:Linux:*:*)
87- echo ${UNAME_MACHINE}-unknown-linux-gnu
88+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
89 exit ;;
90 m32r*:Linux:*:*)
91- echo ${UNAME_MACHINE}-unknown-linux-gnu
92+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
93 exit ;;
94 m68*:Linux:*:*)
95- echo ${UNAME_MACHINE}-unknown-linux-gnu
96+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
97 exit ;;
98 mips:Linux:*:* | mips64:Linux:*:*)
99 eval $set_cc_for_build
100@@ -957,54 +970,54 @@ EOF
101 #endif
102 EOF
103 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
104- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
105+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
106 ;;
107 or32:Linux:*:*)
108- echo ${UNAME_MACHINE}-unknown-linux-gnu
109+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
110 exit ;;
111 padre:Linux:*:*)
112- echo sparc-unknown-linux-gnu
113+ echo sparc-unknown-linux-${LIBC}
114 exit ;;
115 parisc64:Linux:*:* | hppa64:Linux:*:*)
116- echo hppa64-unknown-linux-gnu
117+ echo hppa64-unknown-linux-${LIBC}
118 exit ;;
119 parisc:Linux:*:* | hppa:Linux:*:*)
120 # Look for CPU level
121 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
122- PA7*) echo hppa1.1-unknown-linux-gnu ;;
123- PA8*) echo hppa2.0-unknown-linux-gnu ;;
124- *) echo hppa-unknown-linux-gnu ;;
125+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
126+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
127+ *) echo hppa-unknown-linux-${LIBC} ;;
128 esac
129 exit ;;
130 ppc64:Linux:*:*)
131- echo powerpc64-unknown-linux-gnu
132+ echo powerpc64-unknown-linux-${LIBC}
133 exit ;;
134 ppc:Linux:*:*)
135- echo powerpc-unknown-linux-gnu
136+ echo powerpc-unknown-linux-${LIBC}
137 exit ;;
138 s390:Linux:*:* | s390x:Linux:*:*)
139 echo ${UNAME_MACHINE}-ibm-linux
140 exit ;;
141 sh64*:Linux:*:*)
142- echo ${UNAME_MACHINE}-unknown-linux-gnu
143+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
144 exit ;;
145 sh*:Linux:*:*)
146- echo ${UNAME_MACHINE}-unknown-linux-gnu
147+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
148 exit ;;
149 sparc:Linux:*:* | sparc64:Linux:*:*)
150- echo ${UNAME_MACHINE}-unknown-linux-gnu
151+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
152 exit ;;
153 tile*:Linux:*:*)
154- echo ${UNAME_MACHINE}-unknown-linux-gnu
155+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
156 exit ;;
157 vax:Linux:*:*)
158- echo ${UNAME_MACHINE}-dec-linux-gnu
159+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
160 exit ;;
161 x86_64:Linux:*:*)
162- echo ${UNAME_MACHINE}-unknown-linux-gnu
163+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
164 exit ;;
165 xtensa*:Linux:*:*)
166- echo ${UNAME_MACHINE}-unknown-linux-gnu
167+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
168 exit ;;
169 i*86:DYNIX/ptx:4*:*)
170 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.