diff options
Diffstat (limited to 'meta/packages/glibc/glibc-2.4')
-rw-r--r-- | meta/packages/glibc/glibc-2.4/arm-longlong.patch | 58 | ||||
-rw-r--r-- | meta/packages/glibc/glibc-2.4/arm-memcpy.patch | 758 | ||||
-rw-r--r-- | meta/packages/glibc/glibc-2.4/dl-cache-libcmp.patch | 10 | ||||
-rw-r--r-- | meta/packages/glibc/glibc-2.4/dyn-ldconfig-20041128.patch | 22 | ||||
-rw-r--r-- | meta/packages/glibc/glibc-2.4/dyn-ldconfig.patch | 62 | ||||
-rw-r--r-- | meta/packages/glibc/glibc-2.4/etc/ld.so.conf | 3 | ||||
-rw-r--r-- | meta/packages/glibc/glibc-2.4/fixup-aeabi-syscalls.patch | 329 | ||||
-rw-r--r-- | meta/packages/glibc/glibc-2.4/generic-bits_select.h | 35 | ||||
-rw-r--r-- | meta/packages/glibc/glibc-2.4/generic-bits_time.h | 75 | ||||
-rw-r--r-- | meta/packages/glibc/glibc-2.4/generic-bits_types.h | 200 | ||||
-rw-r--r-- | meta/packages/glibc/glibc-2.4/generic-bits_typesizes.h | 66 | ||||
-rw-r--r-- | meta/packages/glibc/glibc-2.4/glibc-2.4-compile.patch | 29 | ||||
-rw-r--r-- | meta/packages/glibc/glibc-2.4/ldsocache-varrun.patch | 18 | ||||
-rw-r--r-- | meta/packages/glibc/glibc-2.4/nptl-crosscompile.patch | 26 |
14 files changed, 1691 insertions, 0 deletions
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 @@ | |||
1 | Fix up ARM EABI for removed syscalls | ||
2 | http://sourceware.org/ml/libc-ports/2006-03/msg00029.html | ||
3 | |||
4 | Index: 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 | ||
140 | Index: 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 | ||
179 | Index: 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) | ||
207 | Index: 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) | ||
235 | Index: 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 | ||
258 | Index: 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); | ||
294 | Index: 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> | ||
40 | extern 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. */ | ||
69 | struct 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. */ | ||
34 | typedef unsigned char __u_char; | ||
35 | typedef unsigned short int __u_short; | ||
36 | typedef unsigned int __u_int; | ||
37 | typedef unsigned long int __u_long; | ||
38 | |||
39 | /* Fixed-size types, underlying types depend on word size and compiler. */ | ||
40 | typedef signed char __int8_t; | ||
41 | typedef unsigned char __uint8_t; | ||
42 | typedef signed short int __int16_t; | ||
43 | typedef unsigned short int __uint16_t; | ||
44 | typedef signed int __int32_t; | ||
45 | typedef unsigned int __uint32_t; | ||
46 | #if __WORDSIZE == 64 | ||
47 | typedef signed long int __int64_t; | ||
48 | typedef 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 | ||
56 | typedef long int __quad_t; | ||
57 | typedef 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 | ||
62 | typedef struct | ||
63 | { | ||
64 | long __val[2]; | ||
65 | } __quad_t; | ||
66 | typedef 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. */ | ||
187 | typedef __off64_t __loff_t; /* Type of file sizes and offsets (LFS). */ | ||
188 | typedef __quad_t *__qaddr_t; | ||
189 | typedef 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 @@ | |||
1 | This patch moves ld.so.cache from /etc to /var/run. This is for devices | ||
2 | where /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 | ||