summaryrefslogtreecommitdiffstats
path: root/meta/packages
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages')
-rw-r--r--meta/packages/glibc/glibc-2.9/arm-check-pf.patch14
-rw-r--r--meta/packages/glibc/glibc-2.9/arm-longlong.patch58
-rw-r--r--meta/packages/glibc/glibc-2.9/arm-lowlevellock-include-tls.patch12
-rw-r--r--meta/packages/glibc/glibc-2.9/arm-memcpy.patch758
-rw-r--r--meta/packages/glibc/glibc-2.9/dl-cache-libcmp.patch10
-rw-r--r--meta/packages/glibc/glibc-2.9/glibc-arm-IO-acquire-lock-fix.diff13
-rw-r--r--meta/packages/glibc/glibc-2.9/glibc-arm-no-asm-page.patch15
-rw-r--r--meta/packages/glibc/glibc-2.9/local-args6.diff12
-rw-r--r--meta/packages/glibc/glibc-2.9/march-i686.patch38
-rw-r--r--meta/packages/glibc/glibc-2.9/tls_i486.patch14
-rw-r--r--meta/packages/glibc/glibc-initial.inc2
-rw-r--r--meta/packages/glibc/glibc-initial_2.9.bb6
-rw-r--r--meta/packages/glibc/glibc_2.9.bb158
13 files changed, 1109 insertions, 1 deletions
diff --git a/meta/packages/glibc/glibc-2.9/arm-check-pf.patch b/meta/packages/glibc/glibc-2.9/arm-check-pf.patch
new file mode 100644
index 0000000000..b9c72262f2
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.9/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/packages/glibc/glibc-2.9/arm-longlong.patch b/meta/packages/glibc/glibc-2.9/arm-longlong.patch
new file mode 100644
index 0000000000..28aca83dff
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.9/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/packages/glibc/glibc-2.9/arm-lowlevellock-include-tls.patch b/meta/packages/glibc/glibc-2.9/arm-lowlevellock-include-tls.patch
new file mode 100644
index 0000000000..5c8062ecee
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.9/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/packages/glibc/glibc-2.9/arm-memcpy.patch b/meta/packages/glibc/glibc-2.9/arm-memcpy.patch
new file mode 100644
index 0000000000..bc2b3dab84
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.9/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/packages/glibc/glibc-2.9/dl-cache-libcmp.patch b/meta/packages/glibc/glibc-2.9/dl-cache-libcmp.patch
new file mode 100644
index 0000000000..2fedfa6db0
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.9/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/packages/glibc/glibc-2.9/glibc-arm-IO-acquire-lock-fix.diff b/meta/packages/glibc/glibc-2.9/glibc-arm-IO-acquire-lock-fix.diff
new file mode 100644
index 0000000000..a552cf0d1f
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.9/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/packages/glibc/glibc-2.9/glibc-arm-no-asm-page.patch b/meta/packages/glibc/glibc-2.9/glibc-arm-no-asm-page.patch
new file mode 100644
index 0000000000..7eb17179ba
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.9/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/packages/glibc/glibc-2.9/local-args6.diff b/meta/packages/glibc/glibc-2.9/local-args6.diff
new file mode 100644
index 0000000000..28c957f243
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.9/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/packages/glibc/glibc-2.9/march-i686.patch b/meta/packages/glibc/glibc-2.9/march-i686.patch
new file mode 100644
index 0000000000..04616032ad
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.9/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/packages/glibc/glibc-2.9/tls_i486.patch b/meta/packages/glibc/glibc-2.9/tls_i486.patch
new file mode 100644
index 0000000000..69a1fdf91d
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.9/tls_i486.patch
@@ -0,0 +1,14 @@
1Index: glibc-2.9/sysdeps/i386/dl-tlsdesc.S
2===================================================================
3--- glibc-2.9.orig/sysdeps/i386/dl-tlsdesc.S 2009-07-07 23:21:11.647664128 +0200
4+++ glibc-2.9/sysdeps/i386/dl-tlsdesc.S 2009-07-07 23:21:32.802555992 +0200
5@@ -128,8 +128,7 @@
6 .Lslow:
7 cfi_adjust_cfa_offset (28)
8 movl %ebx, 16(%esp)
9- call __i686.get_pc_thunk.bx
10- addl $_GLOBAL_OFFSET_TABLE_, %ebx
11+ LOAD_PIC_REG (bx)
12 call ___tls_get_addr@PLT
13 movl 16(%esp), %ebx
14 jmp .Lret
diff --git a/meta/packages/glibc/glibc-initial.inc b/meta/packages/glibc/glibc-initial.inc
index 143a662d52..21b7631d3e 100644
--- a/meta/packages/glibc/glibc-initial.inc
+++ b/meta/packages/glibc/glibc-initial.inc
@@ -1,7 +1,7 @@
1SECTION = "libs" 1SECTION = "libs"
2DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial linux-libc-headers" 2DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial linux-libc-headers"
3PROVIDES = "virtual/${TARGET_PREFIX}libc-initial" 3PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
4FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-2.4', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}" 4FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-${PV}', '${FILE_DIRNAME}/glibc-2.4', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
5 5
6PACKAGES = "" 6PACKAGES = ""
7PACKAGES_DYNAMIC = "" 7PACKAGES_DYNAMIC = ""
diff --git a/meta/packages/glibc/glibc-initial_2.9.bb b/meta/packages/glibc/glibc-initial_2.9.bb
new file mode 100644
index 0000000000..d66297090f
--- /dev/null
+++ b/meta/packages/glibc/glibc-initial_2.9.bb
@@ -0,0 +1,6 @@
1require glibc_${PV}.bb
2require glibc-initial.inc
3
4do_configure_prepend () {
5 unset CFLAGS
6}
diff --git a/meta/packages/glibc/glibc_2.9.bb b/meta/packages/glibc/glibc_2.9.bb
new file mode 100644
index 0000000000..d56e42fdf8
--- /dev/null
+++ b/meta/packages/glibc/glibc_2.9.bb
@@ -0,0 +1,158 @@
1require glibc.inc
2
3ARM_INSTRUCTION_SET = "arm"
4
5PACKAGES_DYNAMIC = "libc6*"
6RPROVIDES_${PN}-dev = "libc6-dev virtual-libc-dev"
7
8PR = "r0"
9
10# the -isystem in bitbake.conf screws up glibc do_stage
11BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
12TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${layout_includedir}"
13
14GLIBC_ADDONS ?= "ports,nptl,libidn"
15
16GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN"
17
18FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-${PV}', '${FILE_DIRNAME}/glibc-2.4', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
19
20#
21# For now, we will skip building of a gcc package if it is a uclibc one
22# and our build is not a uclibc one, and we skip a glibc one if our build
23# is a uclibc build.
24#
25# See the note in gcc/gcc_3.4.0.oe
26#
27
28python __anonymous () {
29 import bb, re
30 uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
31 if uc_os:
32 raise bb.parse.SkipPackage("incompatible with target %s" %
33 bb.data.getVar('TARGET_OS', d, 1))
34}
35
36RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
37
38# file://noinfo.patch;patch=1
39# file://ldconfig.patch;patch=1;pnum=0
40# file://arm-machine-gmon.patch;patch=1;pnum=0 \
41# \
42# file://arm-ioperm.patch;patch=1;pnum=0 \
43# file://ldd.patch;patch=1;pnum=0 \
44SRC_URI = "ftp://ftp.gnu.org/pub/gnu/glibc/glibc-${PV}.tar.bz2 \
45 ftp://ftp.gnu.org/pub/gnu/glibc/glibc-ports-2.7.tar.bz2 \
46 ftp://ftp.gnu.org/pub/gnu/glibc/glibc-libidn-${PV}.tar.bz2 \
47 file://arm-memcpy.patch;patch=1 \
48 file://arm-longlong.patch;patch=1 \
49 file://fhs-linux-paths.patch;patch=1 \
50 file://dl-cache-libcmp.patch;patch=1 \
51 file://ldsocache-varrun.patch;patch=1 \
52 file://nptl-crosscompile.patch;patch=1 \
53 file://glibc-check_pf.patch;patch=1;pnum=0 \
54 file://ldd-unbash.patch;patch=1 \
55 file://glibc-arm-IO-acquire-lock-fix.diff;patch=1 \
56 file://local-args6.diff;patch=1 \
57 file://arm-check-pf.patch;patch=1 \
58 file://arm-lowlevellock-include-tls.patch;patch=1 \
59 file://generic-bits_select.h \
60 file://generic-bits_types.h \
61 file://generic-bits_typesizes.h \
62 file://generic-bits_time.h \
63 file://etc/ld.so.conf \
64 file://generate-supported.mk \
65 file://march-i686.patch;patch=1;pnum=0 \
66 file://tls_i486.patch;patch=1 \
67 file://glibc-arm-no-asm-page.patch;patch=1 \
68 "
69
70
71# Build fails on sh3 and sh4 without additional patches
72SRC_URI_append_sh3 = " file://no-z-defs.patch;patch=1"
73SRC_URI_append_sh4 = " file://no-z-defs.patch;patch=1"
74
75#powerpc patches to add support for soft-float
76SRC_URI_append_powerpc= " file://powerpc-sqrt-hack.diff;patch=1"
77
78S = "${WORKDIR}/glibc-${PV}"
79B = "${WORKDIR}/build-${TARGET_SYS}"
80
81EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
82 --without-cvs --disable-profile --disable-debug --without-gd \
83 --enable-clocale=gnu \
84 --enable-add-ons=${GLIBC_ADDONS} \
85 --with-headers=${STAGING_INCDIR} \
86 --without-selinux \
87 ${GLIBC_EXTRA_OECONF}"
88
89EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
90
91do_munge() {
92 # Integrate ports and libidn into tree
93 mv ${WORKDIR}/glibc-ports-2.7 ${S}/ports
94 mv ${WORKDIR}/glibc-libidn-${PV} ${S}/libidn
95
96 # Ports isn't really working... Fix it
97 # Some of this is rather dirty, but it seems to be the only
98 # quick way to get this cruft to compile
99 rm -rf ${S}/ports/sysdeps/unix/sysv/linux/arm/linuxthreads
100 ln -s nptl ${S}/ports/sysdeps/unix/sysv/linux/arm/linuxthreads
101 cp ${S}/nptl/sysdeps/pthread/bits/sigthread.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
102 cp ${S}/sysdeps/unix/sysv/linux/i386/bits/wchar.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
103 cp ${S}/sysdeps/wordsize-32/bits/wordsize.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
104 cp ${WORKDIR}/generic-bits_select.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/select.h
105 cp ${WORKDIR}/generic-bits_types.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/types.h
106 cp ${WORKDIR}/generic-bits_typesizes.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/typesizes.h
107 cp ${WORKDIR}/generic-bits_time.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/time.h
108 # Copy in generic stuff for not yet implemented headers
109 for i in ${S}/bits/*.h; do
110 F=`basename $i`
111 [ "$F" = "local_lim.h" ] && continue
112 [ "$F" = "errno.h" ] && continue
113 test -e ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/$F || test -e ${S}/ports/sysdeps/arm/bits/$F || test -e ${S}/sysdeps/unix/sysv/linux/bits/$F || test -e ${S}/sysdeps/ieee754/bits/$F || cp $i ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
114 done
115 # This is harmful; we need to get the one from nptl/sysdeps/pthreads
116 rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/libc-lock.h
117 # Obsoleted by sysdeps/arm/{fpu,eabi}/bits/fenv.h
118 rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/fenv.h
119 # Obsoleted by sysdeps/gnu/bits/utmp.h
120 rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/utmp.h
121}
122
123addtask munge before do_patch after do_unpack
124
125
126do_configure () {
127# override this function to avoid the autoconf/automake/aclocal/autoheader
128# calls for now
129# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
130# version check and doesn't really help with anything
131 if [ -z "`which rpcgen`" ]; then
132 echo "rpcgen not found. Install glibc-devel."
133 exit 1
134 fi
135 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
136 CPPFLAGS="" oe_runconf
137}
138
139rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
140 yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
141 rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
142
143do_compile () {
144 # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
145 unset LDFLAGS
146 base_do_compile
147 (
148 cd ${S}/sunrpc/rpcsvc
149 for r in ${rpcsvc}; do
150 h=`echo $r|sed -e's,\.x$,.h,'`
151 rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
152 done
153 )
154}
155
156require glibc-stage.inc
157
158require glibc-package.bbclass