summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc-2.10.1
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glibc/glibc-2.10.1')
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/arm-check-pf.patch14
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/arm-longlong.patch58
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/arm-lowlevellock-include-tls.patch12
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/arm-memcpy.patch758
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/dl-cache-libcmp.patch10
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/etc/ld.so.conf2
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/fhs-linux-paths.patch11
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/generate-supported.mk11
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/generic-bits_select.h35
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/generic-bits_time.h75
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/generic-bits_types.h200
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/generic-bits_typesizes.h66
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/glibc-2.9-enable-binutils-2.2.patch35
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/glibc-arm-IO-acquire-lock-fix.diff13
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/glibc-arm-no-asm-page.patch15
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/glibc-check_pf.patch343
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/ldd-unbash.patch11
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/ldsocache-varrun.patch18
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/local-args6.diff12
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/march-i686.patch38
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/nptl-crosscompile.patch26
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/nscd-init.patch39
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/powerpc-sqrt-hack.diff25
-rw-r--r--meta/recipes-core/glibc/glibc-2.10.1/rulesfix.patch13
24 files changed, 1840 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/arm-check-pf.patch b/meta/recipes-core/glibc/glibc-2.10.1/arm-check-pf.patch
new file mode 100644
index 0000000000..b9c72262f2
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/arm-check-pf.patch
@@ -0,0 +1,14 @@
1Index: glibc-2.9/ports/sysdeps/unix/sysv/linux/arm/check_pf.c
2===================================================================
3--- glibc-2.9.orig/ports/sysdeps/unix/sysv/linux/arm/check_pf.c 2009-06-19 20:45:32.451372131 +0400
4+++ glibc-2.9/ports/sysdeps/unix/sysv/linux/arm/check_pf.c 2009-06-19 20:45:51.351313426 +0400
5@@ -207,9 +207,6 @@
6 newp->info.flags = (((ifam->ifa_flags & IFA_F_DEPRECATED)
7 ? in6ai_deprecated : 0)
8 | ((ifam->ifa_flags
9- & IFA_F_TEMPORARY)
10- ? in6ai_temporary : 0)
11- | ((ifam->ifa_flags
12 & IFA_F_HOMEADDRESS)
13 ? in6ai_homeaddress : 0));
14 memcpy (newp->info.addr, address ?: local,
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/arm-longlong.patch b/meta/recipes-core/glibc/glibc-2.10.1/arm-longlong.patch
new file mode 100644
index 0000000000..28aca83dff
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/arm-longlong.patch
@@ -0,0 +1,58 @@
1--- glibc-2.4/stdlib/longlong.h.ark 2006-03-11 22:49:27.000000000 +0100
2+++ glibc-2.4/stdlib/longlong.h 2006-03-11 22:55:12.000000000 +0100
3@@ -206,6 +206,14 @@
4 "rI" ((USItype) (bh)), \
5 "r" ((USItype) (al)), \
6 "rI" ((USItype) (bl)) __CLOBBER_CC)
7+/* v3m and all higher arches have long multiply support. */
8+#if !defined(__ARM_ARCH_2__) && !defined(__ARM_ARCH_3__)
9+#define umul_ppmm(xh, xl, a, b) \
10+ __asm__ ("umull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b))
11+#define UMUL_TIME 5
12+#define smul_ppmm(xh, xl, a, b) \
13+ __asm__ ("smull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b))
14+#else
15 #define umul_ppmm(xh, xl, a, b) \
16 {register USItype __t0, __t1, __t2; \
17 __asm__ ("%@ Inlined umul_ppmm\n" \
18@@ -227,7 +235,13 @@
19 : "r" ((USItype) (a)), \
20 "r" ((USItype) (b)) __CLOBBER_CC );}
21 #define UMUL_TIME 20
22+#endif
23 #define UDIV_TIME 100
24+#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__)
25+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X))
26+#define COUNT_LEADING_ZEROS_0 32
27+#endif
28+
29 #endif /* __arm__ */
30
31 #if defined (__hppa) && W_TYPE_SIZE == 32
32--- glibc-2.4/ports/sysdeps/arm/mp_clz_tab.c.ark 2006-03-11 22:56:43.000000000 +0100
33+++ glibc-2.4/ports/sysdeps/arm/mp_clz_tab.c 2006-03-11 22:58:19.000000000 +0100
34@@ -0,0 +1,24 @@
35+/* __clz_tab -- support for longlong.h
36+ Copyright (C) 2004 Free Software Foundation, Inc.
37+ This file is part of the GNU C Library.
38+
39+ The GNU C Library is free software; you can redistribute it and/or
40+ modify it under the terms of the GNU Lesser General Public
41+ License as published by the Free Software Foundation; either
42+ version 2.1 of the License, or (at your option) any later version.
43+
44+ The GNU C Library is distributed in the hope that it will be useful,
45+ but WITHOUT ANY WARRANTY; without even the implied warranty of
46+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
47+ Lesser General Public License for more details.
48+
49+ You should have received a copy of the GNU Lesser General Public
50+ License along with the GNU C Library; if not, write to the Free
51+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
52+ 02111-1307 USA. */
53+
54+#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__)
55+/* Nothing required. */
56+#else
57+#include <stdlib/mp_clz_tab.c>
58+#endif
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/arm-lowlevellock-include-tls.patch b/meta/recipes-core/glibc/glibc-2.10.1/arm-lowlevellock-include-tls.patch
new file mode 100644
index 0000000000..5c8062ecee
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/arm-lowlevellock-include-tls.patch
@@ -0,0 +1,12 @@
1Index: glibc-2.9/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
2===================================================================
3--- glibc-2.9.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-06-19 20:54:35.446686910 +0400
4+++ glibc-2.9/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-06-19 20:54:43.774683370 +0400
5@@ -25,6 +25,7 @@
6 #include <atomic.h>
7 #include <sysdep.h>
8 #include <kernel-features.h>
9+#include <tls.h>
10
11 #define FUTEX_WAIT 0
12 #define FUTEX_WAKE 1
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/arm-memcpy.patch b/meta/recipes-core/glibc/glibc-2.10.1/arm-memcpy.patch
new file mode 100644
index 0000000000..bc2b3dab84
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/arm-memcpy.patch
@@ -0,0 +1,758 @@
1--- /dev/null 2004-02-02 20:32:13.000000000 +0000
2+++ sysdeps/arm/memmove.S 2004-03-20 18:37:23.000000000 +0000
3@@ -0,0 +1,251 @@
4+/*
5+ * Optimized memmove implementation for ARM processors
6+ *
7+ * Author: Nicolas Pitre
8+ * Created: Dec 23, 2003
9+ * Copyright: (C) MontaVista Software, Inc.
10+ *
11+ * This file is free software; you can redistribute it and/or
12+ * modify it under the terms of the GNU Lesser General Public
13+ * License as published by the Free Software Foundation; either
14+ * version 2.1 of the License, or (at your option) any later version.
15+ *
16+ * This file is distributed in the hope that it will be useful,
17+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19+ * Lesser General Public License for more details.
20+ */
21+
22+#include <sysdep.h>
23+
24+
25+/*
26+ * Endian independent macros for shifting bytes within registers.
27+ */
28+#ifndef __ARMEB__
29+#define pull lsr
30+#define push lsl
31+#else
32+#define pull lsl
33+#define push lsr
34+#endif
35+
36+/*
37+ * Enable data preload for architectures that support it (ARMv5 and above)
38+ */
39+#if defined(__ARM_ARCH_5__) || \
40+ defined(__ARM_ARCH_5T__) || \
41+ defined(__ARM_ARCH_5TE__)
42+#define PLD(code...) code
43+#else
44+#define PLD(code...)
45+#endif
46+
47+
48+/* char * memmove (char *dst, const char *src) */
49+ENTRY(memmove)
50+ subs ip, r0, r1
51+ cmphi r2, ip
52+ bls memcpy(PLT)
53+
54+ stmfd sp!, {r0, r4, lr}
55+ add r1, r1, r2
56+ add r0, r0, r2
57+ subs r2, r2, #4
58+ blt 25f
59+ ands ip, r0, #3
60+ PLD( pld [r1, #-4] )
61+ bne 26f
62+ ands ip, r1, #3
63+ bne 27f
64+
65+19: subs r2, r2, #4
66+ blt 24f
67+ subs r2, r2, #8
68+ blt 23f
69+ subs r2, r2, #16
70+ blt 22f
71+
72+ PLD( pld [r1, #-32] )
73+ PLD( subs r2, r2, #96 )
74+ stmfd sp!, {r5 - r8}
75+ PLD( blt 21f )
76+
77+ PLD( @ cache alignment )
78+ PLD( ands ip, r1, #31 )
79+ PLD( pld [r1, #-64] )
80+ PLD( beq 20f )
81+ PLD( cmp r2, ip )
82+ PLD( pld [r1, #-96] )
83+ PLD( blt 20f )
84+ PLD( cmp ip, #16 )
85+ PLD( sub r2, r2, ip )
86+ PLD( ldmgedb r1!, {r3 - r6} )
87+ PLD( stmgedb r0!, {r3 - r6} )
88+ PLD( beq 20f )
89+ PLD( and ip, ip, #15 )
90+ PLD( cmp ip, #8 )
91+ PLD( ldr r3, [r1, #-4]! )
92+ PLD( ldrge r4, [r1, #-4]! )
93+ PLD( ldrgt r5, [r1, #-4]! )
94+ PLD( str r3, [r0, #-4]! )
95+ PLD( strge r4, [r0, #-4]! )
96+ PLD( strgt r5, [r0, #-4]! )
97+
98+20: PLD( pld [r1, #-96] )
99+ PLD( pld [r1, #-128] )
100+21: ldmdb r1!, {r3, r4, ip, lr}
101+ subs r2, r2, #32
102+ stmdb r0!, {r3, r4, ip, lr}
103+ ldmdb r1!, {r3, r4, ip, lr}
104+ stmgedb r0!, {r3, r4, ip, lr}
105+ ldmgedb r1!, {r3, r4, ip, lr}
106+ stmgedb r0!, {r3, r4, ip, lr}
107+ ldmgedb r1!, {r3, r4, ip, lr}
108+ subges r2, r2, #32
109+ stmdb r0!, {r3, r4, ip, lr}
110+ bge 20b
111+ PLD( cmn r2, #96 )
112+ PLD( bge 21b )
113+ PLD( add r2, r2, #96 )
114+ tst r2, #31
115+ ldmfd sp!, {r5 - r8}
116+ ldmeqfd sp!, {r0, r4, pc}
117+
118+ tst r2, #16
119+22: ldmnedb r1!, {r3, r4, ip, lr}
120+ stmnedb r0!, {r3, r4, ip, lr}
121+
122+ tst r2, #8
123+23: ldmnedb r1!, {r3, r4}
124+ stmnedb r0!, {r3, r4}
125+
126+ tst r2, #4
127+24: ldrne r3, [r1, #-4]!
128+ strne r3, [r0, #-4]!
129+
130+25: ands r2, r2, #3
131+ ldmeqfd sp!, {r0, r4, pc}
132+
133+ cmp r2, #2
134+ ldrb r3, [r1, #-1]
135+ ldrgeb r4, [r1, #-2]
136+ ldrgtb ip, [r1, #-3]
137+ strb r3, [r0, #-1]
138+ strgeb r4, [r0, #-2]
139+ strgtb ip, [r0, #-3]
140+ ldmfd sp!, {r0, r4, pc}
141+
142+26: cmp ip, #2
143+ ldrb r3, [r1, #-1]!
144+ ldrgeb r4, [r1, #-1]!
145+ ldrgtb lr, [r1, #-1]!
146+ strb r3, [r0, #-1]!
147+ strgeb r4, [r0, #-1]!
148+ strgtb lr, [r0, #-1]!
149+ subs r2, r2, ip
150+ blt 25b
151+ ands ip, r1, #3
152+ beq 19b
153+
154+27: bic r1, r1, #3
155+ cmp ip, #2
156+ ldr r3, [r1]
157+ beq 35f
158+ blt 36f
159+
160+
161+ .macro backward_copy_shift push pull
162+
163+ cmp r2, #12
164+ PLD( pld [r1, #-4] )
165+ blt 33f
166+ subs r2, r2, #28
167+ stmfd sp!, {r5 - r9}
168+ blt 31f
169+
170+ PLD( subs r2, r2, #96 )
171+ PLD( pld [r1, #-32] )
172+ PLD( blt 30f )
173+ PLD( pld [r1, #-64] )
174+
175+ PLD( @ cache alignment )
176+ PLD( ands ip, r1, #31 )
177+ PLD( pld [r1, #-96] )
178+ PLD( beq 29f )
179+ PLD( cmp r2, ip )
180+ PLD( pld [r1, #-128] )
181+ PLD( blt 29f )
182+ PLD( sub r2, r2, ip )
183+28: PLD( mov r4, r3, push #\push )
184+ PLD( ldr r3, [r1, #-4]! )
185+ PLD( subs ip, ip, #4 )
186+ PLD( orr r4, r4, r3, pull #\pull )
187+ PLD( str r4, [r0, #-4]! )
188+ PLD( bgt 28b )
189+
190+29: PLD( pld [r1, #-128] )
191+30: mov lr, r3, push #\push
192+ ldmdb r1!, {r3 - r9, ip}
193+ subs r2, r2, #32
194+ orr lr, lr, ip, pull #\pull
195+ mov ip, ip, push #\push
196+ orr ip, ip, r9, pull #\pull
197+ mov r9, r9, push #\push
198+ orr r9, r9, r8, pull #\pull
199+ mov r8, r8, push #\push
200+ orr r8, r8, r7, pull #\pull
201+ mov r7, r7, push #\push
202+ orr r7, r7, r6, pull #\pull
203+ mov r6, r6, push #\push
204+ orr r6, r6, r5, pull #\pull
205+ mov r5, r5, push #\push
206+ orr r5, r5, r4, pull #\pull
207+ mov r4, r4, push #\push
208+ orr r4, r4, r3, pull #\pull
209+ stmdb r0!, {r4 - r9, ip, lr}
210+ bge 29b
211+ PLD( cmn r2, #96 )
212+ PLD( bge 30b )
213+ PLD( add r2, r2, #96 )
214+ cmn r2, #16
215+ blt 32f
216+31: mov r7, r3, push #\push
217+ ldmdb r1!, {r3 - r6}
218+ sub r2, r2, #16
219+ orr r7, r7, r6, pull #\pull
220+ mov r6, r6, push #\push
221+ orr r6, r6, r5, pull #\pull
222+ mov r5, r5, push #\push
223+ orr r5, r5, r4, pull #\pull
224+ mov r4, r4, push #\push
225+ orr r4, r4, r3, pull #\pull
226+ stmdb r0!, {r4 - r7}
227+32: adds r2, r2, #28
228+ ldmfd sp!, {r5 - r9}
229+ blt 34f
230+33: mov r4, r3, push #\push
231+ ldr r3, [r1, #-4]!
232+ subs r2, r2, #4
233+ orr r4, r4, r3, pull #\pull
234+ str r4, [r0, #-4]!
235+ bge 33b
236+34:
237+ .endm
238+
239+
240+ backward_copy_shift push=8 pull=24
241+ add r1, r1, #3
242+ b 25b
243+
244+35: backward_copy_shift push=16 pull=16
245+ add r1, r1, #2
246+ b 25b
247+
248+36: backward_copy_shift push=24 pull=8
249+ add r1, r1, #1
250+ b 25b
251+
252+ .size memmove, . - memmove
253+END(memmove)
254+libc_hidden_builtin_def (memmove)
255--- /dev/null 2004-02-02 20:32:13.000000000 +0000
256+++ sysdeps/arm/bcopy.S 2004-03-20 18:37:48.000000000 +0000
257@@ -0,0 +1,255 @@
258+/*
259+ * Optimized memmove implementation for ARM processors
260+ *
261+ * Author: Nicolas Pitre
262+ * Created: Dec 23, 2003
263+ * Copyright: (C) MontaVista Software, Inc.
264+ *
265+ * This file is free software; you can redistribute it and/or
266+ * modify it under the terms of the GNU Lesser General Public
267+ * License as published by the Free Software Foundation; either
268+ * version 2.1 of the License, or (at your option) any later version.
269+ *
270+ * This file is distributed in the hope that it will be useful,
271+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
272+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
273+ * Lesser General Public License for more details.
274+ */
275+
276+#include <sysdep.h>
277+
278+
279+/*
280+ * Endian independent macros for shifting bytes within registers.
281+ */
282+#ifndef __ARMEB__
283+#define pull lsr
284+#define push lsl
285+#else
286+#define pull lsl
287+#define push lsr
288+#endif
289+
290+/*
291+ * Enable data preload for architectures that support it (ARMv5 and above)
292+ */
293+#if defined(__ARM_ARCH_5__) || \
294+ defined(__ARM_ARCH_5T__) || \
295+ defined(__ARM_ARCH_5TE__)
296+#define PLD(code...) code
297+#else
298+#define PLD(code...)
299+#endif
300+
301+dst .req r1
302+src .req r0
303+
304+/* void *bcopy (const char *src, char *dst, size_t size) */
305+ENTRY(bcopy)
306+ subs ip, dst, src
307+ cmphi r2, ip
308+ movls r3, r0
309+ movls r0, r1
310+ movls r1, r3
311+ bls memcpy(PLT)
312+
313+ stmfd sp!, {r4, lr}
314+ add src, src, r2
315+ add dst, dst, r2
316+ subs r2, r2, #4
317+ blt 25f
318+ ands ip, dst, #3
319+ PLD( pld [src, #-4] )
320+ bne 26f
321+ ands ip, src, #3
322+ bne 27f
323+
324+19: subs r2, r2, #4
325+ blt 24f
326+ subs r2, r2, #8
327+ blt 23f
328+ subs r2, r2, #16
329+ blt 22f
330+
331+ PLD( pld [src, #-32] )
332+ PLD( subs r2, r2, #96 )
333+ stmfd sp!, {r5 - r8}
334+ PLD( blt 21f )
335+
336+ PLD( @ cache alignment )
337+ PLD( ands ip, src, #31 )
338+ PLD( pld [src, #-64] )
339+ PLD( beq 20f )
340+ PLD( cmp r2, ip )
341+ PLD( pld [src, #-96] )
342+ PLD( blt 20f )
343+ PLD( cmp ip, #16 )
344+ PLD( sub r2, r2, ip )
345+ PLD( ldmgedb src!, {r3 - r6} )
346+ PLD( stmgedb dst!, {r3 - r6} )
347+ PLD( beq 20f )
348+ PLD( and ip, ip, #15 )
349+ PLD( cmp ip, #8 )
350+ PLD( ldr r3, [src, #-4]! )
351+ PLD( ldrge r4, [src, #-4]! )
352+ PLD( ldrgt r5, [src, #-4]! )
353+ PLD( str r3, [dst, #-4]! )
354+ PLD( strge r4, [dst, #-4]! )
355+ PLD( strgt r5, [dst, #-4]! )
356+
357+20: PLD( pld [src, #-96] )
358+ PLD( pld [src, #-128] )
359+21: ldmdb src!, {r3, r4, ip, lr}
360+ subs r2, r2, #32
361+ stmdb dst!, {r3, r4, ip, lr}
362+ ldmdb src!, {r3, r4, ip, lr}
363+ stmgedb dst!, {r3, r4, ip, lr}
364+ ldmgedb src!, {r3, r4, ip, lr}
365+ stmgedb dst!, {r3, r4, ip, lr}
366+ ldmgedb src!, {r3, r4, ip, lr}
367+ subges r2, r2, #32
368+ stmdb dst!, {r3, r4, ip, lr}
369+ bge 20b
370+ PLD( cmn r2, #96 )
371+ PLD( bge 21b )
372+ PLD( add r2, r2, #96 )
373+ tst r2, #31
374+ ldmfd sp!, {r5 - r8}
375+ ldmeqfd sp!, {r4, pc}
376+
377+ tst r2, #16
378+22: ldmnedb src!, {r3, r4, ip, lr}
379+ stmnedb dst!, {r3, r4, ip, lr}
380+
381+ tst r2, #8
382+23: ldmnedb src!, {r3, r4}
383+ stmnedb dst!, {r3, r4}
384+
385+ tst r2, #4
386+24: ldrne r3, [src, #-4]!
387+ strne r3, [dst, #-4]!
388+
389+25: ands r2, r2, #3
390+ ldmeqfd sp!, {dst, r4, pc}
391+
392+ cmp r2, #2
393+ ldrb r3, [src, #-1]
394+ ldrgeb r4, [src, #-2]
395+ ldrgtb ip, [src, #-3]
396+ strb r3, [dst, #-1]
397+ strgeb r4, [dst, #-2]
398+ strgtb ip, [dst, #-3]
399+ ldmfd sp!, {dst, r4, pc}
400+
401+26: cmp ip, #2
402+ ldrb r3, [src, #-1]!
403+ ldrgeb r4, [src, #-1]!
404+ ldrgtb lr, [src, #-1]!
405+ strb r3, [dst, #-1]!
406+ strgeb r4, [dst, #-1]!
407+ strgtb lr, [dst, #-1]!
408+ subs r2, r2, ip
409+ blt 25b
410+ ands ip, src, #3
411+ beq 19b
412+
413+27: bic src, src, #3
414+ cmp ip, #2
415+ ldr r3, [src]
416+ beq 35f
417+ blt 36f
418+
419+
420+ .macro backward_copy_shift push pull
421+
422+ cmp r2, #12
423+ PLD( pld [src, #-4] )
424+ blt 33f
425+ subs r2, r2, #28
426+ stmfd sp!, {r5 - r9}
427+ blt 31f
428+
429+ PLD( subs r2, r2, #96 )
430+ PLD( pld [src, #-32] )
431+ PLD( blt 30f )
432+ PLD( pld [src, #-64] )
433+
434+ PLD( @ cache alignment )
435+ PLD( ands ip, src, #31 )
436+ PLD( pld [src, #-96] )
437+ PLD( beq 29f )
438+ PLD( cmp r2, ip )
439+ PLD( pld [src, #-128] )
440+ PLD( blt 29f )
441+ PLD( sub r2, r2, ip )
442+28: PLD( mov r4, r3, push #\push )
443+ PLD( ldr r3, [src, #-4]! )
444+ PLD( subs ip, ip, #4 )
445+ PLD( orr r4, r4, r3, pull #\pull )
446+ PLD( str r4, [dst, #-4]! )
447+ PLD( bgt 28b )
448+
449+29: PLD( pld [src, #-128] )
450+30: mov lr, r3, push #\push
451+ ldmdb src!, {r3 - r9, ip}
452+ subs r2, r2, #32
453+ orr lr, lr, ip, pull #\pull
454+ mov ip, ip, push #\push
455+ orr ip, ip, r9, pull #\pull
456+ mov r9, r9, push #\push
457+ orr r9, r9, r8, pull #\pull
458+ mov r8, r8, push #\push
459+ orr r8, r8, r7, pull #\pull
460+ mov r7, r7, push #\push
461+ orr r7, r7, r6, pull #\pull
462+ mov r6, r6, push #\push
463+ orr r6, r6, r5, pull #\pull
464+ mov r5, r5, push #\push
465+ orr r5, r5, r4, pull #\pull
466+ mov r4, r4, push #\push
467+ orr r4, r4, r3, pull #\pull
468+ stmdb dst!, {r4 - r9, ip, lr}
469+ bge 29b
470+ PLD( cmn r2, #96 )
471+ PLD( bge 30b )
472+ PLD( add r2, r2, #96 )
473+ cmn r2, #16
474+ blt 32f
475+31: mov r7, r3, push #\push
476+ ldmdb src!, {r3 - r6}
477+ sub r2, r2, #16
478+ orr r7, r7, r6, pull #\pull
479+ mov r6, r6, push #\push
480+ orr r6, r6, r5, pull #\pull
481+ mov r5, r5, push #\push
482+ orr r5, r5, r4, pull #\pull
483+ mov r4, r4, push #\push
484+ orr r4, r4, r3, pull #\pull
485+ stmdb dst!, {r4 - r7}
486+32: adds r2, r2, #28
487+ ldmfd sp!, {r5 - r9}
488+ blt 34f
489+33: mov r4, r3, push #\push
490+ ldr r3, [src, #-4]!
491+ subs r2, r2, #4
492+ orr r4, r4, r3, pull #\pull
493+ str r4, [dst, #-4]!
494+ bge 33b
495+34:
496+ .endm
497+
498+
499+ backward_copy_shift push=8 pull=24
500+ add src, src, #3
501+ b 25b
502+
503+35: backward_copy_shift push=16 pull=16
504+ add src, src, #2
505+ b 25b
506+
507+36: backward_copy_shift push=24 pull=8
508+ add src, src, #1
509+ b 25b
510+
511+ .size bcopy, . - bcopy
512+END(bcopy)
513
514--- /dev/null 2004-02-02 20:32:13.000000000 +0000
515+++ sysdeps/arm/memcpy.S 2004-05-02 14:33:22.000000000 +0100
516@@ -0,0 +1,242 @@
517+/*
518+ * Optimized memcpy implementation for ARM processors
519+ *
520+ * Author: Nicolas Pitre
521+ * Created: Dec 23, 2003
522+ * Copyright: (C) MontaVista Software, Inc.
523+ *
524+ * This file is free software; you can redistribute it and/or
525+ * modify it under the terms of the GNU Lesser General Public
526+ * License as published by the Free Software Foundation; either
527+ * version 2.1 of the License, or (at your option) any later version.
528+ *
529+ * This file is distributed in the hope that it will be useful,
530+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
531+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
532+ * Lesser General Public License for more details.
533+ */
534+
535+#include <sysdep.h>
536+
537+
538+/*
539+ * Endian independent macros for shifting bytes within registers.
540+ */
541+#ifndef __ARMEB__
542+#define pull lsr
543+#define push lsl
544+#else
545+#define pull lsl
546+#define push lsr
547+#endif
548+
549+/*
550+ * Enable data preload for architectures that support it (ARMv5 and above)
551+ */
552+#if defined(__ARM_ARCH_5__) || \
553+ defined(__ARM_ARCH_5T__) || \
554+ defined(__ARM_ARCH_5TE__)
555+#define PLD(code...) code
556+#else
557+#define PLD(code...)
558+#endif
559+
560+
561+/* char * memcpy (char *dst, const char *src) */
562+
563+ENTRY(memcpy)
564+ subs r2, r2, #4
565+ stmfd sp!, {r0, r4, lr}
566+ blt 7f
567+ ands ip, r0, #3
568+ PLD( pld [r1, #0] )
569+ bne 8f
570+ ands ip, r1, #3
571+ bne 9f
572+
573+1: subs r2, r2, #4
574+ blt 6f
575+ subs r2, r2, #8
576+ blt 5f
577+ subs r2, r2, #16
578+ blt 4f
579+
580+ PLD( subs r2, r2, #65 )
581+ stmfd sp!, {r5 - r8}
582+ PLD( blt 3f )
583+ PLD( pld [r1, #32] )
584+
585+ PLD( @ cache alignment )
586+ PLD( ands ip, r1, #31 )
587+ PLD( pld [r1, #64] )
588+ PLD( beq 2f )
589+ PLD( rsb ip, ip, #32 )
590+ PLD( cmp r2, ip )
591+ PLD( pld [r1, #96] )
592+ PLD( blt 2f )
593+ PLD( cmp ip, #16 )
594+ PLD( sub r2, r2, ip )
595+ PLD( ldmgeia r1!, {r3 - r6} )
596+ PLD( stmgeia r0!, {r3 - r6} )
597+ PLD( beq 2f )
598+ PLD( and ip, ip, #15 )
599+ PLD( cmp ip, #8 )
600+ PLD( ldr r3, [r1], #4 )
601+ PLD( ldrge r4, [r1], #4 )
602+ PLD( ldrgt r5, [r1], #4 )
603+ PLD( str r3, [r0], #4 )
604+ PLD( strge r4, [r0], #4 )
605+ PLD( strgt r5, [r0], #4 )
606+
607+2: PLD( pld [r1, #96] )
608+3: ldmia r1!, {r3 - r8, ip, lr}
609+ subs r2, r2, #32
610+ stmia r0!, {r3 - r8, ip, lr}
611+ bge 2b
612+ PLD( cmn r2, #65 )
613+ PLD( bge 3b )
614+ PLD( add r2, r2, #65 )
615+ tst r2, #31
616+ ldmfd sp!, {r5 - r8}
617+ ldmeqfd sp!, {r0, r4, pc}
618+
619+ tst r2, #16
620+4: ldmneia r1!, {r3, r4, ip, lr}
621+ stmneia r0!, {r3, r4, ip, lr}
622+
623+ tst r2, #8
624+5: ldmneia r1!, {r3, r4}
625+ stmneia r0!, {r3, r4}
626+
627+ tst r2, #4
628+6: ldrne r3, [r1], #4
629+ strne r3, [r0], #4
630+
631+7: ands r2, r2, #3
632+ ldmeqfd sp!, {r0, r4, pc}
633+
634+ cmp r2, #2
635+ ldrb r3, [r1], #1
636+ ldrgeb r4, [r1], #1
637+ ldrgtb ip, [r1]
638+ strb r3, [r0], #1
639+ strgeb r4, [r0], #1
640+ strgtb ip, [r0]
641+ ldmfd sp!, {r0, r4, pc}
642+
643+8: rsb ip, ip, #4
644+ cmp ip, #2
645+ ldrb r3, [r1], #1
646+ ldrgeb r4, [r1], #1
647+ ldrgtb lr, [r1], #1
648+ strb r3, [r0], #1
649+ strgeb r4, [r0], #1
650+ strgtb lr, [r0], #1
651+ subs r2, r2, ip
652+ blt 7b
653+ ands ip, r1, #3
654+ beq 1b
655+
656+9: bic r1, r1, #3
657+ cmp ip, #2
658+ ldr lr, [r1], #4
659+ beq 17f
660+ bgt 18f
661+
662+
663+ .macro forward_copy_shift pull push
664+
665+ cmp r2, #12
666+ PLD( pld [r1, #0] )
667+ blt 15f
668+ subs r2, r2, #28
669+ stmfd sp!, {r5 - r9}
670+ blt 13f
671+
672+ PLD( subs r2, r2, #97 )
673+ PLD( blt 12f )
674+ PLD( pld [r1, #32] )
675+
676+ PLD( @ cache alignment )
677+ PLD( rsb ip, r1, #36 )
678+ PLD( pld [r1, #64] )
679+ PLD( ands ip, ip, #31 )
680+ PLD( pld [r1, #96] )
681+ PLD( beq 11f )
682+ PLD( cmp r2, ip )
683+ PLD( pld [r1, #128] )
684+ PLD( blt 11f )
685+ PLD( sub r2, r2, ip )
686+10: PLD( mov r3, lr, pull #\pull )
687+ PLD( ldr lr, [r1], #4 )
688+ PLD( subs ip, ip, #4 )
689+ PLD( orr r3, r3, lr, push #\push )
690+ PLD( str r3, [r0], #4 )
691+ PLD( bgt 10b )
692+
693+11: PLD( pld [r1, #128] )
694+12: mov r3, lr, pull #\pull
695+ ldmia r1!, {r4 - r9, ip, lr}
696+ subs r2, r2, #32
697+ orr r3, r3, r4, push #\push
698+ mov r4, r4, pull #\pull
699+ orr r4, r4, r5, push #\push
700+ mov r5, r5, pull #\pull
701+ orr r5, r5, r6, push #\push
702+ mov r6, r6, pull #\pull
703+ orr r6, r6, r7, push #\push
704+ mov r7, r7, pull #\pull
705+ orr r7, r7, r8, push #\push
706+ mov r8, r8, pull #\pull
707+ orr r8, r8, r9, push #\push
708+ mov r9, r9, pull #\pull
709+ orr r9, r9, ip, push #\push
710+ mov ip, ip, pull #\pull
711+ orr ip, ip, lr, push #\push
712+ stmia r0!, {r3 - r9, ip}
713+ bge 11b
714+ PLD( cmn r2, #97 )
715+ PLD( bge 12b )
716+ PLD( add r2, r2, #97 )
717+ cmn r2, #16
718+ blt 14f
719+13: mov r3, lr, pull #\pull
720+ ldmia r1!, {r4 - r6, lr}
721+ sub r2, r2, #16
722+ orr r3, r3, r4, push #\push
723+ mov r4, r4, pull #\pull
724+ orr r4, r4, r5, push #\push
725+ mov r5, r5, pull #\pull
726+ orr r5, r5, r6, push #\push
727+ mov r6, r6, pull #\pull
728+ orr r6, r6, lr, push #\push
729+ stmia r0!, {r3 - r6}
730+14: adds r2, r2, #28
731+ ldmfd sp!, {r5 - r9}
732+ blt 16f
733+15: mov r3, lr, pull #\pull
734+ ldr lr, [r1], #4
735+ subs r2, r2, #4
736+ orr r3, r3, lr, push #\push
737+ str r3, [r0], #4
738+ bge 15b
739+16:
740+ .endm
741+
742+
743+ forward_copy_shift pull=8 push=24
744+ sub r1, r1, #3
745+ b 7b
746+
747+17: forward_copy_shift pull=16 push=16
748+ sub r1, r1, #2
749+ b 7b
750+
751+18: forward_copy_shift pull=24 push=8
752+ sub r1, r1, #1
753+ b 7b
754+
755+ .size memcpy, . - memcpy
756+END(memcpy)
757+libc_hidden_builtin_def (memcpy)
758+
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/dl-cache-libcmp.patch b/meta/recipes-core/glibc/glibc-2.10.1/dl-cache-libcmp.patch
new file mode 100644
index 0000000000..2fedfa6db0
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/dl-cache-libcmp.patch
@@ -0,0 +1,10 @@
1--- glibc-2.4/elf/Versions.ark 2006-03-11 23:30:09.000000000 +0100
2+++ glibc-2.4/elf/Versions 2006-03-11 23:31:44.000000000 +0100
3@@ -63,5 +63,7 @@
4 _dl_debug_state;
5 # Pointer protection.
6 __pointer_chk_guard;
7+ # for ldconfig
8+ _dl_cache_libcmp;
9 }
10 }
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/etc/ld.so.conf b/meta/recipes-core/glibc/glibc-2.10.1/etc/ld.so.conf
new file mode 100644
index 0000000000..ddd777db2a
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/etc/ld.so.conf
@@ -0,0 +1,2 @@
1/usr/local/lib
2include /etc/ld.so.conf.d/*
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/fhs-linux-paths.patch b/meta/recipes-core/glibc/glibc-2.10.1/fhs-linux-paths.patch
new file mode 100644
index 0000000000..1f32f6d7f2
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/fhs-linux-paths.patch
@@ -0,0 +1,11 @@
1--- glibc-2.1.1/sysdeps/unix/sysv/linux/paths.h~ Thu May 27 13:16:33 1999
2+++ glibc-2.1.1/sysdeps/unix/sysv/linux/paths.h Thu May 27 13:17:55 1999
3@@ -71,7 +71,7 @@
4 /* Provide trailing slash, since mostly used for building pathnames. */
5 #define _PATH_DEV "/dev/"
6 #define _PATH_TMP "/tmp/"
7-#define _PATH_VARDB "/var/db/"
8+#define _PATH_VARDB "/var/lib/misc/"
9 #define _PATH_VARRUN "/var/run/"
10 #define _PATH_VARTMP "/var/tmp/"
11
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/generate-supported.mk b/meta/recipes-core/glibc/glibc-2.10.1/generate-supported.mk
new file mode 100644
index 0000000000..d2a28c2dc6
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/generate-supported.mk
@@ -0,0 +1,11 @@
1#!/usr/bin/make
2
3include $(IN)
4
5all:
6 rm -f $(OUT)
7 touch $(OUT)
8 for locale in $(SUPPORTED-LOCALES); do \
9 [ $$locale = true ] && continue; \
10 echo $$locale | sed 's,/, ,' >> $(OUT); \
11 done
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/generic-bits_select.h b/meta/recipes-core/glibc/glibc-2.10.1/generic-bits_select.h
new file mode 100644
index 0000000000..47e7dedc30
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/generic-bits_select.h
@@ -0,0 +1,35 @@
1/* Copyright (C) 1997, 1998, 2001 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 02111-1307 USA. */
18
19#ifndef _SYS_SELECT_H
20# error "Never use <bits/select.h> directly; include <sys/select.h> instead."
21#endif
22
23
24/* We don't use `memset' because this would require a prototype and
25 the array isn't too big. */
26#define __FD_ZERO(s) \
27 do { \
28 unsigned int __i; \
29 fd_set *__arr = (s); \
30 for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \
31 __FDS_BITS (__arr)[__i] = 0; \
32 } while (0)
33#define __FD_SET(d, s) (__FDS_BITS (s)[__FDELT(d)] |= __FDMASK(d))
34#define __FD_CLR(d, s) (__FDS_BITS (s)[__FDELT(d)] &= ~__FDMASK(d))
35#define __FD_ISSET(d, s) ((__FDS_BITS (s)[__FDELT(d)] & __FDMASK(d)) != 0)
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/generic-bits_time.h b/meta/recipes-core/glibc/glibc-2.10.1/generic-bits_time.h
new file mode 100644
index 0000000000..b3184d1de9
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/generic-bits_time.h
@@ -0,0 +1,75 @@
1/* System-dependent timing definitions. Generic version.
2 Copyright (C) 1996,1997,1999-2002,2003 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
19
20/*
21 * Never include this file directly; use <time.h> instead.
22 */
23
24#ifndef __need_timeval
25# ifndef _BITS_TIME_H
26# define _BITS_TIME_H 1
27
28/* ISO/IEC 9899:1990 7.12.1: <time.h>
29 The macro `CLOCKS_PER_SEC' is the number per second of the value
30 returned by the `clock' function. */
31/* CAE XSH, Issue 4, Version 2: <time.h>
32 The value of CLOCKS_PER_SEC is required to be 1 million on all
33 XSI-conformant systems. */
34# define CLOCKS_PER_SEC 1000000l
35
36# if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K
37/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
38 presents the real value for clock ticks per second for the system. */
39# include <bits/types.h>
40extern long int __sysconf (int);
41# define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */
42# endif
43
44# ifdef __USE_POSIX199309
45/* Identifier for system-wide realtime clock. */
46# define CLOCK_REALTIME 0
47/* Monotonic system-wide clock. */
48# define CLOCK_MONOTONIC 1
49/* High-resolution timer from the CPU. */
50# define CLOCK_PROCESS_CPUTIME_ID 2
51/* Thread-specific CPU-time clock. */
52# define CLOCK_THREAD_CPUTIME_ID 3
53
54/* Flag to indicate time is absolute. */
55# define TIMER_ABSTIME 1
56# endif
57
58# endif /* bits/time.h */
59#endif
60
61#ifdef __need_timeval
62# undef __need_timeval
63# ifndef _STRUCT_TIMEVAL
64# define _STRUCT_TIMEVAL 1
65# include <bits/types.h>
66
67/* A time value that is accurate to the nearest
68 microsecond but also has a range of years. */
69struct timeval
70 {
71 __time_t tv_sec; /* Seconds. */
72 __suseconds_t tv_usec; /* Microseconds. */
73 };
74# endif /* struct timeval */
75#endif /* need timeval */
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/generic-bits_types.h b/meta/recipes-core/glibc/glibc-2.10.1/generic-bits_types.h
new file mode 100644
index 0000000000..65c8a9fe90
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/generic-bits_types.h
@@ -0,0 +1,200 @@
1/* bits/types.h -- definitions of __*_t types underlying *_t types.
2 Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
19
20/*
21 * Never include this file directly; use <sys/types.h> instead.
22 */
23
24#ifndef _BITS_TYPES_H
25#define _BITS_TYPES_H 1
26
27#include <features.h>
28#include <bits/wordsize.h>
29
30#define __need_size_t
31#include <stddef.h>
32
33/* Convenience types. */
34typedef unsigned char __u_char;
35typedef unsigned short int __u_short;
36typedef unsigned int __u_int;
37typedef unsigned long int __u_long;
38
39/* Fixed-size types, underlying types depend on word size and compiler. */
40typedef signed char __int8_t;
41typedef unsigned char __uint8_t;
42typedef signed short int __int16_t;
43typedef unsigned short int __uint16_t;
44typedef signed int __int32_t;
45typedef unsigned int __uint32_t;
46#if __WORDSIZE == 64
47typedef signed long int __int64_t;
48typedef unsigned long int __uint64_t;
49#elif defined __GLIBC_HAVE_LONG_LONG
50__extension__ typedef signed long long int __int64_t;
51__extension__ typedef unsigned long long int __uint64_t;
52#endif
53
54/* quad_t is also 64 bits. */
55#if __WORDSIZE == 64
56typedef long int __quad_t;
57typedef unsigned long int __u_quad_t;
58#elif defined __GLIBC_HAVE_LONG_LONG
59__extension__ typedef long long int __quad_t;
60__extension__ typedef unsigned long long int __u_quad_t;
61#else
62typedef struct
63{
64 long __val[2];
65} __quad_t;
66typedef struct
67{
68 __u_long __val[2];
69} __u_quad_t;
70#endif
71
72
73/* The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
74 macros for each of the OS types we define below. The definitions
75 of those macros must use the following macros for underlying types.
76 We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
77 variants of each of the following integer types on this machine.
78
79 16 -- "natural" 16-bit type (always short)
80 32 -- "natural" 32-bit type (always int)
81 64 -- "natural" 64-bit type (long or long long)
82 LONG32 -- 32-bit type, traditionally long
83 QUAD -- 64-bit type, always long long
84 WORD -- natural type of __WORDSIZE bits (int or long)
85 LONGWORD -- type of __WORDSIZE bits, traditionally long
86
87 We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
88 conventional uses of `long' or `long long' type modifiers match the
89 types we define, even when a less-adorned type would be the same size.
90 This matters for (somewhat) portably writing printf/scanf formats for
91 these types, where using the appropriate l or ll format modifiers can
92 make the typedefs and the formats match up across all GNU platforms. If
93 we used `long' when it's 64 bits where `long long' is expected, then the
94 compiler would warn about the formats not matching the argument types,
95 and the programmer changing them to shut up the compiler would break the
96 program's portability.
97
98 Here we assume what is presently the case in all the GCC configurations
99 we support: long long is always 64 bits, long is always word/address size,
100 and int is always 32 bits. */
101
102#define __S16_TYPE short int
103#define __U16_TYPE unsigned short int
104#define __S32_TYPE int
105#define __U32_TYPE unsigned int
106#define __SLONGWORD_TYPE long int
107#define __ULONGWORD_TYPE unsigned long int
108#if __WORDSIZE == 32
109# define __SQUAD_TYPE __quad_t
110# define __UQUAD_TYPE __u_quad_t
111# define __SWORD_TYPE int
112# define __UWORD_TYPE unsigned int
113# define __SLONG32_TYPE long int
114# define __ULONG32_TYPE unsigned long int
115# define __S64_TYPE __quad_t
116# define __U64_TYPE __u_quad_t
117/* We want __extension__ before typedef's that use nonstandard base types
118 such as `long long' in C89 mode. */
119# define __STD_TYPE __extension__ typedef
120#elif __WORDSIZE == 64
121# define __SQUAD_TYPE long int
122# define __UQUAD_TYPE unsigned long int
123# define __SWORD_TYPE long int
124# define __UWORD_TYPE unsigned long int
125# define __SLONG32_TYPE int
126# define __ULONG32_TYPE unsigned int
127# define __S64_TYPE long int
128# define __U64_TYPE unsigned long int
129/* No need to mark the typedef with __extension__. */
130# define __STD_TYPE typedef
131#else
132# error
133#endif
134#include <bits/typesizes.h> /* Defines __*_T_TYPE macros. */
135
136
137__STD_TYPE __DEV_T_TYPE __dev_t; /* Type of device numbers. */
138__STD_TYPE __UID_T_TYPE __uid_t; /* Type of user identifications. */
139__STD_TYPE __GID_T_TYPE __gid_t; /* Type of group identifications. */
140__STD_TYPE __INO_T_TYPE __ino_t; /* Type of file serial numbers. */
141__STD_TYPE __INO64_T_TYPE __ino64_t; /* Type of file serial numbers (LFS).*/
142__STD_TYPE __MODE_T_TYPE __mode_t; /* Type of file attribute bitmasks. */
143__STD_TYPE __NLINK_T_TYPE __nlink_t; /* Type of file link counts. */
144__STD_TYPE __OFF_T_TYPE __off_t; /* Type of file sizes and offsets. */
145__STD_TYPE __OFF64_T_TYPE __off64_t; /* Type of file sizes and offsets (LFS). */
146__STD_TYPE __PID_T_TYPE __pid_t; /* Type of process identifications. */
147__STD_TYPE __FSID_T_TYPE __fsid_t; /* Type of file system IDs. */
148__STD_TYPE __CLOCK_T_TYPE __clock_t; /* Type of CPU usage counts. */
149__STD_TYPE __RLIM_T_TYPE __rlim_t; /* Type for resource measurement. */
150__STD_TYPE __RLIM64_T_TYPE __rlim64_t; /* Type for resource measurement (LFS). */
151__STD_TYPE __ID_T_TYPE __id_t; /* General type for IDs. */
152__STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */
153__STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */
154__STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */
155
156__STD_TYPE __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */
157__STD_TYPE __SWBLK_T_TYPE __swblk_t; /* Type of a swap block maybe? */
158__STD_TYPE __KEY_T_TYPE __key_t; /* Type of an IPC key. */
159
160/* Clock ID used in clock and timer functions. */
161__STD_TYPE __CLOCKID_T_TYPE __clockid_t;
162
163/* Timer ID returned by `timer_create'. */
164__STD_TYPE __TIMER_T_TYPE __timer_t;
165
166/* Type to represent block size. */
167__STD_TYPE __BLKSIZE_T_TYPE __blksize_t;
168
169/* Types from the Large File Support interface. */
170
171/* Type to count number of disk blocks. */
172__STD_TYPE __BLKCNT_T_TYPE __blkcnt_t;
173__STD_TYPE __BLKCNT64_T_TYPE __blkcnt64_t;
174
175/* Type to count file system blocks. */
176__STD_TYPE __FSBLKCNT_T_TYPE __fsblkcnt_t;
177__STD_TYPE __FSBLKCNT64_T_TYPE __fsblkcnt64_t;
178
179/* Type to count file system nodes. */
180__STD_TYPE __FSFILCNT_T_TYPE __fsfilcnt_t;
181__STD_TYPE __FSFILCNT64_T_TYPE __fsfilcnt64_t;
182
183__STD_TYPE __SSIZE_T_TYPE __ssize_t; /* Type of a byte count, or error. */
184
185/* These few don't really vary by system, they always correspond
186 to one of the other defined types. */
187typedef __off64_t __loff_t; /* Type of file sizes and offsets (LFS). */
188typedef __quad_t *__qaddr_t;
189typedef char *__caddr_t;
190
191/* Duplicates info from stdint.h but this is used in unistd.h. */
192__STD_TYPE __SWORD_TYPE __intptr_t;
193
194/* Duplicate info from sys/socket.h. */
195__STD_TYPE __U32_TYPE __socklen_t;
196
197
198#undef __STD_TYPE
199
200#endif /* bits/types.h */
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/generic-bits_typesizes.h b/meta/recipes-core/glibc/glibc-2.10.1/generic-bits_typesizes.h
new file mode 100644
index 0000000000..e9226c4174
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/generic-bits_typesizes.h
@@ -0,0 +1,66 @@
1/* bits/typesizes.h -- underlying types for *_t. Generic version.
2 Copyright (C) 2002, 2003 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
19
20#ifndef _BITS_TYPES_H
21# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
22#endif
23
24#ifndef _BITS_TYPESIZES_H
25#define _BITS_TYPESIZES_H 1
26
27/* See <bits/types.h> for the meaning of these macros. This file exists so
28 that <bits/types.h> need not vary across different GNU platforms. */
29
30#define __DEV_T_TYPE __UQUAD_TYPE
31#define __UID_T_TYPE __U32_TYPE
32#define __GID_T_TYPE __U32_TYPE
33#define __INO_T_TYPE __ULONGWORD_TYPE
34#define __INO64_T_TYPE __UQUAD_TYPE
35#define __MODE_T_TYPE __U32_TYPE
36#define __NLINK_T_TYPE __UWORD_TYPE
37#define __OFF_T_TYPE __SLONGWORD_TYPE
38#define __OFF64_T_TYPE __SQUAD_TYPE
39#define __PID_T_TYPE __S32_TYPE
40#define __RLIM_T_TYPE __ULONGWORD_TYPE
41#define __RLIM64_T_TYPE __UQUAD_TYPE
42#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
43#define __BLKCNT64_T_TYPE __SQUAD_TYPE
44#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
45#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
46#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
47#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
48#define __ID_T_TYPE __U32_TYPE
49#define __CLOCK_T_TYPE __SLONGWORD_TYPE
50#define __TIME_T_TYPE __SLONGWORD_TYPE
51#define __USECONDS_T_TYPE __U32_TYPE
52#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
53#define __DADDR_T_TYPE __S32_TYPE
54#define __SWBLK_T_TYPE __SLONGWORD_TYPE
55#define __KEY_T_TYPE __S32_TYPE
56#define __CLOCKID_T_TYPE __S32_TYPE
57#define __TIMER_T_TYPE void *
58#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
59#define __FSID_T_TYPE struct { int __val[2]; }
60#define __SSIZE_T_TYPE __SWORD_TYPE
61
62/* Number of descriptors that can fit in an `fd_set'. */
63#define __FD_SETSIZE 1024
64
65
66#endif /* bits/typesizes.h */
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/glibc-2.9-enable-binutils-2.2.patch b/meta/recipes-core/glibc/glibc-2.10.1/glibc-2.9-enable-binutils-2.2.patch
new file mode 100644
index 0000000000..09200dd43b
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/glibc-2.9-enable-binutils-2.2.patch
@@ -0,0 +1,35 @@
1--- glibc-2.9.orig/configure.in 2009-10-22 15:38:13.000000000 +0200
2+++ glibc-2.9/configure.in 2009-10-22 15:37:33.000000000 +0200
3@@ -844,10 +844,10 @@
4 # Accept binutils 2.13 or newer.
5 AC_CHECK_PROG_VER(AS, $AS, --version,
6 [GNU assembler.* \([0-9]*\.[0-9.]*\)],
7- [2.1[3-9]*], AS=: critic_missing="$critic_missing as")
8+ [2.1[3-9]* | 2.2* ], AS=: critic_missing="$critic_missing as")
9 AC_CHECK_PROG_VER(LD, $LD, --version,
10 [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)],
11- [2.1[3-9]*], LD=: critic_missing="$critic_missing ld")
12+ [2.1[3-9]* | 2.2* ], LD=: critic_missing="$critic_missing ld")
13
14 # We need the physical current working directory. We cannot use the
15 # "pwd -P" shell builtin since that's not portable. Instead we try to
16--- glibc-2.9.orig/configure 2009-02-26 22:28:17.000000000 +0100
17+++ glibc-2.9/configure 2009-10-22 15:43:11.000000000 +0200
18@@ -4531,7 +4531,7 @@
19 ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
20 case $ac_prog_version in
21 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
22- 2.1[3-9]*)
23+ 2.1[3-9]* | 2.2*)
24 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
25 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
26
27@@ -4594,7 +4594,7 @@
28 ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
29 case $ac_prog_version in
30 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
31- 2.1[3-9]*)
32+ 2.1[3-9]* | 2.2*)
33 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
34 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
35
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/glibc-arm-IO-acquire-lock-fix.diff b/meta/recipes-core/glibc/glibc-2.10.1/glibc-arm-IO-acquire-lock-fix.diff
new file mode 100644
index 0000000000..a552cf0d1f
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/glibc-arm-IO-acquire-lock-fix.diff
@@ -0,0 +1,13 @@
1Arm needs a similar fix as http://sourceware.org/ml/libc-ports/2007-12/msg00000.html
2
3--- /tmp/stdio-lock.h 2008-03-04 18:51:15.555038993 +0100
4+++ glibc-2.7/ports/sysdeps/unix/sysv/linux/arm/bits/stdio-lock.h 2008-03-04 18:51:28.445035052 +0100
5@@ -50,6 +50,8 @@
6 _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp)); \
7 _IO_flockfile (_fp)
8
9+# define _IO_acquire_lock_clear_flags2(_fp) _IO_acquire_lock (_fp)
10+
11 # define _IO_release_lock(_fp) \
12 _IO_funlockfile (_fp); \
13 _IO_cleanup_region_end (0)
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/glibc-arm-no-asm-page.patch b/meta/recipes-core/glibc/glibc-2.10.1/glibc-arm-no-asm-page.patch
new file mode 100644
index 0000000000..7eb17179ba
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/glibc-arm-no-asm-page.patch
@@ -0,0 +1,15 @@
1http://sourceware.org/ml/libc-ports/2008-04/msg00005.html
2
3
4Index: glibc-2.6.1/ports/sysdeps/unix/sysv/linux/arm/ioperm.c
5===================================================================
6--- glibc-2.6.1.orig/ports/sysdeps/unix/sysv/linux/arm/ioperm.c 2008-09-12 18:08:18.000000000 -0700
7+++ glibc-2.6.1/ports/sysdeps/unix/sysv/linux/arm/ioperm.c 2008-09-12 18:08:28.000000000 -0700
8@@ -45,7 +45,6 @@
9 #include <sys/mman.h>
10
11 #include <linux/version.h>
12-#include <asm/page.h>
13 #include <sys/sysctl.h>
14
15 #define PATH_ARM_SYSTYPE "/etc/arm_systype"
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/glibc-check_pf.patch b/meta/recipes-core/glibc/glibc-2.10.1/glibc-check_pf.patch
new file mode 100644
index 0000000000..3cff6bbcfa
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/glibc-check_pf.patch
@@ -0,0 +1,343 @@
1From libc-ports-return-550-listarch-libc-ports=sources dot redhat dot com at sourceware dot org Tue Oct 31 17:37:21 2006
2Return-Path: <libc-ports-return-550-listarch-libc-ports=sources dot redhat dot com at sourceware dot org>
3Delivered-To: listarch-libc-ports at sources dot redhat dot com
4Received: (qmail 17273 invoked by alias); 31 Oct 2006 17:37:20 -0000
5Received: (qmail 17262 invoked by uid 22791); 31 Oct 2006 17:37:19 -0000
6X-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,TW_CP
7X-Spam-Check-By: sourceware.org
8Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 31 Oct 2006 17:37:11 +0000
9Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GexXw-0007Dj-30; Tue, 31 Oct 2006 12:37:08 -0500
10Date: Tue, 31 Oct 2006 12:37:08 -0500
11From: Daniel Jacobowitz <drow at false dot org>
12To: Mike Frysinger <vapier at gentoo dot org>
13Cc: libc-ports at sourceware dot org, Philip Balister <philip dot balister at gmail dot com>
14Subject: Re: Problem with glibc-2.5 on ARM
15Message-ID: <20061031173708.GJ20468@nevyn.them.org>
16References: <499146270610241149ibe030e0nd9d6b177a95b346e@mail.gmail.com> <499146270610241254u7cadf63ej2edf05cedbc5266f@mail.gmail.com> <20061024195837.GA20181@nevyn.them.org> <200610291954.27022.vapier@gentoo.org>
17MIME-Version: 1.0
18Content-Type: text/plain; charset=us-ascii
19Content-Disposition: inline
20In-Reply-To: <200610291954 dot 27022 dot vapier at gentoo dot org>
21User-Agent: Mutt/1.5.13 (2006-08-11)
22X-IsSubscribed: yes
23Mailing-List: contact libc-ports-help at sourceware dot org; run by ezmlm
24Precedence: bulk
25List-Subscribe: <mailto:libc-ports-subscribe at sourceware dot org>
26List-Post: <mailto:libc-ports at sourceware dot org>
27List-Help: <mailto:libc-ports-help at sourceware dot org>, <http://sourceware dot org/lists dot html#faqs>
28Sender: libc-ports-owner at sourceware dot org
29Delivered-To: mailing list libc-ports at sourceware dot org
30
31On Sun, Oct 29, 2006 at 07:54:25PM -0500, Mike Frysinger wrote:
32> On Tuesday 24 October 2006 15:58, Daniel Jacobowitz wrote:
33> > ARM is going to need a slightly different version of that file, I
34> > guess.
35>
36> would declaring req with attribute packed not help ?
37> -mike
38
39Nope. "struct rtgenmsg" would still have size 4.
40
41Philip, are you still at all interested in this for the old ABI?
42I don't have time to test this patch right now, but I think it
43will work.
44
45--
46Daniel Jacobowitz
47CodeSourcery
48
492006-10-31 Daniel Jacobowitz <dan@codesourcery.com>
50
51 * sysdeps/unix/sysv/linux/arm/check_pf.c: New file.
52 * sysdeps/unix/sysv/linux/arm/eabi/check_pf.c: New file.
53
54Index: sysdeps/unix/sysv/linux/arm/check_pf.c
55===================================================================
56RCS file: sysdeps/unix/sysv/linux/arm/check_pf.c
57diff -N sysdeps/unix/sysv/linux/arm/check_pf.c
58--- /dev/null 1 Jan 1970 00:00:00 -0000
59+++ sysdeps/unix/sysv/linux/arm/check_pf.c 31 Oct 2006 17:29:58 -0000
60@@ -0,0 +1,274 @@
61+/* Determine protocol families for which interfaces exist. ARM Linux version.
62+ Copyright (C) 2003, 2006 Free Software Foundation, Inc.
63+ This file is part of the GNU C Library.
64+
65+ The GNU C Library is free software; you can redistribute it and/or
66+ modify it under the terms of the GNU Lesser General Public
67+ License as published by the Free Software Foundation; either
68+ version 2.1 of the License, or (at your option) any later version.
69+
70+ The GNU C Library is distributed in the hope that it will be useful,
71+ but WITHOUT ANY WARRANTY; without even the implied warranty of
72+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
73+ Lesser General Public License for more details.
74+
75+ You should have received a copy of the GNU Lesser General Public
76+ License along with the GNU C Library; if not, write to the Free
77+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
78+ 02111-1307 USA. */
79+
80+#include <assert.h>
81+#include <errno.h>
82+#include <ifaddrs.h>
83+#include <netdb.h>
84+#include <stddef.h>
85+#include <string.h>
86+#include <time.h>
87+#include <unistd.h>
88+#include <sys/socket.h>
89+
90+#include <asm/types.h>
91+#include <linux/netlink.h>
92+#include <linux/rtnetlink.h>
93+
94+#include <not-cancel.h>
95+#include <kernel-features.h>
96+
97+
98+#ifndef IFA_F_TEMPORARY
99+# define IFA_F_TEMPORARY IFA_F_SECONDARY
100+#endif
101+#ifndef IFA_F_HOMEADDRESS
102+# define IFA_F_HOMEADDRESS 0
103+#endif
104+
105+
106+static int
107+make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
108+ struct in6addrinfo **in6ai, size_t *in6ailen)
109+{
110+ struct req
111+ {
112+ struct nlmsghdr nlh;
113+ struct rtgenmsg g;
114+ } req;
115+ struct sockaddr_nl nladdr;
116+
117+ /* struct rtgenmsg consists of a single byte but the ARM ABI rounds
118+ it up to a word. Clear the padding explicitly here. */
119+ assert (sizeof (req.g) == 4);
120+ memset (&req.g, '\0', sizeof (req.g));
121+
122+ req.nlh.nlmsg_len = sizeof (req);
123+ req.nlh.nlmsg_type = RTM_GETADDR;
124+ req.nlh.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST;
125+ req.nlh.nlmsg_pid = 0;
126+ req.nlh.nlmsg_seq = time (NULL);
127+ req.g.rtgen_family = AF_UNSPEC;
128+
129+ memset (&nladdr, '\0', sizeof (nladdr));
130+ nladdr.nl_family = AF_NETLINK;
131+
132+ if (TEMP_FAILURE_RETRY (__sendto (fd, (void *) &req, sizeof (req), 0,
133+ (struct sockaddr *) &nladdr,
134+ sizeof (nladdr))) < 0)
135+ return -1;
136+
137+ *seen_ipv4 = false;
138+ *seen_ipv6 = false;
139+
140+ bool done = false;
141+ char buf[4096];
142+ struct iovec iov = { buf, sizeof (buf) };
143+ struct in6ailist
144+ {
145+ struct in6addrinfo info;
146+ struct in6ailist *next;
147+ } *in6ailist = NULL;
148+ size_t in6ailistlen = 0;
149+
150+ do
151+ {
152+ struct msghdr msg =
153+ {
154+ (void *) &nladdr, sizeof (nladdr),
155+ &iov, 1,
156+ NULL, 0,
157+ 0
158+ };
159+
160+ ssize_t read_len = TEMP_FAILURE_RETRY (__recvmsg (fd, &msg, 0));
161+ if (read_len < 0)
162+ return -1;
163+
164+ if (msg.msg_flags & MSG_TRUNC)
165+ return -1;
166+
167+ struct nlmsghdr *nlmh;
168+ for (nlmh = (struct nlmsghdr *) buf;
169+ NLMSG_OK (nlmh, (size_t) read_len);
170+ nlmh = (struct nlmsghdr *) NLMSG_NEXT (nlmh, read_len))
171+ {
172+ if (nladdr.nl_pid != 0 || (pid_t) nlmh->nlmsg_pid != pid
173+ || nlmh->nlmsg_seq != req.nlh.nlmsg_seq)
174+ continue;
175+
176+ if (nlmh->nlmsg_type == RTM_NEWADDR)
177+ {
178+ struct ifaddrmsg *ifam = (struct ifaddrmsg *) NLMSG_DATA (nlmh);
179+
180+ switch (ifam->ifa_family)
181+ {
182+ case AF_INET:
183+ *seen_ipv4 = true;
184+ break;
185+ case AF_INET6:
186+ *seen_ipv6 = true;
187+
188+ if (ifam->ifa_flags & (IFA_F_DEPRECATED
189+ | IFA_F_TEMPORARY
190+ | IFA_F_HOMEADDRESS))
191+ {
192+ struct rtattr *rta = IFA_RTA (ifam);
193+ size_t len = (nlmh->nlmsg_len
194+ - NLMSG_LENGTH (sizeof (*ifam)));
195+ void *local = NULL;
196+ void *address = NULL;
197+ while (RTA_OK (rta, len))
198+ {
199+ switch (rta->rta_type)
200+ {
201+ case IFA_LOCAL:
202+ local = RTA_DATA (rta);
203+ break;
204+
205+ case IFA_ADDRESS:
206+ address = RTA_DATA (rta);
207+ break;
208+ }
209+
210+ rta = RTA_NEXT (rta, len);
211+ }
212+
213+ struct in6ailist *newp = alloca (sizeof (*newp));
214+ newp->info.flags = (((ifam->ifa_flags & IFA_F_DEPRECATED)
215+ ? in6ai_deprecated : 0)
216+ | ((ifam->ifa_flags
217+ & IFA_F_TEMPORARY)
218+ ? in6ai_temporary : 0)
219+ | ((ifam->ifa_flags
220+ & IFA_F_HOMEADDRESS)
221+ ? in6ai_homeaddress : 0));
222+ memcpy (newp->info.addr, address ?: local,
223+ sizeof (newp->info.addr));
224+ newp->next = in6ailist;
225+ in6ailist = newp;
226+ ++in6ailistlen;
227+ }
228+ break;
229+ default:
230+ /* Ignore. */
231+ break;
232+ }
233+ }
234+ else if (nlmh->nlmsg_type == NLMSG_DONE)
235+ /* We found the end, leave the loop. */
236+ done = true;
237+ }
238+ }
239+ while (! done);
240+
241+ close_not_cancel_no_status (fd);
242+
243+ if (in6ailist != NULL)
244+ {
245+ *in6ai = malloc (in6ailistlen * sizeof (**in6ai));
246+ if (*in6ai == NULL)
247+ return -1;
248+
249+ *in6ailen = in6ailistlen;
250+
251+ do
252+ {
253+ (*in6ai)[--in6ailistlen] = in6ailist->info;
254+ in6ailist = in6ailist->next;
255+ }
256+ while (in6ailist != NULL);
257+ }
258+
259+ return 0;
260+}
261+
262+
263+/* We don't know if we have NETLINK support compiled in in our
264+ Kernel. */
265+#if __ASSUME_NETLINK_SUPPORT == 0
266+/* Define in ifaddrs.h. */
267+extern int __no_netlink_support attribute_hidden;
268+#else
269+# define __no_netlink_support 0
270+#endif
271+
272+
273+void
274+attribute_hidden
275+__check_pf (bool *seen_ipv4, bool *seen_ipv6,
276+ struct in6addrinfo **in6ai, size_t *in6ailen)
277+{
278+ *in6ai = NULL;
279+ *in6ailen = 0;
280+
281+ if (! __no_netlink_support)
282+ {
283+ int fd = __socket (PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
284+
285+ struct sockaddr_nl nladdr;
286+ memset (&nladdr, '\0', sizeof (nladdr));
287+ nladdr.nl_family = AF_NETLINK;
288+
289+ socklen_t addr_len = sizeof (nladdr);
290+
291+ if (fd >= 0
292+ && __bind (fd, (struct sockaddr *) &nladdr, sizeof (nladdr)) == 0
293+ && __getsockname (fd, (struct sockaddr *) &nladdr, &addr_len) == 0
294+ && make_request (fd, nladdr.nl_pid, seen_ipv4, seen_ipv6,
295+ in6ai, in6ailen) == 0)
296+ /* It worked. */
297+ return;
298+
299+ if (fd >= 0)
300+ __close (fd);
301+
302+#if __ASSUME_NETLINK_SUPPORT == 0
303+ /* Remember that there is no netlink support. */
304+ __no_netlink_support = 1;
305+#else
306+ /* We cannot determine what interfaces are available. Be
307+ pessimistic. */
308+ *seen_ipv4 = true;
309+ *seen_ipv6 = true;
310+#endif
311+ }
312+
313+#if __ASSUME_NETLINK_SUPPORT == 0
314+ /* No netlink. Get the interface list via getifaddrs. */
315+ struct ifaddrs *ifa = NULL;
316+ if (getifaddrs (&ifa) != 0)
317+ {
318+ /* We cannot determine what interfaces are available. Be
319+ pessimistic. */
320+ *seen_ipv4 = true;
321+ *seen_ipv6 = true;
322+ return;
323+ }
324+
325+ struct ifaddrs *runp;
326+ for (runp = ifa; runp != NULL; runp = runp->ifa_next)
327+ if (runp->ifa_addr->sa_family == PF_INET)
328+ *seen_ipv4 = true;
329+ else if (runp->ifa_addr->sa_family == PF_INET6)
330+ *seen_ipv6 = true;
331+
332+ (void) freeifaddrs (ifa);
333+#endif
334+}
335Index: sysdeps/unix/sysv/linux/arm/eabi/check_pf.c
336===================================================================
337RCS file: sysdeps/unix/sysv/linux/arm/eabi/check_pf.c
338diff -N sysdeps/unix/sysv/linux/arm/eabi/check_pf.c
339--- /dev/null 1 Jan 1970 00:00:00 -0000
340+++ sysdeps/unix/sysv/linux/arm/eabi/check_pf.c 31 Oct 2006 17:29:58 -0000
341@@ -0,0 +1 @@
342+#include <sysdeps/unix/sysv/linux/check_pf.c>
343
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/ldd-unbash.patch b/meta/recipes-core/glibc/glibc-2.10.1/ldd-unbash.patch
new file mode 100644
index 0000000000..2fb8854b49
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/ldd-unbash.patch
@@ -0,0 +1,11 @@
1--- glibc-2.5/elf/ldd.bash.in.org 2006-04-30 16:06:20.000000000 +0000
2+++ glibc-2.5/elf/ldd.bash.in 2007-03-30 19:18:57.000000000 +0000
3@@ -110,7 +110,7 @@
4 # environments where the executed program might not have permissions
5 # to write to the console/tty. But only bash 3.x supports the pipefail
6 # option, and we don't bother to handle the case for older bash versions.
7-if set -o pipefail 2> /dev/null; then
8+if false; then
9 try_trace() {
10 eval $add_env '"$@"' | cat
11 }
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/ldsocache-varrun.patch b/meta/recipes-core/glibc/glibc-2.10.1/ldsocache-varrun.patch
new file mode 100644
index 0000000000..9994d4f879
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/ldsocache-varrun.patch
@@ -0,0 +1,18 @@
1This patch moves ld.so.cache from /etc to /var/run. This is for devices
2where /etc is JFFS2 or CRAMFS but /var is a ramdisk.
3
4#
5# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
6#
7
8--- libc/sysdeps/generic/dl-cache.h~ldsocache-varrun
9+++ libc/sysdeps/generic/dl-cache.h
10@@ -29,7 +29,7 @@
11 #endif
12
13 #ifndef LD_SO_CACHE
14-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache"
15+# define LD_SO_CACHE "/var/run/ld.so.cache"
16 #endif
17
18 #ifndef add_system_dir
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/local-args6.diff b/meta/recipes-core/glibc/glibc-2.10.1/local-args6.diff
new file mode 100644
index 0000000000..28c957f243
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/local-args6.diff
@@ -0,0 +1,12 @@
1--- glibc-2.7/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h.orig
2+++ glibc-2.7/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
3@@ -73,6 +73,9 @@
4 # define DOCARGS_5 DOCARGS_4
5 # define UNDOCARGS_5 UNDOCARGS_4
6
7+# define DOCARGS_6 DOCARGS_5
8+# define UNDOCARGS_6 UNDOCARGS_5
9+
10 # ifdef IS_IN_libpthread
11 # define CENABLE bl PLTJMP(__pthread_enable_asynccancel)
12 # define CDISABLE bl PLTJMP(__pthread_disable_asynccancel)
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/march-i686.patch b/meta/recipes-core/glibc/glibc-2.10.1/march-i686.patch
new file mode 100644
index 0000000000..04616032ad
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/march-i686.patch
@@ -0,0 +1,38 @@
12007-02-15 Khem Raj <kraj@xxxxxxxxxx>
2
3 * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
4 * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
5
6
7
8Index: sysdeps/unix/sysv/linux/i386/sysdep.h
9===================================================================
10--- sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
11+++ sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
12@@ -29,6 +29,10 @@
13 #include <dl-sysdep.h>
14 #include <tls.h>
15
16+#if defined __i686 && defined __ASSEMBLER__
17+#undef __i686
18+#define __i686 __i686
19+#endif
20
21 /* For Linux we can use the system call table in the header file
22 /usr/include/asm/unistd.h
23Index: nptl/sysdeps/pthread/pt-initfini.c
24===================================================================
25--- nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
26+++ nptl/sysdeps/pthread/pt-initfini.c (working copy)
27@@ -45,6 +45,11 @@
28 /* Embed an #include to pull in the alignment and .end directives. */
29 asm ("\n#include \"defs.h\"");
30
31+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
32+asm ("\n#undef __i686");
33+asm ("\n#define __i686 __i686");
34+asm ("\n#endif");
35+
36 /* The initial common code ends here. */
37 asm ("\n/*@HEADER_ENDS*/");
38
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/nptl-crosscompile.patch b/meta/recipes-core/glibc/glibc-2.10.1/nptl-crosscompile.patch
new file mode 100644
index 0000000000..18a46ad4f1
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/nptl-crosscompile.patch
@@ -0,0 +1,26 @@
1--- glibc-2.4/nptl/sysdeps/pthread/configure.in.ark 2006-03-12 00:41:40.000000000 +0100
2+++ glibc-2.4/nptl/sysdeps/pthread/configure.in 2006-03-12 00:44:08.000000000 +0100
3@@ -45,5 +45,6 @@
4 AC_MSG_ERROR([the compiler must support C cleanup handling])
5 fi
6 else
7- AC_MSG_ERROR(forced unwind support is required)
8+ AC_MSG_WARN([forced unwind support is required, can't be verified while crosscompiling])
9+ AC_DEFINE(HAVE_FORCED_UNWIND)
10 fi
11--- glibc-2.4/nptl/sysdeps/pthread/configure.ark 2006-03-12 00:42:47.000000000 +0100
12+++ glibc-2.4/nptl/sysdeps/pthread/configure 2006-03-12 00:44:08.000000000 +0100
13@@ -153,7 +153,10 @@
14 { (exit 1); exit 1; }; }
15 fi
16 else
17- { { echo "$as_me:$LINENO: error: forced unwind support is required" >&5
18-echo "$as_me: error: forced unwind support is required" >&2;}
19- { (exit 1); exit 1; }; }
20+ { echo "$as_me:$LINENO: WARNING: forced unwind support is required, can't be verified while crosscompiling" >&5
21+echo "$as_me: WARNING: forced unwind support is required, can't be verified while crosscompiling" >&2;}
22+ cat >>confdefs.h <<\_ACEOF
23+#define HAVE_FORCED_UNWIND 1
24+_ACEOF
25+
26 fi
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/nscd-init.patch b/meta/recipes-core/glibc/glibc-2.10.1/nscd-init.patch
new file mode 100644
index 0000000000..884609a5a3
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/nscd-init.patch
@@ -0,0 +1,39 @@
1--- nscd/nscd.init
2+++ nscd/nscd.init
3@@ -48,9 +48,8 @@
4
5 start () {
6 [ -d /var/run/nscd ] || mkdir /var/run/nscd
7- [ -d /var/db/nscd ] || mkdir /var/db/nscd
8 echo -n $"Starting $prog: "
9- daemon /usr/sbin/nscd
10+ /usr/sbin/nscd
11 RETVAL=$?
12 echo
13 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nscd
14@@ -67,12 +66,10 @@
15 # a non-privileged user
16 rm -f /var/run/nscd/nscd.pid
17 rm -f /var/run/nscd/socket
18- success $"$prog shutdown"
19- else
20- failure $"$prog shutdown"
21 fi
22- echo
23- return $RETVAL
24+ echo "Done."
25+ # If nscd did not run, return 0 according to LSB.
26+ return 0
27 }
28
29 restart() {
30@@ -104,7 +101,8 @@
31 ;;
32 force-reload | reload)
33 echo -n $"Reloading $prog: "
34- killproc /usr/sbin/nscd -HUP
35+ # Use killall, initscripts-1.0-r115 don't support -HUP yet.
36+ killall -HUP /usr/sbin/nscd
37 RETVAL=$?
38 echo
39 ;;
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/powerpc-sqrt-hack.diff b/meta/recipes-core/glibc/glibc-2.10.1/powerpc-sqrt-hack.diff
new file mode 100644
index 0000000000..1046efb2a1
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/powerpc-sqrt-hack.diff
@@ -0,0 +1,25 @@
1diff -Nurd ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c
2--- ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c 2006-04-14 07:44:30.000000000 +0200
3+++ glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c 2006-12-08 12:53:32.202227000 +0100
4@@ -25,6 +25,9 @@
5 #include <sysdep.h>
6 #include <ldsodefs.h>
7
8+#define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
9+
10+
11 static const double almost_half = 0.5000000000000001; /* 0.5 + 2^-53 */
12 static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
13 static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
14diff -Nurd ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c
15--- ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c 2006-04-14 07:44:30.000000000 +0200
16+++ glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c 2006-12-08 12:53:36.992227000 +0100
17@@ -25,6 +25,8 @@
18 #include <sysdep.h>
19 #include <ldsodefs.h>
20
21+#define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
22+
23 static const float almost_half = 0.50000006; /* 0.5 + 2^-24 */
24 static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
25 static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
diff --git a/meta/recipes-core/glibc/glibc-2.10.1/rulesfix.patch b/meta/recipes-core/glibc/glibc-2.10.1/rulesfix.patch
new file mode 100644
index 0000000000..67bfc9467d
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-2.10.1/rulesfix.patch
@@ -0,0 +1,13 @@
1Index: glibc-2.9/Makerules
2===================================================================
3--- glibc-2.9.orig/Makerules 2009-09-14 16:39:21.000000000 +0100
4+++ glibc-2.9/Makerules 2009-09-14 16:39:50.000000000 +0100
5@@ -173,6 +173,8 @@
6 # it's used in sysd-rules, below.
7 $(common-objpfx)%.h $(common-objpfx)%.h.d: $(..)scripts/gen-as-const.awk \
8 %.sym $(common-before-compile)
9+ rm -f $(@:.h=.h.d)
10+ rm -f $(@:.h.d=.h)
11 $(AWK) -f $< $(filter %.sym,$^) \
12 | $(CC) -S -o $(@:.h.d=.h)T3 $(CFLAGS) $(CPPFLAGS) -x c - \
13 -MD -MP -MF $(@:.h=.h.d)T -MT '$(@:.h=.h.d) $(@:.h.d=.h)'