summaryrefslogtreecommitdiffstats
path: root/meta/packages/glibc
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
committerRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
commitb2f192faabe412adce79534e22efe9fb69ee40e2 (patch)
tree7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/glibc
parent2cf0eadf9f730027833af802d7e6c90b44248f80 (diff)
downloadpoky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/glibc')
-rw-r--r--meta/packages/glibc/files/5090_all_stubs-rule-fix.patch39
-rw-r--r--meta/packages/glibc/files/etc/ld.so.conf3
-rw-r--r--meta/packages/glibc/files/fhs-linux-paths.patch11
-rw-r--r--meta/packages/glibc/files/generate-supported.mk11
-rw-r--r--meta/packages/glibc/glibc-2.4/arm-longlong.patch58
-rw-r--r--meta/packages/glibc/glibc-2.4/arm-memcpy.patch758
-rw-r--r--meta/packages/glibc/glibc-2.4/dl-cache-libcmp.patch10
-rw-r--r--meta/packages/glibc/glibc-2.4/dyn-ldconfig-20041128.patch22
-rw-r--r--meta/packages/glibc/glibc-2.4/dyn-ldconfig.patch62
-rw-r--r--meta/packages/glibc/glibc-2.4/etc/ld.so.conf3
-rw-r--r--meta/packages/glibc/glibc-2.4/fixup-aeabi-syscalls.patch329
-rw-r--r--meta/packages/glibc/glibc-2.4/generic-bits_select.h35
-rw-r--r--meta/packages/glibc/glibc-2.4/generic-bits_time.h75
-rw-r--r--meta/packages/glibc/glibc-2.4/generic-bits_types.h200
-rw-r--r--meta/packages/glibc/glibc-2.4/generic-bits_typesizes.h66
-rw-r--r--meta/packages/glibc/glibc-2.4/glibc-2.4-compile.patch29
-rw-r--r--meta/packages/glibc/glibc-2.4/ldsocache-varrun.patch18
-rw-r--r--meta/packages/glibc/glibc-2.4/nptl-crosscompile.patch26
-rw-r--r--meta/packages/glibc/glibc-cvs-2.3.5/arm-audit.patch58
-rw-r--r--meta/packages/glibc/glibc-cvs-2.3.5/arm-audit2.patch18
-rw-r--r--meta/packages/glibc/glibc-cvs-2.3.5/arm-longlong.patch59
-rw-r--r--meta/packages/glibc/glibc-cvs-2.3.5/arm-memcpy.patch758
-rw-r--r--meta/packages/glibc/glibc-cvs-2.3.5/arm-no-hwcap.patch11
-rw-r--r--meta/packages/glibc/glibc-cvs-2.3.5/dl-cache-libcmp.patch10
-rw-r--r--meta/packages/glibc/glibc-cvs-2.3.5/dyn-ldconfig-20041128.patch22
-rw-r--r--meta/packages/glibc/glibc-cvs-2.3.5/ldsocache-varrun.patch18
-rw-r--r--meta/packages/glibc/glibc-cvs/arm-ioperm.patch13
-rw-r--r--meta/packages/glibc/glibc-cvs/arm-longlong.patch59
-rw-r--r--meta/packages/glibc/glibc-cvs/arm-machine-gmon.patch11
-rw-r--r--meta/packages/glibc/glibc-cvs/arm-memcpy.patch758
-rw-r--r--meta/packages/glibc/glibc-cvs/arm-no-hwcap.patch11
-rw-r--r--meta/packages/glibc/glibc-cvs/dyn-ldconfig-20041128.patch22
-rw-r--r--meta/packages/glibc/glibc-cvs/dyn-ldconfig.patch62
-rw-r--r--meta/packages/glibc/glibc-cvs/eabi-patch-188
-rw-r--r--meta/packages/glibc/glibc-cvs/eabi-patch-22446
-rw-r--r--meta/packages/glibc/glibc-cvs/eabi-patch-3430
-rw-r--r--meta/packages/glibc/glibc-cvs/eabi-patch-464
-rw-r--r--meta/packages/glibc/glibc-cvs/etc/ld.so.conf3
-rw-r--r--meta/packages/glibc/glibc-cvs/glibc-fp-byteorder.patch203
-rw-r--r--meta/packages/glibc/glibc-cvs/ldconfig.patch37
-rw-r--r--meta/packages/glibc/glibc-cvs/ldd.patch38
-rw-r--r--meta/packages/glibc/glibc-cvs/ldsocache-varrun.patch18
-rw-r--r--meta/packages/glibc/glibc-cvs/makeconfig.patch15
-rw-r--r--meta/packages/glibc/glibc-cvs/mips-no-throw.patch22
-rw-r--r--meta/packages/glibc/glibc-cvs/noinfo.patch52
-rw-r--r--meta/packages/glibc/glibc-cvs/trampoline.patch560
-rw-r--r--meta/packages/glibc/glibc-initial_2.4.bb46
-rw-r--r--meta/packages/glibc/glibc-intermediate_2.4.bb14
-rw-r--r--meta/packages/glibc/glibc-package.bbclass300
-rw-r--r--meta/packages/glibc/glibc_2.3.5+cvs20050627.bb175
-rw-r--r--meta/packages/glibc/glibc_2.4.bb201
51 files changed, 8357 insertions, 0 deletions
diff --git a/meta/packages/glibc/files/5090_all_stubs-rule-fix.patch b/meta/packages/glibc/files/5090_all_stubs-rule-fix.patch
new file mode 100644
index 0000000000..c445a5296e
--- /dev/null
+++ b/meta/packages/glibc/files/5090_all_stubs-rule-fix.patch
@@ -0,0 +1,39 @@
1Index: Makerules
2===================================================================
3RCS file: /cvs/glibc/libc/Makerules,v
4retrieving revision 1.430
5diff -u -r1.430 Makerules
6--- libc/Makerules 5 Mar 2005 19:24:32 -0000 1.430
7+++ libc/Makerules 22 Apr 2005 18:31:27 -0000
8@@ -1390,15 +1390,26 @@
9 $(addprefix $(objpfx),$(extra-objs))
10 $(objpfx)stubs: $(objs-for-stubs)
11 ifneq (,$(strip $(objs-for-stubs)))
12- $(OBJDUMP) -h $^ | \
13- $(AWK) '/\.gnu\.glibc-stub\./ { \
14- sub(/\.gnu\.glibc-stub\./, "", $$2); \
15- stubs[$$2] = 1; } \
16- END { for (s in stubs) print "#define __stub_" s }' > $@T
17+ $(stub-obj-list)
18+ cat $@L | xargs \
19+ $(OBJDUMP) -h | \
20+ $(AWK) '/\.gnu\.glibc-stub\./ { \
21+ sub(/\.gnu\.glibc-stub\./, "", $$2); \
22+ stubs[$$2] = 1; } \
23+ END { for (s in stubs) print "#define __stub_" s }' \
24+ > $@T
25+ -rm -f $@L
26 mv -f $@T $@
27 else
28 > $@
29 endif
30+
31+define stub-obj-list
32+-@rm -f $@L
33+-@echo "Generating stub obj list..."
34+$(foreach file,$^,
35+@echo >> $@L '$(file)')
36+endef
37
38 # This information is not used for making distributions any more.
39 # But it's used by MakeTAGS for making TAGS files and the .pot files.
diff --git a/meta/packages/glibc/files/etc/ld.so.conf b/meta/packages/glibc/files/etc/ld.so.conf
new file mode 100644
index 0000000000..fb1aab516d
--- /dev/null
+++ b/meta/packages/glibc/files/etc/ld.so.conf
@@ -0,0 +1,3 @@
1/usr/local/lib
2/opt/QtPalmtop/lib
3/usr/X11R6/lib
diff --git a/meta/packages/glibc/files/fhs-linux-paths.patch b/meta/packages/glibc/files/fhs-linux-paths.patch
new file mode 100644
index 0000000000..1f32f6d7f2
--- /dev/null
+++ b/meta/packages/glibc/files/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/packages/glibc/files/generate-supported.mk b/meta/packages/glibc/files/generate-supported.mk
new file mode 100644
index 0000000000..d2a28c2dc6
--- /dev/null
+++ b/meta/packages/glibc/files/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/packages/glibc/glibc-2.4/arm-longlong.patch b/meta/packages/glibc/glibc-2.4/arm-longlong.patch
new file mode 100644
index 0000000000..320a55524c
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/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 <sysdeps/generic/mp_clz_tab.c>
58+#endif
diff --git a/meta/packages/glibc/glibc-2.4/arm-memcpy.patch b/meta/packages/glibc/glibc-2.4/arm-memcpy.patch
new file mode 100644
index 0000000000..bc2b3dab84
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/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.4/dl-cache-libcmp.patch b/meta/packages/glibc/glibc-2.4/dl-cache-libcmp.patch
new file mode 100644
index 0000000000..2fedfa6db0
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/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.4/dyn-ldconfig-20041128.patch b/meta/packages/glibc/glibc-2.4/dyn-ldconfig-20041128.patch
new file mode 100644
index 0000000000..451b6d4afc
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/dyn-ldconfig-20041128.patch
@@ -0,0 +1,22 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- libc/elf/Makefile~dyn-ldconfig-20041128
7+++ libc/elf/Makefile
8@@ -118,12 +118,13 @@
9
10 ifeq (yes,$(use-ldconfig))
11 ifeq (yes,$(build-shared))
12-others-static += ldconfig
13+#others-static += ldconfig
14 others += ldconfig
15 install-rootsbin += ldconfig
16
17 ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon
18 extra-objs += $(ldconfig-modules:=.o)
19+CPPFLAGS-readlib.c = -DNOT_IN_libc=1
20
21 # To find xmalloc.c and xstrdup.c
22 vpath %.c ../locale/programs
diff --git a/meta/packages/glibc/glibc-2.4/dyn-ldconfig.patch b/meta/packages/glibc/glibc-2.4/dyn-ldconfig.patch
new file mode 100644
index 0000000000..1041965d05
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/dyn-ldconfig.patch
@@ -0,0 +1,62 @@
1--- elf/Makefile 13 Mar 2003 21:50:57 -0000 1.258
2+++ elf/Makefile 27 Mar 2003 20:36:07 -0000
3@@ -109,12 +109,13 @@
4
5 ifeq (yes,$(use-ldconfig))
6 ifeq (yes,$(build-shared))
7-others-static += ldconfig
8+#others-static += ldconfig
9 others += ldconfig
10 install-rootsbin += ldconfig
11
12 ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon
13 extra-objs += $(ldconfig-modules:=.o)
14+CPPFLAGS-readlib.c = -DNOT_IN_libc=1
15
16 # To find xmalloc.c and xstrdup.c
17 vpath %.c ../locale/programs
18--- elf/ldconfig.c 13 Jan 2003 08:53:14 -0000 1.31
19+++ elf/ldconfig.c 27 Mar 2003 20:36:09 -0000
20@@ -149,6 +149,9 @@
21 static int
22 is_hwcap_platform (const char *name)
23 {
24+#if 1
25+ return 0;
26+#else
27 int hwcap_idx = _dl_string_hwcap (name);
28
29 if (hwcap_idx != -1 && ((1 << hwcap_idx) & hwcap_mask))
30@@ -164,6 +167,7 @@
31 #endif
32
33 return 0;
34+#endif
35 }
36
37 /* Get hwcap (including platform) encoding of path. */
38@@ -175,6 +179,7 @@
39 uint64_t hwcap = 0;
40 uint64_t h;
41
42+#if 0
43 size_t len;
44
45 len = strlen (str);
46@@ -210,6 +215,7 @@
47 *ptr = '\0';
48 }
49
50+#endif
51 free (str);
52 return hwcap;
53 }
54--- elf/Versions.old 2004-06-26 13:18:35.000000000 +0100
55+++ elf/Versions 2004-06-26 14:41:09.000000000 +0100
56@@ -54,5 +54,6 @@
57 _dl_get_tls_static_info; _dl_allocate_tls_init;
58 _dl_tls_setup; _dl_rtld_di_serinfo;
59 _dl_make_stack_executable;
60+ _dl_cache_libcmp;
61 }
62 }
diff --git a/meta/packages/glibc/glibc-2.4/etc/ld.so.conf b/meta/packages/glibc/glibc-2.4/etc/ld.so.conf
new file mode 100644
index 0000000000..3f9b41aabb
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/etc/ld.so.conf
@@ -0,0 +1,3 @@
1/usr/local/lib
2/opt/QtPalmtop/lib
3
diff --git a/meta/packages/glibc/glibc-2.4/fixup-aeabi-syscalls.patch b/meta/packages/glibc/glibc-2.4/fixup-aeabi-syscalls.patch
new file mode 100644
index 0000000000..fb733b9194
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/fixup-aeabi-syscalls.patch
@@ -0,0 +1,329 @@
1Fix up ARM EABI for removed syscalls
2http://sourceware.org/ml/libc-ports/2006-03/msg00029.html
3
4Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/socket.S
5===================================================================
6--- glibc.orig/ports/sysdeps/unix/sysv/linux/arm/eabi/socket.S 2006-03-21 15:58:10.000000000 -0500
7+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
8@@ -1,131 +0,0 @@
9-/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2005
10- Free Software Foundation, Inc.
11- This file is part of the GNU C Library.
12-
13- The GNU C Library is free software; you can redistribute it and/or
14- modify it under the terms of the GNU Lesser General Public
15- License as published by the Free Software Foundation; either
16- version 2.1 of the License, or (at your option) any later version.
17-
18- The GNU C Library is distributed in the hope that it will be useful,
19- but WITHOUT ANY WARRANTY; without even the implied warranty of
20- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21- Lesser General Public License for more details.
22-
23- You should have received a copy of the GNU Lesser General Public
24- License along with the GNU C Library; if not, write to the Free
25- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
26- 02111-1307 USA. */
27-
28-#include <sysdep-cancel.h>
29-#include <socketcall.h>
30-
31-#define P(a, b) P2(a, b)
32-#define P2(a, b) a##b
33-
34- .text
35-/* The socket-oriented system calls are handled unusally in Linux.
36- They are all gated through the single `socketcall' system call number.
37- `socketcall' takes two arguments: the first is the subcode, specifying
38- which socket function is being called; and the second is a pointer to
39- the arguments to the specific function.
40-
41- The .S files for the other calls just #define socket and #include this. */
42-
43-#ifndef __socket
44-# ifndef NO_WEAK_ALIAS
45-# define __socket P(__,socket)
46-# else
47-# define __socket socket
48-# endif
49-#endif
50-
51-#define PUSHARGS_1 str a1, [sp, $-8]!; .pad #8
52-#define PUSHARGS_2 stmfd sp!, {a1, a2}; .pad #8
53-#define PUSHARGS_3 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* a4 pushed for padding */
54-#define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4}; .pad #16
55-#define PUSHARGS_5 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* Caller has already pushed arg 5 */
56-#define PUSHARGS_6 stmfd sp!, {a1, a2, a3, a4}; .pad #16
57-
58-#define POPARGS_1 add sp, sp, #8
59-#define POPARGS_2 add sp, sp, #8
60-#define POPARGS_3 add sp, sp, #16
61-#define POPARGS_4 add sp, sp, #16
62-#define POPARGS_5 add sp, sp, #16
63-#define POPARGS_6 add sp, sp, #16
64-
65-#ifndef NARGS
66-#define NARGS 3 /* If we were called with no wrapper, this is really socket() */
67-#endif
68-
69-#if defined NEED_CANCELLATION && defined CENABLE
70- PSEUDO_PROLOGUE
71-#endif
72-
73-.globl __socket
74-ENTRY (__socket)
75- .fnstart
76-
77- /* This code previously moved sp into ip and stored the args using
78- stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had
79- to be restored after the syscall completed. It saved an
80- instruction and meant no stack cleanup work was required.
81-
82- This will not work in the case of a socket call being interrupted
83- by a signal. If the signal handler uses any stack the arguments
84- to socket will be trashed. The results of a restart of any
85- socket call are then unpredictable. */
86-
87- /* Push args onto the stack. */
88- P(PUSHARGS_,NARGS)
89-
90-#if defined NEED_CANCELLATION && defined CENABLE
91- SINGLE_THREAD_P
92- bne 1f
93-#endif
94-
95- /* Do the system call trap. */
96- mov a1, $P(SOCKOP_,socket)
97- mov a2, sp
98- DO_CALL (socketcall, 0)
99-
100- /* Pop args off the stack */
101- P(POPARGS_,NARGS)
102-
103- /* r0 is < 0 if there was an error. */
104- cmn r0, $124
105- RETINSTR(cc, r14)
106- b PLTJMP(SYSCALL_ERROR)
107-
108-#if defined NEED_CANCELLATION && defined CENABLE
109-1:
110- stmfd sp!, {r7, lr}
111- .save {r7, lr}
112- CENABLE
113- mov ip, r0
114-
115- mov r0, #P(SOCKOP_,socket)
116- add r1, sp, #8
117- mov r7, #SYS_ify(socketcall)
118- swi 0x0
119-
120- mov r7, r0
121- mov r0, ip
122- CDISABLE
123- mov r0, r7
124- ldmfd sp!, {r7, lr}
125-
126- P(POPARGS_,NARGS)
127-
128- /* r0 is < 0 if there was an error. */
129- cmn r0, $124
130- RETINSTR(cc, r14)
131- b PLTJMP(SYSCALL_ERROR)
132-#endif
133-
134- .fnend
135-PSEUDO_END (__socket)
136-
137-#ifndef NO_WEAK_ALIAS
138-weak_alias (__socket, socket)
139-#endif
140Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list
141===================================================================
142--- /dev/null 1970-01-01 00:00:00.000000000 +0000
143+++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list 2006-03-21 15:58:46.000000000 -0500
144@@ -0,0 +1,34 @@
145+# File name Caller Syscall name # args Strong name Weak names
146+
147+# semaphore and shm system calls
148+msgctl - msgctl i:iip __msgctl msgctl
149+msgget - msgget i:ii __msgget msgget
150+msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
151+msgsnd - msgsnd Ci:ibni __msgsnd msgsnd
152+shmat - shmat i:ipi __shmat shmat
153+shmctl - shmctl i:iip __shmctl shmctl
154+shmdt - shmdt i:s __shmdt shmdt
155+shmget - shmget i:iii __shmget shmget
156+semop - semop i:ipi __semop semop
157+semtimedop - semtimedop i:ipip semtimedop
158+semget - semget i:iii __semget semget
159+semctl - semctl i:iiii __semctl semctl
160+
161+# proper socket implementations:
162+accept - accept Ci:iBN __libc_accept __accept accept
163+bind - bind i:ipi __bind bind
164+connect - connect Ci:ipi __libc_connect __connect_internal __connect connect
165+getpeername - getpeername i:ipp __getpeername getpeername
166+getsockname - getsockname i:ipp __getsockname getsockname
167+getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
168+listen - listen i:ii __listen listen
169+recv - recv Ci:ibni __libc_recv __recv recv
170+recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
171+recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg
172+send - send Ci:ibni __libc_send __send send
173+sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg
174+sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto
175+setsockopt - setsockopt i:iiibn __setsockopt setsockopt
176+shutdown - shutdown i:ii __shutdown shutdown
177+socket - socket i:iii __socket socket
178+socketpair - socketpair i:iiif __socketpair socketpair
179Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h
180===================================================================
181--- glibc.orig/ports/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h 2006-03-21 15:58:10.000000000 -0500
182+++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h 2006-03-21 15:58:46.000000000 -0500
183@@ -53,9 +53,9 @@
184 UNDOARGS_##args; \
185 cmn r0, $4096;
186
187-/* DOARGS pushes four bytes on the stack for five arguments, and nothing
188- otherwise. In order to preserve doubleword alignment, sometimes we must
189- save an extra register. */
190+/* DOARGS pushes four bytes on the stack for five arguments, eight bytes for
191+ six arguments, and nothing for fewer. In order to preserve doubleword
192+ alignment, sometimes we must save an extra register. */
193
194 # define DOCARGS_0 stmfd sp!, {r7, lr}
195 # define UNDOCARGS_0
196@@ -81,6 +81,10 @@
197 # define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3}
198 # define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr}
199
200+# define DOCARGS_6 stmfd sp!, {r0, r1, r2, r3, r7, lr}
201+# define UNDOCARGS_6 ldmfd sp!, {r0, r1, r2, r3}
202+# define RESTORE_LR_6 RESTORE_LR_0
203+
204 # ifdef IS_IN_libpthread
205 # define CENABLE bl PLTJMP(__pthread_enable_asynccancel)
206 # define CDISABLE bl PLTJMP(__pthread_disable_asynccancel)
207Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
208===================================================================
209--- glibc.orig/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h 2006-03-21 15:58:10.000000000 -0500
210+++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h 2006-03-21 15:58:46.000000000 -0500
211@@ -64,9 +64,9 @@
212 UNDOARGS_##args; \
213 cmn r0, $4096;
214
215-/* DOARGS pushes four bytes on the stack for five arguments, and nothing
216- otherwise. In order to preserve doubleword alignment, sometimes we must
217- save an extra register. */
218+/* DOARGS pushes four bytes on the stack for five arguments, eight bytes for
219+ six arguments, and nothing for fewer. In order to preserve doubleword
220+ alignment, sometimes we must save an extra register. */
221
222 # define RESTART_UNWIND .fnend; .fnstart; .save {r7, lr}
223
224@@ -94,6 +94,10 @@
225 # define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4}; .save {r7, lr}; .pad #4
226 # define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr}
227
228+# define DOCARGS_6 .save {r4, r5}; stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #20
229+# define UNDOCARGS_6 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4, r5}; .save {r7, lr}
230+# define RESTORE_LR_6 RESTORE_LR_0
231+
232 # ifdef IS_IN_libpthread
233 # define CENABLE bl PLTJMP(__pthread_enable_asynccancel)
234 # define CDISABLE bl PLTJMP(__pthread_disable_asynccancel)
235Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
236===================================================================
237--- glibc.orig/ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h 2006-03-21 15:58:10.000000000 -0500
238+++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h 2006-03-21 15:58:46.000000000 -0500
239@@ -1,4 +1,4 @@
240-/* Copyright (C) 2005
241+/* Copyright (C) 2005, 2006
242 Free Software Foundation, Inc.
243
244 This file is part of the GNU C Library.
245@@ -29,6 +29,12 @@
246 # error Kernel headers are too old
247 #endif
248
249+/* Don't use stime, even if the kernel headers define it. We have
250+ settimeofday, and some EABI kernels have removed stime. Similarly
251+ use setitimer to implement alarm. */
252+#undef __NR_stime
253+#undef __NR_alarm
254+
255 /* The ARM EABI user interface passes the syscall number in r7, instead
256 of in the swi. This is more efficient, because the kernel does not need
257 to fetch the swi from memory to find out the number; which can be painful
258Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/umount.c
259===================================================================
260--- /dev/null 1970-01-01 00:00:00.000000000 +0000
261+++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/umount.c 2006-03-21 15:58:46.000000000 -0500
262@@ -0,0 +1,31 @@
263+/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
264+ This file is part of the GNU C Library.
265+ Contributed by David Huggins-Daines <dhd@debian.org>, 2000.
266+
267+ The GNU C Library is free software; you can redistribute it and/or
268+ modify it under the terms of the GNU Lesser General Public
269+ License as published by the Free Software Foundation; either
270+ version 2.1 of the License, or (at your option) any later version.
271+
272+ The GNU C Library is distributed in the hope that it will be useful,
273+ but WITHOUT ANY WARRANTY; without even the implied warranty of
274+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
275+ Lesser General Public License for more details.
276+
277+ You should have received a copy of the GNU Lesser General Public
278+ License along with the GNU C Library; if not, write to the Free
279+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
280+ 02111-1307 USA. */
281+
282+/* Since we don't have an oldumount system call, do what the kernel
283+ does down here. */
284+
285+extern long int __umount2 (const char *name, int flags);
286+
287+long int
288+__umount (const char *name)
289+{
290+ return __umount2 (name, 0);
291+}
292+
293+weak_alias (__umount, umount);
294Index: glibc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
295===================================================================
296--- /dev/null 1970-01-01 00:00:00.000000000 +0000
297+++ glibc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h 2006-03-20 17:26:58.000000000 -0500
298@@ -0,0 +1,31 @@
299+/* Set flags signalling availability of kernel features based on given
300+ kernel version number.
301+ Copyright (C) 2006 Free Software Foundation, Inc.
302+ This file is part of the GNU C Library.
303+
304+ The GNU C Library is free software; you can redistribute it and/or
305+ modify it under the terms of the GNU Lesser General Public
306+ License as published by the Free Software Foundation; either
307+ version 2.1 of the License, or (at your option) any later version.
308+
309+ The GNU C Library is distributed in the hope that it will be useful,
310+ but WITHOUT ANY WARRANTY; without even the implied warranty of
311+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
312+ Lesser General Public License for more details.
313+
314+ You should have received a copy of the GNU Lesser General Public
315+ License along with the GNU C Library; if not, write to the Free
316+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
317+ 02111-1307 USA. */
318+
319+/* The utimes syscall was added before 2.6.1. */
320+#if __LINUX_KERNEL_VERSION >= 132609
321+# define __ASSUME_UTIMES 1
322+#endif
323+
324+/* The new getrlimit syscall was added sometime before 2.4.6. */
325+#if __LINUX_KERNEL_VERSION >= 132102
326+#define __ASSUME_NEW_GETRLIMIT_SYSCALL 1
327+#endif
328+
329+#include_next <kernel-features.h>
diff --git a/meta/packages/glibc/glibc-2.4/generic-bits_select.h b/meta/packages/glibc/glibc-2.4/generic-bits_select.h
new file mode 100644
index 0000000000..47e7dedc30
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/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/packages/glibc/glibc-2.4/generic-bits_time.h b/meta/packages/glibc/glibc-2.4/generic-bits_time.h
new file mode 100644
index 0000000000..b3184d1de9
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/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/packages/glibc/glibc-2.4/generic-bits_types.h b/meta/packages/glibc/glibc-2.4/generic-bits_types.h
new file mode 100644
index 0000000000..65c8a9fe90
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/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/packages/glibc/glibc-2.4/generic-bits_typesizes.h b/meta/packages/glibc/glibc-2.4/generic-bits_typesizes.h
new file mode 100644
index 0000000000..e9226c4174
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/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/packages/glibc/glibc-2.4/glibc-2.4-compile.patch b/meta/packages/glibc/glibc-2.4/glibc-2.4-compile.patch
new file mode 100644
index 0000000000..ea9f55ae7f
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/glibc-2.4-compile.patch
@@ -0,0 +1,29 @@
1--- glibc-2.4/csu/libc-start.c.ark 2006-03-13 03:07:15.000000000 +0100
2+++ glibc-2.4/csu/libc-start.c 2006-03-13 03:08:51.000000000 +0100
3@@ -59,6 +59,11 @@
4 # define LIBC_START_MAIN BP_SYM (__libc_start_main)
5 #endif
6
7+#ifdef SHARED
8+#include <pthread-functions.h>
9+extern struct pthread_functions __libc_pthread_functions;
10+#endif
11+
12 #ifdef MAIN_AUXVEC_ARG
13 /* main gets passed a pointer to the auxiliary. */
14 # define MAIN_AUXVEC_DECL , void *
15--- glibc-2.4/nscd/Makefile.ark 2006-03-13 14:05:47.000000000 +0100
16+++ glibc-2.4/nscd/Makefile 2006-03-13 14:06:12.000000000 +0100
17@@ -67,8 +67,10 @@
18 # contains only the basic kernel interface headers, not something like
19 # libselinux. So the simplest thing is to presume that the standard
20 # system headers will be ok for this file.
21-$(objpfx)nscd_stat.o: sysincludes = # nothing
22-$(objpfx)selinux.o: sysincludes = # nothing
23+# Except, of course, this breaks crosscompiling with kernel headers in
24+# a nonstandard location...
25+#$(objpfx)nscd_stat.o: sysincludes = # nothing
26+#$(objpfx)selinux.o: sysincludes = # nothing
27
28 distribute := nscd.h nscd-client.h dbg_log.h \
29 $(addsuffix .c, $(filter-out xmalloc,$(all-nscd-modules))) \
diff --git a/meta/packages/glibc/glibc-2.4/ldsocache-varrun.patch b/meta/packages/glibc/glibc-2.4/ldsocache-varrun.patch
new file mode 100644
index 0000000000..9994d4f879
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/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/packages/glibc/glibc-2.4/nptl-crosscompile.patch b/meta/packages/glibc/glibc-2.4/nptl-crosscompile.patch
new file mode 100644
index 0000000000..18a46ad4f1
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/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/packages/glibc/glibc-cvs-2.3.5/arm-audit.patch b/meta/packages/glibc/glibc-cvs-2.3.5/arm-audit.patch
new file mode 100644
index 0000000000..2404f755e7
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs-2.3.5/arm-audit.patch
@@ -0,0 +1,58 @@
12005-05-09 Daniel Jacobowitz <dan@codesourcery.com>
2 Mark Mitchell <mark@codesourcery.com>
3
4 * sysdeps/generic/ldsodefs.h (struct audit_ifaces): Add ARM entries.
5 * elf/tst-auditmod1.c: Add ARM definitions.
6
7Index: glibc/sysdeps/generic/ldsodefs.h
8===================================================================
9--- glibc.orig/sysdeps/generic/ldsodefs.h 2005-04-05 17:36:52.000000000 -0400
10+++ glibc/sysdeps/generic/ldsodefs.h 2005-05-06 15:54:44.000000000 -0400
11@@ -203,6 +203,8 @@ struct La_sparc32_regs;
12 struct La_sparc32_retval;
13 struct La_sparc64_regs;
14 struct La_sparc64_retval;
15+struct La_arm_regs;
16+struct La_arm_retval;
17
18 struct audit_ifaces
19 {
20@@ -284,6 +286,10 @@ struct audit_ifaces
21 const struct La_sparc64_regs *,
22 unsigned int *, const char *name,
23 long int *framesizep);
24+ Elf32_Addr (*arm_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *,
25+ uintptr_t *, struct La_arm_regs *,
26+ unsigned int *, const char *name,
27+ long int *framesizep);
28 };
29 union
30 {
31@@ -352,6 +358,9 @@ struct audit_ifaces
32 const struct La_sparc32_regs *,
33 struct La_sparc32_retval *,
34 const char *);
35+ unsigned int (*arm_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *,
36+ uintptr_t *, const struct La_arm_regs *,
37+ struct La_arm_retval *, const char *);
38 };
39 unsigned int (*objclose) (uintptr_t *);
40
41Index: glibc/elf/tst-auditmod1.c
42===================================================================
43--- glibc.orig/elf/tst-auditmod1.c 2005-04-05 17:36:53.000000000 -0400
44+++ glibc/elf/tst-auditmod1.c 2005-05-06 15:53:28.000000000 -0400
45@@ -192,6 +192,12 @@ la_symbind64 (Elf64_Sym *sym, unsigned i
46 # define La_regs La_sparc64_regs
47 # define La_retval La_sparc64_retval
48 # define int_retval lrv_reg[0]
49+#elif __arm__
50+# define pltenter la_arm_gnu_pltenter
51+# define pltext la_arm_gnu_pltexit
52+# define La_regs La_arm_regs
53+# define La_retval La_arm_retval
54+# define int_retval lrv_reg[0]
55 #else
56 # error "architecture specific code needed"
57 #endif
58
diff --git a/meta/packages/glibc/glibc-cvs-2.3.5/arm-audit2.patch b/meta/packages/glibc/glibc-cvs-2.3.5/arm-audit2.patch
new file mode 100644
index 0000000000..855632c53e
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs-2.3.5/arm-audit2.patch
@@ -0,0 +1,18 @@
1Index: ports/sysdeps/arm/dl-machine.h
2===================================================================
3RCS file: /cvs/glibc/ports/sysdeps/arm/dl-machine.h,v
4retrieving revision 1.53
5diff -u -r1.53 dl-machine.h
6--- libc/ports/sysdeps/arm/dl-machine.h 10 Jun 2005 11:33:52 -0000 1.53
7+++ libc/ports/sysdeps/arm/dl-machine.h 11 Jun 2005 08:58:04 -0000
8@@ -243,6 +243,10 @@
9 Prelinked libraries may use Elf32_Rela though. */
10 #define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP
11
12+/* Names of the architecture-specific auditing callback functions. */
13+#define ARCH_LA_PLTENTER arm_gnu_pltenter
14+#define ARCH_LA_PLTEXIT arm_gnu_pltexit
15+
16 #ifdef RESOLVE_MAP
17
18 /* Deal with an out-of-range PC24 reloc. */
diff --git a/meta/packages/glibc/glibc-cvs-2.3.5/arm-longlong.patch b/meta/packages/glibc/glibc-cvs-2.3.5/arm-longlong.patch
new file mode 100644
index 0000000000..a0b2ed0039
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs-2.3.5/arm-longlong.patch
@@ -0,0 +1,59 @@
1--- stdlib/longlong.h~ 2002-09-29 18:45:58.000000000 +0100
2+++ stdlib/longlong.h 2004-03-20 19:16:44.000000000 +0000
3@@ -210,6 +210,14 @@
4 "rI" ((USItype) (bh)), \
5 "r" ((USItype) (al)), \
6 "rI" ((USItype) (bl)))
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@@ -231,7 +239,14 @@
19 : "r" ((USItype) (a)), \
20 "r" ((USItype) (b)));}
21 #define UMUL_TIME 20
22+#endif
23 #define UDIV_TIME 100
24+
25+#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__)
26+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X))
27+#define COUNT_LEADING_ZEROS_0 32
28+#endif
29+
30 #endif /* __arm__ */
31
32 #if defined (__hppa) && W_TYPE_SIZE == 32
33--- /dev/null 2004-02-02 20:32:13.000000000 +0000
34+++ ports/sysdeps/arm/mp_clz_tab.c 2004-03-20 19:24:26.000000000 +0000
35@@ -0,0 +1,24 @@
36+/* __clz_tab -- support for longlong.h
37+ Copyright (C) 2004 Free Software Foundation, Inc.
38+ This file is part of the GNU C Library.
39+
40+ The GNU C Library is free software; you can redistribute it and/or
41+ modify it under the terms of the GNU Lesser General Public
42+ License as published by the Free Software Foundation; either
43+ version 2.1 of the License, or (at your option) any later version.
44+
45+ The GNU C Library is distributed in the hope that it will be useful,
46+ but WITHOUT ANY WARRANTY; without even the implied warranty of
47+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
48+ Lesser General Public License for more details.
49+
50+ You should have received a copy of the GNU Lesser General Public
51+ License along with the GNU C Library; if not, write to the Free
52+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
53+ 02111-1307 USA. */
54+
55+#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__)
56+/* Nothing required. */
57+#else
58+#include <sysdeps/generic/mp_clz_tab.c>
59+#endif
diff --git a/meta/packages/glibc/glibc-cvs-2.3.5/arm-memcpy.patch b/meta/packages/glibc/glibc-cvs-2.3.5/arm-memcpy.patch
new file mode 100644
index 0000000000..db1120058b
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs-2.3.5/arm-memcpy.patch
@@ -0,0 +1,758 @@
1--- /dev/null 2004-02-02 20:32:13.000000000 +0000
2+++ libc/ports/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+++ libc/ports/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+++ libc/ports/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-cvs-2.3.5/arm-no-hwcap.patch b/meta/packages/glibc/glibc-cvs-2.3.5/arm-no-hwcap.patch
new file mode 100644
index 0000000000..d3263a7dc6
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs-2.3.5/arm-no-hwcap.patch
@@ -0,0 +1,11 @@
1--- libc/ports/sysdeps/unix/sysv/linux/arm/dl-procinfo.h.orig 2005-12-11 14:49:51 +0100
2+++ libc/ports/sysdeps/unix/sysv/linux/arm/dl-procinfo.h 2005-12-11 14:51:28 +0100
3@@ -64,7 +64,7 @@
4 HWCAP_ARM_VFP = 1 << 6,
5 HWCAP_ARM_EDSP = 1 << 7,
6
7- HWCAP_IMPORTANT = (HWCAP_ARM_HALF | HWCAP_ARM_FAST_MULT)
8+ HWCAP_IMPORTANT = HWCAP_ARM_FAST_MULT
9 };
10
11 static inline int
diff --git a/meta/packages/glibc/glibc-cvs-2.3.5/dl-cache-libcmp.patch b/meta/packages/glibc/glibc-cvs-2.3.5/dl-cache-libcmp.patch
new file mode 100644
index 0000000000..c74ebf6c09
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs-2.3.5/dl-cache-libcmp.patch
@@ -0,0 +1,10 @@
1--- libc/elf/Versions.old 2005-06-27 13:38:25.000000000 +0100
2+++ libc/elf/Versions 2005-06-27 14:03:54.000000000 +0100
3@@ -56,5 +56,7 @@
4 _dl_make_stack_executable;
5 # Only here for gdb while a better method is developed.
6 _dl_debug_state;
7+ # for ldconfig
8+ _dl_cache_libcmp;
9 }
10 }
diff --git a/meta/packages/glibc/glibc-cvs-2.3.5/dyn-ldconfig-20041128.patch b/meta/packages/glibc/glibc-cvs-2.3.5/dyn-ldconfig-20041128.patch
new file mode 100644
index 0000000000..451b6d4afc
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs-2.3.5/dyn-ldconfig-20041128.patch
@@ -0,0 +1,22 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- libc/elf/Makefile~dyn-ldconfig-20041128
7+++ libc/elf/Makefile
8@@ -118,12 +118,13 @@
9
10 ifeq (yes,$(use-ldconfig))
11 ifeq (yes,$(build-shared))
12-others-static += ldconfig
13+#others-static += ldconfig
14 others += ldconfig
15 install-rootsbin += ldconfig
16
17 ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon
18 extra-objs += $(ldconfig-modules:=.o)
19+CPPFLAGS-readlib.c = -DNOT_IN_libc=1
20
21 # To find xmalloc.c and xstrdup.c
22 vpath %.c ../locale/programs
diff --git a/meta/packages/glibc/glibc-cvs-2.3.5/ldsocache-varrun.patch b/meta/packages/glibc/glibc-cvs-2.3.5/ldsocache-varrun.patch
new file mode 100644
index 0000000000..9994d4f879
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs-2.3.5/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/packages/glibc/glibc-cvs/arm-ioperm.patch b/meta/packages/glibc/glibc-cvs/arm-ioperm.patch
new file mode 100644
index 0000000000..ae9423ef55
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/arm-ioperm.patch
@@ -0,0 +1,13 @@
1--- sysdeps/unix/sysv/linux/arm/ioperm.c 20 Feb 2003 22:22:35 -0000 1.6
2+++ sysdeps/unix/sysv/linux/arm/ioperm.c 24 Oct 2003 20:59:38 -0000
3@@ -100,8 +100,8 @@
4 {
5 char systype[256];
6 int i, n;
7- static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
8- static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
9+ static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
10+ static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
11 size_t len = sizeof(io.base);
12
13 if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
diff --git a/meta/packages/glibc/glibc-cvs/arm-longlong.patch b/meta/packages/glibc/glibc-cvs/arm-longlong.patch
new file mode 100644
index 0000000000..dfb9309b7b
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/arm-longlong.patch
@@ -0,0 +1,59 @@
1--- stdlib/longlong.h~ 2002-09-29 18:45:58.000000000 +0100
2+++ stdlib/longlong.h 2004-03-20 19:16:44.000000000 +0000
3@@ -210,6 +210,14 @@
4 "rI" ((USItype) (bh)), \
5 "r" ((USItype) (al)), \
6 "rI" ((USItype) (bl)))
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@@ -231,7 +239,14 @@
19 : "r" ((USItype) (a)), \
20 "r" ((USItype) (b)));}
21 #define UMUL_TIME 20
22+#endif
23 #define UDIV_TIME 100
24+
25+#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__)
26+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X))
27+#define COUNT_LEADING_ZEROS_0 32
28+#endif
29+
30 #endif /* __arm__ */
31
32 #if defined (__hppa) && W_TYPE_SIZE == 32
33--- /dev/null 2004-02-02 20:32:13.000000000 +0000
34+++ sysdeps/arm/mp_clz_tab.c 2004-03-20 19:24:26.000000000 +0000
35@@ -0,0 +1,24 @@
36+/* __clz_tab -- support for longlong.h
37+ Copyright (C) 2004 Free Software Foundation, Inc.
38+ This file is part of the GNU C Library.
39+
40+ The GNU C Library is free software; you can redistribute it and/or
41+ modify it under the terms of the GNU Lesser General Public
42+ License as published by the Free Software Foundation; either
43+ version 2.1 of the License, or (at your option) any later version.
44+
45+ The GNU C Library is distributed in the hope that it will be useful,
46+ but WITHOUT ANY WARRANTY; without even the implied warranty of
47+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
48+ Lesser General Public License for more details.
49+
50+ You should have received a copy of the GNU Lesser General Public
51+ License along with the GNU C Library; if not, write to the Free
52+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
53+ 02111-1307 USA. */
54+
55+#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__)
56+/* Nothing required. */
57+#else
58+#include <sysdeps/generic/mp_clz_tab.c>
59+#endif
diff --git a/meta/packages/glibc/glibc-cvs/arm-machine-gmon.patch b/meta/packages/glibc/glibc-cvs/arm-machine-gmon.patch
new file mode 100644
index 0000000000..0fa789d86b
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/arm-machine-gmon.patch
@@ -0,0 +1,11 @@
1--- sysdeps/arm/machine-gmon.h~ 2001-07-06 00:55:48.000000000 -0400
2+++ sysdeps/arm/machine-gmon.h 2004-04-25 03:56:20.000000000 -0400
3@@ -35,7 +35,7 @@
4 static void mcount_internal (u_long frompc, u_long selfpc);
5
6 #define _MCOUNT_DECL(frompc, selfpc) \
7-static void mcount_internal (u_long frompc, u_long selfpc)
8+static __attribute__((used)) void mcount_internal (u_long frompc, u_long selfpc)
9
10 /* This macro/func MUST save r0, r1 because the compiler inserts
11 blind calls to _mount(), ignoring the fact that _mcount may
diff --git a/meta/packages/glibc/glibc-cvs/arm-memcpy.patch b/meta/packages/glibc/glibc-cvs/arm-memcpy.patch
new file mode 100644
index 0000000000..bc2b3dab84
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/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-cvs/arm-no-hwcap.patch b/meta/packages/glibc/glibc-cvs/arm-no-hwcap.patch
new file mode 100644
index 0000000000..17bfdcd125
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/arm-no-hwcap.patch
@@ -0,0 +1,11 @@
1--- sysdeps/unix/sysv/linux/arm/dl-procinfo.h Mon Jul 23 12:57:23 2001
2+++ sysdeps/unix/sysv/linux/arm/dl-procinfo.h Sun Feb 10 06:37:00 2002
3@@ -67,7 +67,7 @@
4 HWCAP_ARM_VFP = 1 << 6,
5 HWCAP_ARM_EDSP = 1 << 7,
6
7- HWCAP_IMPORTANT = (HWCAP_ARM_HALF | HWCAP_ARM_FAST_MULT)
8+ HWCAP_IMPORTANT = HWCAP_ARM_FAST_MULT
9 };
10
11 static inline int
diff --git a/meta/packages/glibc/glibc-cvs/dyn-ldconfig-20041128.patch b/meta/packages/glibc/glibc-cvs/dyn-ldconfig-20041128.patch
new file mode 100644
index 0000000000..451b6d4afc
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/dyn-ldconfig-20041128.patch
@@ -0,0 +1,22 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- libc/elf/Makefile~dyn-ldconfig-20041128
7+++ libc/elf/Makefile
8@@ -118,12 +118,13 @@
9
10 ifeq (yes,$(use-ldconfig))
11 ifeq (yes,$(build-shared))
12-others-static += ldconfig
13+#others-static += ldconfig
14 others += ldconfig
15 install-rootsbin += ldconfig
16
17 ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon
18 extra-objs += $(ldconfig-modules:=.o)
19+CPPFLAGS-readlib.c = -DNOT_IN_libc=1
20
21 # To find xmalloc.c and xstrdup.c
22 vpath %.c ../locale/programs
diff --git a/meta/packages/glibc/glibc-cvs/dyn-ldconfig.patch b/meta/packages/glibc/glibc-cvs/dyn-ldconfig.patch
new file mode 100644
index 0000000000..1041965d05
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/dyn-ldconfig.patch
@@ -0,0 +1,62 @@
1--- elf/Makefile 13 Mar 2003 21:50:57 -0000 1.258
2+++ elf/Makefile 27 Mar 2003 20:36:07 -0000
3@@ -109,12 +109,13 @@
4
5 ifeq (yes,$(use-ldconfig))
6 ifeq (yes,$(build-shared))
7-others-static += ldconfig
8+#others-static += ldconfig
9 others += ldconfig
10 install-rootsbin += ldconfig
11
12 ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon
13 extra-objs += $(ldconfig-modules:=.o)
14+CPPFLAGS-readlib.c = -DNOT_IN_libc=1
15
16 # To find xmalloc.c and xstrdup.c
17 vpath %.c ../locale/programs
18--- elf/ldconfig.c 13 Jan 2003 08:53:14 -0000 1.31
19+++ elf/ldconfig.c 27 Mar 2003 20:36:09 -0000
20@@ -149,6 +149,9 @@
21 static int
22 is_hwcap_platform (const char *name)
23 {
24+#if 1
25+ return 0;
26+#else
27 int hwcap_idx = _dl_string_hwcap (name);
28
29 if (hwcap_idx != -1 && ((1 << hwcap_idx) & hwcap_mask))
30@@ -164,6 +167,7 @@
31 #endif
32
33 return 0;
34+#endif
35 }
36
37 /* Get hwcap (including platform) encoding of path. */
38@@ -175,6 +179,7 @@
39 uint64_t hwcap = 0;
40 uint64_t h;
41
42+#if 0
43 size_t len;
44
45 len = strlen (str);
46@@ -210,6 +215,7 @@
47 *ptr = '\0';
48 }
49
50+#endif
51 free (str);
52 return hwcap;
53 }
54--- elf/Versions.old 2004-06-26 13:18:35.000000000 +0100
55+++ elf/Versions 2004-06-26 14:41:09.000000000 +0100
56@@ -54,5 +54,6 @@
57 _dl_get_tls_static_info; _dl_allocate_tls_init;
58 _dl_tls_setup; _dl_rtld_di_serinfo;
59 _dl_make_stack_executable;
60+ _dl_cache_libcmp;
61 }
62 }
diff --git a/meta/packages/glibc/glibc-cvs/eabi-patch-1 b/meta/packages/glibc/glibc-cvs/eabi-patch-1
new file mode 100644
index 0000000000..9b1fd408da
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/eabi-patch-1
@@ -0,0 +1,88 @@
1From libc-alpha-return-17227-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Tue Mar 22 15:57:25 2005
2Return-Path: <libc-alpha-return-17227-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
3Delivered-To: listarch-libc-alpha at sources dot redhat dot com
4Received: (qmail 12343 invoked by alias); 22 Mar 2005 15:57:24 -0000
5Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
6Precedence: bulk
7List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
8List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
9List-Post: <mailto:libc-alpha at sources dot redhat dot com>
10List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
11Sender: libc-alpha-owner at sources dot redhat dot com
12Delivered-To: mailing list libc-alpha at sources dot redhat dot com
13Received: (qmail 12264 invoked from network); 22 Mar 2005 15:57:19 -0000
14Received: from unknown (HELO nevyn.them.org) (66.93.172.17)
15 by sourceware dot org with SMTP; 22 Mar 2005 15:57:19 -0000
16Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
17 id 1DDll5-0006ip-R3; Tue, 22 Mar 2005 10:57:31 -0500
18Date: Tue, 22 Mar 2005 10:57:31 -0500
19From: Daniel Jacobowitz <drow at false dot org>
20To: libc-alpha at sources dot redhat dot com
21Cc: Phil Blundell <pb at reciva dot com>
22Subject: Common bits for the ARM EABI port
23Message-ID: <20050322155731.GA25613@nevyn.them.org>
24Mail-Followup-To: libc-alpha at sources dot redhat dot com,
25 Phil Blundell <pb at reciva dot com>
26Mime-Version: 1.0
27Content-Type: text/plain; charset=us-ascii
28Content-Disposition: inline
29User-Agent: Mutt/1.5.6+20040907i
30
31The changes to common files for the ARM EABI port; search the new directory,
32use GLIBC_2.4 as a base version, and generate ld-linux.so.3 (so that old and
33new ABI libraries can be installed on the same system, in case someone needs
34to do that). Generic ARM changes coming up next.
35
36I noticed that the "configure: Regenerated" messages are often left out of
37glibc changelogs; should I skip them?
38
39--
40Daniel Jacobowitz
41CodeSourcery, LLC
42
432005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
44
45 * configure.in: Add arm*-*-linux-gnueabi support. Remove
46 unused arm32 entry from $machine.
47 * configure: Regenerated.
48 * shlib-versions: Add arm*-*-linux-gnueabi.
49
50Index: glibc/configure.in
51===================================================================
52--- glibc.orig/configure.in 2005-03-18 17:10:34.000000000 -0500
53+++ glibc/configure.in 2005-03-21 10:04:41.000000000 -0500
54@@ -423,7 +423,12 @@ changequote(,)dnl
55 test -n "$base_machine" || case "$machine" in
56 a29k | am29000) base_machine=a29k machine=a29k ;;
57 alpha*) base_machine=alpha machine=alpha/$machine ;;
58-arm*) base_machine=arm machine=arm/arm32/$machine ;;
59+arm*) base_machine=arm
60+ case $config_os in
61+ linux-gnueabi) machine=arm/eabi/$machine ;;
62+ *) machine=arm/$machine ;;
63+ esac
64+ ;;
65 c3[012]) base_machine=cx0 machine=cx0/c30 ;;
66 c4[04]) base_machine=cx0 machine=cx0/c40 ;;
67 hppa*64*) base_machine=hppa machine=hppa/hppa64 ;;
68Index: glibc/shlib-versions
69===================================================================
70--- glibc.orig/shlib-versions 2005-02-13 21:53:05.000000000 -0500
71+++ glibc/shlib-versions 2005-03-21 10:06:54.000000000 -0500
72@@ -31,6 +31,7 @@ cris-.*-linux.* DEFAULT GLIBC_2.2
73 x86_64-.*-linux.* DEFAULT GLIBC_2.2.5
74 powerpc64-.*-linux.* DEFAULT GLIBC_2.3
75 .*-.*-gnu-gnu.* DEFAULT GLIBC_2.2.6
76+arm.*-.*-linux-gnueabi DEFAULT GLIBC_2.4
77
78 # Configuration WORDSIZE[32|64] Alternate configuration
79 # ------------- ---------- -----------------------
80@@ -80,6 +81,7 @@ i.86-.*-linux.* ld=ld-linux.so.2
81 sparc64-.*-linux.* ld=ld-linux.so.2 GLIBC_2.2
82 sparc.*-.*-linux.* ld=ld-linux.so.2
83 alpha.*-.*-linux.* ld=ld-linux.so.2
84+arm.*-.*-linux-gnueabi ld=ld-linux.so.3
85 arm.*-.*-linux.* ld=ld-linux.so.2
86 sh.*-.*-linux.* ld=ld-linux.so.2 GLIBC_2.2
87 ia64-.*-linux.* ld=ld-linux-ia64.so.2 GLIBC_2.2
88
diff --git a/meta/packages/glibc/glibc-cvs/eabi-patch-2 b/meta/packages/glibc/glibc-cvs/eabi-patch-2
new file mode 100644
index 0000000000..955a9bb51f
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/eabi-patch-2
@@ -0,0 +1,2446 @@
1From libc-alpha-return-17231-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Tue Mar 22 17:39:38 2005
2Return-Path: <libc-alpha-return-17231-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
3Delivered-To: listarch-libc-alpha at sources dot redhat dot com
4Received: (qmail 15063 invoked by alias); 22 Mar 2005 17:39:38 -0000
5Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
6Precedence: bulk
7List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
8List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
9List-Post: <mailto:libc-alpha at sources dot redhat dot com>
10List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
11Sender: libc-alpha-owner at sources dot redhat dot com
12Delivered-To: mailing list libc-alpha at sources dot redhat dot com
13Received: (qmail 13714 invoked from network); 22 Mar 2005 17:38:53 -0000
14Received: from unknown (HELO nevyn.them.org) (66.93.172.17)
15 by sourceware dot org with SMTP; 22 Mar 2005 17:38:53 -0000
16Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
17 id 1DDnLP-00007R-0B; Tue, 22 Mar 2005 12:39:07 -0500
18Date: Tue, 22 Mar 2005 12:39:06 -0500
19From: Daniel Jacobowitz <drow at false dot org>
20To: libc-alpha at sources dot redhat dot com, Phil Blundell <pb at reciva dot com>
21Subject: Re: Remainder of ARM EABI support
22Message-ID: <20050322173906.GA316@nevyn.them.org>
23Mail-Followup-To: libc-alpha at sources dot redhat dot com,
24 Phil Blundell <pb at reciva dot com>
25References: <20050322162137.GA26662@nevyn.them.org>
26Mime-Version: 1.0
27Content-Type: text/plain; charset=us-ascii
28Content-Disposition: inline
29In-Reply-To: <20050322162137 dot GA26662 at nevyn dot them dot org>
30User-Agent: Mutt/1.5.6+20040907i
31
32On Tue, Mar 22, 2005 at 11:21:37AM -0500, Daniel Jacobowitz wrote:
33> This patch is the remaining pieces of ARM EABI support, the
34> arm*-*-linux-gnueabi target.
35>
36> Highlights of the new ABI compared to the old one:
37> - Eight byte stack alignment instead of four.
38> - VFP floating point support instead of FPA; there's actually hardware
39> which supports VFP...
40> - More standard structure layout. The old ABI (APCS) always rounded
41> structures up to 32-bit alignment even if they contained only chars;
42> it also aligned 64-bit fields to four bytes.
43> - Some types have been grown to accomodate modern ARM cores, particularly
44> jmp_buf.
45>
46> The EABI also defines some additional symbols that a C library has to
47> define, which allow "portable" ARM objects to be linked to multiple C
48> libraries even if certain implementation-defined constants differ.
49> They're added to ARM-specific files in libc_nonshared.a.
50>
51> Most of the contents of sysdeps/unix/sysv/linux/arm/eabi are wrappers for
52> syscalls whose types have changed between the old and new ABI. The kernel
53> developers are discussing an EABI syscall interface, but for now the swi
54> based syscalls take the same argument types they used to for APCS. Only
55> a handful of syscalls are affected.
56
57My track record is not very good this morning; I apologize. I sent the
58wrong version of the patch. This one includes a couple of VFP fixes
59left out of the last posting, and a complete changelog.
60
61--
62Daniel Jacobowitz
63CodeSourcery, LLC
64
652005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
66 Mark Mitchell <mark@codesourcery.com>
67 Paul Brook <paul@codesourcery.com>
68
69 * sysdeps/arm/eabi/Makefile, sysdeps/arm/eabi/Versions,
70 sysdeps/arm/eabi/aeabi_assert.c, sysdeps/arm/eabi/aeabi_atexit.c,
71 sysdeps/arm/eabi/aeabi_errno_addr.c, sysdeps/arm/eabi/aeabi_lcsts.c,
72 sysdeps/arm/eabi/aeabi_localeconv.c, sysdeps/arm/eabi/aeabi_math.c,
73 sysdeps/arm/eabi/aeabi_mb_cur_max.c,
74 sysdeps/arm/eabi/aeabi_sighandlers.S,
75 sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c,
76 sysdeps/arm/eabi/bits/huge_val.h, sysdeps/arm/eabi/bits/setjmp.h,
77 sysdeps/arm/eabi/find_exidx.c, sysdeps/arm/eabi/fpu/__longjmp.S,
78 sysdeps/arm/eabi/fpu/bits/fenv.h, sysdeps/arm/eabi/fpu/fclrexcpt.c,
79 sysdeps/arm/eabi/fpu/fegetround.c, sysdeps/arm/eabi/fpu/fesetenv.c,
80 sysdeps/arm/eabi/fpu/fesetround.c, sysdeps/arm/eabi/fpu/fpu_control.h,
81 sysdeps/arm/eabi/fpu/feholdexcpt.c,
82 sysdeps/arm/eabi/fpu/fraiseexcpt.c,
83 sysdeps/arm/eabi/fpu/setjmp.S,
84 sysdeps/unix/sysv/linux/arm/eabi/configure,
85 sysdeps/unix/sysv/linux/arm/eabi/configure.in,
86 sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c,
87 sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c,
88 sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c,
89 sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c,
90 sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h,
91 sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c,
92 sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c,
93 sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c,
94 sysdeps/unix/sysv/linux/arm/eabi/semop.c,
95 sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c,
96 sysdeps/unix/sysv/linux/arm/eabi/statfs64.c,
97 sysdeps/unix/sysv/linux/arm/eabi/uname.c,
98 sysdeps/unix/sysv/linux/arm/eabi/xstat64.c,
99 sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c,
100 sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h: New files.
101
102
103Index: glibc/sysdeps/arm/eabi/Makefile
104===================================================================
105--- /dev/null 1970-01-01 00:00:00.000000000 +0000
106+++ glibc/sysdeps/arm/eabi/Makefile 2005-03-22 11:53:10.049703870 -0500
107@@ -0,0 +1,15 @@
108+ifeq ($(subdir),csu)
109+aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math
110+aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \
111+ aeabi_mb_cur_max aeabi_atexit
112+
113+sysdep_routines += $(aeabi_constants) $(aeabi_routines)
114+static-only-routines += $(aeabi_constants) $(aeabi_routines)
115+endif
116+
117+ifeq ($(subdir),elf)
118+sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx
119+shared-only-routines += aeabi_unwind_cpp_pr1
120+sysdep-rtld-routines += aeabi_unwind_cpp_pr1
121+endif
122+
123Index: glibc/sysdeps/arm/eabi/Versions
124===================================================================
125--- /dev/null 1970-01-01 00:00:00.000000000 +0000
126+++ glibc/sysdeps/arm/eabi/Versions 2005-03-22 11:53:10.049703870 -0500
127@@ -0,0 +1,6 @@
128+libc {
129+ GLIBC_2.4 {
130+ # Helper routines
131+ __gnu_Unwind_Find_exidx;
132+ }
133+}
134Index: glibc/sysdeps/arm/eabi/aeabi_assert.c
135===================================================================
136--- /dev/null 1970-01-01 00:00:00.000000000 +0000
137+++ glibc/sysdeps/arm/eabi/aeabi_assert.c 2005-03-22 11:53:10.049703870 -0500
138@@ -0,0 +1,27 @@
139+/* Copyright (C) 2004 Free Software Foundation, Inc.
140+ This file is part of the GNU C Library.
141+
142+ The GNU C Library is free software; you can redistribute it and/or
143+ modify it under the terms of the GNU Lesser General Public
144+ License as published by the Free Software Foundation; either
145+ version 2.1 of the License, or (at your option) any later version.
146+
147+ The GNU C Library is distributed in the hope that it will be useful,
148+ but WITHOUT ANY WARRANTY; without even the implied warranty of
149+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
150+ Lesser General Public License for more details.
151+
152+ You should have received a copy of the GNU Lesser General Public
153+ License along with the GNU C Library; if not, write to the Free
154+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
155+ 02111-1307 USA. */
156+
157+#include <assert.h>
158+#include <stdlib.h>
159+
160+void attribute_hidden
161+__aeabi_assert (const char *assertion, const char *file,
162+ unsigned int line)
163+{
164+ __assert_fail (assertion, file, line, NULL);
165+}
166Index: glibc/sysdeps/arm/eabi/aeabi_atexit.c
167===================================================================
168--- /dev/null 1970-01-01 00:00:00.000000000 +0000
169+++ glibc/sysdeps/arm/eabi/aeabi_atexit.c 2005-03-22 11:53:10.050703627 -0500
170@@ -0,0 +1,28 @@
171+/* Copyright (C) 2005 Free Software Foundation, Inc.
172+ This file is part of the GNU C Library.
173+
174+ The GNU C Library is free software; you can redistribute it and/or
175+ modify it under the terms of the GNU Lesser General Public
176+ License as published by the Free Software Foundation; either
177+ version 2.1 of the License, or (at your option) any later version.
178+
179+ The GNU C Library is distributed in the hope that it will be useful,
180+ but WITHOUT ANY WARRANTY; without even the implied warranty of
181+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
182+ Lesser General Public License for more details.
183+
184+ You should have received a copy of the GNU Lesser General Public
185+ License along with the GNU C Library; if not, write to the Free
186+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
187+ 02111-1307 USA. */
188+
189+#include <stdlib.h>
190+
191+/* Register a function to be called by exit or when a shared library
192+ is unloaded. This routine is like __cxa_atexit, but uses the
193+ calling sequence required by the ARM EABI. */
194+int attribute_hidden
195+__aeabi_atexit (void *arg, void (*func) (void *), void *d)
196+{
197+ return __cxa_atexit (func, arg, d);
198+}
199Index: glibc/sysdeps/arm/eabi/aeabi_errno_addr.c
200===================================================================
201--- /dev/null 1970-01-01 00:00:00.000000000 +0000
202+++ glibc/sysdeps/arm/eabi/aeabi_errno_addr.c 2005-03-22 11:53:10.050703627 -0500
203@@ -0,0 +1,26 @@
204+/* Copyright (C) 2004 Free Software Foundation, Inc.
205+ This file is part of the GNU C Library.
206+
207+ The GNU C Library is free software; you can redistribute it and/or
208+ modify it under the terms of the GNU Lesser General Public
209+ License as published by the Free Software Foundation; either
210+ version 2.1 of the License, or (at your option) any later version.
211+
212+ The GNU C Library is distributed in the hope that it will be useful,
213+ but WITHOUT ANY WARRANTY; without even the implied warranty of
214+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
215+ Lesser General Public License for more details.
216+
217+ You should have received a copy of the GNU Lesser General Public
218+ License along with the GNU C Library; if not, write to the Free
219+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
220+ 02111-1307 USA. */
221+
222+#include <errno.h>
223+
224+attribute_hidden
225+volatile int *
226+__aeabi_errno_addr (void)
227+{
228+ return &errno;
229+}
230Index: glibc/sysdeps/arm/eabi/aeabi_lcsts.c
231===================================================================
232--- /dev/null 1970-01-01 00:00:00.000000000 +0000
233+++ glibc/sysdeps/arm/eabi/aeabi_lcsts.c 2005-03-22 11:53:10.050703627 -0500
234@@ -0,0 +1,67 @@
235+/* Link-time constants for ARM EABI.
236+ Copyright (C) 2005 Free Software Foundation, Inc.
237+ This file is part of the GNU C Library.
238+
239+ The GNU C Library is free software; you can redistribute it and/or
240+ modify it under the terms of the GNU Lesser General Public
241+ License as published by the Free Software Foundation; either
242+ version 2.1 of the License, or (at your option) any later version.
243+
244+ The GNU C Library is distributed in the hope that it will be useful,
245+ but WITHOUT ANY WARRANTY; without even the implied warranty of
246+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
247+ Lesser General Public License for more details.
248+
249+ You should have received a copy of the GNU Lesser General Public
250+ License along with the GNU C Library; if not, write to the Free
251+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
252+ 02111-1307 USA. */
253+
254+/* The ARM EABI requires that we provide ISO compile-time constants as
255+ link-time constants. Some portable applications may reference these. */
256+
257+#include <errno.h>
258+#include <limits.h>
259+#include <locale.h>
260+#include <setjmp.h>
261+#include <signal.h>
262+#include <stdio.h>
263+#include <time.h>
264+
265+#define eabi_constant2(X,Y) const int __aeabi_##X attribute_hidden = Y
266+#define eabi_constant(X) const int __aeabi_##X attribute_hidden = X
267+
268+eabi_constant (EDOM);
269+eabi_constant (ERANGE);
270+eabi_constant (EILSEQ);
271+
272+eabi_constant (MB_LEN_MAX);
273+
274+eabi_constant (LC_COLLATE);
275+eabi_constant (LC_CTYPE);
276+eabi_constant (LC_MONETARY);
277+eabi_constant (LC_NUMERIC);
278+eabi_constant (LC_TIME);
279+eabi_constant (LC_ALL);
280+
281+/* The value of __aeabi_JMP_BUF_SIZE is the number of doublewords in a
282+ jmp_buf. */
283+eabi_constant2 (JMP_BUF_SIZE, sizeof (jmp_buf) / 8);
284+
285+eabi_constant (SIGABRT);
286+eabi_constant (SIGFPE);
287+eabi_constant (SIGILL);
288+eabi_constant (SIGINT);
289+eabi_constant (SIGSEGV);
290+eabi_constant (SIGTERM);
291+
292+eabi_constant2 (IOFBF, _IOFBF);
293+eabi_constant2 (IOLBF, _IOLBF);
294+eabi_constant2 (IONBF, _IONBF);
295+eabi_constant (BUFSIZ);
296+eabi_constant (FOPEN_MAX);
297+eabi_constant (TMP_MAX);
298+eabi_constant (FILENAME_MAX);
299+eabi_constant (L_tmpnam);
300+
301+eabi_constant (CLOCKS_PER_SEC);
302Index: glibc/sysdeps/arm/eabi/aeabi_localeconv.c
303===================================================================
304--- /dev/null 1970-01-01 00:00:00.000000000 +0000
305+++ glibc/sysdeps/arm/eabi/aeabi_localeconv.c 2005-03-22 11:53:10.050703627 -0500
306@@ -0,0 +1,26 @@
307+/* Copyright (C) 2004 Free Software Foundation, Inc.
308+ This file is part of the GNU C Library.
309+
310+ The GNU C Library is free software; you can redistribute it and/or
311+ modify it under the terms of the GNU Lesser General Public
312+ License as published by the Free Software Foundation; either
313+ version 2.1 of the License, or (at your option) any later version.
314+
315+ The GNU C Library is distributed in the hope that it will be useful,
316+ but WITHOUT ANY WARRANTY; without even the implied warranty of
317+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
318+ Lesser General Public License for more details.
319+
320+ You should have received a copy of the GNU Lesser General Public
321+ License along with the GNU C Library; if not, write to the Free
322+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
323+ 02111-1307 USA. */
324+
325+#include <locale.h>
326+
327+attribute_hidden
328+struct lconv *
329+__aeabi_localeconv (void)
330+{
331+ return localeconv ();
332+}
333Index: glibc/sysdeps/arm/eabi/aeabi_math.c
334===================================================================
335--- /dev/null 1970-01-01 00:00:00.000000000 +0000
336+++ glibc/sysdeps/arm/eabi/aeabi_math.c 2005-03-22 11:53:10.050703627 -0500
337@@ -0,0 +1,25 @@
338+/* Copyright (C) 2004 Free Software Foundation, Inc.
339+ This file is part of the GNU C Library.
340+
341+ The GNU C Library is free software; you can redistribute it and/or
342+ modify it under the terms of the GNU Lesser General Public
343+ License as published by the Free Software Foundation; either
344+ version 2.1 of the License, or (at your option) any later version.
345+
346+ The GNU C Library is distributed in the hope that it will be useful,
347+ but WITHOUT ANY WARRANTY; without even the implied warranty of
348+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
349+ Lesser General Public License for more details.
350+
351+ You should have received a copy of the GNU Lesser General Public
352+ License along with the GNU C Library; if not, write to the Free
353+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
354+ 02111-1307 USA. */
355+
356+#include <math.h>
357+
358+const double __aeabi_HUGE_VAL attribute_hidden = HUGE_VAL;
359+const long double __aeabi_HUGE_VALL attribute_hidden = HUGE_VALL;
360+const float __aeabi_HUGE_VALF attribute_hidden = HUGE_VALF;
361+const float __aeabi_INFINITY attribute_hidden = INFINITY;
362+const float __aeabi_NAN attribute_hidden = NAN;
363Index: glibc/sysdeps/arm/eabi/aeabi_mb_cur_max.c
364===================================================================
365--- /dev/null 1970-01-01 00:00:00.000000000 +0000
366+++ glibc/sysdeps/arm/eabi/aeabi_mb_cur_max.c 2005-03-22 11:53:10.051703385 -0500
367@@ -0,0 +1,28 @@
368+/* Copyright (C) 2004 Free Software Foundation, Inc.
369+ This file is part of the GNU C Library.
370+
371+ The GNU C Library is free software; you can redistribute it and/or
372+ modify it under the terms of the GNU Lesser General Public
373+ License as published by the Free Software Foundation; either
374+ version 2.1 of the License, or (at your option) any later version.
375+
376+ The GNU C Library is distributed in the hope that it will be useful,
377+ but WITHOUT ANY WARRANTY; without even the implied warranty of
378+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
379+ Lesser General Public License for more details.
380+
381+ You should have received a copy of the GNU Lesser General Public
382+ License along with the GNU C Library; if not, write to the Free
383+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
384+ 02111-1307 USA. */
385+
386+#include <langinfo.h>
387+#include <locale.h>
388+#include <stdlib.h>
389+#include <locale/localeinfo.h>
390+
391+int attribute_hidden
392+__aeabi_MB_CUR_MAX (void)
393+{
394+ return MB_CUR_MAX;
395+}
396Index: glibc/sysdeps/arm/eabi/aeabi_sighandlers.S
397===================================================================
398--- /dev/null 1970-01-01 00:00:00.000000000 +0000
399+++ glibc/sysdeps/arm/eabi/aeabi_sighandlers.S 2005-03-22 11:53:10.051703385 -0500
400@@ -0,0 +1,37 @@
401+/* Link-time constants for ARM EABI - signal handlers.
402+ Copyright (C) 2005 Free Software Foundation, Inc.
403+ This file is part of the GNU C Library.
404+
405+ The GNU C Library is free software; you can redistribute it and/or
406+ modify it under the terms of the GNU Lesser General Public
407+ License as published by the Free Software Foundation; either
408+ version 2.1 of the License, or (at your option) any later version.
409+
410+ The GNU C Library is distributed in the hope that it will be useful,
411+ but WITHOUT ANY WARRANTY; without even the implied warranty of
412+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
413+ Lesser General Public License for more details.
414+
415+ You should have received a copy of the GNU Lesser General Public
416+ License along with the GNU C Library; if not, write to the Free
417+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
418+ 02111-1307 USA. */
419+
420+/* The ARM EABI defines these as "functions". */
421+
422+#include <sysdep.h>
423+
424+ .global __aeabi_SIG_DFL
425+ .hidden __aeabi_SIG_DFL
426+ .type __aeabi_SIG_DFL, %function
427+ .set __aeabi_SIG_DFL, 0
428+
429+ .global __aeabi_SIG_IGN
430+ .hidden __aeabi_SIG_IGN
431+ .type __aeabi_SIG_IGN, %function
432+ .set __aeabi_SIG_IGN, 1
433+
434+ .global __aeabi_SIG_ERR
435+ .hidden __aeabi_SIG_ERR
436+ .type __aeabi_SIG_ERR, %function
437+ .set __aeabi_SIG_ERR, -1
438Index: glibc/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c
439===================================================================
440--- /dev/null 1970-01-01 00:00:00.000000000 +0000
441+++ glibc/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c 2005-03-22 11:53:10.051703385 -0500
442@@ -0,0 +1,28 @@
443+/* Copyright (C) 2005 Free Software Foundation, Inc.
444+ This file is part of the GNU C Library.
445+
446+ The GNU C Library is free software; you can redistribute it and/or
447+ modify it under the terms of the GNU Lesser General Public
448+ License as published by the Free Software Foundation; either
449+ version 2.1 of the License, or (at your option) any later version.
450+
451+ The GNU C Library is distributed in the hope that it will be useful,
452+ but WITHOUT ANY WARRANTY; without even the implied warranty of
453+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
454+ Lesser General Public License for more details.
455+
456+ You should have received a copy of the GNU Lesser General Public
457+ License along with the GNU C Library; if not, write to the Free
458+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
459+ 02111-1307 USA. */
460+
461+/* Because some objects in ld.so and libc.so are built with
462+ -fexceptions, we end up with references to this personality
463+ routine. However, these libraries are not linked against
464+ libgcc_eh.a, so we need a dummy definition. This routine will
465+ never actually be called. */
466+
467+void
468+__aeabi_unwind_cpp_pr1 (void)
469+{
470+}
471Index: glibc/sysdeps/arm/eabi/bits/huge_val.h
472===================================================================
473--- /dev/null 1970-01-01 00:00:00.000000000 +0000
474+++ glibc/sysdeps/arm/eabi/bits/huge_val.h 2005-03-22 11:53:10.051703385 -0500
475@@ -0,0 +1,55 @@
476+/* `HUGE_VAL' constant for IEEE 754 machines (where it is infinity).
477+ Used by <stdlib.h> and <math.h> functions for overflow.
478+ Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004
479+ Free Software Foundation, Inc.
480+ This file is part of the GNU C Library.
481+
482+ The GNU C Library is free software; you can redistribute it and/or
483+ modify it under the terms of the GNU Lesser General Public
484+ License as published by the Free Software Foundation; either
485+ version 2.1 of the License, or (at your option) any later version.
486+
487+ The GNU C Library is distributed in the hope that it will be useful,
488+ but WITHOUT ANY WARRANTY; without even the implied warranty of
489+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
490+ Lesser General Public License for more details.
491+
492+ You should have received a copy of the GNU Lesser General Public
493+ License along with the GNU C Library; if not, write to the Free
494+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
495+ 02111-1307 USA. */
496+
497+#ifndef _MATH_H
498+# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
499+#endif
500+
501+/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
502+
503+#if __GNUC_PREREQ(3,3)
504+# define HUGE_VAL (__builtin_huge_val())
505+#elif __GNUC_PREREQ(2,96)
506+# define HUGE_VAL (__extension__ 0x1.0p2047)
507+#elif defined __GNUC__
508+
509+# define HUGE_VAL \
510+ (__extension__ \
511+ ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \
512+ { __l: 0x7ff0000000000000ULL }).__d)
513+
514+#else /* not GCC */
515+
516+# include <endian.h>
517+
518+typedef union { unsigned char __c[8]; double __d; } __huge_val_t;
519+
520+# if __BYTE_ORDER == __BIG_ENDIAN
521+# define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
522+# endif
523+# if __BYTE_ORDER == __LITTLE_ENDIAN
524+# define __HUGE_VAL_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
525+# endif
526+
527+static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
528+# define HUGE_VAL (__huge_val.__d)
529+
530+#endif /* GCC. */
531Index: glibc/sysdeps/arm/eabi/bits/setjmp.h
532===================================================================
533--- /dev/null 1970-01-01 00:00:00.000000000 +0000
534+++ glibc/sysdeps/arm/eabi/bits/setjmp.h 2005-03-22 11:53:10.052703143 -0500
535@@ -0,0 +1,45 @@
536+/* Copyright (C) 2004 Free Software Foundation, Inc.
537+ This file is part of the GNU C Library.
538+
539+ The GNU C Library is free software; you can redistribute it and/or
540+ modify it under the terms of the GNU Lesser General Public
541+ License as published by the Free Software Foundation; either
542+ version 2.1 of the License, or (at your option) any later version.
543+
544+ The GNU C Library is distributed in the hope that it will be useful,
545+ but WITHOUT ANY WARRANTY; without even the implied warranty of
546+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
547+ Lesser General Public License for more details.
548+
549+ You should have received a copy of the GNU Lesser General Public
550+ License along with the GNU C Library; if not, write to the Free
551+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
552+ 02111-1307 USA. */
553+
554+/* Define the machine-dependent type `jmp_buf'. ARM EABI version. */
555+
556+#ifndef _BITS_SETJMP_H
557+#define _BITS_SETJMP_H 1
558+
559+#if !defined _SETJMP_H && !defined _PTHREAD_H
560+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
561+#endif
562+
563+#ifndef _ASM
564+/* The exact set of registers saved may depend on the particular core
565+ in use, as some coprocessor registers may need to be saved. The C
566+ Library ABI requires that the buffer be 8-byte aligned, and
567+ recommends that the buffer contain 64 words. The first 28 words
568+ are occupied by v1-v6, sl, fp, sp, pc, d8-d15, and fpscr. (Note
569+ that d8-15 require 17 words, due to the use of fstmx.) */
570+typedef int __jmp_buf[64] __attribute__((aligned (8)));
571+#endif
572+
573+#define __JMP_BUF_SP 8
574+
575+/* Test if longjmp to JMPBUF would unwind the frame
576+ containing a local variable at ADDRESS. */
577+#define _JMPBUF_UNWINDS(jmpbuf, address) \
578+ ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
579+
580+#endif
581Index: glibc/sysdeps/arm/eabi/find_exidx.c
582===================================================================
583--- /dev/null 1970-01-01 00:00:00.000000000 +0000
584+++ glibc/sysdeps/arm/eabi/find_exidx.c 2005-03-22 11:53:10.052703143 -0500
585@@ -0,0 +1,80 @@
586+/* Copyright (C) 2005 Free Software Foundation, Inc.
587+ This file is part of the GNU C Library.
588+
589+ The GNU C Library is free software; you can redistribute it and/or
590+ modify it under the terms of the GNU Lesser General Public
591+ License as published by the Free Software Foundation; either
592+ version 2.1 of the License, or (at your option) any later version.
593+
594+ The GNU C Library is distributed in the hope that it will be useful,
595+ but WITHOUT ANY WARRANTY; without even the implied warranty of
596+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
597+ Lesser General Public License for more details.
598+
599+ You should have received a copy of the GNU Lesser General Public
600+ License along with the GNU C Library; if not, write to the Free
601+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
602+ 02111-1307 USA. */
603+
604+#include <link.h>
605+#include <unwind.h>
606+
607+struct unw_eh_callback_data
608+{
609+ _Unwind_Ptr pc;
610+ _Unwind_Ptr exidx_start;
611+ int exidx_len;
612+};
613+
614+
615+/* Callback to determins if the PC lies within an object, and remember the
616+ location of the exception index table if it does. */
617+
618+static int
619+find_exidx_callback (struct dl_phdr_info * info, size_t size, void * ptr)
620+{
621+ struct unw_eh_callback_data * data;
622+ const ElfW(Phdr) *phdr;
623+ int i;
624+ int match;
625+ _Unwind_Ptr load_base;
626+
627+ data = (struct unw_eh_callback_data *) ptr;
628+ load_base = info->dlpi_addr;
629+ phdr = info->dlpi_phdr;
630+
631+ match = 0;
632+ for (i = info->dlpi_phnum; i > 0; i--, phdr++)
633+ {
634+ if (phdr->p_type == PT_LOAD)
635+ {
636+ _Unwind_Ptr vaddr = phdr->p_vaddr + load_base;
637+ if (data->pc >= vaddr && data->pc < vaddr + phdr->p_memsz)
638+ match = 1;
639+ }
640+ else if (phdr->p_type == PT_ARM_EXIDX)
641+ {
642+ data->exidx_start = (_Unwind_Ptr) (phdr->p_vaddr + load_base);
643+ data->exidx_len = phdr->p_memsz;
644+ }
645+ }
646+
647+ return match;
648+}
649+
650+
651+/* Find the exception index table containing PC. */
652+
653+_Unwind_Ptr
654+__gnu_Unwind_Find_exidx (_Unwind_Ptr pc, int * pcount)
655+{
656+ struct unw_eh_callback_data data;
657+
658+ data.pc = pc;
659+ data.exidx_start = 0;
660+ if (dl_iterate_phdr (find_exidx_callback, &data) <= 0)
661+ return 0;
662+
663+ *pcount = data.exidx_len / 8;
664+ return data.exidx_start;
665+}
666Index: glibc/sysdeps/arm/eabi/fpu/__longjmp.S
667===================================================================
668--- /dev/null 1970-01-01 00:00:00.000000000 +0000
669+++ glibc/sysdeps/arm/eabi/fpu/__longjmp.S 2005-03-22 11:53:10.052703143 -0500
670@@ -0,0 +1,43 @@
671+/* longjmp for ARM.
672+ Copyright (C) 2004 Free Software Foundation, Inc.
673+ This file is part of the GNU C Library.
674+
675+ The GNU C Library is free software; you can redistribute it and/or
676+ modify it under the terms of the GNU Lesser General Public
677+ License as published by the Free Software Foundation; either
678+ version 2.1 of the License, or (at your option) any later version.
679+
680+ The GNU C Library is distributed in the hope that it will be useful,
681+ but WITHOUT ANY WARRANTY; without even the implied warranty of
682+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
683+ Lesser General Public License for more details.
684+
685+ You should have received a copy of the GNU Lesser General Public
686+ License along with the GNU C Library; if not, write to the Free
687+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
688+ 02111-1307 USA. */
689+
690+#include <sysdep.h>
691+#define _SETJMP_H
692+#define _ASM
693+#include <bits/setjmp.h>
694+
695+/* __longjmp(jmpbuf, val) */
696+
697+ENTRY (__longjmp)
698+ mov ip, r0 /* save jmp_buf pointer */
699+
700+ movs r0, r1 /* get the return value in place */
701+ moveq r0, #1 /* can't let setjmp() return zero! */
702+
703+ /* Restore the integer registers. */
704+ LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr})
705+
706+ /* Restore the VFP registers. */
707+ fldmiax ip!, {d8-d15}
708+ /* Restore the floating-point status register. */
709+ ldr r1, [ip], #4
710+ fmxr fpscr, r1
711+
712+ DO_RET(lr)
713+END (__longjmp)
714Index: glibc/sysdeps/arm/eabi/fpu/bits/fenv.h
715===================================================================
716--- /dev/null 1970-01-01 00:00:00.000000000 +0000
717+++ glibc/sysdeps/arm/eabi/fpu/bits/fenv.h 2005-03-22 12:34:55.511467536 -0500
718@@ -0,0 +1,74 @@
719+/* Copyright (C) 2004 Free Software Foundation, Inc.
720+ This file is part of the GNU C Library.
721+
722+ The GNU C Library is free software; you can redistribute it and/or
723+ modify it under the terms of the GNU Lesser General Public
724+ License as published by the Free Software Foundation; either
725+ version 2.1 of the License, or (at your option) any later version.
726+
727+ The GNU C Library is distributed in the hope that it will be useful,
728+ but WITHOUT ANY WARRANTY; without even the implied warranty of
729+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
730+ Lesser General Public License for more details.
731+
732+ You should have received a copy of the GNU Lesser General Public
733+ License along with the GNU C Library; if not, write to the Free
734+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
735+ 02111-1307 USA. */
736+
737+#ifndef _FENV_H
738+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
739+#endif
740+
741+/* Define bits representing exceptions in the FPU status word. */
742+enum
743+ {
744+ FE_INVALID = 1,
745+#define FE_INVALID FE_INVALID
746+ FE_DIVBYZERO = 2,
747+#define FE_DIVBYZERO FE_DIVBYZERO
748+ FE_OVERFLOW = 4,
749+#define FE_OVERFLOW FE_OVERFLOW
750+ FE_UNDERFLOW = 8,
751+#define FE_UNDERFLOW FE_UNDERFLOW
752+ FE_INEXACT = 16,
753+#define FE_INEXACT FE_INEXACT
754+ };
755+
756+/* Amount to shift by to convert an exception to a mask bit. */
757+#define FE_EXCEPT_SHIFT 8
758+
759+/* All supported exceptions. */
760+#define FE_ALL_EXCEPT \
761+ (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
762+
763+/* VFP supports all of the four defined rounding modes. */
764+enum
765+ {
766+ FE_TONEAREST = 0,
767+#define FE_TONEAREST FE_TONEAREST
768+ FE_UPWARD = 0x400000,
769+#define FE_UPWARD FE_UPWARD
770+ FE_DOWNWARD = 0x800000,
771+#define FE_DOWNWARD FE_DOWNWARD
772+ FE_TOWARDZERO = 0xc00000
773+#define FE_TOWARDZERO FE_TOWARDZERO
774+ };
775+
776+/* Type representing exception flags. */
777+typedef unsigned int fexcept_t;
778+
779+/* Type representing floating-point environment. */
780+typedef struct
781+ {
782+ unsigned int __cw;
783+ }
784+fenv_t;
785+
786+/* If the default argument is used we use this value. */
787+#define FE_DFL_ENV ((fenv_t *) -1l)
788+
789+#ifdef __USE_GNU
790+/* Floating-point environment where none of the exceptions are masked. */
791+# define FE_NOMASK_ENV ((__const fenv_t *) -2)
792+#endif
793Index: glibc/sysdeps/arm/eabi/fpu/fclrexcpt.c
794===================================================================
795--- /dev/null 1970-01-01 00:00:00.000000000 +0000
796+++ glibc/sysdeps/arm/eabi/fpu/fclrexcpt.c 2005-03-22 11:53:10.053702900 -0500
797@@ -0,0 +1,50 @@
798+/* Clear given exceptions in current floating-point environment.
799+ Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc.
800+ This file is part of the GNU C Library.
801+
802+ The GNU C Library is free software; you can redistribute it and/or
803+ modify it under the terms of the GNU Lesser General Public
804+ License as published by the Free Software Foundation; either
805+ version 2.1 of the License, or (at your option) any later version.
806+
807+ The GNU C Library is distributed in the hope that it will be useful,
808+ but WITHOUT ANY WARRANTY; without even the implied warranty of
809+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
810+ Lesser General Public License for more details.
811+
812+ You should have received a copy of the GNU Lesser General Public
813+ License along with the GNU C Library; if not, write to the Free
814+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
815+ 02111-1307 USA. */
816+
817+#include <fenv.h>
818+#include <fpu_control.h>
819+
820+int
821+__feclearexcept (int excepts)
822+{
823+ unsigned long int temp;
824+
825+ /* Mask out unsupported bits/exceptions. */
826+ excepts &= FE_ALL_EXCEPT;
827+
828+ /* Get the current floating point status. */
829+ _FPU_GETCW (temp);
830+
831+ /* Clear the relevant bits. */
832+ temp = (temp & ~FE_ALL_EXCEPT) | (temp & FE_ALL_EXCEPT & ~excepts);
833+
834+ /* Put the new data in effect. */
835+ _FPU_SETCW (temp);
836+
837+ /* Success. */
838+ return 0;
839+}
840+
841+#include <shlib-compat.h>
842+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
843+strong_alias (__feclearexcept, __old_feclearexcept)
844+compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
845+#endif
846+
847+versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
848Index: glibc/sysdeps/arm/eabi/fpu/fegetround.c
849===================================================================
850--- /dev/null 1970-01-01 00:00:00.000000000 +0000
851+++ glibc/sysdeps/arm/eabi/fpu/fegetround.c 2005-03-22 11:53:10.053702900 -0500
852@@ -0,0 +1,32 @@
853+/* Return current rounding direction.
854+ Copyright (C) 2004 Free Software Foundation, Inc.
855+ This file is part of the GNU C Library.
856+
857+ The GNU C Library is free software; you can redistribute it and/or
858+ modify it under the terms of the GNU Lesser General Public
859+ License as published by the Free Software Foundation; either
860+ version 2.1 of the License, or (at your option) any later version.
861+
862+ The GNU C Library is distributed in the hope that it will be useful,
863+ but WITHOUT ANY WARRANTY; without even the implied warranty of
864+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
865+ Lesser General Public License for more details.
866+
867+ You should have received a copy of the GNU Lesser General Public
868+ License along with the GNU C Library; if not, write to the Free
869+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
870+ 02111-1307 USA. */
871+
872+#include <fenv.h>
873+#include <fpu_control.h>
874+
875+int
876+fegetround (void)
877+{
878+ unsigned int temp;
879+
880+ /* Get the current environment. */
881+ _FPU_GETCW (temp);
882+
883+ return temp & FE_TOWARDZERO;
884+}
885Index: glibc/sysdeps/arm/eabi/fpu/fesetenv.c
886===================================================================
887--- /dev/null 1970-01-01 00:00:00.000000000 +0000
888+++ glibc/sysdeps/arm/eabi/fpu/fesetenv.c 2005-03-22 12:34:55.521465156 -0500
889@@ -0,0 +1,46 @@
890+/* Install given floating-point environment.
891+ Copyright (C) 2004 Free Software Foundation, Inc.
892+ This file is part of the GNU C Library.
893+
894+ The GNU C Library is free software; you can redistribute it and/or
895+ modify it under the terms of the GNU Lesser General Public
896+ License as published by the Free Software Foundation; either
897+ version 2.1 of the License, or (at your option) any later version.
898+
899+ The GNU C Library is distributed in the hope that it will be useful,
900+ but WITHOUT ANY WARRANTY; without even the implied warranty of
901+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
902+ Lesser General Public License for more details.
903+
904+ You should have received a copy of the GNU Lesser General Public
905+ License along with the GNU C Library; if not, write to the Free
906+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
907+ 02111-1307 USA. */
908+
909+#include <fenv.h>
910+#include <fpu_control.h>
911+
912+int
913+__fesetenv (const fenv_t *envp)
914+{
915+ unsigned int temp;
916+
917+ _FPU_GETCW (temp);
918+ temp &= _FPU_RESERVED;
919+
920+ if (envp == FE_DFL_ENV)
921+ temp |= _FPU_DEFAULT;
922+ else if (envp == FE_NOMASK_ENV)
923+ temp |= _FPU_IEEE;
924+ else
925+ temp |= envp->__cw & ~_FPU_RESERVED;
926+
927+ _FPU_SETCW (temp);
928+
929+ /* Success. */
930+ return 0;
931+}
932+
933+#include <shlib-compat.h>
934+libm_hidden_ver (__fesetenv, fesetenv)
935+versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2);
936Index: glibc/sysdeps/arm/eabi/fpu/fesetround.c
937===================================================================
938--- /dev/null 1970-01-01 00:00:00.000000000 +0000
939+++ glibc/sysdeps/arm/eabi/fpu/fesetround.c 2005-03-22 11:53:10.053702900 -0500
940@@ -0,0 +1,41 @@
941+/* Set current rounding direction.
942+ Copyright (C) 2004 Free Software Foundation, Inc.
943+ This file is part of the GNU C Library.
944+
945+ The GNU C Library is free software; you can redistribute it and/or
946+ modify it under the terms of the GNU Lesser General Public
947+ License as published by the Free Software Foundation; either
948+ version 2.1 of the License, or (at your option) any later version.
949+
950+ The GNU C Library is distributed in the hope that it will be useful,
951+ but WITHOUT ANY WARRANTY; without even the implied warranty of
952+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
953+ Lesser General Public License for more details.
954+
955+ You should have received a copy of the GNU Lesser General Public
956+ License along with the GNU C Library; if not, write to the Free
957+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
958+ 02111-1307 USA. */
959+
960+#include <fenv.h>
961+#include <fpu_control.h>
962+
963+int
964+fesetround (int round)
965+{
966+ fpu_control_t temp;
967+
968+ switch (round)
969+ {
970+ case FE_TONEAREST:
971+ case FE_UPWARD:
972+ case FE_DOWNWARD:
973+ case FE_TOWARDZERO:
974+ _FPU_GETCW (temp);
975+ temp = (temp & ~FE_TOWARDZERO) | round;
976+ _FPU_SETCW (temp);
977+ return 0;
978+ default:
979+ return 1;
980+ }
981+}
982Index: glibc/sysdeps/arm/eabi/fpu/fpu_control.h
983===================================================================
984--- /dev/null 1970-01-01 00:00:00.000000000 +0000
985+++ glibc/sysdeps/arm/eabi/fpu/fpu_control.h 2005-03-22 12:34:55.521465156 -0500
986@@ -0,0 +1,47 @@
987+/* FPU control word definitions. ARM VFP version.
988+ Copyright (C) 2004 Free Software Foundation, Inc.
989+ This file is part of the GNU C Library.
990+
991+ The GNU C Library is free software; you can redistribute it and/or
992+ modify it under the terms of the GNU Lesser General Public
993+ License as published by the Free Software Foundation; either
994+ version 2.1 of the License, or (at your option) any later version.
995+
996+ The GNU C Library is distributed in the hope that it will be useful,
997+ but WITHOUT ANY WARRANTY; without even the implied warranty of
998+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
999+ Lesser General Public License for more details.
1000+
1001+ You should have received a copy of the GNU Lesser General Public
1002+ License along with the GNU C Library; if not, write to the Free
1003+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1004+ 02111-1307 USA. */
1005+
1006+#ifndef _FPU_CONTROL_H
1007+#define _FPU_CONTROL_H
1008+
1009+/* masking of interrupts */
1010+#define _FPU_MASK_IM 0x00000100 /* invalid operation */
1011+#define _FPU_MASK_ZM 0x00000200 /* divide by zero */
1012+#define _FPU_MASK_OM 0x00000400 /* overflow */
1013+#define _FPU_MASK_UM 0x00000800 /* underflow */
1014+#define _FPU_MASK_PM 0x00001000 /* inexact */
1015+
1016+/* Some bits in the FPSCR are not yet defined. They must be preserved when
1017+ modifying the contents. */
1018+#define _FPU_RESERVED 0x0e08e0e0
1019+#define _FPU_DEFAULT 0x00000000
1020+/* Default + exceptions enabled. */
1021+#define _FPU_IEEE (_FPU_DEFAULT | 0x00001f00)
1022+
1023+/* Type of the control word. */
1024+typedef unsigned int fpu_control_t;
1025+
1026+/* Macros for accessing the hardware control word. */
1027+#define _FPU_GETCW(cw) __asm__ __volatile__ ("fmrx %0, fpscr" : "=r" (cw))
1028+#define _FPU_SETCW(cw) __asm__ __volatile__ ("fmxr fpscr, %0" : : "r" (cw))
1029+
1030+/* Default control word set at startup. */
1031+extern fpu_control_t __fpu_control;
1032+
1033+#endif /* _FPU_CONTROL_H */
1034Index: glibc/sysdeps/arm/eabi/fpu/setjmp.S
1035===================================================================
1036--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1037+++ glibc/sysdeps/arm/eabi/fpu/setjmp.S 2005-03-22 11:53:10.054702658 -0500
1038@@ -0,0 +1,39 @@
1039+/* setjmp for ARM.
1040+ Copyright (C) 2004 Free Software Foundation, Inc.
1041+ This file is part of the GNU C Library.
1042+
1043+ The GNU C Library is free software; you can redistribute it and/or
1044+ modify it under the terms of the GNU Lesser General Public
1045+ License as published by the Free Software Foundation; either
1046+ version 2.1 of the License, or (at your option) any later version.
1047+
1048+ The GNU C Library is distributed in the hope that it will be useful,
1049+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1050+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1051+ Lesser General Public License for more details.
1052+
1053+ You should have received a copy of the GNU Lesser General Public
1054+ License along with the GNU C Library; if not, write to the Free
1055+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1056+ 02111-1307 USA. */
1057+
1058+#include <sysdep.h>
1059+#define _SETJMP_H
1060+#define _ASM
1061+#include <bits/setjmp.h>
1062+
1063+ENTRY (__sigsetjmp)
1064+ mov ip, r0
1065+
1066+ /* Store the integer registers. */
1067+ stmia ip!, {v1-v6, sl, fp, sp, lr}
1068+
1069+ /* Store the VFP registers. */
1070+ fstmiax ip!, {d8-d15}
1071+ /* Store the floating-point status register. */
1072+ fmrx r2, fpscr
1073+ str r2, [ip], #4
1074+
1075+ /* Make a tail call to __sigjmp_save; it takes the same args. */
1076+ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
1077+END (__sigsetjmp)
1078Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/configure
1079===================================================================
1080--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1081+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/configure 2005-03-22 11:53:10.054702658 -0500
1082@@ -0,0 +1,5 @@
1083+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
1084+ # Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
1085+
1086+arch_minimum_kernel=2.4.17
1087+libc_cv_gcc_unwind_find_fde=no
1088Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/configure.in
1089===================================================================
1090--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1091+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/configure.in 2005-03-22 11:53:10.054702658 -0500
1092@@ -0,0 +1,5 @@
1093+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
1094+# Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
1095+
1096+arch_minimum_kernel=2.4.17
1097+libc_cv_gcc_unwind_find_fde=no
1098Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c
1099===================================================================
1100--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1101+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c 2005-03-22 11:53:10.054702658 -0500
1102@@ -0,0 +1,37 @@
1103+/* epoll_ctl wrapper for ARM EABI.
1104+ Copyright (C) 2005 Free Software Foundation, Inc.
1105+ This file is part of the GNU C Library.
1106+
1107+ The GNU C Library is free software; you can redistribute it and/or
1108+ modify it under the terms of the GNU Lesser General Public
1109+ License as published by the Free Software Foundation; either
1110+ version 2.1 of the License, or (at your option) any later version.
1111+
1112+ The GNU C Library is distributed in the hope that it will be useful,
1113+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1114+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1115+ Lesser General Public License for more details.
1116+
1117+ You should have received a copy of the GNU Lesser General Public
1118+ License along with the GNU C Library; if not, write to the Free
1119+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1120+ 02111-1307 USA. */
1121+
1122+#include <sysdep.h>
1123+#include <errno.h>
1124+#include <sys/epoll.h>
1125+
1126+#include <kernel_epoll.h>
1127+
1128+int
1129+epoll_ctl (int __epfd, int __op, int __fd, struct epoll_event *__event)
1130+{
1131+ struct kernel_epoll_event k_event;
1132+
1133+ k_event.events = __event->events;
1134+ memcpy (&k_event.data, &__event->data, sizeof (k_event.data));
1135+
1136+ return INLINE_SYSCALL (epoll_ctl, 4, __epfd, __op, __fd, &k_event);
1137+}
1138+
1139+libc_hidden_def (epoll_ctl)
1140Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c
1141===================================================================
1142--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1143+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c 2005-03-22 11:53:10.055702416 -0500
1144@@ -0,0 +1,54 @@
1145+/* epoll_ctl wrapper for ARM EABI.
1146+ Copyright (C) 2005 Free Software Foundation, Inc.
1147+ This file is part of the GNU C Library.
1148+
1149+ The GNU C Library is free software; you can redistribute it and/or
1150+ modify it under the terms of the GNU Lesser General Public
1151+ License as published by the Free Software Foundation; either
1152+ version 2.1 of the License, or (at your option) any later version.
1153+
1154+ The GNU C Library is distributed in the hope that it will be useful,
1155+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1156+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1157+ Lesser General Public License for more details.
1158+
1159+ You should have received a copy of the GNU Lesser General Public
1160+ License along with the GNU C Library; if not, write to the Free
1161+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1162+ 02111-1307 USA. */
1163+
1164+#include <sysdep.h>
1165+#include <errno.h>
1166+#include <sys/epoll.h>
1167+#include <stdlib.h>
1168+
1169+#include <kernel_epoll.h>
1170+
1171+int
1172+epoll_wait (int __epfd, struct epoll_event *__events,
1173+ int __maxevents, int __timeout);
1174+{
1175+ struct kernel_epoll_event *k_events;
1176+ int result;
1177+
1178+ k_events = malloc (sizeof (struct kernel_epoll_event) * __maxevents);
1179+ if (k_events == NULL)
1180+ {
1181+ __set_errno (ENOMEM);
1182+ return -1;
1183+ }
1184+
1185+ result = INLINE_SYSCALL (epoll_wait, 4, __epfd, __events, k_events,
1186+ __timeout);
1187+
1188+ for (i = 0; i < result; i++)
1189+ {
1190+ __events[i].events = k_events[i].events;
1191+ memcpy (&__events[i].data, &k_events[i].data, sizeof (k_events[i].data));
1192+ }
1193+
1194+ free (k_events);
1195+ return result;
1196+}
1197+
1198+libc_hidden_def (epoll_wait)
1199Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c
1200===================================================================
1201--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1202+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c 2005-03-22 11:53:10.055702416 -0500
1203@@ -0,0 +1,76 @@
1204+/* Return information about the filesystem on which FD resides.
1205+ Copyright (C) 1996,1997,1998,1999,2000,2003,2005
1206+ Free Software Foundation, Inc.
1207+ This file is part of the GNU C Library.
1208+
1209+ The GNU C Library is free software; you can redistribute it and/or
1210+ modify it under the terms of the GNU Lesser General Public
1211+ License as published by the Free Software Foundation; either
1212+ version 2.1 of the License, or (at your option) any later version.
1213+
1214+ The GNU C Library is distributed in the hope that it will be useful,
1215+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1216+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1217+ Lesser General Public License for more details.
1218+
1219+ You should have received a copy of the GNU Lesser General Public
1220+ License along with the GNU C Library; if not, write to the Free
1221+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1222+ 02111-1307 USA. */
1223+
1224+#include <errno.h>
1225+#include <string.h>
1226+#include <sys/statfs.h>
1227+#include <stddef.h>
1228+#include <sysdep.h>
1229+
1230+/* Defined in statfs64.c. */
1231+extern int __no_statfs64 attribute_hidden;
1232+
1233+/* Return information about the filesystem on which FD resides. */
1234+int
1235+__fstatfs64 (int fd, struct statfs64 *buf)
1236+{
1237+#ifdef __NR_fstatfs64
1238+# if __ASSUME_STATFS64 == 0
1239+ if (! __no_statfs64)
1240+# endif
1241+ {
1242+ /* The EABI structure is the same as the old ABI structure, except
1243+ that it has four additional bytes of padding - at the end. We can
1244+ ignore them. */
1245+ int result = INLINE_SYSCALL (fstatfs64, 3, fd, sizeof (*buf) - 4, buf);
1246+
1247+# if __ASSUME_STATFS64 == 0
1248+ if (result == 0 || errno != ENOSYS)
1249+# endif
1250+ return result;
1251+
1252+# if __ASSUME_STATFS64 == 0
1253+ __no_statfs64 = 1;
1254+# endif
1255+ }
1256+#endif
1257+
1258+#if __ASSUME_STATFS64 == 0
1259+ struct statfs buf32;
1260+
1261+ if (__fstatfs (fd, &buf32) < 0)
1262+ return -1;
1263+
1264+ buf->f_type = buf32.f_type;
1265+ buf->f_bsize = buf32.f_bsize;
1266+ buf->f_blocks = buf32.f_blocks;
1267+ buf->f_bfree = buf32.f_bfree;
1268+ buf->f_bavail = buf32.f_bavail;
1269+ buf->f_files = buf32.f_files;
1270+ buf->f_ffree = buf32.f_ffree;
1271+ buf->f_fsid = buf32.f_fsid;
1272+ buf->f_namelen = buf32.f_namelen;
1273+ buf->f_frsize = buf32.f_frsize;
1274+ memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
1275+
1276+ return 0;
1277+#endif
1278+}
1279+weak_alias (__fstatfs64, fstatfs64)
1280Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c
1281===================================================================
1282--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1283+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c 2005-03-22 11:53:10.055702416 -0500
1284@@ -0,0 +1,100 @@
1285+/* fxstat64 using old-style Unix fstat system call.
1286+ Copyright (C) 1997-2002, 2003, 2005 Free Software Foundation, Inc.
1287+ This file is part of the GNU C Library.
1288+
1289+ The GNU C Library is free software; you can redistribute it and/or
1290+ modify it under the terms of the GNU Lesser General Public
1291+ License as published by the Free Software Foundation; either
1292+ version 2.1 of the License, or (at your option) any later version.
1293+
1294+ The GNU C Library is distributed in the hope that it will be useful,
1295+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1296+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1297+ Lesser General Public License for more details.
1298+
1299+ You should have received a copy of the GNU Lesser General Public
1300+ License along with the GNU C Library; if not, write to the Free
1301+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1302+ 02111-1307 USA. */
1303+
1304+#include <errno.h>
1305+#include <stddef.h>
1306+#include <sys/stat.h>
1307+#include <kernel_stat.h>
1308+
1309+#include <sysdep.h>
1310+#include <sys/syscall.h>
1311+#include <bp-checks.h>
1312+
1313+#include "kernel-features.h"
1314+
1315+#if __ASSUME_STAT64_SYSCALL == 0
1316+# include <xstatconv.h>
1317+#endif
1318+
1319+#ifdef __NR_fstat64
1320+# if __ASSUME_STAT64_SYSCALL == 0
1321+/* The variable is shared between all wrappers around *stat64 calls. */
1322+extern int __have_no_stat64;
1323+# endif
1324+#endif
1325+
1326+/* Get information about the file FD in BUF. */
1327+
1328+int
1329+___fxstat64 (int vers, int fd, struct stat64 *buf)
1330+{
1331+ int result;
1332+ struct kernel_stat64 kbuf64;
1333+
1334+#if __ASSUME_STAT64_SYSCALL > 0
1335+ result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (&kbuf64));
1336+ if (result == 0)
1337+ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
1338+# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
1339+ if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
1340+ buf->st_ino = buf->__st_ino;
1341+# endif
1342+ return result;
1343+#else
1344+ struct kernel_stat kbuf;
1345+# if defined __NR_fstat64
1346+ if (! __have_no_stat64)
1347+ {
1348+ int saved_errno = errno;
1349+ result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (&kbuf64));
1350+
1351+ if (result != -1 || errno != ENOSYS)
1352+ {
1353+ if (result == 0)
1354+ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
1355+# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
1356+ if (!result && buf->__st_ino != (__ino_t)buf->st_ino)
1357+ buf->st_ino = buf->__st_ino;
1358+# endif
1359+ return result;
1360+ }
1361+
1362+ __set_errno (saved_errno);
1363+ __have_no_stat64 = 1;
1364+ }
1365+# endif
1366+ result = INLINE_SYSCALL (fstat, 2, fd, __ptrvalue (&kbuf));
1367+ if (result == 0)
1368+ result = __xstat64_conv (vers, &kbuf, buf);
1369+
1370+ return result;
1371+#endif
1372+}
1373+
1374+#include <shlib-compat.h>
1375+
1376+#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
1377+versioned_symbol (libc, ___fxstat64, __fxstat64, GLIBC_2_2);
1378+strong_alias (___fxstat64, __old__fxstat64)
1379+compat_symbol (libc, __old__fxstat64, __fxstat64, GLIBC_2_1);
1380+hidden_ver (___fxstat64, __fxstat64)
1381+#else
1382+strong_alias (___fxstat64, __fxstat64)
1383+hidden_def (__fxstat64)
1384+#endif
1385Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h
1386===================================================================
1387--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1388+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h 2005-03-22 11:53:10.056702174 -0500
1389@@ -0,0 +1,59 @@
1390+/* Copyright (C) 2005 Free Software Foundation, Inc.
1391+ This file is part of the GNU C Library.
1392+
1393+ The GNU C Library is free software; you can redistribute it and/or
1394+ modify it under the terms of the GNU Lesser General Public
1395+ License as published by the Free Software Foundation; either
1396+ version 2.1 of the License, or (at your option) any later version.
1397+
1398+ The GNU C Library is distributed in the hope that it will be useful,
1399+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1400+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1401+ Lesser General Public License for more details.
1402+
1403+ You should have received a copy of the GNU Lesser General Public
1404+ License along with the GNU C Library; if not, write to the Free
1405+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1406+ 02111-1307 USA. */
1407+
1408+#include <sysdeps/unix/sysv/linux/kernel_stat.h>
1409+
1410+/* kernel_stat64 is just like stat64, except packed. The EABI aligns
1411+ st_size to an eight byte boundary but the old ABI only aligns it to
1412+ four. Similarly st_blocks. */
1413+struct kernel_stat64
1414+ {
1415+ __dev_t st_dev; /* Device. */
1416+ unsigned int __pad1;
1417+
1418+ __ino_t __st_ino; /* 32bit file serial number. */
1419+ __mode_t st_mode; /* File mode. */
1420+ __nlink_t st_nlink; /* Link count. */
1421+ __uid_t st_uid; /* User ID of the file's owner. */
1422+ __gid_t st_gid; /* Group ID of the file's group.*/
1423+ __dev_t st_rdev; /* Device number, if device. */
1424+ unsigned int __pad2;
1425+ __off64_t st_size; /* Size of file, in bytes. */
1426+ __blksize_t st_blksize; /* Optimal block size for I/O. */
1427+
1428+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
1429+#ifdef __USE_MISC
1430+ /* Nanosecond resolution timestamps are stored in a format
1431+ equivalent to 'struct timespec'. This is the type used
1432+ whenever possible but the Unix namespace rules do not allow the
1433+ identifier 'timespec' to appear in the <sys/stat.h> header.
1434+ Therefore we have to handle the use of this header in strictly
1435+ standard-compliant sources special. */
1436+ struct timespec st_atim; /* Time of last access. */
1437+ struct timespec st_mtim; /* Time of last modification. */
1438+ struct timespec st_ctim; /* Time of last status change. */
1439+#else
1440+ __time_t st_atime; /* Time of last access. */
1441+ unsigned long int st_atimensec; /* Nscecs of last access. */
1442+ __time_t st_mtime; /* Time of last modification. */
1443+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
1444+ __time_t st_ctime; /* Time of last status change. */
1445+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
1446+#endif
1447+ __ino64_t st_ino; /* File serial number. */
1448+ } __attribute__ ((packed,aligned(4)));
1449Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c
1450===================================================================
1451--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1452+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c 2005-03-22 11:53:10.056702174 -0500
1453@@ -0,0 +1,99 @@
1454+/* lxstat64 using old-style Unix lstat system call.
1455+ Copyright (C) 1997-2002, 2003, 2005 Free Software Foundation, Inc.
1456+ This file is part of the GNU C Library.
1457+
1458+ The GNU C Library is free software; you can redistribute it and/or
1459+ modify it under the terms of the GNU Lesser General Public
1460+ License as published by the Free Software Foundation; either
1461+ version 2.1 of the License, or (at your option) any later version.
1462+
1463+ The GNU C Library is distributed in the hope that it will be useful,
1464+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1465+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1466+ Lesser General Public License for more details.
1467+
1468+ You should have received a copy of the GNU Lesser General Public
1469+ License along with the GNU C Library; if not, write to the Free
1470+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1471+ 02111-1307 USA. */
1472+
1473+#include <errno.h>
1474+#include <stddef.h>
1475+#include <sys/stat.h>
1476+#include <kernel_stat.h>
1477+
1478+#include <sysdep.h>
1479+#include <sys/syscall.h>
1480+#include <bp-checks.h>
1481+
1482+#include "kernel-features.h"
1483+
1484+#if __ASSUME_STAT64_SYSCALL == 0
1485+# include <xstatconv.h>
1486+#endif
1487+
1488+#ifdef __NR_lstat64
1489+# if __ASSUME_STAT64_SYSCALL == 0
1490+/* The variable is shared between all wrappers around *stat64 calls. */
1491+extern int __have_no_stat64;
1492+# endif
1493+#endif
1494+
1495+/* Get information about the file NAME in BUF. */
1496+int
1497+___lxstat64 (int vers, const char *name, struct stat64 *buf)
1498+{
1499+ int result;
1500+ struct kernel_stat64 kbuf64;
1501+
1502+#ifdef __ASSUME_STAT64_SYSCALL
1503+ result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
1504+ if (result == 0)
1505+ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
1506+# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
1507+ if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
1508+ buf->st_ino = buf->__st_ino;
1509+# endif
1510+ return result;
1511+#else
1512+ struct kernel_stat kbuf;
1513+# ifdef __NR_lstat64
1514+ if (! __have_no_stat64)
1515+ {
1516+ int saved_errno = errno;
1517+ result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
1518+
1519+ if (result != -1 || errno != ENOSYS)
1520+ {
1521+ if (result == 0)
1522+ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
1523+# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
1524+ if (!result && buf->__st_ino != (__ino_t) buf->st_ino)
1525+ buf->st_ino = buf->__st_ino;
1526+# endif
1527+ return result;
1528+ }
1529+
1530+ __set_errno (saved_errno);
1531+ __have_no_stat64 = 1;
1532+ }
1533+# endif
1534+ result = INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
1535+ if (result == 0)
1536+ result = __xstat64_conv (vers, &kbuf, buf);
1537+
1538+ return result;
1539+#endif
1540+}
1541+
1542+#include <shlib-compat.h>
1543+
1544+#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
1545+versioned_symbol (libc, ___lxstat64, __lxstat64, GLIBC_2_2);
1546+strong_alias (___lxstat64, __old__lxstat64)
1547+compat_symbol (libc, __old__lxstat64, __lxstat64, GLIBC_2_1);
1548+hidden_ver (___lxstat64, __lxstat64)
1549+#else
1550+strong_alias (___lxstat64, __lxstat64);
1551+hidden_def (__lxstat64)
1552+#endif
1553Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c
1554===================================================================
1555--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1556+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c 2005-03-22 11:53:10.056702174 -0500
1557@@ -0,0 +1 @@
1558+/* Empty. */
1559Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c
1560===================================================================
1561--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1562+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c 2005-03-22 11:53:10.056702174 -0500
1563@@ -0,0 +1 @@
1564+/* Empty. */
1565Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/semop.c
1566===================================================================
1567--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1568+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/semop.c 2005-03-22 11:53:10.056702174 -0500
1569@@ -0,0 +1,67 @@
1570+/* Copyright (C) 1995, 1997, 1998, 1999, 2000, 2005
1571+ Free Software Foundation, Inc.
1572+ This file is part of the GNU C Library.
1573+ Contributed by Ulrich Drepper <drepper@cygnus.com>, August 1995.
1574+
1575+ The GNU C Library is free software; you can redistribute it and/or
1576+ modify it under the terms of the GNU Lesser General Public
1577+ License as published by the Free Software Foundation; either
1578+ version 2.1 of the License, or (at your option) any later version.
1579+
1580+ The GNU C Library is distributed in the hope that it will be useful,
1581+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1582+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1583+ Lesser General Public License for more details.
1584+
1585+ You should have received a copy of the GNU Lesser General Public
1586+ License along with the GNU C Library; if not, write to the Free
1587+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1588+ 02111-1307 USA. */
1589+
1590+#include <errno.h>
1591+#include <sys/sem.h>
1592+#include <ipc_priv.h>
1593+#include <alloca.h>
1594+#include <sysdep.h>
1595+#include <sys/syscall.h>
1596+#include <bp-checks.h>
1597+
1598+struct kernel_sembuf
1599+{
1600+ unsigned short int sem_num; /* semaphore number */
1601+ short int sem_op; /* semaphore operation */
1602+ short int sem_flg; /* operation flag */
1603+ short int __pad1;
1604+};
1605+
1606+/* Perform user-defined atomical operation of array of semaphores. */
1607+
1608+int
1609+semop (semid, sops, nsops)
1610+ int semid;
1611+ struct sembuf *sops;
1612+ size_t nsops;
1613+{
1614+ struct kernel_sembuf *ksops = alloca (sizeof (sops[0]) * nsops);
1615+ size_t i;
1616+ int result;
1617+
1618+ for (i = 0; i < nsops; i++)
1619+ {
1620+ ksops[i].sem_num = sops[i].sem_num;
1621+ ksops[i].sem_op = sops[i].sem_op;
1622+ ksops[i].sem_flg = sops[i].sem_flg;
1623+ }
1624+
1625+ result = INLINE_SYSCALL (ipc, 5, IPCOP_semop,
1626+ semid, (int) nsops, 0, CHECK_N (ksops, nsops));
1627+
1628+ for (i = 0; i < nsops; i++)
1629+ {
1630+ sops[i].sem_num = ksops[i].sem_num;
1631+ sops[i].sem_op = ksops[i].sem_op;
1632+ sops[i].sem_flg = ksops[i].sem_flg;
1633+ }
1634+
1635+ return result;
1636+}
1637Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c
1638===================================================================
1639--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1640+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c 2005-03-22 11:53:10.057701931 -0500
1641@@ -0,0 +1,69 @@
1642+/* Copyright (C) 1995, 1997, 1998, 1999, 2000, 2005
1643+ Free Software Foundation, Inc.
1644+ This file is part of the GNU C Library.
1645+ Contributed by Ulrich Drepper <drepper@cygnus.com>, August 1995.
1646+
1647+ The GNU C Library is free software; you can redistribute it and/or
1648+ modify it under the terms of the GNU Lesser General Public
1649+ License as published by the Free Software Foundation; either
1650+ version 2.1 of the License, or (at your option) any later version.
1651+
1652+ The GNU C Library is distributed in the hope that it will be useful,
1653+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1654+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1655+ Lesser General Public License for more details.
1656+
1657+ You should have received a copy of the GNU Lesser General Public
1658+ License along with the GNU C Library; if not, write to the Free
1659+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1660+ 02111-1307 USA. */
1661+
1662+#include <errno.h>
1663+#include <sys/sem.h>
1664+#include <ipc_priv.h>
1665+#include <alloca.h>
1666+#include <sysdep.h>
1667+#include <sys/syscall.h>
1668+#include <bp-checks.h>
1669+
1670+struct kernel_sembuf
1671+{
1672+ unsigned short int sem_num; /* semaphore number */
1673+ short int sem_op; /* semaphore operation */
1674+ short int sem_flg; /* operation flag */
1675+ short int __pad1;
1676+};
1677+
1678+/* Perform user-defined atomical operation of array of semaphores. */
1679+
1680+int
1681+semtimedop (semid, sops, nsops, timeout)
1682+ int semid;
1683+ struct sembuf *sops;
1684+ size_t nsops;
1685+ const struct timespec *timeout;
1686+{
1687+ struct kernel_sembuf *ksops = alloca (sizeof (sops[0]) * nsops);
1688+ size_t i;
1689+ int result;
1690+
1691+ for (i = 0; i < nsops; i++)
1692+ {
1693+ ksops[i].sem_num = sops[i].sem_num;
1694+ ksops[i].sem_op = sops[i].sem_op;
1695+ ksops[i].sem_flg = sops[i].sem_flg;
1696+ }
1697+
1698+ result = INLINE_SYSCALL (ipc, 6, IPCOP_semtimedop,
1699+ semid, (int) nsops, 0, CHECK_N (sops, nsops),
1700+ timeout);
1701+
1702+ for (i = 0; i < nsops; i++)
1703+ {
1704+ sops[i].sem_num = ksops[i].sem_num;
1705+ sops[i].sem_op = ksops[i].sem_op;
1706+ sops[i].sem_flg = ksops[i].sem_flg;
1707+ }
1708+
1709+ return result;
1710+}
1711Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c
1712===================================================================
1713--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1714+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c 2005-03-22 11:53:10.057701931 -0500
1715@@ -0,0 +1,77 @@
1716+/* Return information about the filesystem on which FILE resides.
1717+ Copyright (C) 1996-2000,2003,2004,2005 Free Software Foundation, Inc.
1718+ This file is part of the GNU C Library.
1719+
1720+ The GNU C Library is free software; you can redistribute it and/or
1721+ modify it under the terms of the GNU Lesser General Public
1722+ License as published by the Free Software Foundation; either
1723+ version 2.1 of the License, or (at your option) any later version.
1724+
1725+ The GNU C Library is distributed in the hope that it will be useful,
1726+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1727+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1728+ Lesser General Public License for more details.
1729+
1730+ You should have received a copy of the GNU Lesser General Public
1731+ License along with the GNU C Library; if not, write to the Free
1732+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1733+ 02111-1307 USA. */
1734+
1735+#include <errno.h>
1736+#include <string.h>
1737+#include <sys/statfs.h>
1738+#include <stddef.h>
1739+#include <sysdep.h>
1740+
1741+
1742+# if __ASSUME_STATFS64 == 0
1743+int __no_statfs64 attribute_hidden;
1744+#endif
1745+
1746+/* Return information about the filesystem on which FILE resides. */
1747+int
1748+__statfs64 (const char *file, struct statfs64 *buf)
1749+{
1750+#ifdef __NR_statfs64
1751+# if __ASSUME_STATFS64 == 0
1752+ if (! __no_statfs64)
1753+# endif
1754+ {
1755+ /* The EABI structure is the same as the old ABI structure, except
1756+ that it has four additional bytes of padding - at the end. We can
1757+ ignore them. */
1758+ int result = INLINE_SYSCALL (statfs64, 3, file, sizeof (*buf) - 4, buf);
1759+
1760+# if __ASSUME_STATFS64 == 0
1761+ if (result == 0 || errno != ENOSYS)
1762+# endif
1763+ return result;
1764+
1765+# if __ASSUME_STATFS64 == 0
1766+ __no_statfs64 = 1;
1767+# endif
1768+ }
1769+#endif
1770+
1771+#if __ASSUME_STATFS64 == 0
1772+ struct statfs buf32;
1773+
1774+ if (__statfs (file, &buf32) < 0)
1775+ return -1;
1776+
1777+ buf->f_type = buf32.f_type;
1778+ buf->f_bsize = buf32.f_bsize;
1779+ buf->f_blocks = buf32.f_blocks;
1780+ buf->f_bfree = buf32.f_bfree;
1781+ buf->f_bavail = buf32.f_bavail;
1782+ buf->f_files = buf32.f_files;
1783+ buf->f_ffree = buf32.f_ffree;
1784+ buf->f_fsid = buf32.f_fsid;
1785+ buf->f_namelen = buf32.f_namelen;
1786+ buf->f_frsize = buf32.f_frsize;
1787+ memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
1788+
1789+ return 0;
1790+#endif
1791+}
1792+weak_alias (__statfs64, statfs64)
1793Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/uname.c
1794===================================================================
1795--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1796+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/uname.c 2005-03-22 11:53:10.057701931 -0500
1797@@ -0,0 +1,43 @@
1798+/* Copyright (C) 2005
1799+ Free Software Foundation, Inc.
1800+ This file is part of the GNU C Library.
1801+
1802+ The GNU C Library is free software; you can redistribute it and/or
1803+ modify it under the terms of the GNU Lesser General Public
1804+ License as published by the Free Software Foundation; either
1805+ version 2.1 of the License, or (at your option) any later version.
1806+
1807+ The GNU C Library is distributed in the hope that it will be useful,
1808+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1809+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1810+ Lesser General Public License for more details.
1811+
1812+ You should have received a copy of the GNU Lesser General Public
1813+ License along with the GNU C Library; if not, write to the Free
1814+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1815+ 02111-1307 USA. */
1816+
1817+#include <errno.h>
1818+#include <sysdep.h>
1819+#include <sys/syscall.h>
1820+#include <string.h>
1821+#include <sys/utsname.h>
1822+
1823+/* The kernel's struct utsname is two bytes larger than a userland struct
1824+ utsname due to the APCS structure size boundary. */
1825+
1826+int
1827+__uname (struct utsname *__name)
1828+{
1829+ char buf[sizeof (struct utsname) + 2];
1830+ int result = INLINE_SYSCALL (uname, 1, buf);
1831+
1832+ if (result == 0)
1833+ memcpy (__name, buf, sizeof (struct utsname));
1834+
1835+ return result;
1836+}
1837+
1838+libc_hidden_def (__uname)
1839+strong_alias (__uname, uname)
1840+libc_hidden_weak (uname)
1841Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c
1842===================================================================
1843--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1844+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c 2005-03-22 11:53:10.058701689 -0500
1845@@ -0,0 +1,103 @@
1846+/* xstat64 using old-style Unix stat system call.
1847+ Copyright (C) 1991, 1995-2002, 2003, 2005 Free Software Foundation, Inc.
1848+ This file is part of the GNU C Library.
1849+
1850+ The GNU C Library is free software; you can redistribute it and/or
1851+ modify it under the terms of the GNU Lesser General Public
1852+ License as published by the Free Software Foundation; either
1853+ version 2.1 of the License, or (at your option) any later version.
1854+
1855+ The GNU C Library is distributed in the hope that it will be useful,
1856+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1857+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1858+ Lesser General Public License for more details.
1859+
1860+ You should have received a copy of the GNU Lesser General Public
1861+ License along with the GNU C Library; if not, write to the Free
1862+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1863+ 02111-1307 USA. */
1864+
1865+#include <errno.h>
1866+#include <stddef.h>
1867+#include <sys/stat.h>
1868+#include <kernel_stat.h>
1869+
1870+#include <sysdep.h>
1871+#include <sys/syscall.h>
1872+#include <bp-checks.h>
1873+
1874+#include "kernel-features.h"
1875+
1876+#if __ASSUME_STAT64_SYSCALL == 0
1877+# include <xstatconv.h>
1878+#endif
1879+
1880+#ifdef __NR_stat64
1881+# if __ASSUME_STAT64_SYSCALL == 0
1882+/* The variable is shared between all wrappers around *stat64 calls.
1883+ This is the definition. */
1884+int __have_no_stat64;
1885+# endif
1886+#endif
1887+
1888+/* Get information about the file NAME in BUF. */
1889+
1890+int
1891+___xstat64 (int vers, const char *name, struct stat64 *buf)
1892+{
1893+ int result;
1894+ struct kernel_stat64 kbuf64;
1895+
1896+#if __ASSUME_STAT64_SYSCALL > 0
1897+ result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
1898+ if (result == 0)
1899+ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
1900+# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
1901+ if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
1902+ buf->st_ino = buf->__st_ino;
1903+# endif
1904+ return result;
1905+#else
1906+ struct kernel_stat kbuf;
1907+# if defined __NR_stat64
1908+ if (! __have_no_stat64)
1909+ {
1910+ int saved_errno = errno;
1911+ result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
1912+
1913+ if (result != -1 || errno != ENOSYS)
1914+ {
1915+ if (result == 0)
1916+ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
1917+# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
1918+ if (!result && buf->__st_ino != (__ino_t) buf->st_ino)
1919+ buf->st_ino = buf->__st_ino;
1920+# endif
1921+ return result;
1922+ }
1923+
1924+ __set_errno (saved_errno);
1925+ __have_no_stat64 = 1;
1926+ }
1927+# endif
1928+
1929+ result = INLINE_SYSCALL (stat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
1930+ if (result == 0)
1931+ result = __xstat64_conv (vers, &kbuf, buf);
1932+
1933+ return result;
1934+#endif
1935+}
1936+
1937+
1938+#include <shlib-compat.h>
1939+
1940+#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
1941+versioned_symbol (libc, ___xstat64, __xstat64, GLIBC_2_2);
1942+strong_alias (___xstat64, __old__xstat64)
1943+compat_symbol (libc, __old__xstat64, __xstat64, GLIBC_2_1);
1944+hidden_ver (___xstat64, __xstat64)
1945+#else
1946+strong_alias (___xstat64, __xstat64)
1947+hidden_def (__xstat64)
1948+#endif
1949Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c
1950===================================================================
1951--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1952+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c 2005-03-22 11:53:10.058701689 -0500
1953@@ -0,0 +1,341 @@
1954+/* Convert between the kernel's `struct stat' format, and libc's.
1955+ Copyright (C) 1991,1995-1997,2000,2002,2003 Free Software Foundation, Inc.
1956+ This file is part of the GNU C Library.
1957+
1958+ The GNU C Library is free software; you can redistribute it and/or
1959+ modify it under the terms of the GNU Lesser General Public
1960+ License as published by the Free Software Foundation; either
1961+ version 2.1 of the License, or (at your option) any later version.
1962+
1963+ The GNU C Library is distributed in the hope that it will be useful,
1964+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1965+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1966+ Lesser General Public License for more details.
1967+
1968+ You should have received a copy of the GNU Lesser General Public
1969+ License along with the GNU C Library; if not, write to the Free
1970+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1971+ 02111-1307 USA. */
1972+
1973+#include <errno.h>
1974+#include <sys/stat.h>
1975+#include <kernel_stat.h>
1976+
1977+#ifdef STAT_IS_KERNEL_STAT
1978+
1979+/* Dummy. */
1980+struct kernel_stat;
1981+
1982+#else
1983+
1984+#include <string.h>
1985+
1986+
1987+#if !defined __ASSUME_STAT64_SYSCALL || defined XSTAT_IS_XSTAT64
1988+int
1989+__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
1990+{
1991+ switch (vers)
1992+ {
1993+ case _STAT_VER_KERNEL:
1994+ /* Nothing to do. The struct is in the form the kernel expects.
1995+ We should have short-circuted before we got here, but for
1996+ completeness... */
1997+ *(struct kernel_stat *) ubuf = *kbuf;
1998+ break;
1999+
2000+ case _STAT_VER_LINUX:
2001+ {
2002+ struct stat *buf = ubuf;
2003+
2004+ /* Convert to current kernel version of `struct stat'. */
2005+ buf->st_dev = kbuf->st_dev;
2006+#ifdef _HAVE_STAT___PAD1
2007+ buf->__pad1 = 0;
2008+#endif
2009+ buf->st_ino = kbuf->st_ino;
2010+ buf->st_mode = kbuf->st_mode;
2011+ buf->st_nlink = kbuf->st_nlink;
2012+ buf->st_uid = kbuf->st_uid;
2013+ buf->st_gid = kbuf->st_gid;
2014+ buf->st_rdev = kbuf->st_rdev;
2015+#ifdef _HAVE_STAT___PAD2
2016+ buf->__pad2 = 0;
2017+#endif
2018+ buf->st_size = kbuf->st_size;
2019+ buf->st_blksize = kbuf->st_blksize;
2020+ buf->st_blocks = kbuf->st_blocks;
2021+#ifdef _HAVE_STAT_NSEC
2022+ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
2023+ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
2024+ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
2025+ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
2026+ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
2027+ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
2028+#else
2029+ buf->st_atime = kbuf->st_atime;
2030+ buf->st_mtime = kbuf->st_mtime;
2031+ buf->st_ctime = kbuf->st_ctime;
2032+#endif
2033+#ifdef _HAVE_STAT___UNUSED1
2034+ buf->__unused1 = 0;
2035+#endif
2036+#ifdef _HAVE_STAT___UNUSED2
2037+ buf->__unused2 = 0;
2038+#endif
2039+#ifdef _HAVE_STAT___UNUSED3
2040+ buf->__unused3 = 0;
2041+#endif
2042+#ifdef _HAVE_STAT___UNUSED4
2043+ buf->__unused4 = 0;
2044+#endif
2045+#ifdef _HAVE_STAT___UNUSED5
2046+ buf->__unused5 = 0;
2047+#endif
2048+ }
2049+ break;
2050+
2051+ default:
2052+ __set_errno (EINVAL);
2053+ return -1;
2054+ }
2055+
2056+ return 0;
2057+}
2058+#endif
2059+
2060+int
2061+__xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
2062+{
2063+#ifdef XSTAT_IS_XSTAT64
2064+ return __xstat_conv (vers, kbuf, ubuf);
2065+#else
2066+ switch (vers)
2067+ {
2068+ case _STAT_VER_LINUX:
2069+ {
2070+ struct stat64 *buf = ubuf;
2071+
2072+ /* Convert to current kernel version of `struct stat64'. */
2073+ buf->st_dev = kbuf->st_dev;
2074+#ifdef _HAVE_STAT64___PAD1
2075+ buf->__pad1 = 0;
2076+#endif
2077+ buf->st_ino = kbuf->st_ino;
2078+#ifdef _HAVE_STAT64___ST_INO
2079+ buf->__st_ino = kbuf->st_ino;
2080+#endif
2081+ buf->st_mode = kbuf->st_mode;
2082+ buf->st_nlink = kbuf->st_nlink;
2083+ buf->st_uid = kbuf->st_uid;
2084+ buf->st_gid = kbuf->st_gid;
2085+ buf->st_rdev = kbuf->st_rdev;
2086+#ifdef _HAVE_STAT64___PAD2
2087+ buf->__pad2 = 0;
2088+#endif
2089+ buf->st_size = kbuf->st_size;
2090+ buf->st_blksize = kbuf->st_blksize;
2091+ buf->st_blocks = kbuf->st_blocks;
2092+#ifdef _HAVE_STAT64_NSEC
2093+ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
2094+ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
2095+ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
2096+ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
2097+ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
2098+ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
2099+#else
2100+ buf->st_atime = kbuf->st_atime;
2101+ buf->st_mtime = kbuf->st_mtime;
2102+ buf->st_ctime = kbuf->st_ctime;
2103+#endif
2104+#ifdef _HAVE_STAT64___UNUSED1
2105+ buf->__unused1 = 0;
2106+#endif
2107+#ifdef _HAVE_STAT64___UNUSED2
2108+ buf->__unused2 = 0;
2109+#endif
2110+#ifdef _HAVE_STAT64___UNUSED3
2111+ buf->__unused3 = 0;
2112+#endif
2113+#ifdef _HAVE_STAT64___UNUSED4
2114+ buf->__unused4 = 0;
2115+#endif
2116+#ifdef _HAVE_STAT64___UNUSED5
2117+ buf->__unused5 = 0;
2118+#endif
2119+ }
2120+ break;
2121+
2122+ /* If struct stat64 is different from struct stat then
2123+ _STAT_VER_KERNEL does not make sense. */
2124+ case _STAT_VER_KERNEL:
2125+ default:
2126+ __set_errno (EINVAL);
2127+ return -1;
2128+ }
2129+
2130+ return 0;
2131+#endif
2132+}
2133+
2134+int
2135+__xstat32_conv (int vers, void *kbuf_, struct stat *buf)
2136+{
2137+ struct kernel_stat64 *kbuf = kbuf_;
2138+
2139+ switch (vers)
2140+ {
2141+ case _STAT_VER_LINUX:
2142+ {
2143+ /* Convert current kernel version of `struct stat64' to
2144+ `struct stat'. */
2145+ buf->st_dev = kbuf->st_dev;
2146+#ifdef _HAVE_STAT___PAD1
2147+ buf->__pad1 = 0;
2148+#endif
2149+#ifdef _HAVE_STAT64___ST_INO
2150+# if __ASSUME_ST_INO_64_BIT == 0
2151+ if (kbuf->st_ino == 0)
2152+ buf->st_ino = kbuf->__st_ino;
2153+ else
2154+# endif
2155+ {
2156+ buf->st_ino = kbuf->st_ino;
2157+ if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino)
2158+ && buf->st_ino != kbuf->st_ino)
2159+ {
2160+ __set_errno (EOVERFLOW);
2161+ return -1;
2162+ }
2163+ }
2164+#else
2165+ buf->st_ino = kbuf->st_ino;
2166+ if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino)
2167+ && buf->st_ino != kbuf->st_ino)
2168+ {
2169+ __set_errno (EOVERFLOW);
2170+ return -1;
2171+ }
2172+#endif
2173+ buf->st_mode = kbuf->st_mode;
2174+ buf->st_nlink = kbuf->st_nlink;
2175+ buf->st_uid = kbuf->st_uid;
2176+ buf->st_gid = kbuf->st_gid;
2177+ buf->st_rdev = kbuf->st_rdev;
2178+#ifdef _HAVE_STAT___PAD2
2179+ buf->__pad2 = 0;
2180+#endif
2181+ buf->st_size = kbuf->st_size;
2182+ /* Check for overflow. */
2183+ if (sizeof (buf->st_size) != sizeof (kbuf->st_size)
2184+ && buf->st_size != kbuf->st_size)
2185+ {
2186+ __set_errno (EOVERFLOW);
2187+ return -1;
2188+ }
2189+ buf->st_blksize = kbuf->st_blksize;
2190+ buf->st_blocks = kbuf->st_blocks;
2191+ /* Check for overflow. */
2192+ if (sizeof (buf->st_blocks) != sizeof (kbuf->st_blocks)
2193+ && buf->st_blocks != kbuf->st_blocks)
2194+ {
2195+ __set_errno (EOVERFLOW);
2196+ return -1;
2197+ }
2198+#ifdef _HAVE_STAT_NSEC
2199+ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
2200+ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
2201+ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
2202+ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
2203+ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
2204+ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
2205+#else
2206+ buf->st_atime = kbuf->st_atime;
2207+ buf->st_mtime = kbuf->st_mtime;
2208+ buf->st_ctime = kbuf->st_ctime;
2209+#endif
2210+
2211+#ifdef _HAVE_STAT___UNUSED1
2212+ buf->__unused1 = 0;
2213+#endif
2214+#ifdef _HAVE_STAT___UNUSED2
2215+ buf->__unused2 = 0;
2216+#endif
2217+#ifdef _HAVE_STAT___UNUSED3
2218+ buf->__unused3 = 0;
2219+#endif
2220+#ifdef _HAVE_STAT___UNUSED4
2221+ buf->__unused4 = 0;
2222+#endif
2223+#ifdef _HAVE_STAT___UNUSED5
2224+ buf->__unused5 = 0;
2225+#endif
2226+ }
2227+ break;
2228+
2229+ /* If struct stat64 is different from struct stat then
2230+ _STAT_VER_KERNEL does not make sense. */
2231+ case _STAT_VER_KERNEL:
2232+ default:
2233+ __set_errno (EINVAL);
2234+ return -1;
2235+ }
2236+
2237+ return 0;
2238+}
2239+
2240+int
2241+__xstat64_kernel64_conv (int vers, void *kbuf_, struct stat64 *buf)
2242+{
2243+ struct kernel_stat64 *kbuf = kbuf_;
2244+
2245+ switch (vers)
2246+ {
2247+ case _STAT_VER_LINUX:
2248+ {
2249+ /* Convert current kernel version of `struct stat64' to
2250+ user version of `struct stat64'. */
2251+ buf->st_dev = kbuf->st_dev;
2252+#ifdef _HAVE_STAT64___PAD1
2253+ buf->__pad1 = kbuf->__pad1;
2254+#endif
2255+#ifdef _HAVE_STAT64___ST_INO
2256+ buf->__st_ino = kbuf->__st_ino;
2257+#endif
2258+ buf->st_mode = kbuf->st_mode;
2259+ buf->st_nlink = kbuf->st_nlink;
2260+ buf->st_uid = kbuf->st_uid;
2261+ buf->st_gid = kbuf->st_gid;
2262+ buf->st_rdev = kbuf->st_rdev;
2263+#ifdef _HAVE_STAT64___PAD2
2264+ buf->__pad2 = kbuf->__pad2;
2265+#endif
2266+ buf->st_size = kbuf->st_size;
2267+ buf->st_blksize = kbuf->st_blksize;
2268+ buf->st_blocks = kbuf->st_blocks;
2269+#ifdef _HAVE_STAT64_NSEC
2270+ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
2271+ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
2272+ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
2273+ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
2274+ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
2275+ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
2276+#else
2277+ buf->st_atime = kbuf->st_atime;
2278+ buf->st_mtime = kbuf->st_mtime;
2279+ buf->st_ctime = kbuf->st_ctime;
2280+#endif
2281+ buf->st_ino = kbuf->st_ino;
2282+ }
2283+ break;
2284+
2285+ case _STAT_VER_KERNEL:
2286+ default:
2287+ __set_errno (EINVAL);
2288+ return -1;
2289+ }
2290+
2291+ return 0;
2292+}
2293+
2294+#endif
2295Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h
2296===================================================================
2297--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2298+++ glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h 2005-03-22 11:53:10.058701689 -0500
2299@@ -0,0 +1,28 @@
2300+/* Convert between the kernel's `struct stat' format, and libc's.
2301+ Copyright (C) 1991,1995-1997,2000,2002,2003 Free Software Foundation, Inc.
2302+ This file is part of the GNU C Library.
2303+
2304+ The GNU C Library is free software; you can redistribute it and/or
2305+ modify it under the terms of the GNU Lesser General Public
2306+ License as published by the Free Software Foundation; either
2307+ version 2.1 of the License, or (at your option) any later version.
2308+
2309+ The GNU C Library is distributed in the hope that it will be useful,
2310+ but WITHOUT ANY WARRANTY; without even the implied warranty of
2311+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2312+ Lesser General Public License for more details.
2313+
2314+ You should have received a copy of the GNU Lesser General Public
2315+ License along with the GNU C Library; if not, write to the Free
2316+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2317+ 02111-1307 USA. */
2318+
2319+#include "kernel-features.h"
2320+
2321+#ifndef STAT_IS_KERNEL_STAT
2322+extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf);
2323+extern int __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf);
2324+#endif
2325+extern int __xstat32_conv (int vers, void *kbuf, struct stat *buf);
2326+extern int __xstat64_kernel64_conv (int vers, struct kernel_stat64 *kbuf,
2327+ struct stat64 *buf);
2328Index: glibc/sysdeps/arm/eabi/fpu/fraiseexcpt.c
2329===================================================================
2330--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2331+++ glibc/sysdeps/arm/eabi/fpu/fraiseexcpt.c 2005-03-22 12:34:55.522464918 -0500
2332@@ -0,0 +1,67 @@
2333+/* Raise given exceptions.
2334+ Copyright (C) 2004 Free Software Foundation, Inc.
2335+ This file is part of the GNU C Library.
2336+
2337+ The GNU C Library is free software; you can redistribute it and/or
2338+ modify it under the terms of the GNU Lesser General Public
2339+ License as published by the Free Software Foundation; either
2340+ version 2.1 of the License, or (at your option) any later version.
2341+
2342+ The GNU C Library is distributed in the hope that it will be useful,
2343+ but WITHOUT ANY WARRANTY; without even the implied warranty of
2344+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2345+ Lesser General Public License for more details.
2346+
2347+ You should have received a copy of the GNU Lesser General Public
2348+ License along with the GNU C Library; if not, write to the Free
2349+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2350+ 02111-1307 USA. */
2351+
2352+#include <fpu_control.h>
2353+#include <fenv.h>
2354+#include <float.h>
2355+
2356+int
2357+feraiseexcept (int excepts)
2358+{
2359+ float dummy;
2360+ int fpscr;
2361+
2362+ /* Raise exceptions represented by EXPECTS. But we must raise only
2363+ one signal at a time. It is important that if the overflow/underflow
2364+ exception and the inexact exception are given at the same time,
2365+ the overflow/underflow exception follows the inexact exception. After
2366+ each exception we read from the fpscr, to force the exception to be
2367+ raised immediately. */
2368+
2369+ /* First: invalid exception. */
2370+ if (FE_INVALID & excepts)
2371+ __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr"
2372+ : "=w" (dummy), "=r" (fpscr) : "w" (0.0f), "w" (0.0f) );
2373+
2374+ /* Next: division by zero. */
2375+ if (FE_DIVBYZERO & excepts)
2376+ __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr"
2377+ : "=w" (dummy), "=r" (fpscr) : "w" (1.0f), "w" (0.0f) );
2378+
2379+ /* Next: overflow. */
2380+ if (FE_OVERFLOW & excepts)
2381+ /* There's no way to raise overflow without also raising inexact. */
2382+ __asm__ __volatile__ ("fadds %0,%2,%3\n\tfmrx %1, fpscr"
2383+ : "=w" (dummy), "=r" (fpscr) : "w" (FLT_MAX), "w" (1.0e32f) );
2384+
2385+ /* Next: underflow. */
2386+ if (FE_UNDERFLOW & excepts)
2387+ __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr"
2388+ : "=w" (dummy), "=r" (fpscr) : "w" (FLT_MIN), "w" (3.0f) );
2389+
2390+ /* Last: inexact. */
2391+ if (FE_INEXACT & excepts)
2392+ __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr"
2393+ : "=w" (dummy), "=r" (fpscr) : "w" (2.0f), "w" (3.0f) );
2394+
2395+ /* Success. */
2396+ return 0;
2397+}
2398+
2399+libm_hidden_def (feraiseexcept)
2400Index: glibc/sysdeps/arm/eabi/fpu/feholdexcpt.c
2401===================================================================
2402--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2403+++ glibc/sysdeps/arm/eabi/fpu/feholdexcpt.c 2005-03-22 12:34:55.521465156 -0500
2404@@ -0,0 +1,41 @@
2405+/* Store current floating-point environment and clear exceptions.
2406+ Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
2407+ This file is part of the GNU C Library.
2408+
2409+ The GNU C Library is free software; you can redistribute it and/or
2410+ modify it under the terms of the GNU Lesser General Public
2411+ License as published by the Free Software Foundation; either
2412+ version 2.1 of the License, or (at your option) any later version.
2413+
2414+ The GNU C Library is distributed in the hope that it will be useful,
2415+ but WITHOUT ANY WARRANTY; without even the implied warranty of
2416+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2417+ Lesser General Public License for more details.
2418+
2419+ You should have received a copy of the GNU Lesser General Public
2420+ License along with the GNU C Library; if not, write to the Free
2421+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2422+ 02111-1307 USA. */
2423+
2424+#include <fenv.h>
2425+#include <fpu_control.h>
2426+
2427+int
2428+feholdexcept (fenv_t *envp)
2429+{
2430+ unsigned long int temp;
2431+
2432+ /* Store the environment. */
2433+ _FPU_GETCW(temp);
2434+ envp->__cw = temp;
2435+
2436+ /* Now set all exceptions to non-stop. */
2437+ temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
2438+
2439+ /* And clear all exception flags. */
2440+ temp &= ~FE_ALL_EXCEPT;
2441+
2442+ _FPU_SETCW(temp);
2443+
2444+ return 0;
2445+}
2446
diff --git a/meta/packages/glibc/glibc-cvs/eabi-patch-3 b/meta/packages/glibc/glibc-cvs/eabi-patch-3
new file mode 100644
index 0000000000..9bd549ec2b
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/eabi-patch-3
@@ -0,0 +1,430 @@
1From libc-alpha-return-17228-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Tue Mar 22 16:08:31 2005
2Return-Path: <libc-alpha-return-17228-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
3Delivered-To: listarch-libc-alpha at sources dot redhat dot com
4Received: (qmail 20972 invoked by alias); 22 Mar 2005 16:08:29 -0000
5Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
6Precedence: bulk
7List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
8List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
9List-Post: <mailto:libc-alpha at sources dot redhat dot com>
10List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
11Sender: libc-alpha-owner at sources dot redhat dot com
12Delivered-To: mailing list libc-alpha at sources dot redhat dot com
13Received: (qmail 20165 invoked from network); 22 Mar 2005 16:08:06 -0000
14Received: from unknown (HELO nevyn.them.org) (66.93.172.17)
15 by sourceware dot org with SMTP; 22 Mar 2005 16:08:06 -0000
16Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
17 id 1DDlvX-0006tE-Bh; Tue, 22 Mar 2005 11:08:19 -0500
18Date: Tue, 22 Mar 2005 11:08:19 -0500
19From: Daniel Jacobowitz <drow at false dot org>
20To: libc-alpha at sources dot redhat dot com
21Cc: Phil Blundell <pb at reciva dot com>
22Subject: ARM EABI support - changes to existing ARM code
23Message-ID: <20050322160819.GA26216@nevyn.them.org>
24Mail-Followup-To: libc-alpha at sources dot redhat dot com,
25 Phil Blundell <pb at reciva dot com>
26Mime-Version: 1.0
27Content-Type: text/plain; charset=us-ascii
28Content-Disposition: inline
29User-Agent: Mutt/1.5.6+20040907i
30
31This patch updates the common ARM files for EABI support. The changes are:
32 - Old ARM ABI targets always use FPA (mixed-endian) byte ordering. EABI
33 targets always use VFP byte ordering for doubles, which is standard
34 ieee754 layout. Removing the arm-specific ieee754.h doesn't break FPA;
35 it was a specialized version of the common header, which handles FPA
36 but also handles VFP.
37 - The stack needs to be aligned to eight bytes instead of just four,
38 including in mmap2 and when shifting _dl_argv.
39 - We need some markers around _start to indicate end-of-stack for the
40 unwinder - ARM EABI does not use either SJLJ exceptions or DWARF-2
41 exceptions. It uses a table based format which seems to be not
42 quite completely unlike DWARF-2.
43
44Do these changes look OK?
45
46--
47Daniel Jacobowitz
48CodeSourcery, LLC
49
502005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
51
52 * sysdeps/arm/bits/endian.h (__FLOAT_WORD_ORDER): Handle VFP.
53 * sysdeps/arm/gmp-mparam.h (IEEE_DOUBLE_BIG_ENDIAN,
54 IEEE_DOUBLE_MIXED_ENDIAN): Handle big-endian and VFP.
55 * sysdeps/arm/ieee754.h: Remove.
56
57 * sysdeps/arm/dl-machine.h (_dl_start_user): Align the stack to eight
58 bytes even when shifting arguments.
59 * sysdeps/arm/dl-sysdep.h: New file.
60
61 * sysdeps/arm/elf/start.S (_start): If not using SJLJ exceptions, include
62 EABI unwind markers to terminate unwinding.
63
64 * sysdeps/unix/sysv/linux/arm/mmap64.S: Handle big-endian byte ordering
65 and EABI stack layout.
66
67Index: glibc/sysdeps/arm/bits/endian.h
68===================================================================
69--- glibc.orig/sysdeps/arm/bits/endian.h 2005-03-22 10:26:27.092978200 -0500
70+++ glibc/sysdeps/arm/bits/endian.h 2005-03-22 10:27:39.457490903 -0500
71@@ -9,4 +9,9 @@
72 #else
73 #define __BYTE_ORDER __LITTLE_ENDIAN
74 #endif
75+
76+#ifdef __VFP_FP__
77+#define __FLOAT_WORD_ORDER __BYTE_ORDER
78+#else
79 #define __FLOAT_WORD_ORDER __BIG_ENDIAN
80+#endif
81Index: glibc/sysdeps/arm/dl-machine.h
82===================================================================
83--- glibc.orig/sysdeps/arm/dl-machine.h 2005-03-22 10:26:27.092978200 -0500
84+++ glibc/sysdeps/arm/dl-machine.h 2005-03-22 10:27:39.457490903 -0500
85@@ -156,22 +156,19 @@ _dl_start_user:\n\
86 add sl, pc, sl\n\
87 .L_GOT_GOT:\n\
88 ldr r4, [sl, r4]\n\
89- @ get the original arg count\n\
90- ldr r1, [sp]\n\
91 @ save the entry point in another register\n\
92 mov r6, r0\n\
93- @ adjust the stack pointer to skip the extra args\n\
94- add sp, sp, r4, lsl #2\n\
95- @ subtract _dl_skip_args from original arg count\n\
96- sub r1, r1, r4\n\
97+ @ get the original arg count\n\
98+ ldr r1, [sp]\n\
99 @ get the argv address\n\
100 add r2, sp, #4\n\
101- @ store the new argc in the new stack location\n\
102- str r1, [sp]\n\
103+ @ Fix up the stack if necessary.\n\
104+ cmp r4, #0\n\
105+ bne .L_fixup_stack\n\
106+.L_done_fixup:\n\
107 @ compute envp\n\
108 add r3, r2, r1, lsl #2\n\
109 add r3, r3, #4\n\
110-\n\
111 @ now we call _dl_init\n\
112 ldr r0, .L_LOADED\n\
113 ldr r0, [sl, r0]\n\
114@@ -182,12 +179,45 @@ _dl_start_user:\n\
115 add r0, sl, r0\n\
116 @ jump to the user_s entry point\n\
117 " BX(r6) "\n\
118+\n\
119+ @ iWMMXt and EABI targets require the stack to be eight byte\n\
120+ @ aligned - shuffle arguments etc.\n\
121+.L_fixup_stack:\n\
122+ @ subtract _dl_skip_args from original arg count\n\
123+ sub r1, r1, r4\n\
124+ @ store the new argc in the new stack location\n\
125+ str r1, [sp]\n\
126+ @ find the first unskipped argument\n\
127+ mov r3, r2\n\
128+ add r4, r2, r4, lsl #2\n\
129+ @ shuffle argv down\n\
130+1: ldr r5, [r4], #4\n\
131+ str r5, [r3], #4\n\
132+ cmp r5, #0\n\
133+ bne 1b\n\
134+ @ shuffle envp down\n\
135+1: ldr r5, [r4], #4\n\
136+ str r5, [r3], #4\n\
137+ cmp r5, #0\n\
138+ bne 1b\n\
139+ @ shuffle auxv down\n\
140+1: ldmia r4!, {r0, r5}\n\
141+ stmia r3!, {r0, r5}\n\
142+ cmp r0, #0\n\
143+ bne 1b\n\
144+ @ Update _dl_argv\n\
145+ ldr r3, .L_ARGV\n\
146+ str r2, [sl, r3]\n\
147+ b .L_done_fixup\n\
148+\n\
149 .L_GET_GOT:\n\
150 .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n\
151 .L_SKIP_ARGS:\n\
152 .word _dl_skip_args(GOTOFF)\n\
153 .L_FINI_PROC:\n\
154 .word _dl_fini(GOTOFF)\n\
155+.L_ARGV:\n\
156+ .word _dl_argv(GOTOFF)\n\
157 .L_LOADED:\n\
158 .word _rtld_local(GOTOFF)\n\
159 .previous\n\
160Index: glibc/sysdeps/arm/dl-sysdep.h
161===================================================================
162--- /dev/null 1970-01-01 00:00:00.000000000 +0000
163+++ glibc/sysdeps/arm/dl-sysdep.h 2005-03-22 10:27:39.458490675 -0500
164@@ -0,0 +1,41 @@
165+/* System-specific settings for dynamic linker code. ARM version.
166+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
167+ This file is part of the GNU C Library.
168+
169+ The GNU C Library is free software; you can redistribute it and/or
170+ modify it under the terms of the GNU Lesser General Public
171+ License as published by the Free Software Foundation; either
172+ version 2.1 of the License, or (at your option) any later version.
173+
174+ The GNU C Library is distributed in the hope that it will be useful,
175+ but WITHOUT ANY WARRANTY; without even the implied warranty of
176+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
177+ Lesser General Public License for more details.
178+
179+ You should have received a copy of the GNU Lesser General Public
180+ License along with the GNU C Library; if not, write to the Free
181+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
182+ 02111-1307 USA. */
183+
184+#ifndef _DL_SYSDEP_H
185+#define _DL_SYSDEP_H 1
186+
187+/* This macro must be defined to either 0 or 1.
188+
189+ If 1, then an errno global variable hidden in ld.so will work right with
190+ all the errno-using libc code compiled for ld.so, and there is never a
191+ need to share the errno location with libc. This is appropriate only if
192+ all the libc functions that ld.so uses are called without PLT and always
193+ get the versions linked into ld.so rather than the libc ones. */
194+
195+#ifdef IS_IN_rtld
196+# define RTLD_PRIVATE_ERRNO 1
197+#else
198+# define RTLD_PRIVATE_ERRNO 0
199+#endif
200+
201+/* _dl_argv cannot be attribute_relro, because _dl_start_user
202+ might write into it after _dl_start returns. */
203+#define DL_ARGV_NOT_RELRO 1
204+
205+#endif /* dl-sysdep.h */
206Index: glibc/sysdeps/arm/elf/start.S
207===================================================================
208--- glibc.orig/sysdeps/arm/elf/start.S 2005-03-22 10:26:27.096977288 -0500
209+++ glibc/sysdeps/arm/elf/start.S 2005-03-22 11:00:35.178522707 -0500
210@@ -1,5 +1,6 @@
211 /* Startup code for ARM & ELF
212- Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
213+ Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2005
214+ Free Software Foundation, Inc.
215 This file is part of the GNU C Library.
216
217 The GNU C Library is free software; you can redistribute it and/or
218@@ -62,6 +63,10 @@
219 .globl _start
220 .type _start,#function
221 _start:
222+#if !defined(__USING_SJLJ_EXCEPTIONS__)
223+ /* Protect against unhandled exceptions. */
224+ .fnstart
225+#endif
226 /* Fetch address of fini */
227 ldr ip, =__libc_csu_fini
228
229@@ -93,6 +98,11 @@ _start:
230 /* should never get here....*/
231 bl abort
232
233+#if !defined(__USING_SJLJ_EXCEPTIONS__)
234+ .cantunwind
235+ .fnend
236+#endif
237+
238 /* Define a symbol for the first piece of initialized data. */
239 .data
240 .globl __data_start
241Index: glibc/sysdeps/arm/gmp-mparam.h
242===================================================================
243--- glibc.orig/sysdeps/arm/gmp-mparam.h 2005-03-22 10:26:27.092978200 -0500
244+++ glibc/sysdeps/arm/gmp-mparam.h 2005-03-22 11:00:42.795683773 -0500
245@@ -1,6 +1,6 @@
246 /* gmp-mparam.h -- Compiler/machine parameter header file.
247
248-Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
249+Copyright (C) 1991, 1993, 1994, 1995, 2005 Free Software Foundation, Inc.
250
251 This file is part of the GNU MP Library.
252
253@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
254 #define BITS_PER_SHORTINT 16
255 #define BITS_PER_CHAR 8
256
257-#define IEEE_DOUBLE_BIG_ENDIAN 0
258-#define IEEE_DOUBLE_MIXED_ENDIAN 1
259+#if defined(__ARMEB__)
260+# define IEEE_DOUBLE_MIXED_ENDIAN 0
261+# define IEEE_DOUBLE_BIG_ENDIAN 1
262+#elif defined(__VFP_FP__)
263+# define IEEE_DOUBLE_MIXED_ENDIAN 0
264+# define IEEE_DOUBLE_BIG_ENDIAN 0
265+#else
266+# define IEEE_DOUBLE_BIG_ENDIAN 0
267+# define IEEE_DOUBLE_MIXED_ENDIAN 1
268+#endif
269Index: glibc/sysdeps/arm/ieee754.h
270===================================================================
271--- glibc.orig/sysdeps/arm/ieee754.h 2005-03-22 10:26:27.092978200 -0500
272+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
273@@ -1,115 +0,0 @@
274-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
275- This file is part of the GNU C Library.
276-
277- The GNU C Library is free software; you can redistribute it and/or
278- modify it under the terms of the GNU Lesser General Public
279- License as published by the Free Software Foundation; either
280- version 2.1 of the License, or (at your option) any later version.
281-
282- The GNU C Library is distributed in the hope that it will be useful,
283- but WITHOUT ANY WARRANTY; without even the implied warranty of
284- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
285- Lesser General Public License for more details.
286-
287- You should have received a copy of the GNU Lesser General Public
288- License along with the GNU C Library; if not, write to the Free
289- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
290- 02111-1307 USA. */
291-
292-#ifndef _IEEE754_H
293-
294-#define _IEEE754_H 1
295-#include <features.h>
296-
297-#include <endian.h>
298-
299-__BEGIN_DECLS
300-
301-union ieee754_float
302- {
303- float f;
304-
305- /* This is the IEEE 754 single-precision format. */
306- struct
307- {
308- unsigned int mantissa:23;
309- unsigned int exponent:8;
310- unsigned int negative:1;
311- } ieee;
312-
313- /* This format makes it easier to see if a NaN is a signalling NaN. */
314- struct
315- {
316- unsigned int mantissa:22;
317- unsigned int quiet_nan:1;
318- unsigned int exponent:8;
319- unsigned int negative:1;
320- } ieee_nan;
321- };
322-
323-#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
324-
325-
326-union ieee754_double
327- {
328- double d;
329-
330- /* This is the IEEE 754 double-precision format. */
331- struct
332- {
333- unsigned int mantissa0:20;
334- unsigned int exponent:11;
335- unsigned int negative:1;
336- unsigned int mantissa1:32;
337- } ieee;
338-
339- /* This format makes it easier to see if a NaN is a signalling NaN. */
340- struct
341- {
342- unsigned int mantissa0:19;
343- unsigned int quiet_nan:1;
344- unsigned int exponent:11;
345- unsigned int negative:1;
346- unsigned int mantissa1:32;
347- } ieee_nan;
348- };
349-
350-#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
351-
352-
353-/* The following two structures are correct for `new' floating point systems but
354- wrong for the old FPPC. The only solution seems to be to avoid their use on
355- old hardware. */
356-
357-union ieee854_long_double
358- {
359- long double d;
360-
361- /* This is the IEEE 854 double-extended-precision format. */
362- struct
363- {
364- unsigned int exponent:15;
365- unsigned int empty:16;
366- unsigned int negative:1;
367- unsigned int mantissa1:32;
368- unsigned int mantissa0:32;
369- } ieee;
370-
371- /* This is for NaNs in the IEEE 854 double-extended-precision format. */
372- struct
373- {
374- unsigned int exponent:15;
375- unsigned int empty:16;
376- unsigned int negative:1;
377- unsigned int mantissa1:32;
378- unsigned int mantissa0:30;
379- unsigned int quiet_nan:1;
380- unsigned int one:1;
381- } ieee_nan;
382- };
383-
384-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
385-
386-__END_DECLS
387-
388-#endif /* ieee754.h */
389Index: glibc/sysdeps/unix/sysv/linux/arm/mmap64.S
390===================================================================
391--- glibc.orig/sysdeps/unix/sysv/linux/arm/mmap64.S 2005-03-22 10:26:27.097977060 -0500
392+++ glibc/sysdeps/unix/sysv/linux/arm/mmap64.S 2005-03-22 11:00:53.051209928 -0500
393@@ -1,4 +1,4 @@
394-/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
395+/* Copyright (C) 2000, 2003, 2005 Free Software Foundation, Inc.
396 This file is part of the GNU C Library.
397
398 The GNU C Library is free software; you can redistribute it and/or
399@@ -23,13 +23,28 @@
400
401 #include "kernel-features.h"
402
403+#ifdef __ARM_EABI__
404+# define INITIAL_OFFSET 8
405+#else
406+# define INITIAL_OFFSET 4
407+#endif
408+
409+#ifdef __ARMEB__
410+# define LOW_OFFSET INITIAL_OFFSET + 4
411+/* The initial + 4 is for the stack postdecrement. */
412+# define HIGH_OFFSET 4 + INITIAL_OFFSET + 0
413+#else
414+# define LOW_OFFSET INITIAL_OFFSET + 0
415+# define HIGH_OFFSET 4 + INITIAL_OFFSET + 4
416+#endif
417+
418 /* The mmap2 system call takes six arguments, all in registers. */
419 .text
420 ENTRY (__mmap64)
421 #ifdef __NR_mmap2
422- ldr ip, [sp, $4] @ offset low part
423+ ldr ip, [sp, $LOW_OFFSET] @ offset low part
424 str r5, [sp, #-4]!
425- ldr r5, [sp, $12] @ offset high part
426+ ldr r5, [sp, $HIGH_OFFSET] @ offset high part
427 str r4, [sp, #-4]!
428 movs r4, ip, lsl $20 @ check that offset is page-aligned
429 mov ip, ip, lsr $12
430
diff --git a/meta/packages/glibc/glibc-cvs/eabi-patch-4 b/meta/packages/glibc/glibc-cvs/eabi-patch-4
new file mode 100644
index 0000000000..45166ef960
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/eabi-patch-4
@@ -0,0 +1,64 @@
1From libc-alpha-return-17230-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Tue Mar 22 16:25:01 2005
2Return-Path: <libc-alpha-return-17230-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
3Delivered-To: listarch-libc-alpha at sources dot redhat dot com
4Received: (qmail 7764 invoked by alias); 22 Mar 2005 16:24:20 -0000
5Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
6Precedence: bulk
7List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
8List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
9List-Post: <mailto:libc-alpha at sources dot redhat dot com>
10List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
11Sender: libc-alpha-owner at sources dot redhat dot com
12Delivered-To: mailing list libc-alpha at sources dot redhat dot com
13Received: (qmail 7316 invoked from network); 22 Mar 2005 16:23:45 -0000
14Received: from unknown (HELO nevyn.them.org) (66.93.172.17)
15 by sourceware dot org with SMTP; 22 Mar 2005 16:23:45 -0000
16Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
17 id 1DDmAg-000798-P7
18 for <libc-alpha at sources dot redhat dot com>; Tue, 22 Mar 2005 11:23:58 -0500
19Date: Tue, 22 Mar 2005 11:23:58 -0500
20From: Daniel Jacobowitz <drow at false dot org>
21To: libc-alpha at sources dot redhat dot com
22Subject: Re: Define PT_ARM_EXIDX
23Message-ID: <20050322162358.GA27424@nevyn.them.org>
24Mail-Followup-To: libc-alpha at sources dot redhat dot com
25References: <20050322155140.GA25312@nevyn.them.org>
26Mime-Version: 1.0
27Content-Type: text/plain; charset=us-ascii
28Content-Disposition: inline
29In-Reply-To: <20050322155140 dot GA25312 at nevyn dot them dot org>
30User-Agent: Mutt/1.5.6+20040907i
31
32On Tue, Mar 22, 2005 at 10:51:40AM -0500, Daniel Jacobowitz wrote:
33> The ARM EABI uses a program header to locate exception tables for shared
34> objects, just like PT_GNU_EH_FRAME. But the format is a little different,
35> and the header is above PT_LOPROC because it was assigned by a processor
36> vendor. This just adds the constant to elf/elf.h.
37
38Oops, Ulrich pointed out that I put the constant in the wrong place.
39
40--
41Daniel Jacobowitz
42CodeSourcery, LLC
43
442005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
45
46 * elf/elf.h (PT_ARM_EXIDX): Define.
47
48Index: glibc/elf/elf.h
49===================================================================
50--- glibc.orig/elf/elf.h 2005-03-22 11:21:34.961464117 -0500
51+++ glibc/elf/elf.h 2005-03-22 11:22:49.872172922 -0500
52@@ -2138,7 +2138,11 @@ typedef Elf32_Addr Elf32_Conflict;
53 #define PF_ARM_SB 0x10000000 /* Segment contains the location
54 addressed by the static base */
55
56+/* Processor specific values for the Phdr p_type field. */
57+#define PT_ARM_EXIDX 0x70000001 /* .ARM.exidx segment */
58+
59 /* ARM relocs. */
60+
61 #define R_ARM_NONE 0 /* No reloc */
62 #define R_ARM_PC24 1 /* PC relative 26 bit branch */
63 #define R_ARM_ABS32 2 /* Direct 32 bit */
64
diff --git a/meta/packages/glibc/glibc-cvs/etc/ld.so.conf b/meta/packages/glibc/glibc-cvs/etc/ld.so.conf
new file mode 100644
index 0000000000..3f9b41aabb
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/etc/ld.so.conf
@@ -0,0 +1,3 @@
1/usr/local/lib
2/opt/QtPalmtop/lib
3
diff --git a/meta/packages/glibc/glibc-cvs/glibc-fp-byteorder.patch b/meta/packages/glibc/glibc-cvs/glibc-fp-byteorder.patch
new file mode 100644
index 0000000000..f20432ea8b
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/glibc-fp-byteorder.patch
@@ -0,0 +1,203 @@
1Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html
2Author: addsub@eyou.com
3Target: ARM
4
5Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c
6and makes printf("%f", 1.0) work.
7
8Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html :
9 It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point
10 is broken' on my big-endian hardfloat FPA ARM platform. ...
11 It's definitely needed for hardfloat. So I'd think it's needed for
12 big-endian systems in any case, and for VFP on little-endian systems
13 too. Someone would have to verify that though.
14
15Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html
16 I just had a look at glibc-20040830, and [this patch] is still needed and useful
17 for this version. glibc-20040830 out-of-the-box still contains the
18 following wrong assumptions:
19 - sysdeps/arm/bits/endian.h: float word order is big endian (which it is
20 not on vfp systems)
21 - sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they
22 are not on big endian systems, neither on vfp systems)
23 - sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order
24 (which they are not on big endian systems)
25 [This patch] seems the right solution for all of these issues.
26
27Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html :
28 It's even needed for glibc CVS, AFAICS.
29 The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h
30 (currently at version 1.4) is only needed for proper VFP operation.
31 But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk
32 that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed
33 for proper operation of *any* FP model on big endian ARM.
34
35See also discussion in followups to
36http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html)
37
38Message-ID: <276985760.37584@eyou.com>
39Received: from unknown (HELO eyou.com) (172.16.2.2)
40 by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800
41Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800
42Date: 17 Feb 2004 10:42:38 +0800
43Message-ID: <20040217104238.8237.qmail@eyou.com>
44From: "add" <addsub@eyou.com>
45To: dank@kegel.com
46Reply-To: "add" <addsub@eyou.com>
47Subject: Re:&nbsp;&nbsp;&nbsp;problem&nbsp;while&nbsp;building&nbsp;arm&nbsp;vfp&nbsp;softfloat&nbsp;gcc&nbsp;`
48
49Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat
50toolchain can printf("%f\n",1.0). So you may have a try of this
51
52
53diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h
54--- glibc.old/sysdeps/arm/bits/endian.h 1999-04-12 11:59:13.000000000 -0400
55+++ glibc.new/sysdeps/arm/bits/endian.h 2004-02-12 09:15:13.000000000 -0500
56@@ -9,4 +9,9 @@
57 #else
58 #define __BYTE_ORDER __LITTLE_ENDIAN
59 #endif
60+
61+#ifdef __VFP_FP__
62+#define __FLOAT_WORD_ORDER __BYTE_ORDER
63+#else
64 #define __FLOAT_WORD_ORDER __BIG_ENDIAN
65+#endif
66diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h
67--- glibc.old/sysdeps/arm/gmp-mparam.h 2001-07-07 15:21:19.000000000 -0400
68+++ glibc.new/sysdeps/arm/gmp-mparam.h 2004-02-12 09:15:13.000000000 -0500
69@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
70 #define BITS_PER_SHORTINT 16
71 #define BITS_PER_CHAR 8
72
73-#define IEEE_DOUBLE_BIG_ENDIAN 0
74-#define IEEE_DOUBLE_MIXED_ENDIAN 1
75+#if defined(__ARMEB__)
76+# define IEEE_DOUBLE_MIXED_ENDIAN 0
77+# define IEEE_DOUBLE_BIG_ENDIAN 1
78+#elif defined(__VFP_FP__)
79+# define IEEE_DOUBLE_MIXED_ENDIAN 0
80+# define IEEE_DOUBLE_BIG_ENDIAN 0
81+#else
82+# define IEEE_DOUBLE_BIG_ENDIAN 0
83+# define IEEE_DOUBLE_MIXED_ENDIAN 1
84+#endif
85diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h
86--- glibc.old/sysdeps/arm/ieee754.h 2001-07-07 15:21:19.000000000 -0400
87+++ glibc.new/sysdeps/arm/ieee754.h 1969-12-31 19:00:00.000000000 -0500
88@@ -1,115 +0,0 @@
89-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
90- This file is part of the GNU C Library.
91-
92- The GNU C Library is free software; you can redistribute it and/or
93- modify it under the terms of the GNU Lesser General Public
94- License as published by the Free Software Foundation; either
95- version 2.1 of the License, or (at your option) any later version.
96-
97- The GNU C Library is distributed in the hope that it will be useful,
98- but WITHOUT ANY WARRANTY; without even the implied warranty of
99- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
100- Lesser General Public License for more details.
101-
102- You should have received a copy of the GNU Lesser General Public
103- License along with the GNU C Library; if not, write to the Free
104- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
105- 02111-1307 USA. */
106-
107-#ifndef _IEEE754_H
108-
109-#define _IEEE754_H 1
110-#include <features.h>
111-
112-#include <endian.h>
113-
114-__BEGIN_DECLS
115-
116-union ieee754_float
117- {
118- float f;
119-
120- /* This is the IEEE 754 single-precision format. */
121- struct
122- {
123- unsigned int mantissa:23;
124- unsigned int exponent:8;
125- unsigned int negative:1;
126- } ieee;
127-
128- /* This format makes it easier to see if a NaN is a signalling NaN. */
129- struct
130- {
131- unsigned int mantissa:22;
132- unsigned int quiet_nan:1;
133- unsigned int exponent:8;
134- unsigned int negative:1;
135- } ieee_nan;
136- };
137-
138-#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
139-
140-
141-union ieee754_double
142- {
143- double d;
144-
145- /* This is the IEEE 754 double-precision format. */
146- struct
147- {
148- unsigned int mantissa0:20;
149- unsigned int exponent:11;
150- unsigned int negative:1;
151- unsigned int mantissa1:32;
152- } ieee;
153-
154- /* This format makes it easier to see if a NaN is a signalling NaN. */
155- struct
156- {
157- unsigned int mantissa0:19;
158- unsigned int quiet_nan:1;
159- unsigned int exponent:11;
160- unsigned int negative:1;
161- unsigned int mantissa1:32;
162- } ieee_nan;
163- };
164-
165-#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
166-
167-
168-/* The following two structures are correct for `new' floating point systems but
169- wrong for the old FPPC. The only solution seems to be to avoid their use on
170- old hardware. */
171-
172-union ieee854_long_double
173- {
174- long double d;
175-
176- /* This is the IEEE 854 double-extended-precision format. */
177- struct
178- {
179- unsigned int exponent:15;
180- unsigned int empty:16;
181- unsigned int negative:1;
182- unsigned int mantissa1:32;
183- unsigned int mantissa0:32;
184- } ieee;
185-
186- /* This is for NaNs in the IEEE 854 double-extended-precision format. */
187- struct
188- {
189- unsigned int exponent:15;
190- unsigned int empty:16;
191- unsigned int negative:1;
192- unsigned int mantissa1:32;
193- unsigned int mantissa0:30;
194- unsigned int quiet_nan:1;
195- unsigned int one:1;
196- } ieee_nan;
197- };
198-
199-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
200-
201-__END_DECLS
202-
203-#endif /* ieee754.h */
diff --git a/meta/packages/glibc/glibc-cvs/ldconfig.patch b/meta/packages/glibc/glibc-cvs/ldconfig.patch
new file mode 100644
index 0000000000..c60b9b1432
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/ldconfig.patch
@@ -0,0 +1,37 @@
1--- elf/ldconfig.c 2003-07-08 23:26:27.000000000 +0900
2+++ elf/ldconfig.c.debian 2003-07-08 23:29:43.000000000 +0900
3@@ -920,26 +920,24 @@
4 {
5 FILE *file = NULL;
6 char *line = NULL;
7- const char *canon;
8+ const char *canon = filename;
9 size_t len = 0;
10+ int file_fd;
11
12 if (opt_chroot)
13 {
14 canon = chroot_canon (opt_chroot, filename);
15- if (canon)
16- file = fopen (canon, "r");
17- else
18+ if (!canon)
19 canon = filename;
20 }
21- else
22- {
23- canon = filename;
24- file = fopen (filename, "r");
25- }
26+
27+ if ((file_fd = open(canon, O_RDONLY | O_EXCL, 0022)) != -1)
28+ file = fdopen (file_fd, "r");
29
30 if (file == NULL)
31 {
32- error (0, errno, _("Can't open configuration file %s"), canon);
33+ if (opt_verbose)
34+ error (0, errno, _("Can't open configuration file %s"), canon);
35 if (canon != filename)
36 free ((char *) canon);
37 return;
diff --git a/meta/packages/glibc/glibc-cvs/ldd.patch b/meta/packages/glibc/glibc-cvs/ldd.patch
new file mode 100644
index 0000000000..01719dbe08
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/ldd.patch
@@ -0,0 +1,38 @@
1--- elf/ldd.bash.in~ Tue Apr 3 21:43:31 2001
2+++ elf/ldd.bash.in Tue Apr 3 21:54:15 2001
3@@ -32,6 +32,7 @@
4 warn=
5 bind_now=
6 verbose=
7+filename_magic_regex="((^|/)lib|.so$)"
8
9 while test $# -gt 0; do
10 case "$1" in
11@@ -123,8 +124,11 @@
12 echo "ldd: ${file}:" $"No such file or directory" >&2
13 result=1
14 elif test -r "$file"; then
15- test -x "$file" || echo 'ldd:' $"\
16-warning: you do not have execution permission for" "\`$file'" >&2
17+ if test ! -x "$file" && eval echo "$file" \
18+ | egrep -v "$filename_magic_regex" > /dev/null; then
19+ echo 'ldd:' $"warning: you do not have execution permission for"\
20+ "\`$file'" >&2
21+ fi
22 RTLD=
23 for rtld in ${RTLDLIST}; do
24 if test -x $rtld; then
25@@ -143,7 +147,12 @@
26 fi
27 case $ret in
28 0)
29- eval $add_env '"$file"' || result=1
30+ if [ ! -x "$file" ] && eval file -L "$file" 2>/dev/null \
31+ | sed 10q | egrep "$file_magic_regex" > /dev/null; then
32+ eval $add_env ${RTLD} '"$file"' || result=1
33+ else
34+ eval $add_env '"$file"' || result=1
35+ fi
36 ;;
37 1)
38 # This can be a non-ELF binary or no binary at all.
diff --git a/meta/packages/glibc/glibc-cvs/ldsocache-varrun.patch b/meta/packages/glibc/glibc-cvs/ldsocache-varrun.patch
new file mode 100644
index 0000000000..9994d4f879
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/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/packages/glibc/glibc-cvs/makeconfig.patch b/meta/packages/glibc/glibc-cvs/makeconfig.patch
new file mode 100644
index 0000000000..4365878e95
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/makeconfig.patch
@@ -0,0 +1,15 @@
1--- Makeconfig~ 2001/09/12 18:49:45 1.265
2+++ Makeconfig 2001/10/07 20:56:17
3@@ -532,10 +532,11 @@
4 $(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
5 $(filter -Wl$(comma)-rpath-link=%,\
6 $(sysdep-LDFLAGS)))))
7+ld_envlib_path = $(shell test x$$LD_LIBRARY_PATH = x || echo -n :$$LD_LIBRARY_PATH)
8 run-program-prefix = $(if $(filter $(notdir $(built-program-file)),\
9 $(tests-static)),, \
10 $(elf-objpfx)$(rtld-installed-name) \
11- --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)))
12+ --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path))$(ld_envlib_path))
13 else
14 run-program-prefix =
15 endif
diff --git a/meta/packages/glibc/glibc-cvs/mips-no-throw.patch b/meta/packages/glibc/glibc-cvs/mips-no-throw.patch
new file mode 100644
index 0000000000..99a316eeac
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/mips-no-throw.patch
@@ -0,0 +1,22 @@
1--- sysdeps/unix/sysv/linux/mips/bits/socket.h.orig 2004-09-15 14:27:06.342572280 +0200
2+++ sysdeps/unix/sysv/linux/mips/bits/socket.h 2004-09-15 14:27:28.162255184 +0200
3@@ -261,7 +261,7 @@
4 # define _EXTERN_INLINE extern __inline
5 # endif
6 _EXTERN_INLINE struct cmsghdr *
7-__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
8+__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)
9 {
10 if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
11 /* The kernel header does this so there may be a reason. */
12--- sysdeps/unix/sysv/linux/mips/sys/tas.h.orig 2004-09-15 14:27:41.809180536 +0200
13+++ sysdeps/unix/sysv/linux/mips/sys/tas.h 2004-09-15 14:27:53.245441960 +0200
14@@ -35,7 +35,7 @@
15 # endif
16
17 _EXTERN_INLINE int
18-_test_and_set (int *p, int v) __THROW
19+_test_and_set (int *p, int v)
20 {
21 int r, t;
22
diff --git a/meta/packages/glibc/glibc-cvs/noinfo.patch b/meta/packages/glibc/glibc-cvs/noinfo.patch
new file mode 100644
index 0000000000..6aa0e64d96
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/noinfo.patch
@@ -0,0 +1,52 @@
1--- glibc-2.3.2/manual/Makefile~noinfo
2+++ glibc-2.3.2/manual/Makefile
3@@ -25,7 +25,7 @@
4 INSTALL_INFO = install-info
5
6 .PHONY: all dvi pdf info html
7-all: dvi
8+all:
9 dvi: libc.dvi
10 pdf: libc.pdf
11
12@@ -41,7 +41,7 @@
13 TEXI2PDF = texi2dvi --pdf
14
15 ifneq ($(strip $(MAKEINFO)),:)
16-all: info
17+all:
18 info: libc.info dir-add.info
19 endif
20
21@@ -176,28 +176,14 @@
22 -rm -f top-menu.texi chapters.texi
23
24 .PHONY: install subdir_install installdirs install-data
25-install-data subdir_install: install
26+install-data subdir_install:
27 ifneq ($(strip $(MAKEINFO)),:)
28 # There are two variants of install-info out there. The GNU version
29 # knows about the INFO-DIR-SECTION tag, the Debian version doesn't.
30 ifneq ($(OLD_DEBIAN_INSTALL_INFO),yes)
31-install: $(inst_infodir)/libc.info dir-add.info
32- @if $(SHELL) -c '$(INSTALL_INFO) --version' >/dev/null 2>&1; then \
33- test -f $(inst_infodir)/dir || $(INSTALL_DATA) dir $(inst_infodir);\
34- $(INSTALL_INFO) --info-dir=$(inst_infodir) $(inst_infodir)/libc.info;\
35- $(INSTALL_INFO) --info-dir=$(inst_infodir) dir-add.info;\
36- else : ; fi
37+install:
38 else
39-install: $(inst_infodir)/libc.info dir-add.info
40- @if $(SHELL) -c '$(INSTALL_INFO) --version' >/dev/null 2>&1; then \
41- test -f $(inst_infodir)/dir || $(INSTALL_DATA) dir $(inst_infodir);\
42- $(INSTALL_INFO) --info-dir=$(inst_infodir) \
43- --section '^GNU Libraries:' 'GNU Libraries:' \
44- $(inst_infodir)/libc.info;\
45- $(INSTALL_INFO) --info-dir=$(inst_infodir) \
46- --section '^GNU C Library functions:' 'GNU C Library functions:' \
47- dir-add.info;\
48- else : ; fi
49+install:
50 endif
51 endif
52 # Catchall implicit rule for other installation targets from the parent.
diff --git a/meta/packages/glibc/glibc-cvs/trampoline.patch b/meta/packages/glibc/glibc-cvs/trampoline.patch
new file mode 100644
index 0000000000..86cfc0a539
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/trampoline.patch
@@ -0,0 +1,560 @@
1From libc-alpha-return-16890-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Wed Jan 19 18:02:53 2005
2Return-Path: <libc-alpha-return-16890-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
3Delivered-To: listarch-libc-alpha at sources dot redhat dot com
4Received: (qmail 26073 invoked by alias); 19 Jan 2005 18:02:41 -0000
5Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
6Precedence: bulk
7List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
8List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
9List-Post: <mailto:libc-alpha at sources dot redhat dot com>
10List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
11Sender: libc-alpha-owner at sources dot redhat dot com
12Delivered-To: mailing list libc-alpha at sources dot redhat dot com
13Received: (qmail 25420 invoked from network); 19 Jan 2005 18:01:47 -0000
14Received: from unknown (HELO mail.codesourcery.com) (65.74.133.9)
15 by sourceware dot org with SMTP; 19 Jan 2005 18:01:47 -0000
16Received: (qmail 7456 invoked from network); 19 Jan 2005 18:01:44 -0000
17Received: from localhost (HELO ?192.168.0.100?) (mitchell@127.0.0.1)
18 by mail dot codesourcery dot com with SMTP; 19 Jan 2005 18:01:44 -0000
19Message-ID: <41EEA082.1020000@codesourcery.com>
20Date: Wed, 19 Jan 2005 10:01:38 -0800
21From: Mark Mitchell <mark at codesourcery dot com>
22Organization: CodeSourcery, LLC
23User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103)
24MIME-Version: 1.0
25To: Daniel Jacobowitz <drow at false dot org>
26CC: libc-alpha at sources dot redhat dot com
27Subject: Re: PATCH: ARM dl-trampoline.S
28References: <200501191631.j0JGVVRA002591@sirius.codesourcery.com> <20050119170217.GA3137@nevyn.them.org>
29In-Reply-To: <20050119170217 dot GA3137 at nevyn dot them dot org>
30Content-Type: multipart/mixed;
31 boundary="------------050601050507020101060100"
32
33This is a multi-part message in MIME format.
34--------------050601050507020101060100
35Content-Type: text/plain; charset=ISO-8859-1; format=flowed
36Content-Transfer-Encoding: 7bit
37
38Daniel Jacobowitz wrote:
39> On Wed, Jan 19, 2005 at 08:31:31AM -0800, Mark Mitchell wrote:
40>
41>>This patch updates the ARM port for the recent dl-trampoline.S and
42>>link.h changes. OK to apply?
43>
44>
45> Did you test this? I'm pretty sure that RESOLVE_MAP returns a link
46> map, unlike RESOLVE.
47
48No, I didn't test -- except by building glibc. (There are other
49problems at the moment, AFAICT, with actually running the library on ARM.)
50
51However, you're definitely correct -- good catch! -- and, in fact, in
52looking at my logs I see compiler warnings about the mismatched type
53assignment. Here is a more plausible version. How about this one?
54
55Thanks,
56
57--
58Mark Mitchell
59CodeSourcery, LLC
60mark@codesourcery.com
61(916) 791-8304
62
63--------------050601050507020101060100
64Content-Type: text/plain;
65 name="glibc.patch"
66Content-Transfer-Encoding: 7bit
67Content-Disposition: inline;
68 filename="glibc.patch"
69
702005-01-19 Mark Mitchell <mark@codesourcery.com>
71
72 * elf/tst-auditmod1.c: Add ARM support.
73 * sysdeps/arm/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE):
74 Remove.
75 (RESOLVE): Do not use it; use ...
76 (RESOLVE_MAP): ... instead.
77 (ARCH_LA_PLTENTER): Define.
78 (ARCH_LA_PLTEXIT): Likewise.
79 (elf_machine_rel): Use RESOLVE_MAP, not RESOLVE.
80 (elf_machine_rela): Likewise.
81 * sysdeps/arm/dl-trampoline.S: New file.
82 * sysdeps/arm/bits/link.h: Likewise.
83 * sysdeps/generic/ldsodefs.h (struct La_arm_regs): Declare.
84 (struct audit_ifaces): Add ARM functions.
85
86Index: elf/tst-auditmod1.c
87===================================================================
88RCS file: /cvs/glibc/libc/elf/tst-auditmod1.c,v
89retrieving revision 1.7
90diff -c -5 -p -r1.7 tst-auditmod1.c
91*** elf/tst-auditmod1.c 16 Jan 2005 06:24:59 -0000 1.7
92--- elf/tst-auditmod1.c 19 Jan 2005 17:54:32 -0000
93*************** la_symbind64 (Elf64_Sym *sym, unsigned i
94*** 100,110 ****
95 symname, (long int) sym->st_value, ndx, *flags);
96
97 return sym->st_value;
98 }
99
100! #ifdef __i386__
101 # define pltenter la_i86_gnu_pltenter
102 # define pltexit la_i86_gnu_pltexit
103 # define La_regs La_i86_regs
104 # define La_retval La_i86_retval
105 # define int_retval lrv_eax
106--- 100,116 ----
107 symname, (long int) sym->st_value, ndx, *flags);
108
109 return sym->st_value;
110 }
111
112! #ifdef __arm__
113! # define pltenter la_arm_gnu_plteneter
114! # define pltext la_arm_gnu_pltexit
115! # define La_regs La_arm_regs
116! # define La_retval La_arm_retval
117! # define int_retval lvr_r0
118! #elif defined __i386__
119 # define pltenter la_i86_gnu_pltenter
120 # define pltexit la_i86_gnu_pltexit
121 # define La_regs La_i86_regs
122 # define La_retval La_i86_retval
123 # define int_retval lrv_eax
124Index: sysdeps/arm/dl-trampoline.S
125===================================================================
126RCS file: sysdeps/arm/dl-trampoline.S
127diff -N sysdeps/arm/dl-trampoline.S
128*** /dev/null 1 Jan 1970 00:00:00 -0000
129--- sysdeps/arm/dl-trampoline.S 19 Jan 2005 17:54:32 -0000
130***************
131*** 0 ****
132--- 1,135 ----
133+ /* PLT trampolines. ARM version.
134+ Copyright (C) 2005 Free Software Foundation, Inc.
135+ This file is part of the GNU C Library.
136+
137+ The GNU C Library is free software; you can redistribute it and/or
138+ modify it under the terms of the GNU Lesser General Public
139+ License as published by the Free Software Foundation; either
140+ version 2.1 of the License, or (at your option) any later version.
141+
142+ The GNU C Library is distributed in the hope that it will be useful,
143+ but WITHOUT ANY WARRANTY; without even the implied warranty of
144+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
145+ Lesser General Public License for more details.
146+
147+ You should have received a copy of the GNU Lesser General Public
148+ License along with the GNU C Library; if not, write to the Free
149+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
150+ 02111-1307 USA. */
151+
152+ #include <sysdep.h>
153+
154+ #if defined(__USE_BX__)
155+ #define BX(x) bx x
156+ #else
157+ #define BX(x) mov pc, x
158+ #endif
159+
160+ #ifndef PROF
161+ .text
162+ .globl _dl_runtime_resolve
163+ .type _dl_runtime_resolve, #function
164+ .align 2
165+ _dl_runtime_resolve:
166+ @ we get called with
167+ @ stack[0] contains the return address from this call
168+ @ ip contains &GOT[n+3] (pointer to function)
169+ @ lr points to &GOT[2]
170+
171+ @ stack arguments
172+ stmdb sp!,{r0-r3}
173+
174+ @ get pointer to linker struct
175+ ldr r0, [lr, #-4]
176+
177+ @ prepare to call _dl_fixup()
178+ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
179+ sub r1, ip, lr
180+ sub r1, r1, #4
181+ add r1, r1, r1
182+
183+ @ call fixup routine
184+ bl _dl_fixup
185+
186+ @ save the return
187+ mov ip, r0
188+
189+ @ get arguments and return address back
190+ ldmia sp!, {r0-r3,lr}
191+
192+ @ jump to the newly found address
193+ BX(ip)
194+
195+ .size _dl_runtime_resolve, .-_dl_runtime_resolve
196+
197+ .globl _dl_runtime_profile
198+ .type _dl_runtime_profile, #function
199+ .align 2
200+ _dl_runtime_profile:
201+ @ stack arguments
202+ stmdb sp!, {r0-r3}
203+
204+ @ get pointer to linker struct
205+ ldr r0, [lr, #-4]
206+
207+ @ prepare to call _dl_profile_fixup()
208+ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
209+ sub r1, ip, lr
210+ sub r1, r1, #4
211+ add r1, r1, r1
212+
213+ @ call profiling fixup routine
214+ bl _dl_profile_fixup
215+
216+ @ save the return
217+ mov ip, r0
218+
219+ @ get arguments and return address back
220+ ldmia sp!, {r0-r3,lr}
221+
222+ @ jump to the newly found address
223+ BX(ip)
224+
225+ .size _dl_runtime_resolve, .-_dl_runtime_resolve
226+ .previous
227+ #else
228+ .text
229+ .globl _dl_runtime_resolve
230+ .globl _dl_runtime_profile
231+ .type _dl_runtime_resolve, #function
232+ .type _dl_runtime_profile, #function
233+ .align 2
234+ _dl_runtime_resolve:
235+ _dl_runtime_profile:
236+ @ we get called with
237+ @ stack[0] contains the return address from this call
238+ @ ip contains &GOT[n+3] (pointer to function)
239+ @ lr points to &GOT[2]
240+
241+ @ stack arguments
242+ stmdb sp!, {r0-r3}
243+
244+ @ get pointer to linker struct
245+ ldr r0, [lr, #-4]
246+
247+ @ prepare to call _dl_fixup()
248+ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
249+ sub r1, ip, lr
250+ sub r1, r1, #4
251+ add r1, r1, r1
252+
253+ @ call profiling fixup routine
254+ bl _dl_fixup
255+
256+ @ save the return
257+ mov ip, r0
258+
259+ @ get arguments and return address back
260+ ldmia sp!, {r0-r3,lr}
261+
262+ @ jump to the newly found address
263+ BX(ip)
264+
265+ .size _dl_runtime_profile, .-_dl_runtime_profile
266+ .previous
267+ #endif
268Index: sysdeps/arm/bits/link.h
269===================================================================
270RCS file: /cvs/glibc/libc/sysdeps/arm/bits/link.h,v
271retrieving revision 1.2
272diff -c -5 -p -r1.2 link.h
273*** sysdeps/arm/bits/link.h 6 Jan 2005 22:40:20 -0000 1.2
274--- sysdeps/arm/bits/link.h 19 Jan 2005 17:54:32 -0000
275***************
276*** 0 ****
277--- 1,57 ----
278+ /* Copyright (C) 2005 Free Software Foundation, Inc.
279+ This file is part of the GNU C Library.
280+
281+ The GNU C Library is free software; you can redistribute it and/or
282+ modify it under the terms of the GNU Lesser General Public
283+ License as published by the Free Software Foundation; either
284+ version 2.1 of the License, or (at your option) any later version.
285+
286+ The GNU C Library is distributed in the hope that it will be useful,
287+ but WITHOUT ANY WARRANTY; without even the implied warranty of
288+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
289+ Lesser General Public License for more details.
290+
291+ You should have received a copy of the GNU Lesser General Public
292+ License along with the GNU C Library; if not, write to the Free
293+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
294+ 02111-1307 USA. */
295+
296+ #ifndef _LINK_H
297+ # error "Never include <bits/link.h> directly; use <link.h> instead."
298+ #endif
299+
300+
301+ /* Registers for entry into PLT on ARM. */
302+ typedef struct La_arm_regs
303+ {
304+ uint32_t lvr_r0;
305+ uint32_t lvr_r1;
306+ uint32_t lvr_r2;
307+ uint32_t lvr_r3;
308+ } La_arm_regs;
309+
310+ /* Return values for calls from PLT on ARM. */
311+ typedef struct La_arm_retval
312+ {
313+ uint32_t lvr_r0;
314+ uint32_t lvr_r1;
315+ } La_arm_retval;
316+
317+
318+ __BEGIN_DECLS
319+
320+ extern Elf32_Addr la_arm_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
321+ uintptr_t *__refcook,
322+ uintptr_t *__defcook,
323+ La_arm_regs *__regs,
324+ unsigned int *__flags,
325+ const char *__symname,
326+ long int *__framesizep);
327+ extern unsigned int la_arm_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
328+ uintptr_t *__refcook,
329+ uintptr_t *__defcook,
330+ const La_arm_regs *__inregs,
331+ La_arm_retval *__outregs,
332+ const char *symname);
333+
334+ __END_DECLS
335Index: sysdeps/generic/ldsodefs.h
336===================================================================
337RCS file: /cvs/glibc/libc/sysdeps/generic/ldsodefs.h,v
338retrieving revision 1.112
339diff -c -5 -p -r1.112 ldsodefs.h
340*** sysdeps/generic/ldsodefs.h 16 Jan 2005 02:07:29 -0000 1.112
341--- sysdeps/generic/ldsodefs.h 19 Jan 2005 17:54:32 -0000
342*************** enum allowmask
343*** 173,182 ****
344--- 173,183 ----
345 allow_ldso = 8
346 };
347
348
349 /* Type for list of auditing interfaces. */
350+ struct La_arm_regs;
351 struct La_i86_regs;
352 struct La_i86_retval;
353 struct La_x86_64_regs;
354 struct La_x86_64_retval;
355 struct La_ppc32_regs;
356*************** struct audit_ifaces
357*** 202,211 ****
358--- 203,216 ----
359 uintptr_t (*symbind64) (Elf64_Sym *, unsigned int, uintptr_t *,
360 uintptr_t *, unsigned int *, const char *);
361 };
362 union
363 {
364+ Elf32_Addr (*arm_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *,
365+ uintptr_t *, struct La_arm_regs *,
366+ unsigned int *, const char *name,
367+ long int *framesizep);
368 Elf32_Addr (*i86_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *,
369 uintptr_t *, struct La_i86_regs *,
370 unsigned int *, const char *name,
371 long int *framesizep);
372 Elf64_Addr (*x86_64_gnu_pltenter) (Elf64_Sym *, unsigned int, uintptr_t *,
373*************** struct audit_ifaces
374*** 229,238 ****
375--- 234,246 ----
376 unsigned int *, const char *name,
377 long int *framesizep);
378 };
379 union
380 {
381+ unsigned int (*arm_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *,
382+ uintptr_t *, const struct La_arm_regs *,
383+ struct La_i86_retval *, const char *);
384 unsigned int (*i86_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *,
385 uintptr_t *, const struct La_i86_regs *,
386 struct La_i86_retval *, const char *);
387 unsigned int (*x86_64_gnu_pltexit) (Elf64_Sym *, unsigned int, uintptr_t *,
388 uintptr_t *,
389
390--------------050601050507020101060100--
391
392diff -u -r1.52 dl-machine.h
393--- sysdeps/arm/dl-machine.h 15 Mar 2005 22:57:26 -0000 1.52
394+++ sysdeps/arm/dl-machine.h 22 Apr 2005 03:38:15 -0000
395@@ -129,119 +129,6 @@
396 #define BX(x) "mov\tpc, " #x
397 #endif
398
399-#ifndef PROF
400-# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
401- .text\n\
402- .globl _dl_runtime_resolve\n\
403- .type _dl_runtime_resolve, #function\n\
404- .align 2\n\
405-_dl_runtime_resolve:\n\
406- @ we get called with\n\
407- @ stack[0] contains the return address from this call\n\
408- @ ip contains &GOT[n+3] (pointer to function)\n\
409- @ lr points to &GOT[2]\n\
410-\n\
411- @ stack arguments\n\
412- stmdb sp!,{r0-r3}\n\
413-\n\
414- @ get pointer to linker struct\n\
415- ldr r0, [lr, #-4]\n\
416-\n\
417- @ prepare to call fixup()\n\
418- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
419- sub r1, ip, lr\n\
420- sub r1, r1, #4\n\
421- add r1, r1, r1\n\
422-\n\
423- @ call fixup routine\n\
424- bl fixup\n\
425-\n\
426- @ save the return\n\
427- mov ip, r0\n\
428-\n\
429- @ get arguments and return address back\n\
430- ldmia sp!, {r0-r3,lr}\n\
431-\n\
432- @ jump to the newly found address\n\
433- " BX(ip) "\n\
434-\n\
435- .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
436-\n\
437- .globl _dl_runtime_profile\n\
438- .type _dl_runtime_profile, #function\n\
439- .align 2\n\
440-_dl_runtime_profile:\n\
441- @ stack arguments\n\
442- stmdb sp!, {r0-r3}\n\
443-\n\
444- @ get pointer to linker struct\n\
445- ldr r0, [lr, #-4]\n\
446-\n\
447- @ prepare to call fixup()\n\
448- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
449- sub r1, ip, lr\n\
450- sub r1, r1, #4\n\
451- add r1, r1, r1\n\
452-\n\
453- @ call profiling fixup routine\n\
454- bl profile_fixup\n\
455-\n\
456- @ save the return\n\
457- mov ip, r0\n\
458-\n\
459- @ get arguments and return address back\n\
460- ldmia sp!, {r0-r3,lr}\n\
461-\n\
462- @ jump to the newly found address\n\
463- " BX(ip) "\n\
464-\n\
465- .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
466- .previous\n\
467-");
468-#else // PROF
469-# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
470- .text\n\
471- .globl _dl_runtime_resolve\n\
472- .globl _dl_runtime_profile\n\
473- .type _dl_runtime_resolve, #function\n\
474- .type _dl_runtime_profile, #function\n\
475- .align 2\n\
476-_dl_runtime_resolve:\n\
477-_dl_runtime_profile:\n\
478- @ we get called with\n\
479- @ stack[0] contains the return address from this call\n\
480- @ ip contains &GOT[n+3] (pointer to function)\n\
481- @ lr points to &GOT[2]\n\
482-\n\
483- @ stack arguments\n\
484- stmdb sp!, {r0-r3}\n\
485-\n\
486- @ get pointer to linker struct\n\
487- ldr r0, [lr, #-4]\n\
488-\n\
489- @ prepare to call fixup()\n\
490- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
491- sub r1, ip, lr\n\
492- sub r1, r1, #4\n\
493- add r1, r1, r1\n\
494-\n\
495- @ call profiling fixup routine\n\
496- bl fixup\n\
497-\n\
498- @ save the return\n\
499- mov ip, r0\n\
500-\n\
501- @ get arguments and return address back\n\
502- ldmia sp!, {r0-r3,lr}\n\
503-\n\
504- @ jump to the newly found address\n\
505- " BX(ip) "\n\
506-\n\
507- .size _dl_runtime_profile, .-_dl_runtime_profile\n\
508- .previous\n\
509-");
510-#endif //PROF
511-
512 /* Mask identifying addresses reserved for the user program,
513 where the dynamic linker should not map anything. */
514 #define ELF_MACHINE_USER_ADDRESS_MASK 0xf8000000UL
515@@ -348,6 +235,10 @@
516 return value;
517 }
518
519+/* Names of the architecture-specific auditing callback functions. */
520+#define ARCH_LA_PLTENTER arm_gnu_pltenter
521+#define ARCH_LA_PLTEXIT arm_gnu_pltexit
522+
523 #endif /* !dl_machine_h */
524
525
526@@ -355,7 +246,7 @@
527 Prelinked libraries may use Elf32_Rela though. */
528 #define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP
529
530-#ifdef RESOLVE
531+#ifdef RESOLVE_MAP
532
533 /* Deal with an out-of-range PC24 reloc. */
534 static Elf32_Addr
535@@ -425,7 +316,8 @@
536 #endif
537 {
538 const Elf32_Sym *const refsym = sym;
539- Elf32_Addr value = RESOLVE (&sym, version, r_type);
540+ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
541+ Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
542 if (sym)
543 value += sym->st_value;
544
545@@ -535,7 +427,8 @@
546 # ifndef RESOLVE_CONFLICT_FIND_MAP
547 const Elf32_Sym *const refsym = sym;
548 # endif
549- Elf32_Addr value = RESOLVE (&sym, version, r_type);
550+ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
551+ Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
552 if (sym)
553 value += sym->st_value;
554
555@@ -637,4 +530,4 @@
556 _dl_reloc_bad_type (map, r_type, 1);
557 }
558
559-#endif /* RESOLVE */
560+#endif /* RESOLVE_MAP */
diff --git a/meta/packages/glibc/glibc-initial_2.4.bb b/meta/packages/glibc/glibc-initial_2.4.bb
new file mode 100644
index 0000000000..422e8b7110
--- /dev/null
+++ b/meta/packages/glibc/glibc-initial_2.4.bb
@@ -0,0 +1,46 @@
1SECTION = "libs"
2include glibc_${PV}.bb
3
4DEPENDS = "linux-libc-headers"
5PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
6FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-cvs', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
7
8PACKAGES = ""
9
10do_configure () {
11 sed -ie 's,{ (exit 1); exit 1; }; },{ (exit 0); }; },g' ${S}/configure
12 chmod +x ${S}/configure
13 CC="${BUILD_CC}" CPP="${BUILD_CPP}" LD="${BUILD_LD}" ${S}/configure --host=${TARGET_SYS} --build=${BUILD_SYS} \
14 --without-cvs --disable-sanity-checks \
15 --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \
16 --enable-hacker-mode
17 if grep -q GLIBC_2.3 ${S}/ChangeLog; then
18 # glibc-2.3.x passes cross options to $(CC) when generating errlist-compat.c, which fails without a real cross-compiler.
19 # Fortunately, we don't need errlist-compat.c, since we just need .h files,
20 # so work around this by creating a fake errlist-compat.c and satisfying its dependencies.
21 # Another workaround might be to tell configure to not use any cross options to $(CC).
22 # The real fix would be to get install-headers to not generate errlist-compat.c.
23 make sysdeps/gnu/errlist.c
24 mkdir -p stdio-common
25 touch stdio-common/errlist-compat.c
26 fi
27}
28
29do_compile () {
30 :
31}
32
33do_stage () {
34 oe_runmake cross-compiling=yes install_root=${CROSS_DIR}/${TARGET_SYS} prefix="" install-headers
35
36 # Two headers -- stubs.h and features.h -- aren't installed by install-headers,
37 # so do them by hand. We can tolerate an empty stubs.h for the moment.
38 # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html
39 mkdir -p ${CROSS_DIR}/${TARGET_SYS}/include/gnu
40 touch ${CROSS_DIR}/${TARGET_SYS}/include/gnu/stubs.h
41 cp ${S}/include/features.h ${CROSS_DIR}/${TARGET_SYS}/include/features.h
42}
43
44do_install () {
45 :
46}
diff --git a/meta/packages/glibc/glibc-intermediate_2.4.bb b/meta/packages/glibc/glibc-intermediate_2.4.bb
new file mode 100644
index 0000000000..819cd0950f
--- /dev/null
+++ b/meta/packages/glibc/glibc-intermediate_2.4.bb
@@ -0,0 +1,14 @@
1SECTION = "libs"
2include glibc_${PV}.bb
3
4DEFAULT_PREFERENCE = "-1"
5
6do_install () {
7 :
8}
9
10PACKAGES = ""
11PROVIDES = "virtual/${TARGET_PREFIX}libc-for-gcc"
12DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial linux-libc-headers"
13GLIBC_ADDONS = "nptl,ports"
14GLIBC_EXTRA_OECONF = ""
diff --git a/meta/packages/glibc/glibc-package.bbclass b/meta/packages/glibc/glibc-package.bbclass
new file mode 100644
index 0000000000..d6decfb709
--- /dev/null
+++ b/meta/packages/glibc/glibc-package.bbclass
@@ -0,0 +1,300 @@
1#
2# For now, we will skip building of a gcc package if it is a uclibc one
3# and our build is not a uclibc one, and we skip a glibc one if our build
4# is a uclibc build.
5#
6# See the note in gcc/gcc_3.4.0.oe
7#
8
9python __anonymous () {
10 import bb, re
11 uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
12 if uc_os:
13 raise bb.parse.SkipPackage("incompatible with target %s" %
14 bb.data.getVar('TARGET_OS', d, 1))
15}
16
17# Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION
18# is set. The idea is to avoid running localedef on the target (at first boot)
19# to decrease initial boot time and avoid localedef being killed by the OOM
20# killer which used to effectively break i18n on machines with < 128MB RAM.
21
22# default to disabled until qemu works for everyone
23ENABLE_BINARY_LOCALE_GENERATION ?= "0"
24
25# BINARY_LOCALE_ARCHES is a space separated list of regular expressions
26BINARY_LOCALE_ARCHES ?= "arm.*"
27
28PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
29PACKAGES_DYNAMIC = "glibc-gconv-* glibc-charmap-* glibc-localedata-*"
30
31libc_baselibs = "/lib/libc* /lib/libm* /lib/ld* /lib/libpthread* /lib/libresolv* /lib/librt* /lib/libutil* /lib/libnsl* /lib/libnss_files* /lib/libnss_compat* /lib/libnss_dns* /lib/libdl* /lib/libanl* /lib/libBrokenLocale*"
32
33FILES_${PN} = "${sysconfdir} ${libc_baselibs} /sbin/ldconfig ${libexecdir} ${datadir}/zoneinfo"
34FILES_ldd = "${bindir}/ldd"
35FILES_libsegfault = "/lib/libSegFault*"
36FILES_glibc-extra-nss = "/lib/libnss*"
37FILES_sln = "/sbin/sln"
38FILES_glibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen"
39FILES_nscd = "${sbindir}/nscd*"
40FILES_glibc-utils = "${bindir} ${sbindir}"
41FILES_glibc-gconv = "${libdir}/gconv"
42FILES_catchsegv = "${bindir}/catchsegv"
43RDEPENDS_catchsegv = "libsegfault"
44FILES_glibc-pcprofile = "/lib/libpcprofile.so"
45FILES_glibc-thread-db = "/lib/libthread_db*"
46FILES_localedef = "${bindir}/localedef"
47RPROVIDES_glibc-dev += "libc-dev"
48
49DESCRIPTION_sln = "glibc: create symbolic links between files"
50DESCRIPTION_nscd = "glibc: name service cache daemon for passwd, group, and hosts"
51DESCRIPTION_glibc-extra-nss = "glibc: nis, nisplus and hesiod search services"
52DESCRIPTION_ldd = "glibc: print shared library dependencies"
53DESCRIPTION_localedef = "glibc: compile locale definition files"
54DESCRIPTION_glibc-utils = "glibc: misc utilities like iconf, local, gencat, tzselect, rpcinfo, ..."
55
56def get_glibc_fpu_setting(bb, d):
57 if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
58 return "--without-fp"
59 return ""
60
61EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
62
63OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
64EXTRA_OECONF_append_arm-linuxeabi = " --without-fp"
65
66do_install() {
67 oe_runmake install_root=${D} install
68 for r in ${rpcsvc}; do
69 h=`echo $r|sed -e's,\.x$,.h,'`
70 install -m 0644 ${S}/sunrpc/rpcsvc/$h ${D}/${includedir}/rpcsvc/
71 done
72 install -m 0644 ${WORKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/
73 install -d ${D}${libdir}/locale
74 make -f ${WORKDIR}/generate-supported.mk IN="${S}/localedata/SUPPORTED" OUT="${WORKDIR}/SUPPORTED"
75 # get rid of some broken files...
76 for i in ${GLIBC_BROKEN_LOCALES}; do
77 grep -v $i ${WORKDIR}/SUPPORTED > ${WORKDIR}/SUPPORTED.tmp
78 mv ${WORKDIR}/SUPPORTED.tmp ${WORKDIR}/SUPPORTED
79 done
80 rm -f ${D}/etc/rpc
81}
82
83TMP_LOCALE="/tmp/locale/${libdir}/locale"
84
85locale_base_postinst() {
86#!/bin/sh
87
88if [ "x$D" != "x" ]; then
89 exit 1
90fi
91
92rm -rf ${TMP_LOCALE}
93mkdir -p ${TMP_LOCALE}
94if [ -f ${libdir}/locale/locale-archive ]; then
95 cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/
96fi
97localedef --inputfile=${datadir}/i18n/locales/%s --charmap=%s --prefix=/tmp/locale %s
98mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/
99rm -rf ${TMP_LOCALE}
100}
101
102locale_base_postrm() {
103#!/bin/sh
104
105rm -rf ${TMP_LOCALE}
106mkdir -p ${TMP_LOCALE}
107if [ -f ${libdir}/locale/locale-archive ]; then
108 cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/
109fi
110localedef --delete-from-archive --inputfile=${datadir}/locales/%s --charmap=%s --prefix=/tmp/locale %s
111mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/
112rm -rf ${TMP_LOCALE}
113}
114
115python __anonymous () {
116 enabled = bb.data.getVar("ENABLE_BINARY_LOCALE_GENERATION", d, 1)
117
118 if enabled and int(enabled):
119 import re
120
121 target_arch = bb.data.getVar("TARGET_ARCH", d, 1)
122 binary_arches = bb.data.getVar("BINARY_LOCALE_ARCHES", d, 1) or ""
123
124 for regexp in binary_arches.split(" "):
125 r = re.compile(regexp)
126
127 if r.match(target_arch):
128 depends = bb.data.getVar("DEPENDS", d, 1)
129 depends = "%s qemu-native" % depends
130 bb.data.setVar("DEPENDS", depends, d)
131 bb.data.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "1", d)
132 break
133}
134
135do_prep_locale_tree() {
136 treedir=${WORKDIR}/locale-tree
137 rm -rf $treedir
138 mkdir -p $treedir/bin $treedir/lib $treedir/${datadir} $treedir/${libdir}/locale
139 cp -a ${D}${datadir}/i18n $treedir/${datadir}/i18n
140 # unzip to avoid parsing errors
141 for i in $treedir/${datadir}/i18n/charmaps/*gz; do
142 gunzip $i
143 done
144 cp -a ${STAGING_LIBDIR}/* $treedir/lib
145 if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* ]; then
146 cp -a ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* $treedir/lib
147 fi
148 install -m 0755 ${D}${bindir}/localedef $treedir/bin
149}
150
151do_collect_bins_from_locale_tree() {
152 treedir=${WORKDIR}/locale-tree
153
154 mkdir -p ${D}${libdir}
155 cp -a $treedir/${libdir}/locale ${D}${libdir}
156}
157
158python package_do_split_gconvs () {
159 import os, re
160 if (bb.data.getVar('PACKAGE_NO_GCONV', d, 1) == '1'):
161 bb.note("package requested not splitting gconvs")
162 return
163
164 if not bb.data.getVar('PACKAGES', d, 1):
165 return
166
167 libdir = bb.data.getVar('libdir', d, 1)
168 if not libdir:
169 bb.error("libdir not defined")
170 return
171 datadir = bb.data.getVar('datadir', d, 1)
172 if not datadir:
173 bb.error("datadir not defined")
174 return
175
176 gconv_libdir = os.path.join(libdir, "gconv")
177 charmap_dir = os.path.join(datadir, "i18n", "charmaps")
178 locales_dir = os.path.join(datadir, "i18n", "locales")
179 binary_locales_dir = os.path.join(libdir, "locale")
180
181 do_split_packages(d, gconv_libdir, file_regex='^(.*)\.so$', output_pattern='glibc-gconv-%s', description='gconv module for character set %s', extra_depends='glibc-gconv')
182
183 do_split_packages(d, charmap_dir, file_regex='^(.*)\.gz$', output_pattern='glibc-charmap-%s', description='character map for %s encoding', extra_depends='')
184
185 def calc_locale_deps(fn, pkg, file_regex, output_pattern, group):
186 deps = []
187 f = open(fn, "r")
188 c_re = re.compile('^copy "(.*)"')
189 i_re = re.compile('^include "(\w+)".*')
190 for l in f.readlines():
191 m = c_re.match(l) or i_re.match(l)
192 if m:
193 dp = legitimize_package_name('glibc-localedata-%s' % m.group(1))
194 if not dp in deps:
195 deps.append(dp)
196 f.close()
197 if deps != []:
198 bb.data.setVar('RDEPENDS_%s' % pkg, " ".join(deps), d)
199
200 use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1)
201 if use_bin:
202 do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern='glibc-localedata-%s', description='locale definition for %s', hook=calc_locale_deps, extra_depends='', aux_files_pattern_verbatim=binary_locales_dir + '/%s')
203 else:
204 do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern='glibc-localedata-%s', description='locale definition for %s', hook=calc_locale_deps, extra_depends='')
205 bb.note("generation of binary locales disabled. this may break i18n!")
206 bb.data.setVar('PACKAGES', bb.data.getVar('PACKAGES', d) + ' glibc-gconv', d)
207
208 f = open(os.path.join(bb.data.getVar('WORKDIR', d, 1), "SUPPORTED"), "r")
209 supported = f.readlines()
210 f.close()
211
212 dot_re = re.compile("(.*)\.(.*)")
213
214 # Collate the locales by base and encoding
215 encodings = {}
216 for l in supported:
217 l = l[:-1]
218 (locale, charset) = l.split(" ")
219 m = dot_re.match(locale)
220 if m:
221 locale = m.group(1)
222 if not encodings.has_key(locale):
223 encodings[locale] = []
224 encodings[locale].append(charset)
225
226 def output_locale_source(name, locale, encoding):
227 pkgname = 'locale-base-' + legitimize_package_name(name)
228
229 bb.data.setVar('RDEPENDS_%s' % pkgname, 'localedef glibc-localedata-%s glibc-charmap-%s' % (legitimize_package_name(locale), legitimize_package_name(encoding)), d)
230 rprovides = 'virtual-locale-%s' % legitimize_package_name(name)
231 m = re.match("(.*)_(.*)", name)
232 if m:
233 rprovides += ' virtual-locale-%s' % m.group(1)
234 bb.data.setVar('RPROVIDES_%s' % pkgname, rprovides, d)
235 bb.data.setVar('PACKAGES', '%s %s' % (pkgname, bb.data.getVar('PACKAGES', d, 1)), d)
236 bb.data.setVar('ALLOW_EMPTY_%s' % pkgname, '1', d)
237 bb.data.setVar('pkg_postinst_%s' % pkgname, bb.data.getVar('locale_base_postinst', d, 1) % (locale, encoding, locale), d)
238 bb.data.setVar('pkg_postrm_%s' % pkgname, bb.data.getVar('locale_base_postrm', d, 1) % (locale, encoding, locale), d)
239
240 def output_locale_binary(name, locale, encoding):
241 target_arch = bb.data.getVar("TARGET_ARCH", d, 1)
242 qemu = "qemu-%s" % target_arch
243 pkgname = 'locale-base-' + legitimize_package_name(name)
244
245 bb.data.setVar('RDEPENDS_%s' % pkgname, 'glibc-localedata-%s glibc-charmap-%s' % (legitimize_package_name(locale), legitimize_package_name(encoding)), d)
246 rprovides = 'virtual-locale-%s' % legitimize_package_name(name)
247 m = re.match("(.*)_(.*)", name)
248 if m:
249 rprovides += ' virtual-locale-%s' % m.group(1)
250 bb.data.setVar('RPROVIDES_%s' % pkgname, rprovides, d)
251 bb.data.setVar('ALLOW_EMPTY_%s' % pkgname, '1', d)
252 bb.data.setVar('PACKAGES', '%s %s' % (pkgname, bb.data.getVar('PACKAGES', d, 1)), d)
253
254 treedir = os.path.join(bb.data.getVar("WORKDIR", d, 1), "locale-tree")
255 path = bb.data.getVar("PATH", d, 1)
256 i18npath = os.path.join(treedir, datadir, "i18n")
257
258 localedef_opts = "--force --old-style --no-archive --prefix=%s --inputfile=%s/i18n/locales/%s --charmap=%s %s" % (treedir, datadir, locale, encoding, locale)
259 cmd = "PATH=\"%s\" I18NPATH=\"%s\" %s -L %s %s/bin/localedef %s" % (path, i18npath, qemu, treedir, treedir, localedef_opts)
260 bb.note("generating locale %s (%s)" % (locale, encoding))
261 if os.system(cmd):
262 raise bb.build.FuncFailed("localedef returned an error.")
263
264 def output_locale(name, locale, encoding):
265 use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1)
266 if use_bin:
267 output_locale_binary(name, locale, encoding)
268 else:
269 output_locale_source(name, locale, encoding)
270
271 use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1)
272 if use_bin:
273 bb.note("preparing tree for binary locale generation")
274 bb.build.exec_func("do_prep_locale_tree", d)
275
276 # Reshuffle names so that UTF-8 is preferred over other encodings
277 for l in encodings.keys():
278 if len(encodings[l]) == 1:
279 output_locale(l, l, encodings[l][0])
280 else:
281 if "UTF-8" in encodings[l]:
282 output_locale(l, l, "UTF-8")
283 encodings[l].remove("UTF-8")
284 for e in encodings[l]:
285 output_locale('%s-%s' % (l, e), l, e)
286
287 use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1)
288 if use_bin:
289 bb.note("collecting binary locales from locale tree")
290 bb.build.exec_func("do_collect_bins_from_locale_tree", d)
291}
292
293# We want to do this indirection so that we can safely 'return'
294# from the called function even though we're prepending
295python populate_packages_prepend () {
296 if bb.data.getVar('DEBIAN_NAMES', d, 1):
297 bb.data.setVar('PKG_glibc', 'libc6', d)
298 bb.data.setVar('PKG_glibc-dev', 'libc6-dev', d)
299 bb.build.exec_func('package_do_split_gconvs', d)
300}
diff --git a/meta/packages/glibc/glibc_2.3.5+cvs20050627.bb b/meta/packages/glibc/glibc_2.3.5+cvs20050627.bb
new file mode 100644
index 0000000000..c8f1d56841
--- /dev/null
+++ b/meta/packages/glibc/glibc_2.3.5+cvs20050627.bb
@@ -0,0 +1,175 @@
1DESCRIPTION = "GNU C Library"
2HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
3LICENSE = "LGPL"
4SECTION = "libs"
5PRIORITY = "required"
6MAINTAINER = "Phil Blundell <pb@handhelds.org>"
7
8FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-cvs-2.3.5"
9SRCDATE = "20050627"
10PR = "r3"
11
12GLIBC_ADDONS ?= "ports,linuxthreads"
13GLIBC_EXTRA_OECONF ?= ""
14
15GLIBC_BROKEN_LOCALES = "sid_ET tr_TR mn_MN"
16
17#
18# For now, we will skip building of a gcc package if it is a uclibc one
19# and our build is not a uclibc one, and we skip a glibc one if our build
20# is a uclibc build.
21#
22# See the note in gcc/gcc_3.4.0.oe
23#
24
25python __anonymous () {
26 import bb, re
27 uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
28 if uc_os:
29 raise bb.parse.SkipPackage("incompatible with target %s" %
30 bb.data.getVar('TARGET_OS', d, 1))
31}
32
33# nptl needs unwind support in gcc, which can't be built without glibc.
34PROVIDES = "virtual/libc ${@['virtual/${TARGET_PREFIX}libc-for-gcc', '']['nptl' in '${GLIBC_ADDONS}']}"
35PROVIDES += "virtual/libintl virtual/libiconv"
36DEPENDS = "${@['virtual/${TARGET_PREFIX}gcc-initial', 'virtual/${TARGET_PREFIX}gcc']['nptl' in '${GLIBC_ADDONS}']} linux-libc-headers"
37RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
38INHIBIT_DEFAULT_DEPS = "1"
39
40# file://noinfo.patch;patch=1
41# file://ldconfig.patch;patch=1;pnum=0
42# file://arm-machine-gmon.patch;patch=1;pnum=0 \
43# \
44# file://arm-ioperm.patch;patch=1;pnum=0 \
45# file://ldd.patch;patch=1;pnum=0 \
46SRC_URI = "http://familiar.handhelds.org/source/v0.8.3/stash_libc_sources.redhat.com__20050627.tar.gz \
47 http://familiar.handhelds.org/source/v0.8.3/stash_ports_sources.redhat.com__20050627.tar.gz \
48 file://arm-audit.patch;patch=1 \
49 file://arm-audit2.patch;patch=1 \
50 file://arm-no-hwcap.patch;patch=1 \
51 file://arm-memcpy.patch;patch=1 \
52 file://arm-longlong.patch;patch=1;pnum=0 \
53 file://fhs-linux-paths.patch;patch=1 \
54 file://dl-cache-libcmp.patch;patch=1 \
55 file://ldsocache-varrun.patch;patch=1 \
56 file://5090_all_stubs-rule-fix.patch;patch=1 \
57 file://etc/ld.so.conf \
58 file://generate-supported.mk"
59
60# seems to fail on tls platforms
61SRC_URI_append_arm = " file://dyn-ldconfig-20041128.patch;patch=1"
62
63S = "${WORKDIR}/libc"
64B = "${WORKDIR}/build-${TARGET_SYS}"
65
66inherit autotools
67
68EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
69 --without-cvs --disable-profile --disable-debug --without-gd \
70 --enable-clocale=gnu \
71 --enable-add-ons=${GLIBC_ADDONS} \
72 --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \
73 --without-selinux \
74 ${GLIBC_EXTRA_OECONF}"
75
76EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
77
78def get_glibc_fpu_setting(bb, d):
79 if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
80 return "--without-fp"
81 return ""
82
83do_munge() {
84 # Integrate ports into tree
85 mv ${WORKDIR}/ports ${S}
86
87 # http://www.handhelds.org/hypermail/oe/51/5135.html
88 # Some files were moved around between directories on
89 # 2005-12-21, which means that any attempt to check out
90 # from CVS using a datestamp older than that will be doomed.
91 #
92 # This is a workaround for that problem.
93 rm -rf ${S}/bits
94}
95
96addtask munge before do_patch after do_unpack
97
98do_configure () {
99# override this function to avoid the autoconf/automake/aclocal/autoheader
100# calls for now
101# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
102# version check and doesn't really help with anything
103 if [ -z "`which rpcgen`" ]; then
104 echo "rpcgen not found. Install glibc-devel."
105 exit 1
106 fi
107 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
108 CPPFLAGS="" oe_runconf
109}
110
111rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
112 yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
113 rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
114
115do_compile () {
116 # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
117 unset LDFLAGS
118 base_do_compile
119 (
120 cd ${S}/sunrpc/rpcsvc
121 for r in ${rpcsvc}; do
122 h=`echo $r|sed -e's,\.x$,.h,'`
123 rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
124 done
125 )
126}
127
128do_stage() {
129 rm -f ${STAGING_LIBDIR}/libc.so.6
130 oe_runmake 'install_root=${STAGING_DIR}/${HOST_SYS}' \
131 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \
132 '${STAGING_LIBDIR}/libc.so.6' \
133 install-headers install-lib
134
135 install -d ${STAGING_INCDIR}/gnu \
136 ${STAGING_INCDIR}/bits \
137 ${STAGING_INCDIR}/rpcsvc
138 install -m 0644 ${S}/include/gnu/stubs.h ${STAGING_INCDIR}/gnu/
139 install -m 0644 ${B}/bits/stdio_lim.h ${STAGING_INCDIR}/bits/
140 install -m 0644 misc/syscall-list.h ${STAGING_INCDIR}/bits/syscall.h
141 for r in ${rpcsvc}; do
142 h=`echo $r|sed -e's,\.x$,.h,'`
143 install -m 0644 ${S}/sunrpc/rpcsvc/$h ${STAGING_INCDIR}/rpcsvc/
144 done
145 for i in libc.a libc_pic.a libc_nonshared.a; do
146 install -m 0644 ${B}/$i ${STAGING_LIBDIR}/ || die "failed to install $i"
147 done
148 echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${STAGING_LIBDIR}/libpthread.so
149 echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${STAGING_LIBDIR}/libc.so
150
151 rm -f ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6
152 oe_runmake 'install_root=${CROSS_DIR}/${TARGET_SYS}' \
153 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \
154 '${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6' \
155 install-headers install-lib
156
157 install -d ${CROSS_DIR}/${TARGET_SYS}/include/gnu \
158 ${CROSS_DIR}/${TARGET_SYS}/include/bits \
159 ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc
160 install -m 0644 ${S}/include/gnu/stubs.h ${CROSS_DIR}/${TARGET_SYS}/include/gnu/
161 install -m 0644 ${B}/bits/stdio_lim.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/
162 install -m 0644 misc/syscall-list.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/syscall.h
163 for r in ${rpcsvc}; do
164 h=`echo $r|sed -e's,\.x$,.h,'`
165 install -m 0644 ${S}/sunrpc/rpcsvc/$h ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc/
166 done
167
168 for i in libc.a libc_pic.a libc_nonshared.a; do
169 install -m 0644 ${B}/$i ${CROSS_DIR}/${TARGET_SYS}/lib/ || die "failed to install $i"
170 done
171 echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libpthread.so
172 echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so
173}
174
175include glibc-package.bbclass
diff --git a/meta/packages/glibc/glibc_2.4.bb b/meta/packages/glibc/glibc_2.4.bb
new file mode 100644
index 0000000000..faaf27ced3
--- /dev/null
+++ b/meta/packages/glibc/glibc_2.4.bb
@@ -0,0 +1,201 @@
1DESCRIPTION = "GNU C Library"
2HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
3LICENSE = "LGPL"
4SECTION = "libs"
5PRIORITY = "required"
6DEFAULT_PREFERENCE = "-1"
7PR = "r4"
8
9FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-2.4"
10
11GLIBC_ADDONS ?= "ports,nptl,libidn"
12GLIBC_EXTRA_OECONF ?= ""
13
14GLIBC_BROKEN_LOCALES = "sid_ET tr_TR mn_MN"
15
16#
17# For now, we will skip building of a gcc package if it is a uclibc one
18# and our build is not a uclibc one, and we skip a glibc one if our build
19# is a uclibc build.
20#
21# See the note in gcc/gcc_3.4.0.oe
22#
23
24python __anonymous () {
25 import bb, re
26 uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
27 if uc_os:
28 raise bb.parse.SkipPackage("incompatible with target %s" %
29 bb.data.getVar('TARGET_OS', d, 1))
30}
31
32# nptl needs unwind support in gcc, which can't be built without glibc.
33PROVIDES = "virtual/libc ${@['virtual/${TARGET_PREFIX}libc-for-gcc', '']['nptl' in '${GLIBC_ADDONS}']}"
34PROVIDES += "virtual/libintl virtual/libiconv"
35DEPENDS = "${@['virtual/${TARGET_PREFIX}gcc-initial', 'virtual/${TARGET_PREFIX}gcc']['nptl' in '${GLIBC_ADDONS}']} linux-libc-headers"
36RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
37INHIBIT_DEFAULT_DEPS = "1"
38
39# file://noinfo.patch;patch=1
40# file://ldconfig.patch;patch=1;pnum=0
41# file://arm-machine-gmon.patch;patch=1;pnum=0 \
42# \
43# file://arm-ioperm.patch;patch=1;pnum=0 \
44# file://ldd.patch;patch=1;pnum=0 \
45SRC_URI = "ftp://ftp.gnu.org/pub/gnu/glibc/glibc-2.4.tar.bz2 \
46 ftp://ftp.gnu.org/pub/gnu/glibc/glibc-ports-2.4.tar.bz2 \
47 ftp://ftp.gnu.org/pub/gnu/glibc/glibc-libidn-2.4.tar.bz2 \
48 file://arm-memcpy.patch;patch=1 \
49 file://arm-longlong.patch;patch=1 \
50 file://fhs-linux-paths.patch;patch=1 \
51 file://dl-cache-libcmp.patch;patch=1 \
52 file://ldsocache-varrun.patch;patch=1 \
53 file://nptl-crosscompile.patch;patch=1 \
54 file://glibc-2.4-compile.patch;patch=1 \
55 file://fixup-aeabi-syscalls.patch;patch=1 \
56 file://generic-bits_select.h \
57 file://generic-bits_types.h \
58 file://generic-bits_typesizes.h \
59 file://generic-bits_time.h \
60 file://etc/ld.so.conf \
61 file://generate-supported.mk"
62
63S = "${WORKDIR}/glibc-2.4"
64B = "${WORKDIR}/build-${TARGET_SYS}"
65
66inherit autotools
67
68EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
69 --without-cvs --disable-profile --disable-debug --without-gd \
70 --enable-clocale=gnu \
71 --enable-add-ons=${GLIBC_ADDONS} \
72 --with-headers=${STAGING_INCDIR} \
73 --without-selinux \
74 ${GLIBC_EXTRA_OECONF}"
75
76EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
77
78def get_glibc_fpu_setting(bb, d):
79 if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
80 return "--without-fp"
81 return ""
82
83do_munge() {
84 # Integrate ports and libidn into tree
85 mv ${WORKDIR}/glibc-ports-${PV} ${S}/ports
86 mv ${WORKDIR}/glibc-libidn-${PV} ${S}/libidn
87
88 # Ports isn't really working... Fix it
89 # Some of this is rather dirty, but it seems to be the only
90 # quick way to get this cruft to compile
91 rm -rf ${S}/ports/sysdeps/unix/sysv/linux/arm/linuxthreads
92 ln -s nptl ${S}/ports/sysdeps/unix/sysv/linux/arm/linuxthreads
93 cp ${S}/sysdeps/unix/sysv/linux/i386/bits/wchar.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
94 cp ${S}/sysdeps/wordsize-32/bits/wordsize.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
95 cp ${WORKDIR}/generic-bits_select.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/select.h
96 cp ${WORKDIR}/generic-bits_types.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/types.h
97 cp ${WORKDIR}/generic-bits_typesizes.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/typesizes.h
98 cp ${WORKDIR}/generic-bits_time.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/time.h
99 # Copy in generic stuff for not yet implemented headers
100 for i in ${S}/bits/*.h; do
101 F=`basename $i`
102 [ "$F" = "local_lim.h" ] && continue
103 [ "$F" = "errno.h" ] && continue
104 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/
105 done
106 # This is harmful; we need to get the one from nptl/sysdeps/pthreads
107 rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/libc-lock.h
108 # Obsoleted by sysdeps/arm/{fpu,eabi}/bits/fenv.h
109 rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/fenv.h
110 # Obsoleted by sysdeps/gnu/bits/utmp.h
111 rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/utmp.h
112
113 # http://www.handhelds.org/hypermail/oe/51/5135.html
114 # Some files were moved around between directories on
115 # 2005-12-21, which means that any attempt to check out
116 # from CVS using a datestamp older than that will be doomed.
117 #
118 # This is a workaround for that problem.
119 rm -rf ${S}/bits
120}
121
122addtask munge before do_patch after do_unpack
123
124do_configure () {
125# override this function to avoid the autoconf/automake/aclocal/autoheader
126# calls for now
127# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
128# version check and doesn't really help with anything
129 if [ -z "`which rpcgen`" ]; then
130 echo "rpcgen not found. Install glibc-devel."
131 exit 1
132 fi
133 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
134 CPPFLAGS="" oe_runconf
135}
136
137rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
138 yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
139 rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
140
141do_compile () {
142 # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
143 unset LDFLAGS
144 base_do_compile
145 (
146 cd ${S}/sunrpc/rpcsvc
147 for r in ${rpcsvc}; do
148 h=`echo $r|sed -e's,\.x$,.h,'`
149 rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
150 done
151 )
152}
153
154do_stage() {
155 rm -f ${STAGING_LIBDIR}/libc.so.6
156 oe_runmake 'install_root=${STAGING_DIR}/${HOST_SYS}' \
157 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \
158 '${STAGING_LIBDIR}/libc.so.6' \
159 install-headers install-lib
160
161 install -d ${STAGING_INCDIR}/gnu \
162 ${STAGING_INCDIR}/bits \
163 ${STAGING_INCDIR}/rpcsvc
164 install -m 0644 ${S}/include/gnu/stubs.h ${STAGING_INCDIR}/gnu/
165 install -m 0644 ${B}/bits/stdio_lim.h ${STAGING_INCDIR}/bits/
166 install -m 0644 misc/syscall-list.h ${STAGING_INCDIR}/bits/syscall.h
167 for r in ${rpcsvc}; do
168 h=`echo $r|sed -e's,\.x$,.h,'`
169 install -m 0644 ${S}/sunrpc/rpcsvc/$h ${STAGING_INCDIR}/rpcsvc/
170 done
171 for i in libc.a libc_pic.a libc_nonshared.a; do
172 install -m 0644 ${B}/$i ${STAGING_LIBDIR}/ || die "failed to install $i"
173 done
174 echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${STAGING_LIBDIR}/libpthread.so
175 echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${STAGING_LIBDIR}/libc.so
176
177 rm -f ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6
178 oe_runmake 'install_root=${CROSS_DIR}/${TARGET_SYS}' \
179 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \
180 '${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6' \
181 install-headers install-lib
182
183 install -d ${CROSS_DIR}/${TARGET_SYS}/include/gnu \
184 ${CROSS_DIR}/${TARGET_SYS}/include/bits \
185 ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc
186 install -m 0644 ${S}/include/gnu/stubs.h ${CROSS_DIR}/${TARGET_SYS}/include/gnu/
187 install -m 0644 ${B}/bits/stdio_lim.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/
188 install -m 0644 misc/syscall-list.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/syscall.h
189 for r in ${rpcsvc}; do
190 h=`echo $r|sed -e's,\.x$,.h,'`
191 install -m 0644 ${S}/sunrpc/rpcsvc/$h ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc/
192 done
193
194 for i in libc.a libc_pic.a libc_nonshared.a; do
195 install -m 0644 ${B}/$i ${CROSS_DIR}/${TARGET_SYS}/lib/ || die "failed to install $i"
196 done
197 echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libpthread.so
198 echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so
199}
200
201include glibc-package.bbclass