aboutsummaryrefslogtreecommitdiffstats
path: root/meta/packages/glibc
diff options
context:
space:
mode:
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 @@
+Index: Makerules
+===================================================================
+RCS file: /cvs/glibc/libc/Makerules,v
+retrieving revision 1.430
+diff -u -r1.430 Makerules
+--- libc/Makerules 5 Mar 2005 19:24:32 -0000 1.430
++++ libc/Makerules 22 Apr 2005 18:31:27 -0000
+@@ -1390,15 +1390,26 @@
+ $(addprefix $(objpfx),$(extra-objs))
+ $(objpfx)stubs: $(objs-for-stubs)
+ ifneq (,$(strip $(objs-for-stubs)))
+- $(OBJDUMP) -h $^ | \
+- $(AWK) '/\.gnu\.glibc-stub\./ { \
+- sub(/\.gnu\.glibc-stub\./, "", $$2); \
+- stubs[$$2] = 1; } \
+- END { for (s in stubs) print "#define __stub_" s }' > $@T
++ $(stub-obj-list)
++ cat $@L | xargs \
++ $(OBJDUMP) -h | \
++ $(AWK) '/\.gnu\.glibc-stub\./ { \
++ sub(/\.gnu\.glibc-stub\./, "", $$2); \
++ stubs[$$2] = 1; } \
++ END { for (s in stubs) print "#define __stub_" s }' \
++ > $@T
++ -rm -f $@L
+ mv -f $@T $@
+ else
+ > $@
+ endif
++
++define stub-obj-list
++-@rm -f $@L
++-@echo "Generating stub obj list..."
++$(foreach file,$^,
++@echo >> $@L '$(file)')
++endef
+
+ # This information is not used for making distributions any more.
+ # 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 @@
+/usr/local/lib
+/opt/QtPalmtop/lib
+/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 @@
+--- glibc-2.1.1/sysdeps/unix/sysv/linux/paths.h~ Thu May 27 13:16:33 1999
++++ glibc-2.1.1/sysdeps/unix/sysv/linux/paths.h Thu May 27 13:17:55 1999
+@@ -71,7 +71,7 @@
+ /* Provide trailing slash, since mostly used for building pathnames. */
+ #define _PATH_DEV "/dev/"
+ #define _PATH_TMP "/tmp/"
+-#define _PATH_VARDB "/var/db/"
++#define _PATH_VARDB "/var/lib/misc/"
+ #define _PATH_VARRUN "/var/run/"
+ #define _PATH_VARTMP "/var/tmp/"
+
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 @@
+#!/usr/bin/make
+
+include $(IN)
+
+all:
+ rm -f $(OUT)
+ touch $(OUT)
+ for locale in $(SUPPORTED-LOCALES); do \
+ [ $$locale = true ] && continue; \
+ echo $$locale | sed 's,/, ,' >> $(OUT); \
+ 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 @@
+--- glibc-2.4/stdlib/longlong.h.ark 2006-03-11 22:49:27.000000000 +0100
++++ glibc-2.4/stdlib/longlong.h 2006-03-11 22:55:12.000000000 +0100
+@@ -206,6 +206,14 @@
+ "rI" ((USItype) (bh)), \
+ "r" ((USItype) (al)), \
+ "rI" ((USItype) (bl)) __CLOBBER_CC)
++/* v3m and all higher arches have long multiply support. */
++#if !defined(__ARM_ARCH_2__) && !defined(__ARM_ARCH_3__)
++#define umul_ppmm(xh, xl, a, b) \
++ __asm__ ("umull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b))
++#define UMUL_TIME 5
++#define smul_ppmm(xh, xl, a, b) \
++ __asm__ ("smull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b))
++#else
+ #define umul_ppmm(xh, xl, a, b) \
+ {register USItype __t0, __t1, __t2; \
+ __asm__ ("%@ Inlined umul_ppmm\n" \
+@@ -227,7 +235,13 @@
+ : "r" ((USItype) (a)), \
+ "r" ((USItype) (b)) __CLOBBER_CC );}
+ #define UMUL_TIME 20
++#endif
+ #define UDIV_TIME 100
++#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__)
++#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X))
++#define COUNT_LEADING_ZEROS_0 32
++#endif
++
+ #endif /* __arm__ */
+
+ #if defined (__hppa) && W_TYPE_SIZE == 32
+--- glibc-2.4/ports/sysdeps/arm/mp_clz_tab.c.ark 2006-03-11 22:56:43.000000000 +0100
++++ glibc-2.4/ports/sysdeps/arm/mp_clz_tab.c 2006-03-11 22:58:19.000000000 +0100
+@@ -0,0 +1,24 @@
++/* __clz_tab -- support for longlong.h
++ Copyright (C) 2004 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__)
++/* Nothing required. */
++#else
++#include <sysdeps/generic/mp_clz_tab.c>
++#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 @@
+--- /dev/null 2004-02-02 20:32:13.000000000 +0000
++++ sysdeps/arm/memmove.S 2004-03-20 18:37:23.000000000 +0000
+@@ -0,0 +1,251 @@
++/*
++ * Optimized memmove implementation for ARM processors
++ *
++ * Author: Nicolas Pitre
++ * Created: Dec 23, 2003
++ * Copyright: (C) MontaVista Software, Inc.
++ *
++ * This file is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This file is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ */
++
++#include <sysdep.h>
++
++
++/*
++ * Endian independent macros for shifting bytes within registers.
++ */
++#ifndef __ARMEB__
++#define pull lsr
++#define push lsl
++#else
++#define pull lsl
++#define push lsr
++#endif
++
++/*
++ * Enable data preload for architectures that support it (ARMv5 and above)
++ */
++#if defined(__ARM_ARCH_5__) || \
++ defined(__ARM_ARCH_5T__) || \
++ defined(__ARM_ARCH_5TE__)
++#define PLD(code...) code
++#else
++#define PLD(code...)
++#endif
++
++
++/* char * memmove (char *dst, const char *src) */
++ENTRY(memmove)
++ subs ip, r0, r1
++ cmphi r2, ip
++ bls memcpy(PLT)
++
++ stmfd sp!, {r0, r4, lr}
++ add r1, r1, r2
++ add r0, r0, r2
++ subs r2, r2, #4
++ blt 25f
++ ands ip, r0, #3
++ PLD( pld [r1, #-4] )
++ bne 26f
++ ands ip, r1, #3
++ bne 27f
++
++19: subs r2, r2, #4
++ blt 24f
++ subs r2, r2, #8
++ blt 23f
++ subs r2, r2, #16
++ blt 22f
++
++ PLD( pld [r1, #-32] )
++ PLD( subs r2, r2, #96 )
++ stmfd sp!, {r5 - r8}
++ PLD( blt 21f )
++
++ PLD( @ cache alignment )
++ PLD( ands ip, r1, #31 )
++ PLD( pld [r1, #-64] )
++ PLD( beq 20f )
++ PLD( cmp r2, ip )
++ PLD( pld [r1, #-96] )
++ PLD( blt 20f )
++ PLD( cmp ip, #16 )
++ PLD( sub r2, r2, ip )
++ PLD( ldmgedb r1!, {r3 - r6} )
++ PLD( stmgedb r0!, {r3 - r6} )
++ PLD( beq 20f )
++ PLD( and ip, ip, #15 )
++ PLD( cmp ip, #8 )
++ PLD( ldr r3, [r1, #-4]! )
++ PLD( ldrge r4, [r1, #-4]! )
++ PLD( ldrgt r5, [r1, #-4]! )
++ PLD( str r3, [r0, #-4]! )
++ PLD( strge r4, [r0, #-4]! )
++ PLD( strgt r5, [r0, #-4]! )
++
++20: PLD( pld [r1, #-96] )
++ PLD( pld [r1, #-128] )
++21: ldmdb r1!, {r3, r4, ip, lr}
++ subs r2, r2, #32
++ stmdb r0!, {r3, r4, ip, lr}
++ ldmdb r1!, {r3, r4, ip, lr}
++ stmgedb r0!, {r3, r4, ip, lr}
++ ldmgedb r1!, {r3, r4, ip, lr}
++ stmgedb r0!, {r3, r4, ip, lr}
++ ldmgedb r1!, {r3, r4, ip, lr}
++ subges r2, r2, #32
++ stmdb r0!, {r3, r4, ip, lr}
++ bge 20b
++ PLD( cmn r2, #96 )
++ PLD( bge 21b )
++ PLD( add r2, r2, #96 )
++ tst r2, #31
++ ldmfd sp!, {r5 - r8}
++ ldmeqfd sp!, {r0, r4, pc}
++
++ tst r2, #16
++22: ldmnedb r1!, {r3, r4, ip, lr}
++ stmnedb r0!, {r3, r4, ip, lr}
++
++ tst r2, #8
++23: ldmnedb r1!, {r3, r4}
++ stmnedb r0!, {r3, r4}
++
++ tst r2, #4
++24: ldrne r3, [r1, #-4]!
++ strne r3, [r0, #-4]!
++
++25: ands r2, r2, #3
++ ldmeqfd sp!, {r0, r4, pc}
++
++ cmp r2, #2
++ ldrb r3, [r1, #-1]
++ ldrgeb r4, [r1, #-2]
++ ldrgtb ip, [r1, #-3]
++ strb r3, [r0, #-1]
++ strgeb r4, [r0, #-2]
++ strgtb ip, [r0, #-3]
++ ldmfd sp!, {r0, r4, pc}
++
++26: cmp ip, #2
++ ldrb r3, [r1, #-1]!
++ ldrgeb r4, [r1, #-1]!
++ ldrgtb lr, [r1, #-1]!
++ strb r3, [r0, #-1]!
++ strgeb r4, [r0, #-1]!
++ strgtb lr, [r0, #-1]!
++ subs r2, r2, ip
++ blt 25b
++ ands ip, r1, #3
++ beq 19b
++
++27: bic r1, r1, #3
++ cmp ip, #2
++ ldr r3, [r1]
++ beq 35f
++ blt 36f
++
++
++ .macro backward_copy_shift push pull
++
++ cmp r2, #12
++ PLD( pld [r1, #-4] )
++ blt 33f
++ subs r2, r2, #28
++ stmfd sp!, {r5 - r9}
++ blt 31f
++
++ PLD( subs r2, r2, #96 )
++ PLD( pld [r1, #-32] )
++ PLD( blt 30f )
++ PLD( pld [r1, #-64] )
++
++ PLD( @ cache alignment )
++ PLD( ands ip, r1, #31 )
++ PLD( pld [r1, #-96] )
++ PLD( beq 29f )
++ PLD( cmp r2, ip )
++ PLD( pld [r1, #-128] )
++ PLD( blt 29f )
++ PLD( sub r2, r2, ip )
++28: PLD( mov r4, r3, push #\push )
++ PLD( ldr r3, [r1, #-4]! )
++ PLD( subs ip, ip, #4 )
++ PLD( orr r4, r4, r3, pull #\pull )
++ PLD( str r4, [r0, #-4]! )
++ PLD( bgt 28b )
++
++29: PLD( pld [r1, #-128] )
++30: mov lr, r3, push #\push
++ ldmdb r1!, {r3 - r9, ip}
++ subs r2, r2, #32
++ orr lr, lr, ip, pull #\pull
++ mov ip, ip, push #\push
++ orr ip, ip, r9, pull #\pull
++ mov r9, r9, push #\push
++ orr r9, r9, r8, pull #\pull
++ mov r8, r8, push #\push
++ orr r8, r8, r7, pull #\pull
++ mov r7, r7, push #\push
++ orr r7, r7, r6, pull #\pull
++ mov r6, r6, push #\push
++ orr r6, r6, r5, pull #\pull
++ mov r5, r5, push #\push
++ orr r5, r5, r4, pull #\pull
++ mov r4, r4, push #\push
++ orr r4, r4, r3, pull #\pull
++ stmdb r0!, {r4 - r9, ip, lr}
++ bge 29b
++ PLD( cmn r2, #96 )
++ PLD( bge 30b )
++ PLD( add r2, r2, #96 )
++ cmn r2, #16
++ blt 32f
++31: mov r7, r3, push #\push
++ ldmdb r1!, {r3 - r6}
++ sub r2, r2, #16
++ orr r7, r7, r6, pull #\pull
++ mov r6, r6, push #\push
++ orr r6, r6, r5, pull #\pull
++ mov r5, r5, push #\push
++ orr r5, r5, r4, pull #\pull
++ mov r4, r4, push #\push
++ orr r4, r4, r3, pull #\pull
++ stmdb r0!, {r4 - r7}
++32: adds r2, r2, #28
++ ldmfd sp!, {r5 - r9}
++ blt 34f
++33: mov r4, r3, push #\push
++ ldr r3, [r1, #-4]!
++ subs r2, r2, #4
++ orr r4, r4, r3, pull #\pull
++ str r4, [r0, #-4]!
++ bge 33b
++34:
++ .endm
++
++
++ backward_copy_shift push=8 pull=24
++ add r1, r1, #3
++ b 25b
++
++35: backward_copy_shift push=16 pull=16
++ add r1, r1, #2
++ b 25b
++
++36: backward_copy_shift push=24 pull=8
++ add r1, r1, #1
++ b 25b
++
++ .size memmove, . - memmove
++END(memmove)
++libc_hidden_builtin_def (memmove)
+--- /dev/null 2004-02-02 20:32:13.000000000 +0000
++++ sysdeps/arm/bcopy.S 2004-03-20 18:37:48.000000000 +0000
+@@ -0,0 +1,255 @@
++/*
++ * Optimized memmove implementation for ARM processors
++ *
++ * Author: Nicolas Pitre
++ * Created: Dec 23, 2003
++ * Copyright: (C) MontaVista Software, Inc.
++ *
++ * This file is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This file is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ */
++
++#include <sysdep.h>
++
++
++/*
++ * Endian independent macros for shifting bytes within registers.
++ */
++#ifndef __ARMEB__
++#define pull lsr
++#define push lsl
++#else
++#define pull lsl
++#define push lsr
++#endif
++
++/*
++ * Enable data preload for architectures that support it (ARMv5 and above)
++ */
++#if defined(__ARM_ARCH_5__) || \
++ defined(__ARM_ARCH_5T__) || \
++ defined(__ARM_ARCH_5TE__)
++#define PLD(code...) code
++#else
++#define PLD(code...)
++#endif
++
++dst .req r1
++src .req r0
++
++/* void *bcopy (const char *src, char *dst, size_t size) */
++ENTRY(bcopy)
++ subs ip, dst, src
++ cmphi r2, ip
++ movls r3, r0
++ movls r0, r1
++ movls r1, r3
++ bls memcpy(PLT)
++
++ stmfd sp!, {r4, lr}
++ add src, src, r2
++ add dst, dst, r2
++ subs r2, r2, #4
++ blt 25f
++ ands ip, dst, #3
++ PLD( pld [src, #-4] )
++ bne 26f
++ ands ip, src, #3
++ bne 27f
++
++19: subs r2, r2, #4
++ blt 24f
++ subs r2, r2, #8
++ blt 23f
++ subs r2, r2, #16
++ blt 22f
++
++ PLD( pld [src, #-32] )
++ PLD( subs r2, r2, #96 )
++ stmfd sp!, {r5 - r8}
++ PLD( blt 21f )
++
++ PLD( @ cache alignment )
++ PLD( ands ip, src, #31 )
++ PLD( pld [src, #-64] )
++ PLD( beq 20f )
++ PLD( cmp r2, ip )
++ PLD( pld [src, #-96] )
++ PLD( blt 20f )
++ PLD( cmp ip, #16 )
++ PLD( sub r2, r2, ip )
++ PLD( ldmgedb src!, {r3 - r6} )
++ PLD( stmgedb dst!, {r3 - r6} )
++ PLD( beq 20f )
++ PLD( and ip, ip, #15 )
++ PLD( cmp ip, #8 )
++ PLD( ldr r3, [src, #-4]! )
++ PLD( ldrge r4, [src, #-4]! )
++ PLD( ldrgt r5, [src, #-4]! )
++ PLD( str r3, [dst, #-4]! )
++ PLD( strge r4, [dst, #-4]! )
++ PLD( strgt r5, [dst, #-4]! )
++
++20: PLD( pld [src, #-96] )
++ PLD( pld [src, #-128] )
++21: ldmdb src!, {r3, r4, ip, lr}
++ subs r2, r2, #32
++ stmdb dst!, {r3, r4, ip, lr}
++ ldmdb src!, {r3, r4, ip, lr}
++ stmgedb dst!, {r3, r4, ip, lr}
++ ldmgedb src!, {r3, r4, ip, lr}
++ stmgedb dst!, {r3, r4, ip, lr}
++ ldmgedb src!, {r3, r4, ip, lr}
++ subges r2, r2, #32
++ stmdb dst!, {r3, r4, ip, lr}
++ bge 20b
++ PLD( cmn r2, #96 )
++ PLD( bge 21b )
++ PLD( add r2, r2, #96 )
++ tst r2, #31
++ ldmfd sp!, {r5 - r8}
++ ldmeqfd sp!, {r4, pc}
++
++ tst r2, #16
++22: ldmnedb src!, {r3, r4, ip, lr}
++ stmnedb dst!, {r3, r4, ip, lr}
++
++ tst r2, #8
++23: ldmnedb src!, {r3, r4}
++ stmnedb dst!, {r3, r4}
++
++ tst r2, #4
++24: ldrne r3, [src, #-4]!
++ strne r3, [dst, #-4]!
++
++25: ands r2, r2, #3
++ ldmeqfd sp!, {dst, r4, pc}
++
++ cmp r2, #2
++ ldrb r3, [src, #-1]
++ ldrgeb r4, [src, #-2]
++ ldrgtb ip, [src, #-3]
++ strb r3, [dst, #-1]
++ strgeb r4, [dst, #-2]
++ strgtb ip, [dst, #-3]
++ ldmfd sp!, {dst, r4, pc}
++
++26: cmp ip, #2
++ ldrb r3, [src, #-1]!
++ ldrgeb r4, [src, #-1]!
++ ldrgtb lr, [src, #-1]!
++ strb r3, [dst, #-1]!
++ strgeb r4, [dst, #-1]!
++ strgtb lr, [dst, #-1]!
++ subs r2, r2, ip
++ blt 25b
++ ands ip, src, #3
++ beq 19b
++
++27: bic src, src, #3
++ cmp ip, #2
++ ldr r3, [src]
++ beq 35f
++ blt 36f
++
++
++ .macro backward_copy_shift push pull
++
++ cmp r2, #12
++ PLD( pld [src, #-4] )
++ blt 33f
++ subs r2, r2, #28
++ stmfd sp!, {r5 - r9}
++ blt 31f
++
++ PLD( subs r2, r2, #96 )
++ PLD( pld [src, #-32] )
++ PLD( blt 30f )
++ PLD( pld [src, #-64] )
++
++ PLD( @ cache alignment )
++ PLD( ands ip, src, #31 )
++ PLD( pld [src, #-96] )
++ PLD( beq 29f )
++ PLD( cmp r2, ip )
++ PLD( pld [src, #-128] )
++ PLD( blt 29f )
++ PLD( sub r2, r2, ip )
++28: PLD( mov r4, r3, push #\push )
++ PLD( ldr r3, [src, #-4]! )
++ PLD( subs ip, ip, #4 )
++ PLD( orr r4, r4, r3, pull #\pull )
++ PLD( str r4, [dst, #-4]! )
++ PLD( bgt 28b )
++
++29: PLD( pld [src, #-128] )
++30: mov lr, r3, push #\push
++ ldmdb src!, {r3 - r9, ip}
++ subs r2, r2, #32
++ orr lr, lr, ip, pull #\pull
++ mov ip, ip, push #\push
++ orr ip, ip, r9, pull #\pull
++ mov r9, r9, push #\push
++ orr r9, r9, r8, pull #\pull
++ mov r8, r8, push #\push
++ orr r8, r8, r7, pull #\pull
++ mov r7, r7, push #\push
++ orr r7, r7, r6, pull #\pull
++ mov r6, r6, push #\push
++ orr r6, r6, r5, pull #\pull
++ mov r5, r5, push #\push
++ orr r5, r5, r4, pull #\pull
++ mov r4, r4, push #\push
++ orr r4, r4, r3, pull #\pull
++ stmdb dst!, {r4 - r9, ip, lr}
++ bge 29b
++ PLD( cmn r2, #96 )
++ PLD( bge 30b )
++ PLD( add r2, r2, #96 )
++ cmn r2, #16
++ blt 32f
++31: mov r7, r3, push #\push
++ ldmdb src!, {r3 - r6}
++ sub r2, r2, #16
++ orr r7, r7, r6, pull #\pull
++ mov r6, r6, push #\push
++ orr r6, r6, r5, pull #\pull
++ mov r5, r5, push #\push
++ orr r5, r5, r4, pull #\pull
++ mov r4, r4, push #\push
++ orr r4, r4, r3, pull #\pull
++ stmdb dst!, {r4 - r7}
++32: adds r2, r2, #28
++ ldmfd sp!, {r5 - r9}
++ blt 34f
++33: mov r4, r3, push #\push
++ ldr r3, [src, #-4]!
++ subs r2, r2, #4
++ orr r4, r4, r3, pull #\pull
++ str r4, [dst, #-4]!
++ bge 33b
++34:
++ .endm
++
++
++ backward_copy_shift push=8 pull=24
++ add src, src, #3
++ b 25b
++
++35: backward_copy_shift push=16 pull=16
++ add src, src, #2
++ b 25b
++
++36: backward_copy_shift push=24 pull=8
++ add src, src, #1
++ b 25b
++
++ .size bcopy, . - bcopy
++END(bcopy)
+
+--- /dev/null 2004-02-02 20:32:13.000000000 +0000
++++ sysdeps/arm/memcpy.S 2004-05-02 14:33:22.000000000 +0100
+@@ -0,0 +1,242 @@
++/*
++ * Optimized memcpy implementation for ARM processors
++ *
++ * Author: Nicolas Pitre
++ * Created: Dec 23, 2003
++ * Copyright: (C) MontaVista Software, Inc.
++ *
++ * This file is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This file is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ */
++
++#include <sysdep.h>
++
++
++/*
++ * Endian independent macros for shifting bytes within registers.
++ */
++#ifndef __ARMEB__
++#define pull lsr
++#define push lsl
++#else
++#define pull lsl
++#define push lsr
++#endif
++
++/*
++ * Enable data preload for architectures that support it (ARMv5 and above)
++ */
++#if defined(__ARM_ARCH_5__) || \
++ defined(__ARM_ARCH_5T__) || \
++ defined(__ARM_ARCH_5TE__)
++#define PLD(code...) code
++#else
++#define PLD(code...)
++#endif
++
++
++/* char * memcpy (char *dst, const char *src) */
++
++ENTRY(memcpy)
++ subs r2, r2, #4
++ stmfd sp!, {r0, r4, lr}
++ blt 7f
++ ands ip, r0, #3
++ PLD( pld [r1, #0] )
++ bne 8f
++ ands ip, r1, #3
++ bne 9f
++
++1: subs r2, r2, #4
++ blt 6f
++ subs r2, r2, #8
++ blt 5f
++ subs r2, r2, #16
++ blt 4f
++
++ PLD( subs r2, r2, #65 )
++ stmfd sp!, {r5 - r8}
++ PLD( blt 3f )
++ PLD( pld [r1, #32] )
++
++ PLD( @ cache alignment )
++ PLD( ands ip, r1, #31 )
++ PLD( pld [r1, #64] )
++ PLD( beq 2f )
++ PLD( rsb ip, ip, #32 )
++ PLD( cmp r2, ip )
++ PLD( pld [r1, #96] )
++ PLD( blt 2f )
++ PLD( cmp ip, #16 )
++ PLD( sub r2, r2, ip )
++ PLD( ldmgeia r1!, {r3 - r6} )
++ PLD( stmgeia r0!, {r3 - r6} )
++ PLD( beq 2f )
++ PLD( and ip, ip, #15 )
++ PLD( cmp ip, #8 )
++ PLD( ldr r3, [r1], #4 )
++ PLD( ldrge r4, [r1], #4 )
++ PLD( ldrgt r5, [r1], #4 )
++ PLD( str r3, [r0], #4 )
++ PLD( strge r4, [r0], #4 )
++ PLD( strgt r5, [r0], #4 )
++
++2: PLD( pld [r1, #96] )
++3: ldmia r1!, {r3 - r8, ip, lr}
++ subs r2, r2, #32
++ stmia r0!, {r3 - r8, ip, lr}
++ bge 2b
++ PLD( cmn r2, #65 )
++ PLD( bge 3b )
++ PLD( add r2, r2, #65 )
++ tst r2, #31
++ ldmfd sp!, {r5 - r8}
++ ldmeqfd sp!, {r0, r4, pc}
++
++ tst r2, #16
++4: ldmneia r1!, {r3, r4, ip, lr}
++ stmneia r0!, {r3, r4, ip, lr}
++
++ tst r2, #8
++5: ldmneia r1!, {r3, r4}
++ stmneia r0!, {r3, r4}
++
++ tst r2, #4
++6: ldrne r3, [r1], #4
++ strne r3, [r0], #4
++
++7: ands r2, r2, #3
++ ldmeqfd sp!, {r0, r4, pc}
++
++ cmp r2, #2
++ ldrb r3, [r1], #1
++ ldrgeb r4, [r1], #1
++ ldrgtb ip, [r1]
++ strb r3, [r0], #1
++ strgeb r4, [r0], #1
++ strgtb ip, [r0]
++ ldmfd sp!, {r0, r4, pc}
++
++8: rsb ip, ip, #4
++ cmp ip, #2
++ ldrb r3, [r1], #1
++ ldrgeb r4, [r1], #1
++ ldrgtb lr, [r1], #1
++ strb r3, [r0], #1
++ strgeb r4, [r0], #1
++ strgtb lr, [r0], #1
++ subs r2, r2, ip
++ blt 7b
++ ands ip, r1, #3
++ beq 1b
++
++9: bic r1, r1, #3
++ cmp ip, #2
++ ldr lr, [r1], #4
++ beq 17f
++ bgt 18f
++
++
++ .macro forward_copy_shift pull push
++
++ cmp r2, #12
++ PLD( pld [r1, #0] )
++ blt 15f
++ subs r2, r2, #28
++ stmfd sp!, {r5 - r9}
++ blt 13f
++
++ PLD( subs r2, r2, #97 )
++ PLD( blt 12f )
++ PLD( pld [r1, #32] )
++
++ PLD( @ cache alignment )
++ PLD( rsb ip, r1, #36 )
++ PLD( pld [r1, #64] )
++ PLD( ands ip, ip, #31 )
++ PLD( pld [r1, #96] )
++ PLD( beq 11f )
++ PLD( cmp r2, ip )
++ PLD( pld [r1, #128] )
++ PLD( blt 11f )
++ PLD( sub r2, r2, ip )
++10: PLD( mov r3, lr, pull #\pull )
++ PLD( ldr lr, [r1], #4 )
++ PLD( subs ip, ip, #4 )
++ PLD( orr r3, r3, lr, push #\push )
++ PLD( str r3, [r0], #4 )
++ PLD( bgt 10b )
++
++11: PLD( pld [r1, #128] )
++12: mov r3, lr, pull #\pull
++ ldmia r1!, {r4 - r9, ip, lr}
++ subs r2, r2, #32
++ orr r3, r3, r4, push #\push
++ mov r4, r4, pull #\pull
++ orr r4, r4, r5, push #\push
++ mov r5, r5, pull #\pull
++ orr r5, r5, r6, push #\push
++ mov r6, r6, pull #\pull
++ orr r6, r6, r7, push #\push
++ mov r7, r7, pull #\pull
++ orr r7, r7, r8, push #\push
++ mov r8, r8, pull #\pull
++ orr r8, r8, r9, push #\push
++ mov r9, r9, pull #\pull
++ orr r9, r9, ip, push #\push
++ mov ip, ip, pull #\pull
++ orr ip, ip, lr, push #\push
++ stmia r0!, {r3 - r9, ip}
++ bge 11b
++ PLD( cmn r2, #97 )
++ PLD( bge 12b )
++ PLD( add r2, r2, #97 )
++ cmn r2, #16
++ blt 14f
++13: mov r3, lr, pull #\pull
++ ldmia r1!, {r4 - r6, lr}
++ sub r2, r2, #16
++ orr r3, r3, r4, push #\push
++ mov r4, r4, pull #\pull
++ orr r4, r4, r5, push #\push
++ mov r5, r5, pull #\pull
++ orr r5, r5, r6, push #\push
++ mov r6, r6, pull #\pull
++ orr r6, r6, lr, push #\push
++ stmia r0!, {r3 - r6}
++14: adds r2, r2, #28
++ ldmfd sp!, {r5 - r9}
++ blt 16f
++15: mov r3, lr, pull #\pull
++ ldr lr, [r1], #4
++ subs r2, r2, #4
++ orr r3, r3, lr, push #\push
++ str r3, [r0], #4
++ bge 15b
++16:
++ .endm
++
++
++ forward_copy_shift pull=8 push=24
++ sub r1, r1, #3
++ b 7b
++
++17: forward_copy_shift pull=16 push=16
++ sub r1, r1, #2
++ b 7b
++
++18: forward_copy_shift pull=24 push=8
++ sub r1, r1, #1
++ b 7b
++
++ .size memcpy, . - memcpy
++END(memcpy)
++libc_hidden_builtin_def (memcpy)
++
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 @@
+--- glibc-2.4/elf/Versions.ark 2006-03-11 23:30:09.000000000 +0100
++++ glibc-2.4/elf/Versions 2006-03-11 23:31:44.000000000 +0100
+@@ -63,5 +63,7 @@
+ _dl_debug_state;
+ # Pointer protection.
+ __pointer_chk_guard;
++ # for ldconfig
++ _dl_cache_libcmp;
+ }
+ }
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 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- libc/elf/Makefile~dyn-ldconfig-20041128
++++ libc/elf/Makefile
+@@ -118,12 +118,13 @@
+
+ ifeq (yes,$(use-ldconfig))
+ ifeq (yes,$(build-shared))
+-others-static += ldconfig
++#others-static += ldconfig
+ others += ldconfig
+ install-rootsbin += ldconfig
+
+ ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon
+ extra-objs += $(ldconfig-modules:=.o)
++CPPFLAGS-readlib.c = -DNOT_IN_libc=1
+
+ # To find xmalloc.c and xstrdup.c
+ 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 @@
+--- elf/Makefile 13 Mar 2003 21:50:57 -0000 1.258
++++ elf/Makefile 27 Mar 2003 20:36:07 -0000
+@@ -109,12 +109,13 @@
+
+ ifeq (yes,$(use-ldconfig))
+ ifeq (yes,$(build-shared))
+-others-static += ldconfig
++#others-static += ldconfig
+ others += ldconfig
+ install-rootsbin += ldconfig
+
+ ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon
+ extra-objs += $(ldconfig-modules:=.o)
++CPPFLAGS-readlib.c = -DNOT_IN_libc=1
+
+ # To find xmalloc.c and xstrdup.c
+ vpath %.c ../locale/programs
+--- elf/ldconfig.c 13 Jan 2003 08:53:14 -0000 1.31
++++ elf/ldconfig.c 27 Mar 2003 20:36:09 -0000
+@@ -149,6 +149,9 @@
+ static int
+ is_hwcap_platform (const char *name)
+ {
++#if 1
++ return 0;
++#else
+ int hwcap_idx = _dl_string_hwcap (name);
+
+ if (hwcap_idx != -1 && ((1 << hwcap_idx) & hwcap_mask))
+@@ -164,6 +167,7 @@
+ #endif
+
+ return 0;
++#endif
+ }
+
+ /* Get hwcap (including platform) encoding of path. */
+@@ -175,6 +179,7 @@
+ uint64_t hwcap = 0;
+ uint64_t h;
+
++#if 0
+ size_t len;
+
+ len = strlen (str);
+@@ -210,6 +215,7 @@
+ *ptr = '\0';
+ }
+
++#endif
+ free (str);
+ return hwcap;
+ }
+--- elf/Versions.old 2004-06-26 13:18:35.000000000 +0100
++++ elf/Versions 2004-06-26 14:41:09.000000000 +0100
+@@ -54,5 +54,6 @@
+ _dl_get_tls_static_info; _dl_allocate_tls_init;
+ _dl_tls_setup; _dl_rtld_di_serinfo;
+ _dl_make_stack_executable;
++ _dl_cache_libcmp;
+ }
+ }
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 @@
+/usr/local/lib
+/opt/QtPalmtop/lib
+
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 @@
+Fix up ARM EABI for removed syscalls
+http://sourceware.org/ml/libc-ports/2006-03/msg00029.html
+
+Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/socket.S
+===================================================================
+--- glibc.orig/ports/sysdeps/unix/sysv/linux/arm/eabi/socket.S 2006-03-21 15:58:10.000000000 -0500
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,131 +0,0 @@
+-/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2005
+- Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+-
+- The GNU C Library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Lesser General Public
+- License as published by the Free Software Foundation; either
+- version 2.1 of the License, or (at your option) any later version.
+-
+- The GNU C Library is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Lesser General Public License for more details.
+-
+- You should have received a copy of the GNU Lesser General Public
+- License along with the GNU C Library; if not, write to the Free
+- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+- 02111-1307 USA. */
+-
+-#include <sysdep-cancel.h>
+-#include <socketcall.h>
+-
+-#define P(a, b) P2(a, b)
+-#define P2(a, b) a##b
+-
+- .text
+-/* The socket-oriented system calls are handled unusally in Linux.
+- They are all gated through the single `socketcall' system call number.
+- `socketcall' takes two arguments: the first is the subcode, specifying
+- which socket function is being called; and the second is a pointer to
+- the arguments to the specific function.
+-
+- The .S files for the other calls just #define socket and #include this. */
+-
+-#ifndef __socket
+-# ifndef NO_WEAK_ALIAS
+-# define __socket P(__,socket)
+-# else
+-# define __socket socket
+-# endif
+-#endif
+-
+-#define PUSHARGS_1 str a1, [sp, $-8]!; .pad #8
+-#define PUSHARGS_2 stmfd sp!, {a1, a2}; .pad #8
+-#define PUSHARGS_3 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* a4 pushed for padding */
+-#define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4}; .pad #16
+-#define PUSHARGS_5 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* Caller has already pushed arg 5 */
+-#define PUSHARGS_6 stmfd sp!, {a1, a2, a3, a4}; .pad #16
+-
+-#define POPARGS_1 add sp, sp, #8
+-#define POPARGS_2 add sp, sp, #8
+-#define POPARGS_3 add sp, sp, #16
+-#define POPARGS_4 add sp, sp, #16
+-#define POPARGS_5 add sp, sp, #16
+-#define POPARGS_6 add sp, sp, #16
+-
+-#ifndef NARGS
+-#define NARGS 3 /* If we were called with no wrapper, this is really socket() */
+-#endif
+-
+-#if defined NEED_CANCELLATION && defined CENABLE
+- PSEUDO_PROLOGUE
+-#endif
+-
+-.globl __socket
+-ENTRY (__socket)
+- .fnstart
+-
+- /* This code previously moved sp into ip and stored the args using
+- stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had
+- to be restored after the syscall completed. It saved an
+- instruction and meant no stack cleanup work was required.
+-
+- This will not work in the case of a socket call being interrupted
+- by a signal. If the signal handler uses any stack the arguments
+- to socket will be trashed. The results of a restart of any
+- socket call are then unpredictable. */
+-
+- /* Push args onto the stack. */
+- P(PUSHARGS_,NARGS)
+-
+-#if defined NEED_CANCELLATION && defined CENABLE
+- SINGLE_THREAD_P
+- bne 1f
+-#endif
+-
+- /* Do the system call trap. */
+- mov a1, $P(SOCKOP_,socket)
+- mov a2, sp
+- DO_CALL (socketcall, 0)
+-
+- /* Pop args off the stack */
+- P(POPARGS_,NARGS)
+-
+- /* r0 is < 0 if there was an error. */
+- cmn r0, $124
+- RETINSTR(cc, r14)
+- b PLTJMP(SYSCALL_ERROR)
+-
+-#if defined NEED_CANCELLATION && defined CENABLE
+-1:
+- stmfd sp!, {r7, lr}
+- .save {r7, lr}
+- CENABLE
+- mov ip, r0
+-
+- mov r0, #P(SOCKOP_,socket)
+- add r1, sp, #8
+- mov r7, #SYS_ify(socketcall)
+- swi 0x0
+-
+- mov r7, r0
+- mov r0, ip
+- CDISABLE
+- mov r0, r7
+- ldmfd sp!, {r7, lr}
+-
+- P(POPARGS_,NARGS)
+-
+- /* r0 is < 0 if there was an error. */
+- cmn r0, $124
+- RETINSTR(cc, r14)
+- b PLTJMP(SYSCALL_ERROR)
+-#endif
+-
+- .fnend
+-PSEUDO_END (__socket)
+-
+-#ifndef NO_WEAK_ALIAS
+-weak_alias (__socket, socket)
+-#endif
+Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list 2006-03-21 15:58:46.000000000 -0500
+@@ -0,0 +1,34 @@
++# File name Caller Syscall name # args Strong name Weak names
++
++# semaphore and shm system calls
++msgctl - msgctl i:iip __msgctl msgctl
++msgget - msgget i:ii __msgget msgget
++msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
++msgsnd - msgsnd Ci:ibni __msgsnd msgsnd
++shmat - shmat i:ipi __shmat shmat
++shmctl - shmctl i:iip __shmctl shmctl
++shmdt - shmdt i:s __shmdt shmdt
++shmget - shmget i:iii __shmget shmget
++semop - semop i:ipi __semop semop
++semtimedop - semtimedop i:ipip semtimedop
++semget - semget i:iii __semget semget
++semctl - semctl i:iiii __semctl semctl
++
++# proper socket implementations:
++accept - accept Ci:iBN __libc_accept __accept accept
++bind - bind i:ipi __bind bind
++connect - connect Ci:ipi __libc_connect __connect_internal __connect connect
++getpeername - getpeername i:ipp __getpeername getpeername
++getsockname - getsockname i:ipp __getsockname getsockname
++getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
++listen - listen i:ii __listen listen
++recv - recv Ci:ibni __libc_recv __recv recv
++recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
++recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg
++send - send Ci:ibni __libc_send __send send
++sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg
++sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto
++setsockopt - setsockopt i:iiibn __setsockopt setsockopt
++shutdown - shutdown i:ii __shutdown shutdown
++socket - socket i:iii __socket socket
++socketpair - socketpair i:iiif __socketpair socketpair
+Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h
+===================================================================
+--- glibc.orig/ports/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h 2006-03-21 15:58:10.000000000 -0500
++++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h 2006-03-21 15:58:46.000000000 -0500
+@@ -53,9 +53,9 @@
+ UNDOARGS_##args; \
+ cmn r0, $4096;
+
+-/* DOARGS pushes four bytes on the stack for five arguments, and nothing
+- otherwise. In order to preserve doubleword alignment, sometimes we must
+- save an extra register. */
++/* DOARGS pushes four bytes on the stack for five arguments, eight bytes for
++ six arguments, and nothing for fewer. In order to preserve doubleword
++ alignment, sometimes we must save an extra register. */
+
+ # define DOCARGS_0 stmfd sp!, {r7, lr}
+ # define UNDOCARGS_0
+@@ -81,6 +81,10 @@
+ # define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3}
+ # define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr}
+
++# define DOCARGS_6 stmfd sp!, {r0, r1, r2, r3, r7, lr}
++# define UNDOCARGS_6 ldmfd sp!, {r0, r1, r2, r3}
++# define RESTORE_LR_6 RESTORE_LR_0
++
+ # ifdef IS_IN_libpthread
+ # define CENABLE bl PLTJMP(__pthread_enable_asynccancel)
+ # define CDISABLE bl PLTJMP(__pthread_disable_asynccancel)
+Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
+===================================================================
+--- glibc.orig/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h 2006-03-21 15:58:10.000000000 -0500
++++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h 2006-03-21 15:58:46.000000000 -0500
+@@ -64,9 +64,9 @@
+ UNDOARGS_##args; \
+ cmn r0, $4096;
+
+-/* DOARGS pushes four bytes on the stack for five arguments, and nothing
+- otherwise. In order to preserve doubleword alignment, sometimes we must
+- save an extra register. */
++/* DOARGS pushes four bytes on the stack for five arguments, eight bytes for
++ six arguments, and nothing for fewer. In order to preserve doubleword
++ alignment, sometimes we must save an extra register. */
+
+ # define RESTART_UNWIND .fnend; .fnstart; .save {r7, lr}
+
+@@ -94,6 +94,10 @@
+ # define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4}; .save {r7, lr}; .pad #4
+ # define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr}
+
++# define DOCARGS_6 .save {r4, r5}; stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #20
++# define UNDOCARGS_6 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4, r5}; .save {r7, lr}
++# define RESTORE_LR_6 RESTORE_LR_0
++
+ # ifdef IS_IN_libpthread
+ # define CENABLE bl PLTJMP(__pthread_enable_asynccancel)
+ # define CDISABLE bl PLTJMP(__pthread_disable_asynccancel)
+Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
+===================================================================
+--- glibc.orig/ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h 2006-03-21 15:58:10.000000000 -0500
++++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h 2006-03-21 15:58:46.000000000 -0500
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005
++/* Copyright (C) 2005, 2006
+ Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+@@ -29,6 +29,12 @@
+ # error Kernel headers are too old
+ #endif
+
++/* Don't use stime, even if the kernel headers define it. We have
++ settimeofday, and some EABI kernels have removed stime. Similarly
++ use setitimer to implement alarm. */
++#undef __NR_stime
++#undef __NR_alarm
++
+ /* The ARM EABI user interface passes the syscall number in r7, instead
+ of in the swi. This is more efficient, because the kernel does not need
+ to fetch the swi from memory to find out the number; which can be painful
+Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/umount.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/umount.c 2006-03-21 15:58:46.000000000 -0500
+@@ -0,0 +1,31 @@
++/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by David Huggins-Daines <dhd@debian.org>, 2000.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++/* Since we don't have an oldumount system call, do what the kernel
++ does down here. */
++
++extern long int __umount2 (const char *name, int flags);
++
++long int
++__umount (const char *name)
++{
++ return __umount2 (name, 0);
++}
++
++weak_alias (__umount, umount);
+Index: glibc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h 2006-03-20 17:26:58.000000000 -0500
+@@ -0,0 +1,31 @@
++/* Set flags signalling availability of kernel features based on given
++ kernel version number.
++ Copyright (C) 2006 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++/* The utimes syscall was added before 2.6.1. */
++#if __LINUX_KERNEL_VERSION >= 132609
++# define __ASSUME_UTIMES 1
++#endif
++
++/* The new getrlimit syscall was added sometime before 2.4.6. */
++#if __LINUX_KERNEL_VERSION >= 132102
++#define __ASSUME_NEW_GETRLIMIT_SYSCALL 1
++#endif
++
++#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 @@
+/* Copyright (C) 1997, 1998, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_SELECT_H
+# error "Never use <bits/select.h> directly; include <sys/select.h> instead."
+#endif
+
+
+/* We don't use `memset' because this would require a prototype and
+ the array isn't too big. */
+#define __FD_ZERO(s) \
+ do { \
+ unsigned int __i; \
+ fd_set *__arr = (s); \
+ for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \
+ __FDS_BITS (__arr)[__i] = 0; \
+ } while (0)
+#define __FD_SET(d, s) (__FDS_BITS (s)[__FDELT(d)] |= __FDMASK(d))
+#define __FD_CLR(d, s) (__FDS_BITS (s)[__FDELT(d)] &= ~__FDMASK(d))
+#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 @@
+/* System-dependent timing definitions. Generic version.
+ Copyright (C) 1996,1997,1999-2002,2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/*
+ * Never include this file directly; use <time.h> instead.
+ */
+
+#ifndef __need_timeval
+# ifndef _BITS_TIME_H
+# define _BITS_TIME_H 1
+
+/* ISO/IEC 9899:1990 7.12.1: <time.h>
+ The macro `CLOCKS_PER_SEC' is the number per second of the value
+ returned by the `clock' function. */
+/* CAE XSH, Issue 4, Version 2: <time.h>
+ The value of CLOCKS_PER_SEC is required to be 1 million on all
+ XSI-conformant systems. */
+# define CLOCKS_PER_SEC 1000000l
+
+# if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K
+/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
+ presents the real value for clock ticks per second for the system. */
+# include <bits/types.h>
+extern long int __sysconf (int);
+# define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */
+# endif
+
+# ifdef __USE_POSIX199309
+/* Identifier for system-wide realtime clock. */
+# define CLOCK_REALTIME 0
+/* Monotonic system-wide clock. */
+# define CLOCK_MONOTONIC 1
+/* High-resolution timer from the CPU. */
+# define CLOCK_PROCESS_CPUTIME_ID 2
+/* Thread-specific CPU-time clock. */
+# define CLOCK_THREAD_CPUTIME_ID 3
+
+/* Flag to indicate time is absolute. */
+# define TIMER_ABSTIME 1
+# endif
+
+# endif /* bits/time.h */
+#endif
+
+#ifdef __need_timeval
+# undef __need_timeval
+# ifndef _STRUCT_TIMEVAL
+# define _STRUCT_TIMEVAL 1
+# include <bits/types.h>
+
+/* A time value that is accurate to the nearest
+ microsecond but also has a range of years. */
+struct timeval
+ {
+ __time_t tv_sec; /* Seconds. */
+ __suseconds_t tv_usec; /* Microseconds. */
+ };
+# endif /* struct timeval */
+#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 @@
+/* bits/types.h -- definitions of __*_t types underlying *_t types.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/*
+ * Never include this file directly; use <sys/types.h> instead.
+ */
+
+#ifndef _BITS_TYPES_H
+#define _BITS_TYPES_H 1
+
+#include <features.h>
+#include <bits/wordsize.h>
+
+#define __need_size_t
+#include <stddef.h>
+
+/* Convenience types. */
+typedef unsigned char __u_char;
+typedef unsigned short int __u_short;
+typedef unsigned int __u_int;
+typedef unsigned long int __u_long;
+
+/* Fixed-size types, underlying types depend on word size and compiler. */
+typedef signed char __int8_t;
+typedef unsigned char __uint8_t;
+typedef signed short int __int16_t;
+typedef unsigned short int __uint16_t;
+typedef signed int __int32_t;
+typedef unsigned int __uint32_t;
+#if __WORDSIZE == 64
+typedef signed long int __int64_t;
+typedef unsigned long int __uint64_t;
+#elif defined __GLIBC_HAVE_LONG_LONG
+__extension__ typedef signed long long int __int64_t;
+__extension__ typedef unsigned long long int __uint64_t;
+#endif
+
+/* quad_t is also 64 bits. */
+#if __WORDSIZE == 64
+typedef long int __quad_t;
+typedef unsigned long int __u_quad_t;
+#elif defined __GLIBC_HAVE_LONG_LONG
+__extension__ typedef long long int __quad_t;
+__extension__ typedef unsigned long long int __u_quad_t;
+#else
+typedef struct
+{
+ long __val[2];
+} __quad_t;
+typedef struct
+{
+ __u_long __val[2];
+} __u_quad_t;
+#endif
+
+
+/* The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+ macros for each of the OS types we define below. The definitions
+ of those macros must use the following macros for underlying types.
+ We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+ variants of each of the following integer types on this machine.
+
+ 16 -- "natural" 16-bit type (always short)
+ 32 -- "natural" 32-bit type (always int)
+ 64 -- "natural" 64-bit type (long or long long)
+ LONG32 -- 32-bit type, traditionally long
+ QUAD -- 64-bit type, always long long
+ WORD -- natural type of __WORDSIZE bits (int or long)
+ LONGWORD -- type of __WORDSIZE bits, traditionally long
+
+ We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+ conventional uses of `long' or `long long' type modifiers match the
+ types we define, even when a less-adorned type would be the same size.
+ This matters for (somewhat) portably writing printf/scanf formats for
+ these types, where using the appropriate l or ll format modifiers can
+ make the typedefs and the formats match up across all GNU platforms. If
+ we used `long' when it's 64 bits where `long long' is expected, then the
+ compiler would warn about the formats not matching the argument types,
+ and the programmer changing them to shut up the compiler would break the
+ program's portability.
+
+ Here we assume what is presently the case in all the GCC configurations
+ we support: long long is always 64 bits, long is always word/address size,
+ and int is always 32 bits. */
+
+#define __S16_TYPE short int
+#define __U16_TYPE unsigned short int
+#define __S32_TYPE int
+#define __U32_TYPE unsigned int
+#define __SLONGWORD_TYPE long int
+#define __ULONGWORD_TYPE unsigned long int
+#if __WORDSIZE == 32
+# define __SQUAD_TYPE __quad_t
+# define __UQUAD_TYPE __u_quad_t
+# define __SWORD_TYPE int
+# define __UWORD_TYPE unsigned int
+# define __SLONG32_TYPE long int
+# define __ULONG32_TYPE unsigned long int
+# define __S64_TYPE __quad_t
+# define __U64_TYPE __u_quad_t
+/* We want __extension__ before typedef's that use nonstandard base types
+ such as `long long' in C89 mode. */
+# define __STD_TYPE __extension__ typedef
+#elif __WORDSIZE == 64
+# define __SQUAD_TYPE long int
+# define __UQUAD_TYPE unsigned long int
+# define __SWORD_TYPE long int
+# define __UWORD_TYPE unsigned long int
+# define __SLONG32_TYPE int
+# define __ULONG32_TYPE unsigned int
+# define __S64_TYPE long int
+# define __U64_TYPE unsigned long int
+/* No need to mark the typedef with __extension__. */
+# define __STD_TYPE typedef
+#else
+# error
+#endif
+#include <bits/typesizes.h> /* Defines __*_T_TYPE macros. */
+
+
+__STD_TYPE __DEV_T_TYPE __dev_t; /* Type of device numbers. */
+__STD_TYPE __UID_T_TYPE __uid_t; /* Type of user identifications. */
+__STD_TYPE __GID_T_TYPE __gid_t; /* Type of group identifications. */
+__STD_TYPE __INO_T_TYPE __ino_t; /* Type of file serial numbers. */
+__STD_TYPE __INO64_T_TYPE __ino64_t; /* Type of file serial numbers (LFS).*/
+__STD_TYPE __MODE_T_TYPE __mode_t; /* Type of file attribute bitmasks. */
+__STD_TYPE __NLINK_T_TYPE __nlink_t; /* Type of file link counts. */
+__STD_TYPE __OFF_T_TYPE __off_t; /* Type of file sizes and offsets. */
+__STD_TYPE __OFF64_T_TYPE __off64_t; /* Type of file sizes and offsets (LFS). */
+__STD_TYPE __PID_T_TYPE __pid_t; /* Type of process identifications. */
+__STD_TYPE __FSID_T_TYPE __fsid_t; /* Type of file system IDs. */
+__STD_TYPE __CLOCK_T_TYPE __clock_t; /* Type of CPU usage counts. */
+__STD_TYPE __RLIM_T_TYPE __rlim_t; /* Type for resource measurement. */
+__STD_TYPE __RLIM64_T_TYPE __rlim64_t; /* Type for resource measurement (LFS). */
+__STD_TYPE __ID_T_TYPE __id_t; /* General type for IDs. */
+__STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */
+__STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */
+__STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */
+
+__STD_TYPE __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */
+__STD_TYPE __SWBLK_T_TYPE __swblk_t; /* Type of a swap block maybe? */
+__STD_TYPE __KEY_T_TYPE __key_t; /* Type of an IPC key. */
+
+/* Clock ID used in clock and timer functions. */
+__STD_TYPE __CLOCKID_T_TYPE __clockid_t;
+
+/* Timer ID returned by `timer_create'. */
+__STD_TYPE __TIMER_T_TYPE __timer_t;
+
+/* Type to represent block size. */
+__STD_TYPE __BLKSIZE_T_TYPE __blksize_t;
+
+/* Types from the Large File Support interface. */
+
+/* Type to count number of disk blocks. */
+__STD_TYPE __BLKCNT_T_TYPE __blkcnt_t;
+__STD_TYPE __BLKCNT64_T_TYPE __blkcnt64_t;
+
+/* Type to count file system blocks. */
+__STD_TYPE __FSBLKCNT_T_TYPE __fsblkcnt_t;
+__STD_TYPE __FSBLKCNT64_T_TYPE __fsblkcnt64_t;
+
+/* Type to count file system nodes. */
+__STD_TYPE __FSFILCNT_T_TYPE __fsfilcnt_t;
+__STD_TYPE __FSFILCNT64_T_TYPE __fsfilcnt64_t;
+
+__STD_TYPE __SSIZE_T_TYPE __ssize_t; /* Type of a byte count, or error. */
+
+/* These few don't really vary by system, they always correspond
+ to one of the other defined types. */
+typedef __off64_t __loff_t; /* Type of file sizes and offsets (LFS). */
+typedef __quad_t *__qaddr_t;
+typedef char *__caddr_t;
+
+/* Duplicates info from stdint.h but this is used in unistd.h. */
+__STD_TYPE __SWORD_TYPE __intptr_t;
+
+/* Duplicate info from sys/socket.h. */
+__STD_TYPE __U32_TYPE __socklen_t;
+
+
+#undef __STD_TYPE
+
+#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 @@
+/* bits/typesizes.h -- underlying types for *_t. Generic version.
+ Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _BITS_TYPES_H
+# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
+#endif
+
+#ifndef _BITS_TYPESIZES_H
+#define _BITS_TYPESIZES_H 1
+
+/* See <bits/types.h> for the meaning of these macros. This file exists so
+ that <bits/types.h> need not vary across different GNU platforms. */
+
+#define __DEV_T_TYPE __UQUAD_TYPE
+#define __UID_T_TYPE __U32_TYPE
+#define __GID_T_TYPE __U32_TYPE
+#define __INO_T_TYPE __ULONGWORD_TYPE
+#define __INO64_T_TYPE __UQUAD_TYPE
+#define __MODE_T_TYPE __U32_TYPE
+#define __NLINK_T_TYPE __UWORD_TYPE
+#define __OFF_T_TYPE __SLONGWORD_TYPE
+#define __OFF64_T_TYPE __SQUAD_TYPE
+#define __PID_T_TYPE __S32_TYPE
+#define __RLIM_T_TYPE __ULONGWORD_TYPE
+#define __RLIM64_T_TYPE __UQUAD_TYPE
+#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
+#define __BLKCNT64_T_TYPE __SQUAD_TYPE
+#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
+#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
+#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
+#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
+#define __ID_T_TYPE __U32_TYPE
+#define __CLOCK_T_TYPE __SLONGWORD_TYPE
+#define __TIME_T_TYPE __SLONGWORD_TYPE
+#define __USECONDS_T_TYPE __U32_TYPE
+#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
+#define __DADDR_T_TYPE __S32_TYPE
+#define __SWBLK_T_TYPE __SLONGWORD_TYPE
+#define __KEY_T_TYPE __S32_TYPE
+#define __CLOCKID_T_TYPE __S32_TYPE
+#define __TIMER_T_TYPE void *
+#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
+#define __FSID_T_TYPE struct { int __val[2]; }
+#define __SSIZE_T_TYPE __SWORD_TYPE
+
+/* Number of descriptors that can fit in an `fd_set'. */
+#define __FD_SETSIZE 1024
+
+
+#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 @@
+--- glibc-2.4/csu/libc-start.c.ark 2006-03-13 03:07:15.000000000 +0100
++++ glibc-2.4/csu/libc-start.c 2006-03-13 03:08:51.000000000 +0100
+@@ -59,6 +59,11 @@
+ # define LIBC_START_MAIN BP_SYM (__libc_start_main)
+ #endif
+
++#ifdef SHARED
++#include <pthread-functions.h>
++extern struct pthread_functions __libc_pthread_functions;
++#endif
++
+ #ifdef MAIN_AUXVEC_ARG
+ /* main gets passed a pointer to the auxiliary. */
+ # define MAIN_AUXVEC_DECL , void *
+--- glibc-2.4/nscd/Makefile.ark 2006-03-13 14:05:47.000000000 +0100
++++ glibc-2.4/nscd/Makefile 2006-03-13 14:06:12.000000000 +0100
+@@ -67,8 +67,10 @@
+ # contains only the basic kernel interface headers, not something like
+ # libselinux. So the simplest thing is to presume that the standard
+ # system headers will be ok for this file.
+-$(objpfx)nscd_stat.o: sysincludes = # nothing
+-$(objpfx)selinux.o: sysincludes = # nothing
++# Except, of course, this breaks crosscompiling with kernel headers in
++# a nonstandard location...
++#$(objpfx)nscd_stat.o: sysincludes = # nothing
++#$(objpfx)selinux.o: sysincludes = # nothing
+
+ distribute := nscd.h nscd-client.h dbg_log.h \
+ $(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 @@
+This patch moves ld.so.cache from /etc to /var/run. This is for devices
+where /etc is JFFS2 or CRAMFS but /var is a ramdisk.
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- libc/sysdeps/generic/dl-cache.h~ldsocache-varrun
++++ libc/sysdeps/generic/dl-cache.h
+@@ -29,7 +29,7 @@
+ #endif
+
+ #ifndef LD_SO_CACHE
+-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache"
++# define LD_SO_CACHE "/var/run/ld.so.cache"
+ #endif
+
+ #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 @@
+--- glibc-2.4/nptl/sysdeps/pthread/configure.in.ark 2006-03-12 00:41:40.000000000 +0100
++++ glibc-2.4/nptl/sysdeps/pthread/configure.in 2006-03-12 00:44:08.000000000 +0100
+@@ -45,5 +45,6 @@
+ AC_MSG_ERROR([the compiler must support C cleanup handling])
+ fi
+ else
+- AC_MSG_ERROR(forced unwind support is required)
++ AC_MSG_WARN([forced unwind support is required, can't be verified while crosscompiling])
++ AC_DEFINE(HAVE_FORCED_UNWIND)
+ fi
+--- glibc-2.4/nptl/sysdeps/pthread/configure.ark 2006-03-12 00:42:47.000000000 +0100
++++ glibc-2.4/nptl/sysdeps/pthread/configure 2006-03-12 00:44:08.000000000 +0100
+@@ -153,7 +153,10 @@
+ { (exit 1); exit 1; }; }
+ fi
+ else
+- { { echo "$as_me:$LINENO: error: forced unwind support is required" >&5
+-echo "$as_me: error: forced unwind support is required" >&2;}
+- { (exit 1); exit 1; }; }
++ { echo "$as_me:$LINENO: WARNING: forced unwind support is required, can't be verified while crosscompiling" >&5
++echo "$as_me: WARNING: forced unwind support is required, can't be verified while crosscompiling" >&2;}
++ cat >>confdefs.h <<\_ACEOF
++#define HAVE_FORCED_UNWIND 1
++_ACEOF
++
+ 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 @@
+2005-05-09 Daniel Jacobowitz <dan@codesourcery.com>
+ Mark Mitchell <mark@codesourcery.com>
+
+ * sysdeps/generic/ldsodefs.h (struct audit_ifaces): Add ARM entries.
+ * elf/tst-auditmod1.c: Add ARM definitions.
+
+Index: glibc/sysdeps/generic/ldsodefs.h
+===================================================================
+--- glibc.orig/sysdeps/generic/ldsodefs.h 2005-04-05 17:36:52.000000000 -0400
++++ glibc/sysdeps/generic/ldsodefs.h 2005-05-06 15:54:44.000000000 -0400
+@@ -203,6 +203,8 @@ struct La_sparc32_regs;
+ struct La_sparc32_retval;
+ struct La_sparc64_regs;
+ struct La_sparc64_retval;
++struct La_arm_regs;
++struct La_arm_retval;
+
+ struct audit_ifaces
+ {
+@@ -284,6 +286,10 @@ struct audit_ifaces
+ const struct La_sparc64_regs *,
+ unsigned int *, const char *name,
+ long int *framesizep);
++ Elf32_Addr (*arm_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *,
++ uintptr_t *, struct La_arm_regs *,
++ unsigned int *, const char *name,
++ long int *framesizep);
+ };
+ union
+ {
+@@ -352,6 +358,9 @@ struct audit_ifaces
+ const struct La_sparc32_regs *,
+ struct La_sparc32_retval *,
+ const char *);
++ unsigned int (*arm_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *,
++ uintptr_t *, const struct La_arm_regs *,
++ struct La_arm_retval *, const char *);
+ };
+ unsigned int (*objclose) (uintptr_t *);
+
+Index: glibc/elf/tst-auditmod1.c
+===================================================================
+--- glibc.orig/elf/tst-auditmod1.c 2005-04-05 17:36:53.000000000 -0400
++++ glibc/elf/tst-auditmod1.c 2005-05-06 15:53:28.000000000 -0400
+@@ -192,6 +192,12 @@ la_symbind64 (Elf64_Sym *sym, unsigned i
+ # define La_regs La_sparc64_regs
+ # define La_retval La_sparc64_retval
+ # define int_retval lrv_reg[0]
++#elif __arm__
++# define pltenter la_arm_gnu_pltenter
++# define pltext la_arm_gnu_pltexit
++# define La_regs La_arm_regs
++# define La_retval La_arm_retval
++# define int_retval lrv_reg[0]
+ #else
+ # error "architecture specific code needed"
+ #endif
+
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 @@
+Index: ports/sysdeps/arm/dl-machine.h
+===================================================================
+RCS file: /cvs/glibc/ports/sysdeps/arm/dl-machine.h,v
+retrieving revision 1.53
+diff -u -r1.53 dl-machine.h
+--- libc/ports/sysdeps/arm/dl-machine.h 10 Jun 2005 11:33:52 -0000 1.53
++++ libc/ports/sysdeps/arm/dl-machine.h 11 Jun 2005 08:58:04 -0000
+@@ -243,6 +243,10 @@
+ Prelinked libraries may use Elf32_Rela though. */
+ #define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP
+
++/* Names of the architecture-specific auditing callback functions. */
++#define ARCH_LA_PLTENTER arm_gnu_pltenter
++#define ARCH_LA_PLTEXIT arm_gnu_pltexit
++
+ #ifdef RESOLVE_MAP
+
+ /* 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 @@
+--- stdlib/longlong.h~ 2002-09-29 18:45:58.000000000 +0100
++++ stdlib/longlong.h 2004-03-20 19:16:44.000000000 +0000
+@@ -210,6 +210,14 @@
+ "rI" ((USItype) (bh)), \
+ "r" ((USItype) (al)), \
+ "rI" ((USItype) (bl)))
++/* v3m and all higher arches have long multiply support. */
++#if !defined(__ARM_ARCH_2__) && !defined(__ARM_ARCH_3__)
++#define umul_ppmm(xh, xl, a, b) \
++ __asm__ ("umull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b))
++#define UMUL_TIME 5
++#define smul_ppmm(xh, xl, a, b) \
++ __asm__ ("smull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b))
++#else
+ #define umul_ppmm(xh, xl, a, b) \
+ {register USItype __t0, __t1, __t2; \
+ __asm__ ("%@ Inlined umul_ppmm\n" \
+@@ -231,7 +239,14 @@
+ : "r" ((USItype) (a)), \
+ "r" ((USItype) (b)));}
+ #define UMUL_TIME 20
++#endif
+ #define UDIV_TIME 100
++
++#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__)
++#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X))
++#define COUNT_LEADING_ZEROS_0 32
++#endif
++
+ #endif /* __arm__ */
+
+ #if defined (__hppa) && W_TYPE_SIZE == 32
+--- /dev/null 2004-02-02 20:32:13.000000000 +0000
++++ ports/sysdeps/arm/mp_clz_tab.c 2004-03-20 19:24:26.000000000 +0000
+@@ -0,0 +1,24 @@
++/* __clz_tab -- support for longlong.h
++ Copyright (C) 2004 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__)
++/* Nothing required. */
++#else
++#include <sysdeps/generic/mp_clz_tab.c>
++#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 @@
+--- /dev/null 2004-02-02 20:32:13.000000000 +0000
++++ libc/ports/sysdeps/arm/memmove.S 2004-03-20 18:37:23.000000000 +0000
+@@ -0,0 +1,251 @@
++/*
++ * Optimized memmove implementation for ARM processors
++ *
++ * Author: Nicolas Pitre
++ * Created: Dec 23, 2003
++ * Copyright: (C) MontaVista Software, Inc.
++ *
++ * This file is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This file is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ */
++
++#include <sysdep.h>
++
++
++/*
++ * Endian independent macros for shifting bytes within registers.
++ */
++#ifndef __ARMEB__
++#define pull lsr
++#define push lsl
++#else
++#define pull lsl
++#define push lsr
++#endif
++
++/*
++ * Enable data preload for architectures that support it (ARMv5 and above)
++ */
++#if defined(__ARM_ARCH_5__) || \
++ defined(__ARM_ARCH_5T__) || \
++ defined(__ARM_ARCH_5TE__)
++#define PLD(code...) code
++#else
++#define PLD(code...)
++#endif
++
++
++/* char * memmove (char *dst, const char *src) */
++ENTRY(memmove)
++ subs ip, r0, r1
++ cmphi r2, ip
++ bls memcpy(PLT)
++
++ stmfd sp!, {r0, r4, lr}
++ add r1, r1, r2
++ add r0, r0, r2
++ subs r2, r2, #4
++ blt 25f
++ ands ip, r0, #3
++ PLD( pld [r1, #-4] )
++ bne 26f
++ ands ip, r1, #3
++ bne 27f
++
++19: subs r2, r2, #4
++ blt 24f
++ subs r2, r2, #8
++ blt 23f
++ subs r2, r2, #16
++ blt 22f
++
++ PLD( pld [r1, #-32] )
++ PLD( subs r2, r2, #96 )
++ stmfd sp!, {r5 - r8}
++ PLD( blt 21f )
++
++ PLD( @ cache alignment )
++ PLD( ands ip, r1, #31 )
++ PLD( pld [r1, #-64] )
++ PLD( beq 20f )
++ PLD( cmp r2, ip )
++ PLD( pld [r1, #-96] )
++ PLD( blt 20f )
++ PLD( cmp ip, #16 )
++ PLD( sub r2, r2, ip )
++ PLD( ldmgedb r1!, {r3 - r6} )
++ PLD( stmgedb r0!, {r3 - r6} )
++ PLD( beq 20f )
++ PLD( and ip, ip, #15 )
++ PLD( cmp ip, #8 )
++ PLD( ldr r3, [r1, #-4]! )
++ PLD( ldrge r4, [r1, #-4]! )
++ PLD( ldrgt r5, [r1, #-4]! )
++ PLD( str r3, [r0, #-4]! )
++ PLD( strge r4, [r0, #-4]! )
++ PLD( strgt r5, [r0, #-4]! )
++
++20: PLD( pld [r1, #-96] )
++ PLD( pld [r1, #-128] )
++21: ldmdb r1!, {r3, r4, ip, lr}
++ subs r2, r2, #32
++ stmdb r0!, {r3, r4, ip, lr}
++ ldmdb r1!, {r3, r4, ip, lr}
++ stmgedb r0!, {r3, r4, ip, lr}
++ ldmgedb r1!, {r3, r4, ip, lr}
++ stmgedb r0!, {r3, r4, ip, lr}
++ ldmgedb r1!, {r3, r4, ip, lr}
++ subges r2, r2, #32
++ stmdb r0!, {r3, r4, ip, lr}
++ bge 20b
++ PLD( cmn r2, #96 )
++ PLD( bge 21b )
++ PLD( add r2, r2, #96 )
++ tst r2, #31
++ ldmfd sp!, {r5 - r8}
++ ldmeqfd sp!, {r0, r4, pc}
++
++ tst r2, #16
++22: ldmnedb r1!, {r3, r4, ip, lr}
++ stmnedb r0!, {r3, r4, ip, lr}
++
++ tst r2, #8
++23: ldmnedb r1!, {r3, r4}
++ stmnedb r0!, {r3, r4}
++
++ tst r2, #4
++24: ldrne r3, [r1, #-4]!
++ strne r3, [r0, #-4]!
++
++25: ands r2, r2, #3
++ ldmeqfd sp!, {r0, r4, pc}
++
++ cmp r2, #2
++ ldrb r3, [r1, #-1]
++ ldrgeb r4, [r1, #-2]
++ ldrgtb ip, [r1, #-3]
++ strb r3, [r0, #-1]
++ strgeb r4, [r0, #-2]
++ strgtb ip, [r0, #-3]
++ ldmfd sp!, {r0, r4, pc}
++
++26: cmp ip, #2
++ ldrb r3, [r1, #-1]!
++ ldrgeb r4, [r1, #-1]!
++ ldrgtb lr, [r1, #-1]!
++ strb r3, [r0, #-1]!
++ strgeb r4, [r0, #-1]!
++ strgtb lr, [r0, #-1]!
++ subs r2, r2, ip
++ blt 25b
++ ands ip, r1, #3
++ beq 19b
++
++27: bic r1, r1, #3
++ cmp ip, #2
++ ldr r3, [r1]
++ beq 35f
++ blt 36f
++
++
++ .macro backward_copy_shift push pull
++
++ cmp r2, #12
++ PLD( pld [r1, #-4] )
++ blt 33f
++ subs r2, r2, #28
++ stmfd sp!, {r5 - r9}
++ blt 31f
++
++ PLD( subs r2, r2, #96 )
++ PLD( pld [r1, #-32] )
++ PLD( blt 30f )
++ PLD( pld [r1, #-64] )
++
++ PLD( @ cache alignment )
++ PLD( ands ip, r1, #31 )
++ PLD( pld [r1, #-96] )
++ PLD( beq 29f )
++ PLD( cmp r2, ip )
++ PLD( pld [r1, #-128] )
++ PLD( blt 29f )
++ PLD( sub r2, r2, ip )
++28: PLD( mov r4, r3, push #\push )
++ PLD( ldr r3, [r1, #-4]! )
++ PLD( subs ip, ip, #4 )
++ PLD( orr r4, r4, r3, pull #\pull )
++ PLD( str r4, [r0, #-4]! )
++ PLD( bgt 28b )
++
++29: PLD( pld [r1, #-128] )
++30: mov lr, r3, push #\push
++ ldmdb r1!, {r3 - r9, ip}
++ subs r2, r2, #32
++ orr lr, lr, ip, pull #\pull
++ mov ip, ip, push #\push
++ orr ip, ip, r9, pull #\pull
++ mov r9, r9, push #\push
++ orr r9, r9, r8, pull #\pull
++ mov r8, r8, push #\push
++ orr r8, r8, r7, pull #\pull
++ mov r7, r7, push #\push
++ orr r7, r7, r6, pull #\pull
++ mov r6, r6, push #\push
++ orr r6, r6, r5, pull #\pull
++ mov r5, r5, push #\push
++ orr r5, r5, r4, pull #\pull
++ mov r4, r4, push #\push
++ orr r4, r4, r3, pull #\pull
++ stmdb r0!, {r4 - r9, ip, lr}
++ bge 29b
++ PLD( cmn r2, #96 )
++ PLD( bge 30b )
++ PLD( add r2, r2, #96 )
++ cmn r2, #16
++ blt 32f
++31: mov r7, r3, push #\push
++ ldmdb r1!, {r3 - r6}
++ sub r2, r2, #16
++ orr r7, r7, r6, pull #\pull
++ mov r6, r6, push #\push
++ orr r6, r6, r5, pull #\pull
++ mov r5, r5, push #\push
++ orr r5, r5, r4, pull #\pull
++ mov r4, r4, push #\push
++ orr r4, r4, r3, pull #\pull
++ stmdb r0!, {r4 - r7}
++32: adds r2, r2, #28
++ ldmfd sp!, {r5 - r9}
++ blt 34f
++33: mov r4, r3, push #\push
++ ldr r3, [r1, #-4]!
++ subs r2, r2, #4
++ orr r4, r4, r3, pull #\pull
++ str r4, [r0, #-4]!
++ bge 33b
++34:
++ .endm
++
++
++ backward_copy_shift push=8 pull=24
++ add r1, r1, #3
++ b 25b
++
++35: backward_copy_shift push=16 pull=16
++ add r1, r1, #2
++ b 25b
++
++36: backward_copy_shift push=24 pull=8
++ add r1, r1, #1
++ b 25b
++
++ .size memmove, . - memmove
++END(memmove)
++libc_hidden_builtin_def (memmove)
+--- /dev/null 2004-02-02 20:32:13.000000000 +0000
++++ libc/ports/sysdeps/arm/bcopy.S 2004-03-20 18:37:48.000000000 +0000
+@@ -0,0 +1,255 @@
++/*
++ * Optimized memmove implementation for ARM processors
++ *
++ * Author: Nicolas Pitre
++ * Created: Dec 23, 2003
++ * Copyright: (C) MontaVista Software, Inc.
++ *
++ * This file is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This file is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ */
++
++#include <sysdep.h>
++
++
++/*
++ * Endian independent macros for shifting bytes within registers.
++ */
++#ifndef __ARMEB__
++#define pull lsr
++#define push lsl
++#else
++#define pull lsl
++#define push lsr
++#endif
++
++/*
++ * Enable data preload for architectures that support it (ARMv5 and above)
++ */
++#if defined(__ARM_ARCH_5__) || \
++ defined(__ARM_ARCH_5T__) || \
++ defined(__ARM_ARCH_5TE__)
++#define PLD(code...) code
++#else
++#define PLD(code...)
++#endif
++
++dst .req r1
++src .req r0
++
++/* void *bcopy (const char *src, char *dst, size_t size) */
++ENTRY(bcopy)
++ subs ip, dst, src
++ cmphi r2, ip
++ movls r3, r0
++ movls r0, r1
++ movls r1, r3
++ bls memcpy(PLT)
++
++ stmfd sp!, {r4, lr}
++ add src, src, r2
++ add dst, dst, r2
++ subs r2, r2, #4
++ blt 25f
++ ands ip, dst, #3
++ PLD( pld [src, #-4] )
++ bne 26f
++ ands ip, src, #3
++ bne 27f
++
++19: subs r2, r2, #4
++ blt 24f
++ subs r2, r2, #8
++ blt 23f
++ subs r2, r2, #16
++ blt 22f
++
++ PLD( pld [src, #-32] )
++ PLD( subs r2, r2, #96 )
++ stmfd sp!, {r5 - r8}
++ PLD( blt 21f )
++
++ PLD( @ cache alignment )
++ PLD( ands ip, src, #31 )
++ PLD( pld [src, #-64] )
++ PLD( beq 20f )
++ PLD( cmp r2, ip )
++ PLD( pld [src, #-96] )
++ PLD( blt 20f )
++ PLD( cmp ip, #16 )
++ PLD( sub r2, r2, ip )
++ PLD( ldmgedb src!, {r3 - r6} )
++ PLD( stmgedb dst!, {r3 - r6} )
++ PLD( beq 20f )
++ PLD( and ip, ip, #15 )
++ PLD( cmp ip, #8 )
++ PLD( ldr r3, [src, #-4]! )
++ PLD( ldrge r4, [src, #-4]! )
++ PLD( ldrgt r5, [src, #-4]! )
++ PLD( str r3, [dst, #-4]! )
++ PLD( strge r4, [dst, #-4]! )
++ PLD( strgt r5, [dst, #-4]! )
++
++20: PLD( pld [src, #-96] )
++ PLD( pld [src, #-128] )
++21: ldmdb src!, {r3, r4, ip, lr}
++ subs r2, r2, #32
++ stmdb dst!, {r3, r4, ip, lr}
++ ldmdb src!, {r3, r4, ip, lr}
++ stmgedb dst!, {r3, r4, ip, lr}
++ ldmgedb src!, {r3, r4, ip, lr}
++ stmgedb dst!, {r3, r4, ip, lr}
++ ldmgedb src!, {r3, r4, ip, lr}
++ subges r2, r2, #32
++ stmdb dst!, {r3, r4, ip, lr}
++ bge 20b
++ PLD( cmn r2, #96 )
++ PLD( bge 21b )
++ PLD( add r2, r2, #96 )
++ tst r2, #31
++ ldmfd sp!, {r5 - r8}
++ ldmeqfd sp!, {r4, pc}
++
++ tst r2, #16
++22: ldmnedb src!, {r3, r4, ip, lr}
++ stmnedb dst!, {r3, r4, ip, lr}
++
++ tst r2, #8
++23: ldmnedb src!, {r3, r4}
++ stmnedb dst!, {r3, r4}
++
++ tst r2, #4
++24: ldrne r3, [src, #-4]!
++ strne r3, [dst, #-4]!
++
++25: ands r2, r2, #3
++ ldmeqfd sp!, {dst, r4, pc}
++
++ cmp r2, #2
++ ldrb r3, [src, #-1]
++ ldrgeb r4, [src, #-2]
++ ldrgtb ip, [src, #-3]
++ strb r3, [dst, #-1]
++ strgeb r4, [dst, #-2]
++ strgtb ip, [dst, #-3]
++ ldmfd sp!, {dst, r4, pc}
++
++26: cmp ip, #2
++ ldrb r3, [src, #-1]!
++ ldrgeb r4, [src, #-1]!
++ ldrgtb lr, [src, #-1]!
++ strb r3, [dst, #-1]!
++ strgeb r4, [dst, #-1]!
++ strgtb lr, [dst, #-1]!
++ subs r2, r2, ip
++ blt 25b
++ ands ip, src, #3
++ beq 19b
++
++27: bic src, src, #3
++ cmp ip, #2
++ ldr r3, [src]
++ beq 35f
++ blt 36f
++
++
++ .macro backward_copy_shift push pull
++
++ cmp r2, #12
++ PLD( pld [src, #-4] )
++ blt 33f
++ subs r2, r2, #28
++ stmfd sp!, {r5 - r9}
++ blt 31f
++
++ PLD( subs r2, r2, #96 )
++ PLD( pld [src, #-32] )
++ PLD( blt 30f )
++ PLD( pld [src, #-64] )
++
++ PLD( @ cache alignment )
++ PLD( ands ip, src, #31 )
++ PLD( pld [src, #-96] )
++ PLD( beq 29f )
++ PLD( cmp r2, ip )
++ PLD( pld [src, #-128] )
++ PLD( blt 29f )
++ PLD( sub r2, r2, ip )
++28: PLD( mov r4, r3, push #\push )
++ PLD( ldr r3, [src, #-4]! )
++ PLD( subs ip, ip, #4 )
++ PLD( orr r4, r4, r3, pull #\pull )
++ PLD( str r4, [dst, #-4]! )
++ PLD( bgt 28b )
++
++29: PLD( pld [src, #-128] )
++30: mov lr, r3, push #\push
++ ldmdb src!, {r3 - r9, ip}
++ subs r2, r2, #32
++ orr lr, lr, ip, pull #\pull
++ mov ip, ip, push #\push
++ orr ip, ip, r9, pull #\pull
++ mov r9, r9, push #\push
++ orr r9, r9, r8, pull #\pull
++ mov r8, r8, push #\push
++ orr r8, r8, r7, pull #\pull
++ mov r7, r7, push #\push
++ orr r7, r7, r6, pull #\pull
++ mov r6, r6, push #\push
++ orr r6, r6, r5, pull #\pull
++ mov r5, r5, push #\push
++ orr r5, r5, r4, pull #\pull
++ mov r4, r4, push #\push
++ orr r4, r4, r3, pull #\pull
++ stmdb dst!, {r4 - r9, ip, lr}
++ bge 29b
++ PLD( cmn r2, #96 )
++ PLD( bge 30b )
++ PLD( add r2, r2, #96 )
++ cmn r2, #16
++ blt 32f
++31: mov r7, r3, push #\push
++ ldmdb src!, {r3 - r6}
++ sub r2, r2, #16
++ orr r7, r7, r6, pull #\pull
++ mov r6, r6, push #\push
++ orr r6, r6, r5, pull #\pull
++ mov r5, r5, push #\push
++ orr r5, r5, r4, pull #\pull
++ mov r4, r4, push #\push
++ orr r4, r4, r3, pull #\pull
++ stmdb dst!, {r4 - r7}
++32: adds r2, r2, #28
++ ldmfd sp!, {r5 - r9}
++ blt 34f
++33: mov r4, r3, push #\push
++ ldr r3, [src, #-4]!
++ subs r2, r2, #4
++ orr r4, r4, r3, pull #\pull
++ str r4, [dst, #-4]!
++ bge 33b
++34:
++ .endm
++
++
++ backward_copy_shift push=8 pull=24
++ add src, src, #3
++ b 25b
++
++35: backward_copy_shift push=16 pull=16
++ add src, src, #2
++ b 25b
++
++36: backward_copy_shift push=24 pull=8
++ add src, src, #1
++ b 25b
++
++ .size bcopy, . - bcopy
++END(bcopy)
+
+--- /dev/null 2004-02-02 20:32:13.000000000 +0000
++++ libc/ports/sysdeps/arm/memcpy.S 2004-05-02 14:33:22.000000000 +0100
+@@ -0,0 +1,242 @@
++/*
++ * Optimized memcpy implementation for ARM processors
++ *
++ * Author: Nicolas Pitre
++ * Created: Dec 23, 2003
++ * Copyright: (C) MontaVista Software, Inc.
++ *
++ * This file is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This file is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ */
++
++#include <sysdep.h>
++
++
++/*
++ * Endian independent macros for shifting bytes within registers.
++ */
++#ifndef __ARMEB__
++#define pull lsr
++#define push lsl
++#else
++#define pull lsl
++#define push lsr
++#endif
++
++/*
++ * Enable data preload for architectures that support it (ARMv5 and above)
++ */
++#if defined(__ARM_ARCH_5__) || \
++ defined(__ARM_ARCH_5T__) || \
++ defined(__ARM_ARCH_5TE__)
++#define PLD(code...) code
++#else
++#define PLD(code...)
++#endif
++
++
++/* char * memcpy (char *dst, const char *src) */
++
++ENTRY(memcpy)
++ subs r2, r2, #4
++ stmfd sp!, {r0, r4, lr}
++ blt 7f
++ ands ip, r0, #3
++ PLD( pld [r1, #0] )
++ bne 8f
++ ands ip, r1, #3
++ bne 9f
++
++1: subs r2, r2, #4
++ blt 6f
++ subs r2, r2, #8
++ blt 5f
++ subs r2, r2, #16
++ blt 4f
++
++ PLD( subs r2, r2, #65 )
++ stmfd sp!, {r5 - r8}
++ PLD( blt 3f )
++ PLD( pld [r1, #32] )
++
++ PLD( @ cache alignment )
++ PLD( ands ip, r1, #31 )
++ PLD( pld [r1, #64] )
++ PLD( beq 2f )
++ PLD( rsb ip, ip, #32 )
++ PLD( cmp r2, ip )
++ PLD( pld [r1, #96] )
++ PLD( blt 2f )
++ PLD( cmp ip, #16 )
++ PLD( sub r2, r2, ip )
++ PLD( ldmgeia r1!, {r3 - r6} )
++ PLD( stmgeia r0!, {r3 - r6} )
++ PLD( beq 2f )
++ PLD( and ip, ip, #15 )
++ PLD( cmp ip, #8 )
++ PLD( ldr r3, [r1], #4 )
++ PLD( ldrge r4, [r1], #4 )
++ PLD( ldrgt r5, [r1], #4 )
++ PLD( str r3, [r0], #4 )
++ PLD( strge r4, [r0], #4 )
++ PLD( strgt r5, [r0], #4 )
++
++2: PLD( pld [r1, #96] )
++3: ldmia r1!, {r3 - r8, ip, lr}
++ subs r2, r2, #32
++ stmia r0!, {r3 - r8, ip, lr}
++ bge 2b
++ PLD( cmn r2, #65 )
++ PLD( bge 3b )
++ PLD( add r2, r2, #65 )
++ tst r2, #31
++ ldmfd sp!, {r5 - r8}
++ ldmeqfd sp!, {r0, r4, pc}
++
++ tst r2, #16
++4: ldmneia r1!, {r3, r4, ip, lr}
++ stmneia r0!, {r3, r4, ip, lr}
++
++ tst r2, #8
++5: ldmneia r1!, {r3, r4}
++ stmneia r0!, {r3, r4}
++
++ tst r2, #4
++6: ldrne r3, [r1], #4
++ strne r3, [r0], #4
++
++7: ands r2, r2, #3
++ ldmeqfd sp!, {r0, r4, pc}
++
++ cmp r2, #2
++ ldrb r3, [r1], #1
++ ldrgeb r4, [r1], #1
++ ldrgtb ip, [r1]
++ strb r3, [r0], #1
++ strgeb r4, [r0], #1
++ strgtb ip, [r0]
++ ldmfd sp!, {r0, r4, pc}
++
++8: rsb ip, ip, #4
++ cmp ip, #2
++ ldrb r3, [r1], #1
++ ldrgeb r4, [r1], #1
++ ldrgtb lr, [r1], #1
++ strb r3, [r0], #1
++ strgeb r4, [r0], #1
++ strgtb lr, [r0], #1
++ subs r2, r2, ip
++ blt 7b
++ ands ip, r1, #3
++ beq 1b
++
++9: bic r1, r1, #3
++ cmp ip, #2
++ ldr lr, [r1], #4
++ beq 17f
++ bgt 18f
++
++
++ .macro forward_copy_shift pull push
++
++ cmp r2, #12
++ PLD( pld [r1, #0] )
++ blt 15f
++ subs r2, r2, #28
++ stmfd sp!, {r5 - r9}
++ blt 13f
++
++ PLD( subs r2, r2, #97 )
++ PLD( blt 12f )
++ PLD( pld [r1, #32] )
++
++ PLD( @ cache alignment )
++ PLD( rsb ip, r1, #36 )
++ PLD( pld [r1, #64] )
++ PLD( ands ip, ip, #31 )
++ PLD( pld [r1, #96] )
++ PLD( beq 11f )
++ PLD( cmp r2, ip )
++ PLD( pld [r1, #128] )
++ PLD( blt 11f )
++ PLD( sub r2, r2, ip )
++10: PLD( mov r3, lr, pull #\pull )
++ PLD( ldr lr, [r1], #4 )
++ PLD( subs ip, ip, #4 )
++ PLD( orr r3, r3, lr, push #\push )
++ PLD( str r3, [r0], #4 )
++ PLD( bgt 10b )
++
++11: PLD( pld [r1, #128] )
++12: mov r3, lr, pull #\pull
++ ldmia r1!, {r4 - r9, ip, lr}
++ subs r2, r2, #32
++ orr r3, r3, r4, push #\push
++ mov r4, r4, pull #\pull
++ orr r4, r4, r5, push #\push
++ mov r5, r5, pull #\pull
++ orr r5, r5, r6, push #\push
++ mov r6, r6, pull #\pull
++ orr r6, r6, r7, push #\push
++ mov r7, r7, pull #\pull
++ orr r7, r7, r8, push #\push
++ mov r8, r8, pull #\pull
++ orr r8, r8, r9, push #\push
++ mov r9, r9, pull #\pull
++ orr r9, r9, ip, push #\push
++ mov ip, ip, pull #\pull
++ orr ip, ip, lr, push #\push
++ stmia r0!, {r3 - r9, ip}
++ bge 11b
++ PLD( cmn r2, #97 )
++ PLD( bge 12b )
++ PLD( add r2, r2, #97 )
++ cmn r2, #16
++ blt 14f
++13: mov r3, lr, pull #\pull
++ ldmia r1!, {r4 - r6, lr}
++ sub r2, r2, #16
++ orr r3, r3, r4, push #\push
++ mov r4, r4, pull #\pull
++ orr r4, r4, r5, push #\push
++ mov r5, r5, pull #\pull
++ orr r5, r5, r6, push #\push
++ mov r6, r6, pull #\pull
++ orr r6, r6, lr, push #\push
++ stmia r0!, {r3 - r6}
++14: adds r2, r2, #28
++ ldmfd sp!, {r5 - r9}
++ blt 16f
++15: mov r3, lr, pull #\pull
++ ldr lr, [r1], #4
++ subs r2, r2, #4
++ orr r3, r3, lr, push #\push
++ str r3, [r0], #4
++ bge 15b
++16:
++ .endm
++
++
++ forward_copy_shift pull=8 push=24
++ sub r1, r1, #3
++ b 7b
++
++17: forward_copy_shift pull=16 push=16
++ sub r1, r1, #2
++ b 7b
++
++18: forward_copy_shift pull=24 push=8
++ sub r1, r1, #1
++ b 7b
++
++ .size memcpy, . - memcpy
++END(memcpy)
++libc_hidden_builtin_def (memcpy)
++
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 @@
+--- libc/ports/sysdeps/unix/sysv/linux/arm/dl-procinfo.h.orig 2005-12-11 14:49:51 +0100
++++ libc/ports/sysdeps/unix/sysv/linux/arm/dl-procinfo.h 2005-12-11 14:51:28 +0100
+@@ -64,7 +64,7 @@
+ HWCAP_ARM_VFP = 1 << 6,
+ HWCAP_ARM_EDSP = 1 << 7,
+
+- HWCAP_IMPORTANT = (HWCAP_ARM_HALF | HWCAP_ARM_FAST_MULT)
++ HWCAP_IMPORTANT = HWCAP_ARM_FAST_MULT
+ };
+
+ 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 @@
+--- libc/elf/Versions.old 2005-06-27 13:38:25.000000000 +0100
++++ libc/elf/Versions 2005-06-27 14:03:54.000000000 +0100
+@@ -56,5 +56,7 @@
+ _dl_make_stack_executable;
+ # Only here for gdb while a better method is developed.
+ _dl_debug_state;
++ # for ldconfig
++ _dl_cache_libcmp;
+ }
+ }
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 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- libc/elf/Makefile~dyn-ldconfig-20041128
++++ libc/elf/Makefile
+@@ -118,12 +118,13 @@
+
+ ifeq (yes,$(use-ldconfig))
+ ifeq (yes,$(build-shared))
+-others-static += ldconfig
++#others-static += ldconfig
+ others += ldconfig
+ install-rootsbin += ldconfig
+
+ ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon
+ extra-objs += $(ldconfig-modules:=.o)
++CPPFLAGS-readlib.c = -DNOT_IN_libc=1
+
+ # To find xmalloc.c and xstrdup.c
+ 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 @@
+This patch moves ld.so.cache from /etc to /var/run. This is for devices
+where /etc is JFFS2 or CRAMFS but /var is a ramdisk.
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- libc/sysdeps/generic/dl-cache.h~ldsocache-varrun
++++ libc/sysdeps/generic/dl-cache.h
+@@ -29,7 +29,7 @@
+ #endif
+
+ #ifndef LD_SO_CACHE
+-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache"
++# define LD_SO_CACHE "/var/run/ld.so.cache"
+ #endif
+
+ #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 @@
+--- sysdeps/unix/sysv/linux/arm/ioperm.c 20 Feb 2003 22:22:35 -0000 1.6
++++ sysdeps/unix/sysv/linux/arm/ioperm.c 24 Oct 2003 20:59:38 -0000
+@@ -100,8 +100,8 @@
+ {
+ char systype[256];
+ int i, n;
+- static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
+- static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
++ static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
++ static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
+ size_t len = sizeof(io.base);
+
+ 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 @@
+--- stdlib/longlong.h~ 2002-09-29 18:45:58.000000000 +0100
++++ stdlib/longlong.h 2004-03-20 19:16:44.000000000 +0000
+@@ -210,6 +210,14 @@
+ "rI" ((USItype) (bh)), \
+ "r" ((USItype) (al)), \
+ "rI" ((USItype) (bl)))
++/* v3m and all higher arches have long multiply support. */
++#if !defined(__ARM_ARCH_2__) && !defined(__ARM_ARCH_3__)
++#define umul_ppmm(xh, xl, a, b) \
++ __asm__ ("umull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b))
++#define UMUL_TIME 5
++#define smul_ppmm(xh, xl, a, b) \
++ __asm__ ("smull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b))
++#else
+ #define umul_ppmm(xh, xl, a, b) \
+ {register USItype __t0, __t1, __t2; \
+ __asm__ ("%@ Inlined umul_ppmm\n" \
+@@ -231,7 +239,14 @@
+ : "r" ((USItype) (a)), \
+ "r" ((USItype) (b)));}
+ #define UMUL_TIME 20
++#endif
+ #define UDIV_TIME 100
++
++#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__)
++#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X))
++#define COUNT_LEADING_ZEROS_0 32
++#endif
++
+ #endif /* __arm__ */
+
+ #if defined (__hppa) && W_TYPE_SIZE == 32
+--- /dev/null 2004-02-02 20:32:13.000000000 +0000
++++ sysdeps/arm/mp_clz_tab.c 2004-03-20 19:24:26.000000000 +0000
+@@ -0,0 +1,24 @@
++/* __clz_tab -- support for longlong.h
++ Copyright (C) 2004 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__)
++/* Nothing required. */
++#else
++#include <sysdeps/generic/mp_clz_tab.c>
++#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 @@
+--- sysdeps/arm/machine-gmon.h~ 2001-07-06 00:55:48.000000000 -0400
++++ sysdeps/arm/machine-gmon.h 2004-04-25 03:56:20.000000000 -0400
+@@ -35,7 +35,7 @@
+ static void mcount_internal (u_long frompc, u_long selfpc);
+
+ #define _MCOUNT_DECL(frompc, selfpc) \
+-static void mcount_internal (u_long frompc, u_long selfpc)
++static __attribute__((used)) void mcount_internal (u_long frompc, u_long selfpc)
+
+ /* This macro/func MUST save r0, r1 because the compiler inserts
+ 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 @@
+--- /dev/null 2004-02-02 20:32:13.000000000 +0000
++++ sysdeps/arm/memmove.S 2004-03-20 18:37:23.000000000 +0000
+@@ -0,0 +1,251 @@
++/*
++ * Optimized memmove implementation for ARM processors
++ *
++ * Author: Nicolas Pitre
++ * Created: Dec 23, 2003
++ * Copyright: (C) MontaVista Software, Inc.
++ *
++ * This file is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This file is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ */
++
++#include <sysdep.h>
++
++
++/*
++ * Endian independent macros for shifting bytes within registers.
++ */
++#ifndef __ARMEB__
++#define pull lsr
++#define push lsl
++#else
++#define pull lsl
++#define push lsr
++#endif
++
++/*
++ * Enable data preload for architectures that support it (ARMv5 and above)
++ */
++#if defined(__ARM_ARCH_5__) || \
++ defined(__ARM_ARCH_5T__) || \
++ defined(__ARM_ARCH_5TE__)
++#define PLD(code...) code
++#else
++#define PLD(code...)
++#endif
++
++
++/* char * memmove (char *dst, const char *src) */
++ENTRY(memmove)
++ subs ip, r0, r1
++ cmphi r2, ip
++ bls memcpy(PLT)
++
++ stmfd sp!, {r0, r4, lr}
++ add r1, r1, r2
++ add r0, r0, r2
++ subs r2, r2, #4
++ blt 25f
++ ands ip, r0, #3
++ PLD( pld [r1, #-4] )
++ bne 26f
++ ands ip, r1, #3
++ bne 27f
++
++19: subs r2, r2, #4
++ blt 24f
++ subs r2, r2, #8
++ blt 23f
++ subs r2, r2, #16
++ blt 22f
++
++ PLD( pld [r1, #-32] )
++ PLD( subs r2, r2, #96 )
++ stmfd sp!, {r5 - r8}
++ PLD( blt 21f )
++
++ PLD( @ cache alignment )
++ PLD( ands ip, r1, #31 )
++ PLD( pld [r1, #-64] )
++ PLD( beq 20f )
++ PLD( cmp r2, ip )
++ PLD( pld [r1, #-96] )
++ PLD( blt 20f )
++ PLD( cmp ip, #16 )
++ PLD( sub r2, r2, ip )
++ PLD( ldmgedb r1!, {r3 - r6} )
++ PLD( stmgedb r0!, {r3 - r6} )
++ PLD( beq 20f )
++ PLD( and ip, ip, #15 )
++ PLD( cmp ip, #8 )
++ PLD( ldr r3, [r1, #-4]! )
++ PLD( ldrge r4, [r1, #-4]! )
++ PLD( ldrgt r5, [r1, #-4]! )
++ PLD( str r3, [r0, #-4]! )
++ PLD( strge r4, [r0, #-4]! )
++ PLD( strgt r5, [r0, #-4]! )
++
++20: PLD( pld [r1, #-96] )
++ PLD( pld [r1, #-128] )
++21: ldmdb r1!, {r3, r4, ip, lr}
++ subs r2, r2, #32
++ stmdb r0!, {r3, r4, ip, lr}
++ ldmdb r1!, {r3, r4, ip, lr}
++ stmgedb r0!, {r3, r4, ip, lr}
++ ldmgedb r1!, {r3, r4, ip, lr}
++ stmgedb r0!, {r3, r4, ip, lr}
++ ldmgedb r1!, {r3, r4, ip, lr}
++ subges r2, r2, #32
++ stmdb r0!, {r3, r4, ip, lr}
++ bge 20b
++ PLD( cmn r2, #96 )
++ PLD( bge 21b )
++ PLD( add r2, r2, #96 )
++ tst r2, #31
++ ldmfd sp!, {r5 - r8}
++ ldmeqfd sp!, {r0, r4, pc}
++
++ tst r2, #16
++22: ldmnedb r1!, {r3, r4, ip, lr}
++ stmnedb r0!, {r3, r4, ip, lr}
++
++ tst r2, #8
++23: ldmnedb r1!, {r3, r4}
++ stmnedb r0!, {r3, r4}
++
++ tst r2, #4
++24: ldrne r3, [r1, #-4]!
++ strne r3, [r0, #-4]!
++
++25: ands r2, r2, #3
++ ldmeqfd sp!, {r0, r4, pc}
++
++ cmp r2, #2
++ ldrb r3, [r1, #-1]
++ ldrgeb r4, [r1, #-2]
++ ldrgtb ip, [r1, #-3]
++ strb r3, [r0, #-1]
++ strgeb r4, [r0, #-2]
++ strgtb ip, [r0, #-3]
++ ldmfd sp!, {r0, r4, pc}
++
++26: cmp ip, #2
++ ldrb r3, [r1, #-1]!
++ ldrgeb r4, [r1, #-1]!
++ ldrgtb lr, [r1, #-1]!
++ strb r3, [r0, #-1]!
++ strgeb r4, [r0, #-1]!
++ strgtb lr, [r0, #-1]!
++ subs r2, r2, ip
++ blt 25b
++ ands ip, r1, #3
++ beq 19b
++
++27: bic r1, r1, #3
++ cmp ip, #2
++ ldr r3, [r1]
++ beq 35f
++ blt 36f
++
++
++ .macro backward_copy_shift push pull
++
++ cmp r2, #12
++ PLD( pld [r1, #-4] )
++ blt 33f
++ subs r2, r2, #28
++ stmfd sp!, {r5 - r9}
++ blt 31f
++
++ PLD( subs r2, r2, #96 )
++ PLD( pld [r1, #-32] )
++ PLD( blt 30f )
++ PLD( pld [r1, #-64] )
++
++ PLD( @ cache alignment )
++ PLD( ands ip, r1, #31 )
++ PLD( pld [r1, #-96] )
++ PLD( beq 29f )
++ PLD( cmp r2, ip )
++ PLD( pld [r1, #-128] )
++ PLD( blt 29f )
++ PLD( sub r2, r2, ip )
++28: PLD( mov r4, r3, push #\push )
++ PLD( ldr r3, [r1, #-4]! )
++ PLD( subs ip, ip, #4 )
++ PLD( orr r4, r4, r3, pull #\pull )
++ PLD( str r4, [r0, #-4]! )
++ PLD( bgt 28b )
++
++29: PLD( pld [r1, #-128] )
++30: mov lr, r3, push #\push
++ ldmdb r1!, {r3 - r9, ip}
++ subs r2, r2, #32
++ orr lr, lr, ip, pull #\pull
++ mov ip, ip, push #\push
++ orr ip, ip, r9, pull #\pull
++ mov r9, r9, push #\push
++ orr r9, r9, r8, pull #\pull
++ mov r8, r8, push #\push
++ orr r8, r8, r7, pull #\pull
++ mov r7, r7, push #\push
++ orr r7, r7, r6, pull #\pull
++ mov r6, r6, push #\push
++ orr r6, r6, r5, pull #\pull
++ mov r5, r5, push #\push
++ orr r5, r5, r4, pull #\pull
++ mov r4, r4, push #\push
++ orr r4, r4, r3, pull #\pull
++ stmdb r0!, {r4 - r9, ip, lr}
++ bge 29b
++ PLD( cmn r2, #96 )
++ PLD( bge 30b )
++ PLD( add r2, r2, #96 )
++ cmn r2, #16
++ blt 32f
++31: mov r7, r3, push #\push
++ ldmdb r1!, {r3 - r6}
++ sub r2, r2, #16
++ orr r7, r7, r6, pull #\pull
++ mov r6, r6, push #\push
++ orr r6, r6, r5, pull #\pull
++ mov r5, r5, push #\push
++ orr r5, r5, r4, pull #\pull
++ mov r4, r4, push #\push
++ orr r4, r4, r3, pull #\pull
++ stmdb r0!, {r4 - r7}
++32: adds r2, r2, #28
++ ldmfd sp!, {r5 - r9}
++ blt 34f
++33: mov r4, r3, push #\push
++ ldr r3, [r1, #-4]!
++ subs r2, r2, #4
++ orr r4, r4, r3, pull #\pull
++ str r4, [r0, #-4]!
++ bge 33b
++34:
++ .endm
++
++
++ backward_copy_shift push=8 pull=24
++ add r1, r1, #3
++ b 25b
++
++35: backward_copy_shift push=16 pull=16
++ add r1, r1, #2
++ b 25b
++
++36: backward_copy_shift push=24 pull=8
++ add r1, r1, #1
++ b 25b
++
++ .size memmove, . - memmove
++END(memmove)
++libc_hidden_builtin_def (memmove)
+--- /dev/null 2004-02-02 20:32:13.000000000 +0000
++++ sysdeps/arm/bcopy.S 2004-03-20 18:37:48.000000000 +0000
+@@ -0,0 +1,255 @@
++/*
++ * Optimized memmove implementation for ARM processors
++ *
++ * Author: Nicolas Pitre
++ * Created: Dec 23, 2003
++ * Copyright: (C) MontaVista Software, Inc.
++ *
++ * This file is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This file is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ */
++
++#include <sysdep.h>
++
++
++/*
++ * Endian independent macros for shifting bytes within registers.
++ */
++#ifndef __ARMEB__
++#define pull lsr
++#define push lsl
++#else
++#define pull lsl
++#define push lsr
++#endif
++
++/*
++ * Enable data preload for architectures that support it (ARMv5 and above)
++ */
++#if defined(__ARM_ARCH_5__) || \
++ defined(__ARM_ARCH_5T__) || \
++ defined(__ARM_ARCH_5TE__)
++#define PLD(code...) code
++#else
++#define PLD(code...)
++#endif
++
++dst .req r1
++src .req r0
++
++/* void *bcopy (const char *src, char *dst, size_t size) */
++ENTRY(bcopy)
++ subs ip, dst, src
++ cmphi r2, ip
++ movls r3, r0
++ movls r0, r1
++ movls r1, r3
++ bls memcpy(PLT)
++
++ stmfd sp!, {r4, lr}
++ add src, src, r2
++ add dst, dst, r2
++ subs r2, r2, #4
++ blt 25f
++ ands ip, dst, #3
++ PLD( pld [src, #-4] )
++ bne 26f
++ ands ip, src, #3
++ bne 27f
++
++19: subs r2, r2, #4
++ blt 24f
++ subs r2, r2, #8
++ blt 23f
++ subs r2, r2, #16
++ blt 22f
++
++ PLD( pld [src, #-32] )
++ PLD( subs r2, r2, #96 )
++ stmfd sp!, {r5 - r8}
++ PLD( blt 21f )
++
++ PLD( @ cache alignment )
++ PLD( ands ip, src, #31 )
++ PLD( pld [src, #-64] )
++ PLD( beq 20f )
++ PLD( cmp r2, ip )
++ PLD( pld [src, #-96] )
++ PLD( blt 20f )
++ PLD( cmp ip, #16 )
++ PLD( sub r2, r2, ip )
++ PLD( ldmgedb src!, {r3 - r6} )
++ PLD( stmgedb dst!, {r3 - r6} )
++ PLD( beq 20f )
++ PLD( and ip, ip, #15 )
++ PLD( cmp ip, #8 )
++ PLD( ldr r3, [src, #-4]! )
++ PLD( ldrge r4, [src, #-4]! )
++ PLD( ldrgt r5, [src, #-4]! )
++ PLD( str r3, [dst, #-4]! )
++ PLD( strge r4, [dst, #-4]! )
++ PLD( strgt r5, [dst, #-4]! )
++
++20: PLD( pld [src, #-96] )
++ PLD( pld [src, #-128] )
++21: ldmdb src!, {r3, r4, ip, lr}
++ subs r2, r2, #32
++ stmdb dst!, {r3, r4, ip, lr}
++ ldmdb src!, {r3, r4, ip, lr}
++ stmgedb dst!, {r3, r4, ip, lr}
++ ldmgedb src!, {r3, r4, ip, lr}
++ stmgedb dst!, {r3, r4, ip, lr}
++ ldmgedb src!, {r3, r4, ip, lr}
++ subges r2, r2, #32
++ stmdb dst!, {r3, r4, ip, lr}
++ bge 20b
++ PLD( cmn r2, #96 )
++ PLD( bge 21b )
++ PLD( add r2, r2, #96 )
++ tst r2, #31
++ ldmfd sp!, {r5 - r8}
++ ldmeqfd sp!, {r4, pc}
++
++ tst r2, #16
++22: ldmnedb src!, {r3, r4, ip, lr}
++ stmnedb dst!, {r3, r4, ip, lr}
++
++ tst r2, #8
++23: ldmnedb src!, {r3, r4}
++ stmnedb dst!, {r3, r4}
++
++ tst r2, #4
++24: ldrne r3, [src, #-4]!
++ strne r3, [dst, #-4]!
++
++25: ands r2, r2, #3
++ ldmeqfd sp!, {dst, r4, pc}
++
++ cmp r2, #2
++ ldrb r3, [src, #-1]
++ ldrgeb r4, [src, #-2]
++ ldrgtb ip, [src, #-3]
++ strb r3, [dst, #-1]
++ strgeb r4, [dst, #-2]
++ strgtb ip, [dst, #-3]
++ ldmfd sp!, {dst, r4, pc}
++
++26: cmp ip, #2
++ ldrb r3, [src, #-1]!
++ ldrgeb r4, [src, #-1]!
++ ldrgtb lr, [src, #-1]!
++ strb r3, [dst, #-1]!
++ strgeb r4, [dst, #-1]!
++ strgtb lr, [dst, #-1]!
++ subs r2, r2, ip
++ blt 25b
++ ands ip, src, #3
++ beq 19b
++
++27: bic src, src, #3
++ cmp ip, #2
++ ldr r3, [src]
++ beq 35f
++ blt 36f
++
++
++ .macro backward_copy_shift push pull
++
++ cmp r2, #12
++ PLD( pld [src, #-4] )
++ blt 33f
++ subs r2, r2, #28
++ stmfd sp!, {r5 - r9}
++ blt 31f
++
++ PLD( subs r2, r2, #96 )
++ PLD( pld [src, #-32] )
++ PLD( blt 30f )
++ PLD( pld [src, #-64] )
++
++ PLD( @ cache alignment )
++ PLD( ands ip, src, #31 )
++ PLD( pld [src, #-96] )
++ PLD( beq 29f )
++ PLD( cmp r2, ip )
++ PLD( pld [src, #-128] )
++ PLD( blt 29f )
++ PLD( sub r2, r2, ip )
++28: PLD( mov r4, r3, push #\push )
++ PLD( ldr r3, [src, #-4]! )
++ PLD( subs ip, ip, #4 )
++ PLD( orr r4, r4, r3, pull #\pull )
++ PLD( str r4, [dst, #-4]! )
++ PLD( bgt 28b )
++
++29: PLD( pld [src, #-128] )
++30: mov lr, r3, push #\push
++ ldmdb src!, {r3 - r9, ip}
++ subs r2, r2, #32
++ orr lr, lr, ip, pull #\pull
++ mov ip, ip, push #\push
++ orr ip, ip, r9, pull #\pull
++ mov r9, r9, push #\push
++ orr r9, r9, r8, pull #\pull
++ mov r8, r8, push #\push
++ orr r8, r8, r7, pull #\pull
++ mov r7, r7, push #\push
++ orr r7, r7, r6, pull #\pull
++ mov r6, r6, push #\push
++ orr r6, r6, r5, pull #\pull
++ mov r5, r5, push #\push
++ orr r5, r5, r4, pull #\pull
++ mov r4, r4, push #\push
++ orr r4, r4, r3, pull #\pull
++ stmdb dst!, {r4 - r9, ip, lr}
++ bge 29b
++ PLD( cmn r2, #96 )
++ PLD( bge 30b )
++ PLD( add r2, r2, #96 )
++ cmn r2, #16
++ blt 32f
++31: mov r7, r3, push #\push
++ ldmdb src!, {r3 - r6}
++ sub r2, r2, #16
++ orr r7, r7, r6, pull #\pull
++ mov r6, r6, push #\push
++ orr r6, r6, r5, pull #\pull
++ mov r5, r5, push #\push
++ orr r5, r5, r4, pull #\pull
++ mov r4, r4, push #\push
++ orr r4, r4, r3, pull #\pull
++ stmdb dst!, {r4 - r7}
++32: adds r2, r2, #28
++ ldmfd sp!, {r5 - r9}
++ blt 34f
++33: mov r4, r3, push #\push
++ ldr r3, [src, #-4]!
++ subs r2, r2, #4
++ orr r4, r4, r3, pull #\pull
++ str r4, [dst, #-4]!
++ bge 33b
++34:
++ .endm
++
++
++ backward_copy_shift push=8 pull=24
++ add src, src, #3
++ b 25b
++
++35: backward_copy_shift push=16 pull=16
++ add src, src, #2
++ b 25b
++
++36: backward_copy_shift push=24 pull=8
++ add src, src, #1
++ b 25b
++
++ .size bcopy, . - bcopy
++END(bcopy)
+
+--- /dev/null 2004-02-02 20:32:13.000000000 +0000
++++ sysdeps/arm/memcpy.S 2004-05-02 14:33:22.000000000 +0100
+@@ -0,0 +1,242 @@
++/*
++ * Optimized memcpy implementation for ARM processors
++ *
++ * Author: Nicolas Pitre
++ * Created: Dec 23, 2003
++ * Copyright: (C) MontaVista Software, Inc.
++ *
++ * This file is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This file is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ */
++
++#include <sysdep.h>
++
++
++/*
++ * Endian independent macros for shifting bytes within registers.
++ */
++#ifndef __ARMEB__
++#define pull lsr
++#define push lsl
++#else
++#define pull lsl
++#define push lsr
++#endif
++
++/*
++ * Enable data preload for architectures that support it (ARMv5 and above)
++ */
++#if defined(__ARM_ARCH_5__) || \
++ defined(__ARM_ARCH_5T__) || \
++ defined(__ARM_ARCH_5TE__)
++#define PLD(code...) code
++#else
++#define PLD(code...)
++#endif
++
++
++/* char * memcpy (char *dst, const char *src) */
++
++ENTRY(memcpy)
++ subs r2, r2, #4
++ stmfd sp!, {r0, r4, lr}
++ blt 7f
++ ands ip, r0, #3
++ PLD( pld [r1, #0] )
++ bne 8f
++ ands ip, r1, #3
++ bne 9f
++
++1: subs r2, r2, #4
++ blt 6f
++ subs r2, r2, #8
++ blt 5f
++ subs r2, r2, #16
++ blt 4f
++
++ PLD( subs r2, r2, #65 )
++ stmfd sp!, {r5 - r8}
++ PLD( blt 3f )
++ PLD( pld [r1, #32] )
++
++ PLD( @ cache alignment )
++ PLD( ands ip, r1, #31 )
++ PLD( pld [r1, #64] )
++ PLD( beq 2f )
++ PLD( rsb ip, ip, #32 )
++ PLD( cmp r2, ip )
++ PLD( pld [r1, #96] )
++ PLD( blt 2f )
++ PLD( cmp ip, #16 )
++ PLD( sub r2, r2, ip )
++ PLD( ldmgeia r1!, {r3 - r6} )
++ PLD( stmgeia r0!, {r3 - r6} )
++ PLD( beq 2f )
++ PLD( and ip, ip, #15 )
++ PLD( cmp ip, #8 )
++ PLD( ldr r3, [r1], #4 )
++ PLD( ldrge r4, [r1], #4 )
++ PLD( ldrgt r5, [r1], #4 )
++ PLD( str r3, [r0], #4 )
++ PLD( strge r4, [r0], #4 )
++ PLD( strgt r5, [r0], #4 )
++
++2: PLD( pld [r1, #96] )
++3: ldmia r1!, {r3 - r8, ip, lr}
++ subs r2, r2, #32
++ stmia r0!, {r3 - r8, ip, lr}
++ bge 2b
++ PLD( cmn r2, #65 )
++ PLD( bge 3b )
++ PLD( add r2, r2, #65 )
++ tst r2, #31
++ ldmfd sp!, {r5 - r8}
++ ldmeqfd sp!, {r0, r4, pc}
++
++ tst r2, #16
++4: ldmneia r1!, {r3, r4, ip, lr}
++ stmneia r0!, {r3, r4, ip, lr}
++
++ tst r2, #8
++5: ldmneia r1!, {r3, r4}
++ stmneia r0!, {r3, r4}
++
++ tst r2, #4
++6: ldrne r3, [r1], #4
++ strne r3, [r0], #4
++
++7: ands r2, r2, #3
++ ldmeqfd sp!, {r0, r4, pc}
++
++ cmp r2, #2
++ ldrb r3, [r1], #1
++ ldrgeb r4, [r1], #1
++ ldrgtb ip, [r1]
++ strb r3, [r0], #1
++ strgeb r4, [r0], #1
++ strgtb ip, [r0]
++ ldmfd sp!, {r0, r4, pc}
++
++8: rsb ip, ip, #4
++ cmp ip, #2
++ ldrb r3, [r1], #1
++ ldrgeb r4, [r1], #1
++ ldrgtb lr, [r1], #1
++ strb r3, [r0], #1
++ strgeb r4, [r0], #1
++ strgtb lr, [r0], #1
++ subs r2, r2, ip
++ blt 7b
++ ands ip, r1, #3
++ beq 1b
++
++9: bic r1, r1, #3
++ cmp ip, #2
++ ldr lr, [r1], #4
++ beq 17f
++ bgt 18f
++
++
++ .macro forward_copy_shift pull push
++
++ cmp r2, #12
++ PLD( pld [r1, #0] )
++ blt 15f
++ subs r2, r2, #28
++ stmfd sp!, {r5 - r9}
++ blt 13f
++
++ PLD( subs r2, r2, #97 )
++ PLD( blt 12f )
++ PLD( pld [r1, #32] )
++
++ PLD( @ cache alignment )
++ PLD( rsb ip, r1, #36 )
++ PLD( pld [r1, #64] )
++ PLD( ands ip, ip, #31 )
++ PLD( pld [r1, #96] )
++ PLD( beq 11f )
++ PLD( cmp r2, ip )
++ PLD( pld [r1, #128] )
++ PLD( blt 11f )
++ PLD( sub r2, r2, ip )
++10: PLD( mov r3, lr, pull #\pull )
++ PLD( ldr lr, [r1], #4 )
++ PLD( subs ip, ip, #4 )
++ PLD( orr r3, r3, lr, push #\push )
++ PLD( str r3, [r0], #4 )
++ PLD( bgt 10b )
++
++11: PLD( pld [r1, #128] )
++12: mov r3, lr, pull #\pull
++ ldmia r1!, {r4 - r9, ip, lr}
++ subs r2, r2, #32
++ orr r3, r3, r4, push #\push
++ mov r4, r4, pull #\pull
++ orr r4, r4, r5, push #\push
++ mov r5, r5, pull #\pull
++ orr r5, r5, r6, push #\push
++ mov r6, r6, pull #\pull
++ orr r6, r6, r7, push #\push
++ mov r7, r7, pull #\pull
++ orr r7, r7, r8, push #\push
++ mov r8, r8, pull #\pull
++ orr r8, r8, r9, push #\push
++ mov r9, r9, pull #\pull
++ orr r9, r9, ip, push #\push
++ mov ip, ip, pull #\pull
++ orr ip, ip, lr, push #\push
++ stmia r0!, {r3 - r9, ip}
++ bge 11b
++ PLD( cmn r2, #97 )
++ PLD( bge 12b )
++ PLD( add r2, r2, #97 )
++ cmn r2, #16
++ blt 14f
++13: mov r3, lr, pull #\pull
++ ldmia r1!, {r4 - r6, lr}
++ sub r2, r2, #16
++ orr r3, r3, r4, push #\push
++ mov r4, r4, pull #\pull
++ orr r4, r4, r5, push #\push
++ mov r5, r5, pull #\pull
++ orr r5, r5, r6, push #\push
++ mov r6, r6, pull #\pull
++ orr r6, r6, lr, push #\push
++ stmia r0!, {r3 - r6}
++14: adds r2, r2, #28
++ ldmfd sp!, {r5 - r9}
++ blt 16f
++15: mov r3, lr, pull #\pull
++ ldr lr, [r1], #4
++ subs r2, r2, #4
++ orr r3, r3, lr, push #\push
++ str r3, [r0], #4
++ bge 15b
++16:
++ .endm
++
++
++ forward_copy_shift pull=8 push=24
++ sub r1, r1, #3
++ b 7b
++
++17: forward_copy_shift pull=16 push=16
++ sub r1, r1, #2
++ b 7b
++
++18: forward_copy_shift pull=24 push=8
++ sub r1, r1, #1
++ b 7b
++
++ .size memcpy, . - memcpy
++END(memcpy)
++libc_hidden_builtin_def (memcpy)
++
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 @@
+--- sysdeps/unix/sysv/linux/arm/dl-procinfo.h Mon Jul 23 12:57:23 2001
++++ sysdeps/unix/sysv/linux/arm/dl-procinfo.h Sun Feb 10 06:37:00 2002
+@@ -67,7 +67,7 @@
+ HWCAP_ARM_VFP = 1 << 6,
+ HWCAP_ARM_EDSP = 1 << 7,
+
+- HWCAP_IMPORTANT = (HWCAP_ARM_HALF | HWCAP_ARM_FAST_MULT)
++ HWCAP_IMPORTANT = HWCAP_ARM_FAST_MULT
+ };
+
+ 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 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- libc/elf/Makefile~dyn-ldconfig-20041128
++++ libc/elf/Makefile
+@@ -118,12 +118,13 @@
+
+ ifeq (yes,$(use-ldconfig))
+ ifeq (yes,$(build-shared))
+-others-static += ldconfig
++#others-static += ldconfig
+ others += ldconfig
+ install-rootsbin += ldconfig
+
+ ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon
+ extra-objs += $(ldconfig-modules:=.o)
++CPPFLAGS-readlib.c = -DNOT_IN_libc=1
+
+ # To find xmalloc.c and xstrdup.c
+ 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 @@
+--- elf/Makefile 13 Mar 2003 21:50:57 -0000 1.258
++++ elf/Makefile 27 Mar 2003 20:36:07 -0000
+@@ -109,12 +109,13 @@
+
+ ifeq (yes,$(use-ldconfig))
+ ifeq (yes,$(build-shared))
+-others-static += ldconfig
++#others-static += ldconfig
+ others += ldconfig
+ install-rootsbin += ldconfig
+
+ ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon
+ extra-objs += $(ldconfig-modules:=.o)
++CPPFLAGS-readlib.c = -DNOT_IN_libc=1
+
+ # To find xmalloc.c and xstrdup.c
+ vpath %.c ../locale/programs
+--- elf/ldconfig.c 13 Jan 2003 08:53:14 -0000 1.31
++++ elf/ldconfig.c 27 Mar 2003 20:36:09 -0000
+@@ -149,6 +149,9 @@
+ static int
+ is_hwcap_platform (const char *name)
+ {
++#if 1
++ return 0;
++#else
+ int hwcap_idx = _dl_string_hwcap (name);
+
+ if (hwcap_idx != -1 && ((1 << hwcap_idx) & hwcap_mask))
+@@ -164,6 +167,7 @@
+ #endif
+
+ return 0;
++#endif
+ }
+
+ /* Get hwcap (including platform) encoding of path. */
+@@ -175,6 +179,7 @@
+ uint64_t hwcap = 0;
+ uint64_t h;
+
++#if 0
+ size_t len;
+
+ len = strlen (str);
+@@ -210,6 +215,7 @@
+ *ptr = '\0';
+ }
+
++#endif
+ free (str);
+ return hwcap;
+ }
+--- elf/Versions.old 2004-06-26 13:18:35.000000000 +0100
++++ elf/Versions 2004-06-26 14:41:09.000000000 +0100
+@@ -54,5 +54,6 @@
+ _dl_get_tls_static_info; _dl_allocate_tls_init;
+ _dl_tls_setup; _dl_rtld_di_serinfo;
+ _dl_make_stack_executable;
++ _dl_cache_libcmp;
+ }
+ }
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 @@
+From 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
+Return-Path: <libc-alpha-return-17227-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
+Delivered-To: listarch-libc-alpha at sources dot redhat dot com
+Received: (qmail 12343 invoked by alias); 22 Mar 2005 15:57:24 -0000
+Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
+Precedence: bulk
+List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
+List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
+List-Post: <mailto:libc-alpha at sources dot redhat dot com>
+List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
+Sender: libc-alpha-owner at sources dot redhat dot com
+Delivered-To: mailing list libc-alpha at sources dot redhat dot com
+Received: (qmail 12264 invoked from network); 22 Mar 2005 15:57:19 -0000
+Received: from unknown (HELO nevyn.them.org) (66.93.172.17)
+ by sourceware dot org with SMTP; 22 Mar 2005 15:57:19 -0000
+Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
+ id 1DDll5-0006ip-R3; Tue, 22 Mar 2005 10:57:31 -0500
+Date: Tue, 22 Mar 2005 10:57:31 -0500
+From: Daniel Jacobowitz <drow at false dot org>
+To: libc-alpha at sources dot redhat dot com
+Cc: Phil Blundell <pb at reciva dot com>
+Subject: Common bits for the ARM EABI port
+Message-ID: <20050322155731.GA25613@nevyn.them.org>
+Mail-Followup-To: libc-alpha at sources dot redhat dot com,
+ Phil Blundell <pb at reciva dot com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+User-Agent: Mutt/1.5.6+20040907i
+
+The changes to common files for the ARM EABI port; search the new directory,
+use GLIBC_2.4 as a base version, and generate ld-linux.so.3 (so that old and
+new ABI libraries can be installed on the same system, in case someone needs
+to do that). Generic ARM changes coming up next.
+
+I noticed that the "configure: Regenerated" messages are often left out of
+glibc changelogs; should I skip them?
+
+--
+Daniel Jacobowitz
+CodeSourcery, LLC
+
+2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * configure.in: Add arm*-*-linux-gnueabi support. Remove
+ unused arm32 entry from $machine.
+ * configure: Regenerated.
+ * shlib-versions: Add arm*-*-linux-gnueabi.
+
+Index: glibc/configure.in
+===================================================================
+--- glibc.orig/configure.in 2005-03-18 17:10:34.000000000 -0500
++++ glibc/configure.in 2005-03-21 10:04:41.000000000 -0500
+@@ -423,7 +423,12 @@ changequote(,)dnl
+ test -n "$base_machine" || case "$machine" in
+ a29k | am29000) base_machine=a29k machine=a29k ;;
+ alpha*) base_machine=alpha machine=alpha/$machine ;;
+-arm*) base_machine=arm machine=arm/arm32/$machine ;;
++arm*) base_machine=arm
++ case $config_os in
++ linux-gnueabi) machine=arm/eabi/$machine ;;
++ *) machine=arm/$machine ;;
++ esac
++ ;;
+ c3[012]) base_machine=cx0 machine=cx0/c30 ;;
+ c4[04]) base_machine=cx0 machine=cx0/c40 ;;
+ hppa*64*) base_machine=hppa machine=hppa/hppa64 ;;
+Index: glibc/shlib-versions
+===================================================================
+--- glibc.orig/shlib-versions 2005-02-13 21:53:05.000000000 -0500
++++ glibc/shlib-versions 2005-03-21 10:06:54.000000000 -0500
+@@ -31,6 +31,7 @@ cris-.*-linux.* DEFAULT GLIBC_2.2
+ x86_64-.*-linux.* DEFAULT GLIBC_2.2.5
+ powerpc64-.*-linux.* DEFAULT GLIBC_2.3
+ .*-.*-gnu-gnu.* DEFAULT GLIBC_2.2.6
++arm.*-.*-linux-gnueabi DEFAULT GLIBC_2.4
+
+ # Configuration WORDSIZE[32|64] Alternate configuration
+ # ------------- ---------- -----------------------
+@@ -80,6 +81,7 @@ i.86-.*-linux.* ld=ld-linux.so.2
+ sparc64-.*-linux.* ld=ld-linux.so.2 GLIBC_2.2
+ sparc.*-.*-linux.* ld=ld-linux.so.2
+ alpha.*-.*-linux.* ld=ld-linux.so.2
++arm.*-.*-linux-gnueabi ld=ld-linux.so.3
+ arm.*-.*-linux.* ld=ld-linux.so.2
+ sh.*-.*-linux.* ld=ld-linux.so.2 GLIBC_2.2
+ ia64-.*-linux.* ld=ld-linux-ia64.so.2 GLIBC_2.2
+
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 @@
+From 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
+Return-Path: <libc-alpha-return-17231-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
+Delivered-To: listarch-libc-alpha at sources dot redhat dot com
+Received: (qmail 15063 invoked by alias); 22 Mar 2005 17:39:38 -0000
+Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
+Precedence: bulk
+List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
+List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
+List-Post: <mailto:libc-alpha at sources dot redhat dot com>
+List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
+Sender: libc-alpha-owner at sources dot redhat dot com
+Delivered-To: mailing list libc-alpha at sources dot redhat dot com
+Received: (qmail 13714 invoked from network); 22 Mar 2005 17:38:53 -0000
+Received: from unknown (HELO nevyn.them.org) (66.93.172.17)
+ by sourceware dot org with SMTP; 22 Mar 2005 17:38:53 -0000
+Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
+ id 1DDnLP-00007R-0B; Tue, 22 Mar 2005 12:39:07 -0500
+Date: Tue, 22 Mar 2005 12:39:06 -0500
+From: Daniel Jacobowitz <drow at false dot org>
+To: libc-alpha at sources dot redhat dot com, Phil Blundell <pb at reciva dot com>
+Subject: Re: Remainder of ARM EABI support
+Message-ID: <20050322173906.GA316@nevyn.them.org>
+Mail-Followup-To: libc-alpha at sources dot redhat dot com,
+ Phil Blundell <pb at reciva dot com>
+References: <20050322162137.GA26662@nevyn.them.org>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+In-Reply-To: <20050322162137 dot GA26662 at nevyn dot them dot org>
+User-Agent: Mutt/1.5.6+20040907i
+
+On Tue, Mar 22, 2005 at 11:21:37AM -0500, Daniel Jacobowitz wrote:
+> This patch is the remaining pieces of ARM EABI support, the
+> arm*-*-linux-gnueabi target.
+>
+> Highlights of the new ABI compared to the old one:
+> - Eight byte stack alignment instead of four.
+> - VFP floating point support instead of FPA; there's actually hardware
+> which supports VFP...
+> - More standard structure layout. The old ABI (APCS) always rounded
+> structures up to 32-bit alignment even if they contained only chars;
+> it also aligned 64-bit fields to four bytes.
+> - Some types have been grown to accomodate modern ARM cores, particularly
+> jmp_buf.
+>
+> The EABI also defines some additional symbols that a C library has to
+> define, which allow "portable" ARM objects to be linked to multiple C
+> libraries even if certain implementation-defined constants differ.
+> They're added to ARM-specific files in libc_nonshared.a.
+>
+> Most of the contents of sysdeps/unix/sysv/linux/arm/eabi are wrappers for
+> syscalls whose types have changed between the old and new ABI. The kernel
+> developers are discussing an EABI syscall interface, but for now the swi
+> based syscalls take the same argument types they used to for APCS. Only
+> a handful of syscalls are affected.
+
+My track record is not very good this morning; I apologize. I sent the
+wrong version of the patch. This one includes a couple of VFP fixes
+left out of the last posting, and a complete changelog.
+
+--
+Daniel Jacobowitz
+CodeSourcery, LLC
+
+2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
+ Mark Mitchell <mark@codesourcery.com>
+ Paul Brook <paul@codesourcery.com>
+
+ * sysdeps/arm/eabi/Makefile, sysdeps/arm/eabi/Versions,
+ sysdeps/arm/eabi/aeabi_assert.c, sysdeps/arm/eabi/aeabi_atexit.c,
+ sysdeps/arm/eabi/aeabi_errno_addr.c, sysdeps/arm/eabi/aeabi_lcsts.c,
+ sysdeps/arm/eabi/aeabi_localeconv.c, sysdeps/arm/eabi/aeabi_math.c,
+ sysdeps/arm/eabi/aeabi_mb_cur_max.c,
+ sysdeps/arm/eabi/aeabi_sighandlers.S,
+ sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c,
+ sysdeps/arm/eabi/bits/huge_val.h, sysdeps/arm/eabi/bits/setjmp.h,
+ sysdeps/arm/eabi/find_exidx.c, sysdeps/arm/eabi/fpu/__longjmp.S,
+ sysdeps/arm/eabi/fpu/bits/fenv.h, sysdeps/arm/eabi/fpu/fclrexcpt.c,
+ sysdeps/arm/eabi/fpu/fegetround.c, sysdeps/arm/eabi/fpu/fesetenv.c,
+ sysdeps/arm/eabi/fpu/fesetround.c, sysdeps/arm/eabi/fpu/fpu_control.h,
+ sysdeps/arm/eabi/fpu/feholdexcpt.c,
+ sysdeps/arm/eabi/fpu/fraiseexcpt.c,
+ sysdeps/arm/eabi/fpu/setjmp.S,
+ sysdeps/unix/sysv/linux/arm/eabi/configure,
+ sysdeps/unix/sysv/linux/arm/eabi/configure.in,
+ sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c,
+ sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c,
+ sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h,
+ sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c,
+ sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c,
+ sysdeps/unix/sysv/linux/arm/eabi/semop.c,
+ sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c,
+ sysdeps/unix/sysv/linux/arm/eabi/statfs64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/uname.c,
+ sysdeps/unix/sysv/linux/arm/eabi/xstat64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c,
+ sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h: New files.
+
+
+Index: glibc/sysdeps/arm/eabi/Makefile
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/Makefile 2005-03-22 11:53:10.049703870 -0500
+@@ -0,0 +1,15 @@
++ifeq ($(subdir),csu)
++aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math
++aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \
++ aeabi_mb_cur_max aeabi_atexit
++
++sysdep_routines += $(aeabi_constants) $(aeabi_routines)
++static-only-routines += $(aeabi_constants) $(aeabi_routines)
++endif
++
++ifeq ($(subdir),elf)
++sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx
++shared-only-routines += aeabi_unwind_cpp_pr1
++sysdep-rtld-routines += aeabi_unwind_cpp_pr1
++endif
++
+Index: glibc/sysdeps/arm/eabi/Versions
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/Versions 2005-03-22 11:53:10.049703870 -0500
+@@ -0,0 +1,6 @@
++libc {
++ GLIBC_2.4 {
++ # Helper routines
++ __gnu_Unwind_Find_exidx;
++ }
++}
+Index: glibc/sysdeps/arm/eabi/aeabi_assert.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/aeabi_assert.c 2005-03-22 11:53:10.049703870 -0500
+@@ -0,0 +1,27 @@
++/* Copyright (C) 2004 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <assert.h>
++#include <stdlib.h>
++
++void attribute_hidden
++__aeabi_assert (const char *assertion, const char *file,
++ unsigned int line)
++{
++ __assert_fail (assertion, file, line, NULL);
++}
+Index: glibc/sysdeps/arm/eabi/aeabi_atexit.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/aeabi_atexit.c 2005-03-22 11:53:10.050703627 -0500
+@@ -0,0 +1,28 @@
++/* Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <stdlib.h>
++
++/* Register a function to be called by exit or when a shared library
++ is unloaded. This routine is like __cxa_atexit, but uses the
++ calling sequence required by the ARM EABI. */
++int attribute_hidden
++__aeabi_atexit (void *arg, void (*func) (void *), void *d)
++{
++ return __cxa_atexit (func, arg, d);
++}
+Index: glibc/sysdeps/arm/eabi/aeabi_errno_addr.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/aeabi_errno_addr.c 2005-03-22 11:53:10.050703627 -0500
+@@ -0,0 +1,26 @@
++/* Copyright (C) 2004 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <errno.h>
++
++attribute_hidden
++volatile int *
++__aeabi_errno_addr (void)
++{
++ return &errno;
++}
+Index: glibc/sysdeps/arm/eabi/aeabi_lcsts.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/aeabi_lcsts.c 2005-03-22 11:53:10.050703627 -0500
+@@ -0,0 +1,67 @@
++/* Link-time constants for ARM EABI.
++ Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++/* The ARM EABI requires that we provide ISO compile-time constants as
++ link-time constants. Some portable applications may reference these. */
++
++#include <errno.h>
++#include <limits.h>
++#include <locale.h>
++#include <setjmp.h>
++#include <signal.h>
++#include <stdio.h>
++#include <time.h>
++
++#define eabi_constant2(X,Y) const int __aeabi_##X attribute_hidden = Y
++#define eabi_constant(X) const int __aeabi_##X attribute_hidden = X
++
++eabi_constant (EDOM);
++eabi_constant (ERANGE);
++eabi_constant (EILSEQ);
++
++eabi_constant (MB_LEN_MAX);
++
++eabi_constant (LC_COLLATE);
++eabi_constant (LC_CTYPE);
++eabi_constant (LC_MONETARY);
++eabi_constant (LC_NUMERIC);
++eabi_constant (LC_TIME);
++eabi_constant (LC_ALL);
++
++/* The value of __aeabi_JMP_BUF_SIZE is the number of doublewords in a
++ jmp_buf. */
++eabi_constant2 (JMP_BUF_SIZE, sizeof (jmp_buf) / 8);
++
++eabi_constant (SIGABRT);
++eabi_constant (SIGFPE);
++eabi_constant (SIGILL);
++eabi_constant (SIGINT);
++eabi_constant (SIGSEGV);
++eabi_constant (SIGTERM);
++
++eabi_constant2 (IOFBF, _IOFBF);
++eabi_constant2 (IOLBF, _IOLBF);
++eabi_constant2 (IONBF, _IONBF);
++eabi_constant (BUFSIZ);
++eabi_constant (FOPEN_MAX);
++eabi_constant (TMP_MAX);
++eabi_constant (FILENAME_MAX);
++eabi_constant (L_tmpnam);
++
++eabi_constant (CLOCKS_PER_SEC);
+Index: glibc/sysdeps/arm/eabi/aeabi_localeconv.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/aeabi_localeconv.c 2005-03-22 11:53:10.050703627 -0500
+@@ -0,0 +1,26 @@
++/* Copyright (C) 2004 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <locale.h>
++
++attribute_hidden
++struct lconv *
++__aeabi_localeconv (void)
++{
++ return localeconv ();
++}
+Index: glibc/sysdeps/arm/eabi/aeabi_math.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/aeabi_math.c 2005-03-22 11:53:10.050703627 -0500
+@@ -0,0 +1,25 @@
++/* Copyright (C) 2004 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <math.h>
++
++const double __aeabi_HUGE_VAL attribute_hidden = HUGE_VAL;
++const long double __aeabi_HUGE_VALL attribute_hidden = HUGE_VALL;
++const float __aeabi_HUGE_VALF attribute_hidden = HUGE_VALF;
++const float __aeabi_INFINITY attribute_hidden = INFINITY;
++const float __aeabi_NAN attribute_hidden = NAN;
+Index: glibc/sysdeps/arm/eabi/aeabi_mb_cur_max.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/aeabi_mb_cur_max.c 2005-03-22 11:53:10.051703385 -0500
+@@ -0,0 +1,28 @@
++/* Copyright (C) 2004 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <langinfo.h>
++#include <locale.h>
++#include <stdlib.h>
++#include <locale/localeinfo.h>
++
++int attribute_hidden
++__aeabi_MB_CUR_MAX (void)
++{
++ return MB_CUR_MAX;
++}
+Index: glibc/sysdeps/arm/eabi/aeabi_sighandlers.S
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/aeabi_sighandlers.S 2005-03-22 11:53:10.051703385 -0500
+@@ -0,0 +1,37 @@
++/* Link-time constants for ARM EABI - signal handlers.
++ Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++/* The ARM EABI defines these as "functions". */
++
++#include <sysdep.h>
++
++ .global __aeabi_SIG_DFL
++ .hidden __aeabi_SIG_DFL
++ .type __aeabi_SIG_DFL, %function
++ .set __aeabi_SIG_DFL, 0
++
++ .global __aeabi_SIG_IGN
++ .hidden __aeabi_SIG_IGN
++ .type __aeabi_SIG_IGN, %function
++ .set __aeabi_SIG_IGN, 1
++
++ .global __aeabi_SIG_ERR
++ .hidden __aeabi_SIG_ERR
++ .type __aeabi_SIG_ERR, %function
++ .set __aeabi_SIG_ERR, -1
+Index: glibc/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c 2005-03-22 11:53:10.051703385 -0500
+@@ -0,0 +1,28 @@
++/* Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++/* Because some objects in ld.so and libc.so are built with
++ -fexceptions, we end up with references to this personality
++ routine. However, these libraries are not linked against
++ libgcc_eh.a, so we need a dummy definition. This routine will
++ never actually be called. */
++
++void
++__aeabi_unwind_cpp_pr1 (void)
++{
++}
+Index: glibc/sysdeps/arm/eabi/bits/huge_val.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/bits/huge_val.h 2005-03-22 11:53:10.051703385 -0500
+@@ -0,0 +1,55 @@
++/* `HUGE_VAL' constant for IEEE 754 machines (where it is infinity).
++ Used by <stdlib.h> and <math.h> functions for overflow.
++ Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004
++ Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#ifndef _MATH_H
++# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
++#endif
++
++/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
++
++#if __GNUC_PREREQ(3,3)
++# define HUGE_VAL (__builtin_huge_val())
++#elif __GNUC_PREREQ(2,96)
++# define HUGE_VAL (__extension__ 0x1.0p2047)
++#elif defined __GNUC__
++
++# define HUGE_VAL \
++ (__extension__ \
++ ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \
++ { __l: 0x7ff0000000000000ULL }).__d)
++
++#else /* not GCC */
++
++# include <endian.h>
++
++typedef union { unsigned char __c[8]; double __d; } __huge_val_t;
++
++# if __BYTE_ORDER == __BIG_ENDIAN
++# define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
++# endif
++# if __BYTE_ORDER == __LITTLE_ENDIAN
++# define __HUGE_VAL_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
++# endif
++
++static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
++# define HUGE_VAL (__huge_val.__d)
++
++#endif /* GCC. */
+Index: glibc/sysdeps/arm/eabi/bits/setjmp.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/bits/setjmp.h 2005-03-22 11:53:10.052703143 -0500
+@@ -0,0 +1,45 @@
++/* Copyright (C) 2004 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++/* Define the machine-dependent type `jmp_buf'. ARM EABI version. */
++
++#ifndef _BITS_SETJMP_H
++#define _BITS_SETJMP_H 1
++
++#if !defined _SETJMP_H && !defined _PTHREAD_H
++# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
++#endif
++
++#ifndef _ASM
++/* The exact set of registers saved may depend on the particular core
++ in use, as some coprocessor registers may need to be saved. The C
++ Library ABI requires that the buffer be 8-byte aligned, and
++ recommends that the buffer contain 64 words. The first 28 words
++ are occupied by v1-v6, sl, fp, sp, pc, d8-d15, and fpscr. (Note
++ that d8-15 require 17 words, due to the use of fstmx.) */
++typedef int __jmp_buf[64] __attribute__((aligned (8)));
++#endif
++
++#define __JMP_BUF_SP 8
++
++/* Test if longjmp to JMPBUF would unwind the frame
++ containing a local variable at ADDRESS. */
++#define _JMPBUF_UNWINDS(jmpbuf, address) \
++ ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
++
++#endif
+Index: glibc/sysdeps/arm/eabi/find_exidx.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/find_exidx.c 2005-03-22 11:53:10.052703143 -0500
+@@ -0,0 +1,80 @@
++/* Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <link.h>
++#include <unwind.h>
++
++struct unw_eh_callback_data
++{
++ _Unwind_Ptr pc;
++ _Unwind_Ptr exidx_start;
++ int exidx_len;
++};
++
++
++/* Callback to determins if the PC lies within an object, and remember the
++ location of the exception index table if it does. */
++
++static int
++find_exidx_callback (struct dl_phdr_info * info, size_t size, void * ptr)
++{
++ struct unw_eh_callback_data * data;
++ const ElfW(Phdr) *phdr;
++ int i;
++ int match;
++ _Unwind_Ptr load_base;
++
++ data = (struct unw_eh_callback_data *) ptr;
++ load_base = info->dlpi_addr;
++ phdr = info->dlpi_phdr;
++
++ match = 0;
++ for (i = info->dlpi_phnum; i > 0; i--, phdr++)
++ {
++ if (phdr->p_type == PT_LOAD)
++ {
++ _Unwind_Ptr vaddr = phdr->p_vaddr + load_base;
++ if (data->pc >= vaddr && data->pc < vaddr + phdr->p_memsz)
++ match = 1;
++ }
++ else if (phdr->p_type == PT_ARM_EXIDX)
++ {
++ data->exidx_start = (_Unwind_Ptr) (phdr->p_vaddr + load_base);
++ data->exidx_len = phdr->p_memsz;
++ }
++ }
++
++ return match;
++}
++
++
++/* Find the exception index table containing PC. */
++
++_Unwind_Ptr
++__gnu_Unwind_Find_exidx (_Unwind_Ptr pc, int * pcount)
++{
++ struct unw_eh_callback_data data;
++
++ data.pc = pc;
++ data.exidx_start = 0;
++ if (dl_iterate_phdr (find_exidx_callback, &data) <= 0)
++ return 0;
++
++ *pcount = data.exidx_len / 8;
++ return data.exidx_start;
++}
+Index: glibc/sysdeps/arm/eabi/fpu/__longjmp.S
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/fpu/__longjmp.S 2005-03-22 11:53:10.052703143 -0500
+@@ -0,0 +1,43 @@
++/* longjmp for ARM.
++ Copyright (C) 2004 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <sysdep.h>
++#define _SETJMP_H
++#define _ASM
++#include <bits/setjmp.h>
++
++/* __longjmp(jmpbuf, val) */
++
++ENTRY (__longjmp)
++ mov ip, r0 /* save jmp_buf pointer */
++
++ movs r0, r1 /* get the return value in place */
++ moveq r0, #1 /* can't let setjmp() return zero! */
++
++ /* Restore the integer registers. */
++ LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr})
++
++ /* Restore the VFP registers. */
++ fldmiax ip!, {d8-d15}
++ /* Restore the floating-point status register. */
++ ldr r1, [ip], #4
++ fmxr fpscr, r1
++
++ DO_RET(lr)
++END (__longjmp)
+Index: glibc/sysdeps/arm/eabi/fpu/bits/fenv.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/fpu/bits/fenv.h 2005-03-22 12:34:55.511467536 -0500
+@@ -0,0 +1,74 @@
++/* Copyright (C) 2004 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#ifndef _FENV_H
++# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
++#endif
++
++/* Define bits representing exceptions in the FPU status word. */
++enum
++ {
++ FE_INVALID = 1,
++#define FE_INVALID FE_INVALID
++ FE_DIVBYZERO = 2,
++#define FE_DIVBYZERO FE_DIVBYZERO
++ FE_OVERFLOW = 4,
++#define FE_OVERFLOW FE_OVERFLOW
++ FE_UNDERFLOW = 8,
++#define FE_UNDERFLOW FE_UNDERFLOW
++ FE_INEXACT = 16,
++#define FE_INEXACT FE_INEXACT
++ };
++
++/* Amount to shift by to convert an exception to a mask bit. */
++#define FE_EXCEPT_SHIFT 8
++
++/* All supported exceptions. */
++#define FE_ALL_EXCEPT \
++ (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
++
++/* VFP supports all of the four defined rounding modes. */
++enum
++ {
++ FE_TONEAREST = 0,
++#define FE_TONEAREST FE_TONEAREST
++ FE_UPWARD = 0x400000,
++#define FE_UPWARD FE_UPWARD
++ FE_DOWNWARD = 0x800000,
++#define FE_DOWNWARD FE_DOWNWARD
++ FE_TOWARDZERO = 0xc00000
++#define FE_TOWARDZERO FE_TOWARDZERO
++ };
++
++/* Type representing exception flags. */
++typedef unsigned int fexcept_t;
++
++/* Type representing floating-point environment. */
++typedef struct
++ {
++ unsigned int __cw;
++ }
++fenv_t;
++
++/* If the default argument is used we use this value. */
++#define FE_DFL_ENV ((fenv_t *) -1l)
++
++#ifdef __USE_GNU
++/* Floating-point environment where none of the exceptions are masked. */
++# define FE_NOMASK_ENV ((__const fenv_t *) -2)
++#endif
+Index: glibc/sysdeps/arm/eabi/fpu/fclrexcpt.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/fpu/fclrexcpt.c 2005-03-22 11:53:10.053702900 -0500
+@@ -0,0 +1,50 @@
++/* Clear given exceptions in current floating-point environment.
++ Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <fenv.h>
++#include <fpu_control.h>
++
++int
++__feclearexcept (int excepts)
++{
++ unsigned long int temp;
++
++ /* Mask out unsupported bits/exceptions. */
++ excepts &= FE_ALL_EXCEPT;
++
++ /* Get the current floating point status. */
++ _FPU_GETCW (temp);
++
++ /* Clear the relevant bits. */
++ temp = (temp & ~FE_ALL_EXCEPT) | (temp & FE_ALL_EXCEPT & ~excepts);
++
++ /* Put the new data in effect. */
++ _FPU_SETCW (temp);
++
++ /* Success. */
++ return 0;
++}
++
++#include <shlib-compat.h>
++#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
++strong_alias (__feclearexcept, __old_feclearexcept)
++compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
++#endif
++
++versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
+Index: glibc/sysdeps/arm/eabi/fpu/fegetround.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/fpu/fegetround.c 2005-03-22 11:53:10.053702900 -0500
+@@ -0,0 +1,32 @@
++/* Return current rounding direction.
++ Copyright (C) 2004 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <fenv.h>
++#include <fpu_control.h>
++
++int
++fegetround (void)
++{
++ unsigned int temp;
++
++ /* Get the current environment. */
++ _FPU_GETCW (temp);
++
++ return temp & FE_TOWARDZERO;
++}
+Index: glibc/sysdeps/arm/eabi/fpu/fesetenv.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/fpu/fesetenv.c 2005-03-22 12:34:55.521465156 -0500
+@@ -0,0 +1,46 @@
++/* Install given floating-point environment.
++ Copyright (C) 2004 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <fenv.h>
++#include <fpu_control.h>
++
++int
++__fesetenv (const fenv_t *envp)
++{
++ unsigned int temp;
++
++ _FPU_GETCW (temp);
++ temp &= _FPU_RESERVED;
++
++ if (envp == FE_DFL_ENV)
++ temp |= _FPU_DEFAULT;
++ else if (envp == FE_NOMASK_ENV)
++ temp |= _FPU_IEEE;
++ else
++ temp |= envp->__cw & ~_FPU_RESERVED;
++
++ _FPU_SETCW (temp);
++
++ /* Success. */
++ return 0;
++}
++
++#include <shlib-compat.h>
++libm_hidden_ver (__fesetenv, fesetenv)
++versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2);
+Index: glibc/sysdeps/arm/eabi/fpu/fesetround.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/fpu/fesetround.c 2005-03-22 11:53:10.053702900 -0500
+@@ -0,0 +1,41 @@
++/* Set current rounding direction.
++ Copyright (C) 2004 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <fenv.h>
++#include <fpu_control.h>
++
++int
++fesetround (int round)
++{
++ fpu_control_t temp;
++
++ switch (round)
++ {
++ case FE_TONEAREST:
++ case FE_UPWARD:
++ case FE_DOWNWARD:
++ case FE_TOWARDZERO:
++ _FPU_GETCW (temp);
++ temp = (temp & ~FE_TOWARDZERO) | round;
++ _FPU_SETCW (temp);
++ return 0;
++ default:
++ return 1;
++ }
++}
+Index: glibc/sysdeps/arm/eabi/fpu/fpu_control.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/fpu/fpu_control.h 2005-03-22 12:34:55.521465156 -0500
+@@ -0,0 +1,47 @@
++/* FPU control word definitions. ARM VFP version.
++ Copyright (C) 2004 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#ifndef _FPU_CONTROL_H
++#define _FPU_CONTROL_H
++
++/* masking of interrupts */
++#define _FPU_MASK_IM 0x00000100 /* invalid operation */
++#define _FPU_MASK_ZM 0x00000200 /* divide by zero */
++#define _FPU_MASK_OM 0x00000400 /* overflow */
++#define _FPU_MASK_UM 0x00000800 /* underflow */
++#define _FPU_MASK_PM 0x00001000 /* inexact */
++
++/* Some bits in the FPSCR are not yet defined. They must be preserved when
++ modifying the contents. */
++#define _FPU_RESERVED 0x0e08e0e0
++#define _FPU_DEFAULT 0x00000000
++/* Default + exceptions enabled. */
++#define _FPU_IEEE (_FPU_DEFAULT | 0x00001f00)
++
++/* Type of the control word. */
++typedef unsigned int fpu_control_t;
++
++/* Macros for accessing the hardware control word. */
++#define _FPU_GETCW(cw) __asm__ __volatile__ ("fmrx %0, fpscr" : "=r" (cw))
++#define _FPU_SETCW(cw) __asm__ __volatile__ ("fmxr fpscr, %0" : : "r" (cw))
++
++/* Default control word set at startup. */
++extern fpu_control_t __fpu_control;
++
++#endif /* _FPU_CONTROL_H */
+Index: glibc/sysdeps/arm/eabi/fpu/setjmp.S
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/fpu/setjmp.S 2005-03-22 11:53:10.054702658 -0500
+@@ -0,0 +1,39 @@
++/* setjmp for ARM.
++ Copyright (C) 2004 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <sysdep.h>
++#define _SETJMP_H
++#define _ASM
++#include <bits/setjmp.h>
++
++ENTRY (__sigsetjmp)
++ mov ip, r0
++
++ /* Store the integer registers. */
++ stmia ip!, {v1-v6, sl, fp, sp, lr}
++
++ /* Store the VFP registers. */
++ fstmiax ip!, {d8-d15}
++ /* Store the floating-point status register. */
++ fmrx r2, fpscr
++ str r2, [ip], #4
++
++ /* Make a tail call to __sigjmp_save; it takes the same args. */
++ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
++END (__sigsetjmp)
+Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/configure
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/configure 2005-03-22 11:53:10.054702658 -0500
+@@ -0,0 +1,5 @@
++# This file is generated from configure.in by Autoconf. DO NOT EDIT!
++ # Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
++
++arch_minimum_kernel=2.4.17
++libc_cv_gcc_unwind_find_fde=no
+Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/configure.in
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/configure.in 2005-03-22 11:53:10.054702658 -0500
+@@ -0,0 +1,5 @@
++GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
++# Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
++
++arch_minimum_kernel=2.4.17
++libc_cv_gcc_unwind_find_fde=no
+Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c 2005-03-22 11:53:10.054702658 -0500
+@@ -0,0 +1,37 @@
++/* epoll_ctl wrapper for ARM EABI.
++ Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <sysdep.h>
++#include <errno.h>
++#include <sys/epoll.h>
++
++#include <kernel_epoll.h>
++
++int
++epoll_ctl (int __epfd, int __op, int __fd, struct epoll_event *__event)
++{
++ struct kernel_epoll_event k_event;
++
++ k_event.events = __event->events;
++ memcpy (&k_event.data, &__event->data, sizeof (k_event.data));
++
++ return INLINE_SYSCALL (epoll_ctl, 4, __epfd, __op, __fd, &k_event);
++}
++
++libc_hidden_def (epoll_ctl)
+Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c 2005-03-22 11:53:10.055702416 -0500
+@@ -0,0 +1,54 @@
++/* epoll_ctl wrapper for ARM EABI.
++ Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <sysdep.h>
++#include <errno.h>
++#include <sys/epoll.h>
++#include <stdlib.h>
++
++#include <kernel_epoll.h>
++
++int
++epoll_wait (int __epfd, struct epoll_event *__events,
++ int __maxevents, int __timeout);
++{
++ struct kernel_epoll_event *k_events;
++ int result;
++
++ k_events = malloc (sizeof (struct kernel_epoll_event) * __maxevents);
++ if (k_events == NULL)
++ {
++ __set_errno (ENOMEM);
++ return -1;
++ }
++
++ result = INLINE_SYSCALL (epoll_wait, 4, __epfd, __events, k_events,
++ __timeout);
++
++ for (i = 0; i < result; i++)
++ {
++ __events[i].events = k_events[i].events;
++ memcpy (&__events[i].data, &k_events[i].data, sizeof (k_events[i].data));
++ }
++
++ free (k_events);
++ return result;
++}
++
++libc_hidden_def (epoll_wait)
+Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c 2005-03-22 11:53:10.055702416 -0500
+@@ -0,0 +1,76 @@
++/* Return information about the filesystem on which FD resides.
++ Copyright (C) 1996,1997,1998,1999,2000,2003,2005
++ Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <errno.h>
++#include <string.h>
++#include <sys/statfs.h>
++#include <stddef.h>
++#include <sysdep.h>
++
++/* Defined in statfs64.c. */
++extern int __no_statfs64 attribute_hidden;
++
++/* Return information about the filesystem on which FD resides. */
++int
++__fstatfs64 (int fd, struct statfs64 *buf)
++{
++#ifdef __NR_fstatfs64
++# if __ASSUME_STATFS64 == 0
++ if (! __no_statfs64)
++# endif
++ {
++ /* The EABI structure is the same as the old ABI structure, except
++ that it has four additional bytes of padding - at the end. We can
++ ignore them. */
++ int result = INLINE_SYSCALL (fstatfs64, 3, fd, sizeof (*buf) - 4, buf);
++
++# if __ASSUME_STATFS64 == 0
++ if (result == 0 || errno != ENOSYS)
++# endif
++ return result;
++
++# if __ASSUME_STATFS64 == 0
++ __no_statfs64 = 1;
++# endif
++ }
++#endif
++
++#if __ASSUME_STATFS64 == 0
++ struct statfs buf32;
++
++ if (__fstatfs (fd, &buf32) < 0)
++ return -1;
++
++ buf->f_type = buf32.f_type;
++ buf->f_bsize = buf32.f_bsize;
++ buf->f_blocks = buf32.f_blocks;
++ buf->f_bfree = buf32.f_bfree;
++ buf->f_bavail = buf32.f_bavail;
++ buf->f_files = buf32.f_files;
++ buf->f_ffree = buf32.f_ffree;
++ buf->f_fsid = buf32.f_fsid;
++ buf->f_namelen = buf32.f_namelen;
++ buf->f_frsize = buf32.f_frsize;
++ memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
++
++ return 0;
++#endif
++}
++weak_alias (__fstatfs64, fstatfs64)
+Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c 2005-03-22 11:53:10.055702416 -0500
+@@ -0,0 +1,100 @@
++/* fxstat64 using old-style Unix fstat system call.
++ Copyright (C) 1997-2002, 2003, 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <errno.h>
++#include <stddef.h>
++#include <sys/stat.h>
++#include <kernel_stat.h>
++
++#include <sysdep.h>
++#include <sys/syscall.h>
++#include <bp-checks.h>
++
++#include "kernel-features.h"
++
++#if __ASSUME_STAT64_SYSCALL == 0
++# include <xstatconv.h>
++#endif
++
++#ifdef __NR_fstat64
++# if __ASSUME_STAT64_SYSCALL == 0
++/* The variable is shared between all wrappers around *stat64 calls. */
++extern int __have_no_stat64;
++# endif
++#endif
++
++/* Get information about the file FD in BUF. */
++
++int
++___fxstat64 (int vers, int fd, struct stat64 *buf)
++{
++ int result;
++ struct kernel_stat64 kbuf64;
++
++#if __ASSUME_STAT64_SYSCALL > 0
++ result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (&kbuf64));
++ if (result == 0)
++ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
++# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
++ if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
++ buf->st_ino = buf->__st_ino;
++# endif
++ return result;
++#else
++ struct kernel_stat kbuf;
++# if defined __NR_fstat64
++ if (! __have_no_stat64)
++ {
++ int saved_errno = errno;
++ result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (&kbuf64));
++
++ if (result != -1 || errno != ENOSYS)
++ {
++ if (result == 0)
++ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
++# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
++ if (!result && buf->__st_ino != (__ino_t)buf->st_ino)
++ buf->st_ino = buf->__st_ino;
++# endif
++ return result;
++ }
++
++ __set_errno (saved_errno);
++ __have_no_stat64 = 1;
++ }
++# endif
++ result = INLINE_SYSCALL (fstat, 2, fd, __ptrvalue (&kbuf));
++ if (result == 0)
++ result = __xstat64_conv (vers, &kbuf, buf);
++
++ return result;
++#endif
++}
++
++#include <shlib-compat.h>
++
++#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
++versioned_symbol (libc, ___fxstat64, __fxstat64, GLIBC_2_2);
++strong_alias (___fxstat64, __old__fxstat64)
++compat_symbol (libc, __old__fxstat64, __fxstat64, GLIBC_2_1);
++hidden_ver (___fxstat64, __fxstat64)
++#else
++strong_alias (___fxstat64, __fxstat64)
++hidden_def (__fxstat64)
++#endif
+Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h 2005-03-22 11:53:10.056702174 -0500
+@@ -0,0 +1,59 @@
++/* Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <sysdeps/unix/sysv/linux/kernel_stat.h>
++
++/* kernel_stat64 is just like stat64, except packed. The EABI aligns
++ st_size to an eight byte boundary but the old ABI only aligns it to
++ four. Similarly st_blocks. */
++struct kernel_stat64
++ {
++ __dev_t st_dev; /* Device. */
++ unsigned int __pad1;
++
++ __ino_t __st_ino; /* 32bit file serial number. */
++ __mode_t st_mode; /* File mode. */
++ __nlink_t st_nlink; /* Link count. */
++ __uid_t st_uid; /* User ID of the file's owner. */
++ __gid_t st_gid; /* Group ID of the file's group.*/
++ __dev_t st_rdev; /* Device number, if device. */
++ unsigned int __pad2;
++ __off64_t st_size; /* Size of file, in bytes. */
++ __blksize_t st_blksize; /* Optimal block size for I/O. */
++
++ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
++#ifdef __USE_MISC
++ /* Nanosecond resolution timestamps are stored in a format
++ equivalent to 'struct timespec'. This is the type used
++ whenever possible but the Unix namespace rules do not allow the
++ identifier 'timespec' to appear in the <sys/stat.h> header.
++ Therefore we have to handle the use of this header in strictly
++ standard-compliant sources special. */
++ struct timespec st_atim; /* Time of last access. */
++ struct timespec st_mtim; /* Time of last modification. */
++ struct timespec st_ctim; /* Time of last status change. */
++#else
++ __time_t st_atime; /* Time of last access. */
++ unsigned long int st_atimensec; /* Nscecs of last access. */
++ __time_t st_mtime; /* Time of last modification. */
++ unsigned long int st_mtimensec; /* Nsecs of last modification. */
++ __time_t st_ctime; /* Time of last status change. */
++ unsigned long int st_ctimensec; /* Nsecs of last status change. */
++#endif
++ __ino64_t st_ino; /* File serial number. */
++ } __attribute__ ((packed,aligned(4)));
+Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c 2005-03-22 11:53:10.056702174 -0500
+@@ -0,0 +1,99 @@
++/* lxstat64 using old-style Unix lstat system call.
++ Copyright (C) 1997-2002, 2003, 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <errno.h>
++#include <stddef.h>
++#include <sys/stat.h>
++#include <kernel_stat.h>
++
++#include <sysdep.h>
++#include <sys/syscall.h>
++#include <bp-checks.h>
++
++#include "kernel-features.h"
++
++#if __ASSUME_STAT64_SYSCALL == 0
++# include <xstatconv.h>
++#endif
++
++#ifdef __NR_lstat64
++# if __ASSUME_STAT64_SYSCALL == 0
++/* The variable is shared between all wrappers around *stat64 calls. */
++extern int __have_no_stat64;
++# endif
++#endif
++
++/* Get information about the file NAME in BUF. */
++int
++___lxstat64 (int vers, const char *name, struct stat64 *buf)
++{
++ int result;
++ struct kernel_stat64 kbuf64;
++
++#ifdef __ASSUME_STAT64_SYSCALL
++ result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
++ if (result == 0)
++ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
++# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
++ if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
++ buf->st_ino = buf->__st_ino;
++# endif
++ return result;
++#else
++ struct kernel_stat kbuf;
++# ifdef __NR_lstat64
++ if (! __have_no_stat64)
++ {
++ int saved_errno = errno;
++ result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
++
++ if (result != -1 || errno != ENOSYS)
++ {
++ if (result == 0)
++ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
++# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
++ if (!result && buf->__st_ino != (__ino_t) buf->st_ino)
++ buf->st_ino = buf->__st_ino;
++# endif
++ return result;
++ }
++
++ __set_errno (saved_errno);
++ __have_no_stat64 = 1;
++ }
++# endif
++ result = INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
++ if (result == 0)
++ result = __xstat64_conv (vers, &kbuf, buf);
++
++ return result;
++#endif
++}
++
++#include <shlib-compat.h>
++
++#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
++versioned_symbol (libc, ___lxstat64, __lxstat64, GLIBC_2_2);
++strong_alias (___lxstat64, __old__lxstat64)
++compat_symbol (libc, __old__lxstat64, __lxstat64, GLIBC_2_1);
++hidden_ver (___lxstat64, __lxstat64)
++#else
++strong_alias (___lxstat64, __lxstat64);
++hidden_def (__lxstat64)
++#endif
+Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c 2005-03-22 11:53:10.056702174 -0500
+@@ -0,0 +1 @@
++/* Empty. */
+Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c 2005-03-22 11:53:10.056702174 -0500
+@@ -0,0 +1 @@
++/* Empty. */
+Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/semop.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/semop.c 2005-03-22 11:53:10.056702174 -0500
+@@ -0,0 +1,67 @@
++/* Copyright (C) 1995, 1997, 1998, 1999, 2000, 2005
++ Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Ulrich Drepper <drepper@cygnus.com>, August 1995.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <errno.h>
++#include <sys/sem.h>
++#include <ipc_priv.h>
++#include <alloca.h>
++#include <sysdep.h>
++#include <sys/syscall.h>
++#include <bp-checks.h>
++
++struct kernel_sembuf
++{
++ unsigned short int sem_num; /* semaphore number */
++ short int sem_op; /* semaphore operation */
++ short int sem_flg; /* operation flag */
++ short int __pad1;
++};
++
++/* Perform user-defined atomical operation of array of semaphores. */
++
++int
++semop (semid, sops, nsops)
++ int semid;
++ struct sembuf *sops;
++ size_t nsops;
++{
++ struct kernel_sembuf *ksops = alloca (sizeof (sops[0]) * nsops);
++ size_t i;
++ int result;
++
++ for (i = 0; i < nsops; i++)
++ {
++ ksops[i].sem_num = sops[i].sem_num;
++ ksops[i].sem_op = sops[i].sem_op;
++ ksops[i].sem_flg = sops[i].sem_flg;
++ }
++
++ result = INLINE_SYSCALL (ipc, 5, IPCOP_semop,
++ semid, (int) nsops, 0, CHECK_N (ksops, nsops));
++
++ for (i = 0; i < nsops; i++)
++ {
++ sops[i].sem_num = ksops[i].sem_num;
++ sops[i].sem_op = ksops[i].sem_op;
++ sops[i].sem_flg = ksops[i].sem_flg;
++ }
++
++ return result;
++}
+Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c 2005-03-22 11:53:10.057701931 -0500
+@@ -0,0 +1,69 @@
++/* Copyright (C) 1995, 1997, 1998, 1999, 2000, 2005
++ Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Ulrich Drepper <drepper@cygnus.com>, August 1995.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <errno.h>
++#include <sys/sem.h>
++#include <ipc_priv.h>
++#include <alloca.h>
++#include <sysdep.h>
++#include <sys/syscall.h>
++#include <bp-checks.h>
++
++struct kernel_sembuf
++{
++ unsigned short int sem_num; /* semaphore number */
++ short int sem_op; /* semaphore operation */
++ short int sem_flg; /* operation flag */
++ short int __pad1;
++};
++
++/* Perform user-defined atomical operation of array of semaphores. */
++
++int
++semtimedop (semid, sops, nsops, timeout)
++ int semid;
++ struct sembuf *sops;
++ size_t nsops;
++ const struct timespec *timeout;
++{
++ struct kernel_sembuf *ksops = alloca (sizeof (sops[0]) * nsops);
++ size_t i;
++ int result;
++
++ for (i = 0; i < nsops; i++)
++ {
++ ksops[i].sem_num = sops[i].sem_num;
++ ksops[i].sem_op = sops[i].sem_op;
++ ksops[i].sem_flg = sops[i].sem_flg;
++ }
++
++ result = INLINE_SYSCALL (ipc, 6, IPCOP_semtimedop,
++ semid, (int) nsops, 0, CHECK_N (sops, nsops),
++ timeout);
++
++ for (i = 0; i < nsops; i++)
++ {
++ sops[i].sem_num = ksops[i].sem_num;
++ sops[i].sem_op = ksops[i].sem_op;
++ sops[i].sem_flg = ksops[i].sem_flg;
++ }
++
++ return result;
++}
+Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c 2005-03-22 11:53:10.057701931 -0500
+@@ -0,0 +1,77 @@
++/* Return information about the filesystem on which FILE resides.
++ Copyright (C) 1996-2000,2003,2004,2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <errno.h>
++#include <string.h>
++#include <sys/statfs.h>
++#include <stddef.h>
++#include <sysdep.h>
++
++
++# if __ASSUME_STATFS64 == 0
++int __no_statfs64 attribute_hidden;
++#endif
++
++/* Return information about the filesystem on which FILE resides. */
++int
++__statfs64 (const char *file, struct statfs64 *buf)
++{
++#ifdef __NR_statfs64
++# if __ASSUME_STATFS64 == 0
++ if (! __no_statfs64)
++# endif
++ {
++ /* The EABI structure is the same as the old ABI structure, except
++ that it has four additional bytes of padding - at the end. We can
++ ignore them. */
++ int result = INLINE_SYSCALL (statfs64, 3, file, sizeof (*buf) - 4, buf);
++
++# if __ASSUME_STATFS64 == 0
++ if (result == 0 || errno != ENOSYS)
++# endif
++ return result;
++
++# if __ASSUME_STATFS64 == 0
++ __no_statfs64 = 1;
++# endif
++ }
++#endif
++
++#if __ASSUME_STATFS64 == 0
++ struct statfs buf32;
++
++ if (__statfs (file, &buf32) < 0)
++ return -1;
++
++ buf->f_type = buf32.f_type;
++ buf->f_bsize = buf32.f_bsize;
++ buf->f_blocks = buf32.f_blocks;
++ buf->f_bfree = buf32.f_bfree;
++ buf->f_bavail = buf32.f_bavail;
++ buf->f_files = buf32.f_files;
++ buf->f_ffree = buf32.f_ffree;
++ buf->f_fsid = buf32.f_fsid;
++ buf->f_namelen = buf32.f_namelen;
++ buf->f_frsize = buf32.f_frsize;
++ memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
++
++ return 0;
++#endif
++}
++weak_alias (__statfs64, statfs64)
+Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/uname.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/uname.c 2005-03-22 11:53:10.057701931 -0500
+@@ -0,0 +1,43 @@
++/* Copyright (C) 2005
++ Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <errno.h>
++#include <sysdep.h>
++#include <sys/syscall.h>
++#include <string.h>
++#include <sys/utsname.h>
++
++/* The kernel's struct utsname is two bytes larger than a userland struct
++ utsname due to the APCS structure size boundary. */
++
++int
++__uname (struct utsname *__name)
++{
++ char buf[sizeof (struct utsname) + 2];
++ int result = INLINE_SYSCALL (uname, 1, buf);
++
++ if (result == 0)
++ memcpy (__name, buf, sizeof (struct utsname));
++
++ return result;
++}
++
++libc_hidden_def (__uname)
++strong_alias (__uname, uname)
++libc_hidden_weak (uname)
+Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c 2005-03-22 11:53:10.058701689 -0500
+@@ -0,0 +1,103 @@
++/* xstat64 using old-style Unix stat system call.
++ Copyright (C) 1991, 1995-2002, 2003, 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <errno.h>
++#include <stddef.h>
++#include <sys/stat.h>
++#include <kernel_stat.h>
++
++#include <sysdep.h>
++#include <sys/syscall.h>
++#include <bp-checks.h>
++
++#include "kernel-features.h"
++
++#if __ASSUME_STAT64_SYSCALL == 0
++# include <xstatconv.h>
++#endif
++
++#ifdef __NR_stat64
++# if __ASSUME_STAT64_SYSCALL == 0
++/* The variable is shared between all wrappers around *stat64 calls.
++ This is the definition. */
++int __have_no_stat64;
++# endif
++#endif
++
++/* Get information about the file NAME in BUF. */
++
++int
++___xstat64 (int vers, const char *name, struct stat64 *buf)
++{
++ int result;
++ struct kernel_stat64 kbuf64;
++
++#if __ASSUME_STAT64_SYSCALL > 0
++ result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
++ if (result == 0)
++ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
++# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
++ if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
++ buf->st_ino = buf->__st_ino;
++# endif
++ return result;
++#else
++ struct kernel_stat kbuf;
++# if defined __NR_stat64
++ if (! __have_no_stat64)
++ {
++ int saved_errno = errno;
++ result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
++
++ if (result != -1 || errno != ENOSYS)
++ {
++ if (result == 0)
++ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
++# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
++ if (!result && buf->__st_ino != (__ino_t) buf->st_ino)
++ buf->st_ino = buf->__st_ino;
++# endif
++ return result;
++ }
++
++ __set_errno (saved_errno);
++ __have_no_stat64 = 1;
++ }
++# endif
++
++ result = INLINE_SYSCALL (stat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
++ if (result == 0)
++ result = __xstat64_conv (vers, &kbuf, buf);
++
++ return result;
++#endif
++}
++
++
++#include <shlib-compat.h>
++
++#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
++versioned_symbol (libc, ___xstat64, __xstat64, GLIBC_2_2);
++strong_alias (___xstat64, __old__xstat64)
++compat_symbol (libc, __old__xstat64, __xstat64, GLIBC_2_1);
++hidden_ver (___xstat64, __xstat64)
++#else
++strong_alias (___xstat64, __xstat64)
++hidden_def (__xstat64)
++#endif
+Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c 2005-03-22 11:53:10.058701689 -0500
+@@ -0,0 +1,341 @@
++/* Convert between the kernel's `struct stat' format, and libc's.
++ Copyright (C) 1991,1995-1997,2000,2002,2003 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <errno.h>
++#include <sys/stat.h>
++#include <kernel_stat.h>
++
++#ifdef STAT_IS_KERNEL_STAT
++
++/* Dummy. */
++struct kernel_stat;
++
++#else
++
++#include <string.h>
++
++
++#if !defined __ASSUME_STAT64_SYSCALL || defined XSTAT_IS_XSTAT64
++int
++__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
++{
++ switch (vers)
++ {
++ case _STAT_VER_KERNEL:
++ /* Nothing to do. The struct is in the form the kernel expects.
++ We should have short-circuted before we got here, but for
++ completeness... */
++ *(struct kernel_stat *) ubuf = *kbuf;
++ break;
++
++ case _STAT_VER_LINUX:
++ {
++ struct stat *buf = ubuf;
++
++ /* Convert to current kernel version of `struct stat'. */
++ buf->st_dev = kbuf->st_dev;
++#ifdef _HAVE_STAT___PAD1
++ buf->__pad1 = 0;
++#endif
++ buf->st_ino = kbuf->st_ino;
++ buf->st_mode = kbuf->st_mode;
++ buf->st_nlink = kbuf->st_nlink;
++ buf->st_uid = kbuf->st_uid;
++ buf->st_gid = kbuf->st_gid;
++ buf->st_rdev = kbuf->st_rdev;
++#ifdef _HAVE_STAT___PAD2
++ buf->__pad2 = 0;
++#endif
++ buf->st_size = kbuf->st_size;
++ buf->st_blksize = kbuf->st_blksize;
++ buf->st_blocks = kbuf->st_blocks;
++#ifdef _HAVE_STAT_NSEC
++ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
++ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
++ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
++ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
++ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
++ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
++#else
++ buf->st_atime = kbuf->st_atime;
++ buf->st_mtime = kbuf->st_mtime;
++ buf->st_ctime = kbuf->st_ctime;
++#endif
++#ifdef _HAVE_STAT___UNUSED1
++ buf->__unused1 = 0;
++#endif
++#ifdef _HAVE_STAT___UNUSED2
++ buf->__unused2 = 0;
++#endif
++#ifdef _HAVE_STAT___UNUSED3
++ buf->__unused3 = 0;
++#endif
++#ifdef _HAVE_STAT___UNUSED4
++ buf->__unused4 = 0;
++#endif
++#ifdef _HAVE_STAT___UNUSED5
++ buf->__unused5 = 0;
++#endif
++ }
++ break;
++
++ default:
++ __set_errno (EINVAL);
++ return -1;
++ }
++
++ return 0;
++}
++#endif
++
++int
++__xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
++{
++#ifdef XSTAT_IS_XSTAT64
++ return __xstat_conv (vers, kbuf, ubuf);
++#else
++ switch (vers)
++ {
++ case _STAT_VER_LINUX:
++ {
++ struct stat64 *buf = ubuf;
++
++ /* Convert to current kernel version of `struct stat64'. */
++ buf->st_dev = kbuf->st_dev;
++#ifdef _HAVE_STAT64___PAD1
++ buf->__pad1 = 0;
++#endif
++ buf->st_ino = kbuf->st_ino;
++#ifdef _HAVE_STAT64___ST_INO
++ buf->__st_ino = kbuf->st_ino;
++#endif
++ buf->st_mode = kbuf->st_mode;
++ buf->st_nlink = kbuf->st_nlink;
++ buf->st_uid = kbuf->st_uid;
++ buf->st_gid = kbuf->st_gid;
++ buf->st_rdev = kbuf->st_rdev;
++#ifdef _HAVE_STAT64___PAD2
++ buf->__pad2 = 0;
++#endif
++ buf->st_size = kbuf->st_size;
++ buf->st_blksize = kbuf->st_blksize;
++ buf->st_blocks = kbuf->st_blocks;
++#ifdef _HAVE_STAT64_NSEC
++ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
++ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
++ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
++ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
++ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
++ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
++#else
++ buf->st_atime = kbuf->st_atime;
++ buf->st_mtime = kbuf->st_mtime;
++ buf->st_ctime = kbuf->st_ctime;
++#endif
++#ifdef _HAVE_STAT64___UNUSED1
++ buf->__unused1 = 0;
++#endif
++#ifdef _HAVE_STAT64___UNUSED2
++ buf->__unused2 = 0;
++#endif
++#ifdef _HAVE_STAT64___UNUSED3
++ buf->__unused3 = 0;
++#endif
++#ifdef _HAVE_STAT64___UNUSED4
++ buf->__unused4 = 0;
++#endif
++#ifdef _HAVE_STAT64___UNUSED5
++ buf->__unused5 = 0;
++#endif
++ }
++ break;
++
++ /* If struct stat64 is different from struct stat then
++ _STAT_VER_KERNEL does not make sense. */
++ case _STAT_VER_KERNEL:
++ default:
++ __set_errno (EINVAL);
++ return -1;
++ }
++
++ return 0;
++#endif
++}
++
++int
++__xstat32_conv (int vers, void *kbuf_, struct stat *buf)
++{
++ struct kernel_stat64 *kbuf = kbuf_;
++
++ switch (vers)
++ {
++ case _STAT_VER_LINUX:
++ {
++ /* Convert current kernel version of `struct stat64' to
++ `struct stat'. */
++ buf->st_dev = kbuf->st_dev;
++#ifdef _HAVE_STAT___PAD1
++ buf->__pad1 = 0;
++#endif
++#ifdef _HAVE_STAT64___ST_INO
++# if __ASSUME_ST_INO_64_BIT == 0
++ if (kbuf->st_ino == 0)
++ buf->st_ino = kbuf->__st_ino;
++ else
++# endif
++ {
++ buf->st_ino = kbuf->st_ino;
++ if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino)
++ && buf->st_ino != kbuf->st_ino)
++ {
++ __set_errno (EOVERFLOW);
++ return -1;
++ }
++ }
++#else
++ buf->st_ino = kbuf->st_ino;
++ if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino)
++ && buf->st_ino != kbuf->st_ino)
++ {
++ __set_errno (EOVERFLOW);
++ return -1;
++ }
++#endif
++ buf->st_mode = kbuf->st_mode;
++ buf->st_nlink = kbuf->st_nlink;
++ buf->st_uid = kbuf->st_uid;
++ buf->st_gid = kbuf->st_gid;
++ buf->st_rdev = kbuf->st_rdev;
++#ifdef _HAVE_STAT___PAD2
++ buf->__pad2 = 0;
++#endif
++ buf->st_size = kbuf->st_size;
++ /* Check for overflow. */
++ if (sizeof (buf->st_size) != sizeof (kbuf->st_size)
++ && buf->st_size != kbuf->st_size)
++ {
++ __set_errno (EOVERFLOW);
++ return -1;
++ }
++ buf->st_blksize = kbuf->st_blksize;
++ buf->st_blocks = kbuf->st_blocks;
++ /* Check for overflow. */
++ if (sizeof (buf->st_blocks) != sizeof (kbuf->st_blocks)
++ && buf->st_blocks != kbuf->st_blocks)
++ {
++ __set_errno (EOVERFLOW);
++ return -1;
++ }
++#ifdef _HAVE_STAT_NSEC
++ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
++ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
++ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
++ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
++ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
++ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
++#else
++ buf->st_atime = kbuf->st_atime;
++ buf->st_mtime = kbuf->st_mtime;
++ buf->st_ctime = kbuf->st_ctime;
++#endif
++
++#ifdef _HAVE_STAT___UNUSED1
++ buf->__unused1 = 0;
++#endif
++#ifdef _HAVE_STAT___UNUSED2
++ buf->__unused2 = 0;
++#endif
++#ifdef _HAVE_STAT___UNUSED3
++ buf->__unused3 = 0;
++#endif
++#ifdef _HAVE_STAT___UNUSED4
++ buf->__unused4 = 0;
++#endif
++#ifdef _HAVE_STAT___UNUSED5
++ buf->__unused5 = 0;
++#endif
++ }
++ break;
++
++ /* If struct stat64 is different from struct stat then
++ _STAT_VER_KERNEL does not make sense. */
++ case _STAT_VER_KERNEL:
++ default:
++ __set_errno (EINVAL);
++ return -1;
++ }
++
++ return 0;
++}
++
++int
++__xstat64_kernel64_conv (int vers, void *kbuf_, struct stat64 *buf)
++{
++ struct kernel_stat64 *kbuf = kbuf_;
++
++ switch (vers)
++ {
++ case _STAT_VER_LINUX:
++ {
++ /* Convert current kernel version of `struct stat64' to
++ user version of `struct stat64'. */
++ buf->st_dev = kbuf->st_dev;
++#ifdef _HAVE_STAT64___PAD1
++ buf->__pad1 = kbuf->__pad1;
++#endif
++#ifdef _HAVE_STAT64___ST_INO
++ buf->__st_ino = kbuf->__st_ino;
++#endif
++ buf->st_mode = kbuf->st_mode;
++ buf->st_nlink = kbuf->st_nlink;
++ buf->st_uid = kbuf->st_uid;
++ buf->st_gid = kbuf->st_gid;
++ buf->st_rdev = kbuf->st_rdev;
++#ifdef _HAVE_STAT64___PAD2
++ buf->__pad2 = kbuf->__pad2;
++#endif
++ buf->st_size = kbuf->st_size;
++ buf->st_blksize = kbuf->st_blksize;
++ buf->st_blocks = kbuf->st_blocks;
++#ifdef _HAVE_STAT64_NSEC
++ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
++ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
++ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
++ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
++ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
++ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
++#else
++ buf->st_atime = kbuf->st_atime;
++ buf->st_mtime = kbuf->st_mtime;
++ buf->st_ctime = kbuf->st_ctime;
++#endif
++ buf->st_ino = kbuf->st_ino;
++ }
++ break;
++
++ case _STAT_VER_KERNEL:
++ default:
++ __set_errno (EINVAL);
++ return -1;
++ }
++
++ return 0;
++}
++
++#endif
+Index: glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h 2005-03-22 11:53:10.058701689 -0500
+@@ -0,0 +1,28 @@
++/* Convert between the kernel's `struct stat' format, and libc's.
++ Copyright (C) 1991,1995-1997,2000,2002,2003 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include "kernel-features.h"
++
++#ifndef STAT_IS_KERNEL_STAT
++extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf);
++extern int __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf);
++#endif
++extern int __xstat32_conv (int vers, void *kbuf, struct stat *buf);
++extern int __xstat64_kernel64_conv (int vers, struct kernel_stat64 *kbuf,
++ struct stat64 *buf);
+Index: glibc/sysdeps/arm/eabi/fpu/fraiseexcpt.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/fpu/fraiseexcpt.c 2005-03-22 12:34:55.522464918 -0500
+@@ -0,0 +1,67 @@
++/* Raise given exceptions.
++ Copyright (C) 2004 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <fpu_control.h>
++#include <fenv.h>
++#include <float.h>
++
++int
++feraiseexcept (int excepts)
++{
++ float dummy;
++ int fpscr;
++
++ /* Raise exceptions represented by EXPECTS. But we must raise only
++ one signal at a time. It is important that if the overflow/underflow
++ exception and the inexact exception are given at the same time,
++ the overflow/underflow exception follows the inexact exception. After
++ each exception we read from the fpscr, to force the exception to be
++ raised immediately. */
++
++ /* First: invalid exception. */
++ if (FE_INVALID & excepts)
++ __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr"
++ : "=w" (dummy), "=r" (fpscr) : "w" (0.0f), "w" (0.0f) );
++
++ /* Next: division by zero. */
++ if (FE_DIVBYZERO & excepts)
++ __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr"
++ : "=w" (dummy), "=r" (fpscr) : "w" (1.0f), "w" (0.0f) );
++
++ /* Next: overflow. */
++ if (FE_OVERFLOW & excepts)
++ /* There's no way to raise overflow without also raising inexact. */
++ __asm__ __volatile__ ("fadds %0,%2,%3\n\tfmrx %1, fpscr"
++ : "=w" (dummy), "=r" (fpscr) : "w" (FLT_MAX), "w" (1.0e32f) );
++
++ /* Next: underflow. */
++ if (FE_UNDERFLOW & excepts)
++ __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr"
++ : "=w" (dummy), "=r" (fpscr) : "w" (FLT_MIN), "w" (3.0f) );
++
++ /* Last: inexact. */
++ if (FE_INEXACT & excepts)
++ __asm__ __volatile__ ("fdivs %0,%2,%3\n\tfmrx %1, fpscr"
++ : "=w" (dummy), "=r" (fpscr) : "w" (2.0f), "w" (3.0f) );
++
++ /* Success. */
++ return 0;
++}
++
++libm_hidden_def (feraiseexcept)
+Index: glibc/sysdeps/arm/eabi/fpu/feholdexcpt.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/eabi/fpu/feholdexcpt.c 2005-03-22 12:34:55.521465156 -0500
+@@ -0,0 +1,41 @@
++/* Store current floating-point environment and clear exceptions.
++ Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <fenv.h>
++#include <fpu_control.h>
++
++int
++feholdexcept (fenv_t *envp)
++{
++ unsigned long int temp;
++
++ /* Store the environment. */
++ _FPU_GETCW(temp);
++ envp->__cw = temp;
++
++ /* Now set all exceptions to non-stop. */
++ temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
++
++ /* And clear all exception flags. */
++ temp &= ~FE_ALL_EXCEPT;
++
++ _FPU_SETCW(temp);
++
++ return 0;
++}
+
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 @@
+From 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
+Return-Path: <libc-alpha-return-17228-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
+Delivered-To: listarch-libc-alpha at sources dot redhat dot com
+Received: (qmail 20972 invoked by alias); 22 Mar 2005 16:08:29 -0000
+Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
+Precedence: bulk
+List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
+List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
+List-Post: <mailto:libc-alpha at sources dot redhat dot com>
+List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
+Sender: libc-alpha-owner at sources dot redhat dot com
+Delivered-To: mailing list libc-alpha at sources dot redhat dot com
+Received: (qmail 20165 invoked from network); 22 Mar 2005 16:08:06 -0000
+Received: from unknown (HELO nevyn.them.org) (66.93.172.17)
+ by sourceware dot org with SMTP; 22 Mar 2005 16:08:06 -0000
+Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
+ id 1DDlvX-0006tE-Bh; Tue, 22 Mar 2005 11:08:19 -0500
+Date: Tue, 22 Mar 2005 11:08:19 -0500
+From: Daniel Jacobowitz <drow at false dot org>
+To: libc-alpha at sources dot redhat dot com
+Cc: Phil Blundell <pb at reciva dot com>
+Subject: ARM EABI support - changes to existing ARM code
+Message-ID: <20050322160819.GA26216@nevyn.them.org>
+Mail-Followup-To: libc-alpha at sources dot redhat dot com,
+ Phil Blundell <pb at reciva dot com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+User-Agent: Mutt/1.5.6+20040907i
+
+This patch updates the common ARM files for EABI support. The changes are:
+ - Old ARM ABI targets always use FPA (mixed-endian) byte ordering. EABI
+ targets always use VFP byte ordering for doubles, which is standard
+ ieee754 layout. Removing the arm-specific ieee754.h doesn't break FPA;
+ it was a specialized version of the common header, which handles FPA
+ but also handles VFP.
+ - The stack needs to be aligned to eight bytes instead of just four,
+ including in mmap2 and when shifting _dl_argv.
+ - We need some markers around _start to indicate end-of-stack for the
+ unwinder - ARM EABI does not use either SJLJ exceptions or DWARF-2
+ exceptions. It uses a table based format which seems to be not
+ quite completely unlike DWARF-2.
+
+Do these changes look OK?
+
+--
+Daniel Jacobowitz
+CodeSourcery, LLC
+
+2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/arm/bits/endian.h (__FLOAT_WORD_ORDER): Handle VFP.
+ * sysdeps/arm/gmp-mparam.h (IEEE_DOUBLE_BIG_ENDIAN,
+ IEEE_DOUBLE_MIXED_ENDIAN): Handle big-endian and VFP.
+ * sysdeps/arm/ieee754.h: Remove.
+
+ * sysdeps/arm/dl-machine.h (_dl_start_user): Align the stack to eight
+ bytes even when shifting arguments.
+ * sysdeps/arm/dl-sysdep.h: New file.
+
+ * sysdeps/arm/elf/start.S (_start): If not using SJLJ exceptions, include
+ EABI unwind markers to terminate unwinding.
+
+ * sysdeps/unix/sysv/linux/arm/mmap64.S: Handle big-endian byte ordering
+ and EABI stack layout.
+
+Index: glibc/sysdeps/arm/bits/endian.h
+===================================================================
+--- glibc.orig/sysdeps/arm/bits/endian.h 2005-03-22 10:26:27.092978200 -0500
++++ glibc/sysdeps/arm/bits/endian.h 2005-03-22 10:27:39.457490903 -0500
+@@ -9,4 +9,9 @@
+ #else
+ #define __BYTE_ORDER __LITTLE_ENDIAN
+ #endif
++
++#ifdef __VFP_FP__
++#define __FLOAT_WORD_ORDER __BYTE_ORDER
++#else
+ #define __FLOAT_WORD_ORDER __BIG_ENDIAN
++#endif
+Index: glibc/sysdeps/arm/dl-machine.h
+===================================================================
+--- glibc.orig/sysdeps/arm/dl-machine.h 2005-03-22 10:26:27.092978200 -0500
++++ glibc/sysdeps/arm/dl-machine.h 2005-03-22 10:27:39.457490903 -0500
+@@ -156,22 +156,19 @@ _dl_start_user:\n\
+ add sl, pc, sl\n\
+ .L_GOT_GOT:\n\
+ ldr r4, [sl, r4]\n\
+- @ get the original arg count\n\
+- ldr r1, [sp]\n\
+ @ save the entry point in another register\n\
+ mov r6, r0\n\
+- @ adjust the stack pointer to skip the extra args\n\
+- add sp, sp, r4, lsl #2\n\
+- @ subtract _dl_skip_args from original arg count\n\
+- sub r1, r1, r4\n\
++ @ get the original arg count\n\
++ ldr r1, [sp]\n\
+ @ get the argv address\n\
+ add r2, sp, #4\n\
+- @ store the new argc in the new stack location\n\
+- str r1, [sp]\n\
++ @ Fix up the stack if necessary.\n\
++ cmp r4, #0\n\
++ bne .L_fixup_stack\n\
++.L_done_fixup:\n\
+ @ compute envp\n\
+ add r3, r2, r1, lsl #2\n\
+ add r3, r3, #4\n\
+-\n\
+ @ now we call _dl_init\n\
+ ldr r0, .L_LOADED\n\
+ ldr r0, [sl, r0]\n\
+@@ -182,12 +179,45 @@ _dl_start_user:\n\
+ add r0, sl, r0\n\
+ @ jump to the user_s entry point\n\
+ " BX(r6) "\n\
++\n\
++ @ iWMMXt and EABI targets require the stack to be eight byte\n\
++ @ aligned - shuffle arguments etc.\n\
++.L_fixup_stack:\n\
++ @ subtract _dl_skip_args from original arg count\n\
++ sub r1, r1, r4\n\
++ @ store the new argc in the new stack location\n\
++ str r1, [sp]\n\
++ @ find the first unskipped argument\n\
++ mov r3, r2\n\
++ add r4, r2, r4, lsl #2\n\
++ @ shuffle argv down\n\
++1: ldr r5, [r4], #4\n\
++ str r5, [r3], #4\n\
++ cmp r5, #0\n\
++ bne 1b\n\
++ @ shuffle envp down\n\
++1: ldr r5, [r4], #4\n\
++ str r5, [r3], #4\n\
++ cmp r5, #0\n\
++ bne 1b\n\
++ @ shuffle auxv down\n\
++1: ldmia r4!, {r0, r5}\n\
++ stmia r3!, {r0, r5}\n\
++ cmp r0, #0\n\
++ bne 1b\n\
++ @ Update _dl_argv\n\
++ ldr r3, .L_ARGV\n\
++ str r2, [sl, r3]\n\
++ b .L_done_fixup\n\
++\n\
+ .L_GET_GOT:\n\
+ .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n\
+ .L_SKIP_ARGS:\n\
+ .word _dl_skip_args(GOTOFF)\n\
+ .L_FINI_PROC:\n\
+ .word _dl_fini(GOTOFF)\n\
++.L_ARGV:\n\
++ .word _dl_argv(GOTOFF)\n\
+ .L_LOADED:\n\
+ .word _rtld_local(GOTOFF)\n\
+ .previous\n\
+Index: glibc/sysdeps/arm/dl-sysdep.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ glibc/sysdeps/arm/dl-sysdep.h 2005-03-22 10:27:39.458490675 -0500
+@@ -0,0 +1,41 @@
++/* System-specific settings for dynamic linker code. ARM version.
++ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#ifndef _DL_SYSDEP_H
++#define _DL_SYSDEP_H 1
++
++/* This macro must be defined to either 0 or 1.
++
++ If 1, then an errno global variable hidden in ld.so will work right with
++ all the errno-using libc code compiled for ld.so, and there is never a
++ need to share the errno location with libc. This is appropriate only if
++ all the libc functions that ld.so uses are called without PLT and always
++ get the versions linked into ld.so rather than the libc ones. */
++
++#ifdef IS_IN_rtld
++# define RTLD_PRIVATE_ERRNO 1
++#else
++# define RTLD_PRIVATE_ERRNO 0
++#endif
++
++/* _dl_argv cannot be attribute_relro, because _dl_start_user
++ might write into it after _dl_start returns. */
++#define DL_ARGV_NOT_RELRO 1
++
++#endif /* dl-sysdep.h */
+Index: glibc/sysdeps/arm/elf/start.S
+===================================================================
+--- glibc.orig/sysdeps/arm/elf/start.S 2005-03-22 10:26:27.096977288 -0500
++++ glibc/sysdeps/arm/elf/start.S 2005-03-22 11:00:35.178522707 -0500
+@@ -1,5 +1,6 @@
+ /* Startup code for ARM & ELF
+- Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
++ Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2005
++ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+@@ -62,6 +63,10 @@
+ .globl _start
+ .type _start,#function
+ _start:
++#if !defined(__USING_SJLJ_EXCEPTIONS__)
++ /* Protect against unhandled exceptions. */
++ .fnstart
++#endif
+ /* Fetch address of fini */
+ ldr ip, =__libc_csu_fini
+
+@@ -93,6 +98,11 @@ _start:
+ /* should never get here....*/
+ bl abort
+
++#if !defined(__USING_SJLJ_EXCEPTIONS__)
++ .cantunwind
++ .fnend
++#endif
++
+ /* Define a symbol for the first piece of initialized data. */
+ .data
+ .globl __data_start
+Index: glibc/sysdeps/arm/gmp-mparam.h
+===================================================================
+--- glibc.orig/sysdeps/arm/gmp-mparam.h 2005-03-22 10:26:27.092978200 -0500
++++ glibc/sysdeps/arm/gmp-mparam.h 2005-03-22 11:00:42.795683773 -0500
+@@ -1,6 +1,6 @@
+ /* gmp-mparam.h -- Compiler/machine parameter header file.
+
+-Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
++Copyright (C) 1991, 1993, 1994, 1995, 2005 Free Software Foundation, Inc.
+
+ This file is part of the GNU MP Library.
+
+@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
+ #define BITS_PER_SHORTINT 16
+ #define BITS_PER_CHAR 8
+
+-#define IEEE_DOUBLE_BIG_ENDIAN 0
+-#define IEEE_DOUBLE_MIXED_ENDIAN 1
++#if defined(__ARMEB__)
++# define IEEE_DOUBLE_MIXED_ENDIAN 0
++# define IEEE_DOUBLE_BIG_ENDIAN 1
++#elif defined(__VFP_FP__)
++# define IEEE_DOUBLE_MIXED_ENDIAN 0
++# define IEEE_DOUBLE_BIG_ENDIAN 0
++#else
++# define IEEE_DOUBLE_BIG_ENDIAN 0
++# define IEEE_DOUBLE_MIXED_ENDIAN 1
++#endif
+Index: glibc/sysdeps/arm/ieee754.h
+===================================================================
+--- glibc.orig/sysdeps/arm/ieee754.h 2005-03-22 10:26:27.092978200 -0500
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,115 +0,0 @@
+-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+-
+- The GNU C Library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Lesser General Public
+- License as published by the Free Software Foundation; either
+- version 2.1 of the License, or (at your option) any later version.
+-
+- The GNU C Library is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Lesser General Public License for more details.
+-
+- You should have received a copy of the GNU Lesser General Public
+- License along with the GNU C Library; if not, write to the Free
+- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+- 02111-1307 USA. */
+-
+-#ifndef _IEEE754_H
+-
+-#define _IEEE754_H 1
+-#include <features.h>
+-
+-#include <endian.h>
+-
+-__BEGIN_DECLS
+-
+-union ieee754_float
+- {
+- float f;
+-
+- /* This is the IEEE 754 single-precision format. */
+- struct
+- {
+- unsigned int mantissa:23;
+- unsigned int exponent:8;
+- unsigned int negative:1;
+- } ieee;
+-
+- /* This format makes it easier to see if a NaN is a signalling NaN. */
+- struct
+- {
+- unsigned int mantissa:22;
+- unsigned int quiet_nan:1;
+- unsigned int exponent:8;
+- unsigned int negative:1;
+- } ieee_nan;
+- };
+-
+-#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
+-
+-
+-union ieee754_double
+- {
+- double d;
+-
+- /* This is the IEEE 754 double-precision format. */
+- struct
+- {
+- unsigned int mantissa0:20;
+- unsigned int exponent:11;
+- unsigned int negative:1;
+- unsigned int mantissa1:32;
+- } ieee;
+-
+- /* This format makes it easier to see if a NaN is a signalling NaN. */
+- struct
+- {
+- unsigned int mantissa0:19;
+- unsigned int quiet_nan:1;
+- unsigned int exponent:11;
+- unsigned int negative:1;
+- unsigned int mantissa1:32;
+- } ieee_nan;
+- };
+-
+-#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
+-
+-
+-/* The following two structures are correct for `new' floating point systems but
+- wrong for the old FPPC. The only solution seems to be to avoid their use on
+- old hardware. */
+-
+-union ieee854_long_double
+- {
+- long double d;
+-
+- /* This is the IEEE 854 double-extended-precision format. */
+- struct
+- {
+- unsigned int exponent:15;
+- unsigned int empty:16;
+- unsigned int negative:1;
+- unsigned int mantissa1:32;
+- unsigned int mantissa0:32;
+- } ieee;
+-
+- /* This is for NaNs in the IEEE 854 double-extended-precision format. */
+- struct
+- {
+- unsigned int exponent:15;
+- unsigned int empty:16;
+- unsigned int negative:1;
+- unsigned int mantissa1:32;
+- unsigned int mantissa0:30;
+- unsigned int quiet_nan:1;
+- unsigned int one:1;
+- } ieee_nan;
+- };
+-
+-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
+-
+-__END_DECLS
+-
+-#endif /* ieee754.h */
+Index: glibc/sysdeps/unix/sysv/linux/arm/mmap64.S
+===================================================================
+--- glibc.orig/sysdeps/unix/sysv/linux/arm/mmap64.S 2005-03-22 10:26:27.097977060 -0500
++++ glibc/sysdeps/unix/sysv/linux/arm/mmap64.S 2005-03-22 11:00:53.051209928 -0500
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
++/* Copyright (C) 2000, 2003, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+@@ -23,13 +23,28 @@
+
+ #include "kernel-features.h"
+
++#ifdef __ARM_EABI__
++# define INITIAL_OFFSET 8
++#else
++# define INITIAL_OFFSET 4
++#endif
++
++#ifdef __ARMEB__
++# define LOW_OFFSET INITIAL_OFFSET + 4
++/* The initial + 4 is for the stack postdecrement. */
++# define HIGH_OFFSET 4 + INITIAL_OFFSET + 0
++#else
++# define LOW_OFFSET INITIAL_OFFSET + 0
++# define HIGH_OFFSET 4 + INITIAL_OFFSET + 4
++#endif
++
+ /* The mmap2 system call takes six arguments, all in registers. */
+ .text
+ ENTRY (__mmap64)
+ #ifdef __NR_mmap2
+- ldr ip, [sp, $4] @ offset low part
++ ldr ip, [sp, $LOW_OFFSET] @ offset low part
+ str r5, [sp, #-4]!
+- ldr r5, [sp, $12] @ offset high part
++ ldr r5, [sp, $HIGH_OFFSET] @ offset high part
+ str r4, [sp, #-4]!
+ movs r4, ip, lsl $20 @ check that offset is page-aligned
+ mov ip, ip, lsr $12
+
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 @@
+From 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
+Return-Path: <libc-alpha-return-17230-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
+Delivered-To: listarch-libc-alpha at sources dot redhat dot com
+Received: (qmail 7764 invoked by alias); 22 Mar 2005 16:24:20 -0000
+Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
+Precedence: bulk
+List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
+List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
+List-Post: <mailto:libc-alpha at sources dot redhat dot com>
+List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
+Sender: libc-alpha-owner at sources dot redhat dot com
+Delivered-To: mailing list libc-alpha at sources dot redhat dot com
+Received: (qmail 7316 invoked from network); 22 Mar 2005 16:23:45 -0000
+Received: from unknown (HELO nevyn.them.org) (66.93.172.17)
+ by sourceware dot org with SMTP; 22 Mar 2005 16:23:45 -0000
+Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian))
+ id 1DDmAg-000798-P7
+ for <libc-alpha at sources dot redhat dot com>; Tue, 22 Mar 2005 11:23:58 -0500
+Date: Tue, 22 Mar 2005 11:23:58 -0500
+From: Daniel Jacobowitz <drow at false dot org>
+To: libc-alpha at sources dot redhat dot com
+Subject: Re: Define PT_ARM_EXIDX
+Message-ID: <20050322162358.GA27424@nevyn.them.org>
+Mail-Followup-To: libc-alpha at sources dot redhat dot com
+References: <20050322155140.GA25312@nevyn.them.org>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+In-Reply-To: <20050322155140 dot GA25312 at nevyn dot them dot org>
+User-Agent: Mutt/1.5.6+20040907i
+
+On Tue, Mar 22, 2005 at 10:51:40AM -0500, Daniel Jacobowitz wrote:
+> The ARM EABI uses a program header to locate exception tables for shared
+> objects, just like PT_GNU_EH_FRAME. But the format is a little different,
+> and the header is above PT_LOPROC because it was assigned by a processor
+> vendor. This just adds the constant to elf/elf.h.
+
+Oops, Ulrich pointed out that I put the constant in the wrong place.
+
+--
+Daniel Jacobowitz
+CodeSourcery, LLC
+
+2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * elf/elf.h (PT_ARM_EXIDX): Define.
+
+Index: glibc/elf/elf.h
+===================================================================
+--- glibc.orig/elf/elf.h 2005-03-22 11:21:34.961464117 -0500
++++ glibc/elf/elf.h 2005-03-22 11:22:49.872172922 -0500
+@@ -2138,7 +2138,11 @@ typedef Elf32_Addr Elf32_Conflict;
+ #define PF_ARM_SB 0x10000000 /* Segment contains the location
+ addressed by the static base */
+
++/* Processor specific values for the Phdr p_type field. */
++#define PT_ARM_EXIDX 0x70000001 /* .ARM.exidx segment */
++
+ /* ARM relocs. */
++
+ #define R_ARM_NONE 0 /* No reloc */
+ #define R_ARM_PC24 1 /* PC relative 26 bit branch */
+ #define R_ARM_ABS32 2 /* Direct 32 bit */
+
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 @@
+/usr/local/lib
+/opt/QtPalmtop/lib
+
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 @@
+Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html
+Author: addsub@eyou.com
+Target: ARM
+
+Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c
+and makes printf("%f", 1.0) work.
+
+Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html :
+ It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point
+ is broken' on my big-endian hardfloat FPA ARM platform. ...
+ It's definitely needed for hardfloat. So I'd think it's needed for
+ big-endian systems in any case, and for VFP on little-endian systems
+ too. Someone would have to verify that though.
+
+Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html
+ I just had a look at glibc-20040830, and [this patch] is still needed and useful
+ for this version. glibc-20040830 out-of-the-box still contains the
+ following wrong assumptions:
+ - sysdeps/arm/bits/endian.h: float word order is big endian (which it is
+ not on vfp systems)
+ - sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they
+ are not on big endian systems, neither on vfp systems)
+ - sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order
+ (which they are not on big endian systems)
+ [This patch] seems the right solution for all of these issues.
+
+Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html :
+ It's even needed for glibc CVS, AFAICS.
+ The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h
+ (currently at version 1.4) is only needed for proper VFP operation.
+ But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk
+ that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed
+ for proper operation of *any* FP model on big endian ARM.
+
+See also discussion in followups to
+http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html)
+
+Message-ID: <276985760.37584@eyou.com>
+Received: from unknown (HELO eyou.com) (172.16.2.2)
+ by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800
+Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800
+Date: 17 Feb 2004 10:42:38 +0800
+Message-ID: <20040217104238.8237.qmail@eyou.com>
+From: "add" <addsub@eyou.com>
+To: dank@kegel.com
+Reply-To: "add" <addsub@eyou.com>
+Subject: Re:&nbsp;&nbsp;&nbsp;problem&nbsp;while&nbsp;building&nbsp;arm&nbsp;vfp&nbsp;softfloat&nbsp;gcc&nbsp;`
+
+Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat
+toolchain can printf("%f\n",1.0). So you may have a try of this
+
+
+diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h
+--- glibc.old/sysdeps/arm/bits/endian.h 1999-04-12 11:59:13.000000000 -0400
++++ glibc.new/sysdeps/arm/bits/endian.h 2004-02-12 09:15:13.000000000 -0500
+@@ -9,4 +9,9 @@
+ #else
+ #define __BYTE_ORDER __LITTLE_ENDIAN
+ #endif
++
++#ifdef __VFP_FP__
++#define __FLOAT_WORD_ORDER __BYTE_ORDER
++#else
+ #define __FLOAT_WORD_ORDER __BIG_ENDIAN
++#endif
+diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h
+--- glibc.old/sysdeps/arm/gmp-mparam.h 2001-07-07 15:21:19.000000000 -0400
++++ glibc.new/sysdeps/arm/gmp-mparam.h 2004-02-12 09:15:13.000000000 -0500
+@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
+ #define BITS_PER_SHORTINT 16
+ #define BITS_PER_CHAR 8
+
+-#define IEEE_DOUBLE_BIG_ENDIAN 0
+-#define IEEE_DOUBLE_MIXED_ENDIAN 1
++#if defined(__ARMEB__)
++# define IEEE_DOUBLE_MIXED_ENDIAN 0
++# define IEEE_DOUBLE_BIG_ENDIAN 1
++#elif defined(__VFP_FP__)
++# define IEEE_DOUBLE_MIXED_ENDIAN 0
++# define IEEE_DOUBLE_BIG_ENDIAN 0
++#else
++# define IEEE_DOUBLE_BIG_ENDIAN 0
++# define IEEE_DOUBLE_MIXED_ENDIAN 1
++#endif
+diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h
+--- glibc.old/sysdeps/arm/ieee754.h 2001-07-07 15:21:19.000000000 -0400
++++ glibc.new/sysdeps/arm/ieee754.h 1969-12-31 19:00:00.000000000 -0500
+@@ -1,115 +0,0 @@
+-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+-
+- The GNU C Library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Lesser General Public
+- License as published by the Free Software Foundation; either
+- version 2.1 of the License, or (at your option) any later version.
+-
+- The GNU C Library is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Lesser General Public License for more details.
+-
+- You should have received a copy of the GNU Lesser General Public
+- License along with the GNU C Library; if not, write to the Free
+- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+- 02111-1307 USA. */
+-
+-#ifndef _IEEE754_H
+-
+-#define _IEEE754_H 1
+-#include <features.h>
+-
+-#include <endian.h>
+-
+-__BEGIN_DECLS
+-
+-union ieee754_float
+- {
+- float f;
+-
+- /* This is the IEEE 754 single-precision format. */
+- struct
+- {
+- unsigned int mantissa:23;
+- unsigned int exponent:8;
+- unsigned int negative:1;
+- } ieee;
+-
+- /* This format makes it easier to see if a NaN is a signalling NaN. */
+- struct
+- {
+- unsigned int mantissa:22;
+- unsigned int quiet_nan:1;
+- unsigned int exponent:8;
+- unsigned int negative:1;
+- } ieee_nan;
+- };
+-
+-#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
+-
+-
+-union ieee754_double
+- {
+- double d;
+-
+- /* This is the IEEE 754 double-precision format. */
+- struct
+- {
+- unsigned int mantissa0:20;
+- unsigned int exponent:11;
+- unsigned int negative:1;
+- unsigned int mantissa1:32;
+- } ieee;
+-
+- /* This format makes it easier to see if a NaN is a signalling NaN. */
+- struct
+- {
+- unsigned int mantissa0:19;
+- unsigned int quiet_nan:1;
+- unsigned int exponent:11;
+- unsigned int negative:1;
+- unsigned int mantissa1:32;
+- } ieee_nan;
+- };
+-
+-#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
+-
+-
+-/* The following two structures are correct for `new' floating point systems but
+- wrong for the old FPPC. The only solution seems to be to avoid their use on
+- old hardware. */
+-
+-union ieee854_long_double
+- {
+- long double d;
+-
+- /* This is the IEEE 854 double-extended-precision format. */
+- struct
+- {
+- unsigned int exponent:15;
+- unsigned int empty:16;
+- unsigned int negative:1;
+- unsigned int mantissa1:32;
+- unsigned int mantissa0:32;
+- } ieee;
+-
+- /* This is for NaNs in the IEEE 854 double-extended-precision format. */
+- struct
+- {
+- unsigned int exponent:15;
+- unsigned int empty:16;
+- unsigned int negative:1;
+- unsigned int mantissa1:32;
+- unsigned int mantissa0:30;
+- unsigned int quiet_nan:1;
+- unsigned int one:1;
+- } ieee_nan;
+- };
+-
+-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
+-
+-__END_DECLS
+-
+-#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 @@
+--- elf/ldconfig.c 2003-07-08 23:26:27.000000000 +0900
++++ elf/ldconfig.c.debian 2003-07-08 23:29:43.000000000 +0900
+@@ -920,26 +920,24 @@
+ {
+ FILE *file = NULL;
+ char *line = NULL;
+- const char *canon;
++ const char *canon = filename;
+ size_t len = 0;
++ int file_fd;
+
+ if (opt_chroot)
+ {
+ canon = chroot_canon (opt_chroot, filename);
+- if (canon)
+- file = fopen (canon, "r");
+- else
++ if (!canon)
+ canon = filename;
+ }
+- else
+- {
+- canon = filename;
+- file = fopen (filename, "r");
+- }
++
++ if ((file_fd = open(canon, O_RDONLY | O_EXCL, 0022)) != -1)
++ file = fdopen (file_fd, "r");
+
+ if (file == NULL)
+ {
+- error (0, errno, _("Can't open configuration file %s"), canon);
++ if (opt_verbose)
++ error (0, errno, _("Can't open configuration file %s"), canon);
+ if (canon != filename)
+ free ((char *) canon);
+ 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 @@
+--- elf/ldd.bash.in~ Tue Apr 3 21:43:31 2001
++++ elf/ldd.bash.in Tue Apr 3 21:54:15 2001
+@@ -32,6 +32,7 @@
+ warn=
+ bind_now=
+ verbose=
++filename_magic_regex="((^|/)lib|.so$)"
+
+ while test $# -gt 0; do
+ case "$1" in
+@@ -123,8 +124,11 @@
+ echo "ldd: ${file}:" $"No such file or directory" >&2
+ result=1
+ elif test -r "$file"; then
+- test -x "$file" || echo 'ldd:' $"\
+-warning: you do not have execution permission for" "\`$file'" >&2
++ if test ! -x "$file" && eval echo "$file" \
++ | egrep -v "$filename_magic_regex" > /dev/null; then
++ echo 'ldd:' $"warning: you do not have execution permission for"\
++ "\`$file'" >&2
++ fi
+ RTLD=
+ for rtld in ${RTLDLIST}; do
+ if test -x $rtld; then
+@@ -143,7 +147,12 @@
+ fi
+ case $ret in
+ 0)
+- eval $add_env '"$file"' || result=1
++ if [ ! -x "$file" ] && eval file -L "$file" 2>/dev/null \
++ | sed 10q | egrep "$file_magic_regex" > /dev/null; then
++ eval $add_env ${RTLD} '"$file"' || result=1
++ else
++ eval $add_env '"$file"' || result=1
++ fi
+ ;;
+ 1)
+ # 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 @@
+This patch moves ld.so.cache from /etc to /var/run. This is for devices
+where /etc is JFFS2 or CRAMFS but /var is a ramdisk.
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- libc/sysdeps/generic/dl-cache.h~ldsocache-varrun
++++ libc/sysdeps/generic/dl-cache.h
+@@ -29,7 +29,7 @@
+ #endif
+
+ #ifndef LD_SO_CACHE
+-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache"
++# define LD_SO_CACHE "/var/run/ld.so.cache"
+ #endif
+
+ #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 @@
+--- Makeconfig~ 2001/09/12 18:49:45 1.265
++++ Makeconfig 2001/10/07 20:56:17
+@@ -532,10 +532,11 @@
+ $(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
+ $(filter -Wl$(comma)-rpath-link=%,\
+ $(sysdep-LDFLAGS)))))
++ld_envlib_path = $(shell test x$$LD_LIBRARY_PATH = x || echo -n :$$LD_LIBRARY_PATH)
+ run-program-prefix = $(if $(filter $(notdir $(built-program-file)),\
+ $(tests-static)),, \
+ $(elf-objpfx)$(rtld-installed-name) \
+- --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)))
++ --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path))$(ld_envlib_path))
+ else
+ run-program-prefix =
+ 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 @@
+--- sysdeps/unix/sysv/linux/mips/bits/socket.h.orig 2004-09-15 14:27:06.342572280 +0200
++++ sysdeps/unix/sysv/linux/mips/bits/socket.h 2004-09-15 14:27:28.162255184 +0200
+@@ -261,7 +261,7 @@
+ # define _EXTERN_INLINE extern __inline
+ # endif
+ _EXTERN_INLINE struct cmsghdr *
+-__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
++__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)
+ {
+ if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
+ /* The kernel header does this so there may be a reason. */
+--- sysdeps/unix/sysv/linux/mips/sys/tas.h.orig 2004-09-15 14:27:41.809180536 +0200
++++ sysdeps/unix/sysv/linux/mips/sys/tas.h 2004-09-15 14:27:53.245441960 +0200
+@@ -35,7 +35,7 @@
+ # endif
+
+ _EXTERN_INLINE int
+-_test_and_set (int *p, int v) __THROW
++_test_and_set (int *p, int v)
+ {
+ int r, t;
+
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 @@
+--- glibc-2.3.2/manual/Makefile~noinfo
++++ glibc-2.3.2/manual/Makefile
+@@ -25,7 +25,7 @@
+ INSTALL_INFO = install-info
+
+ .PHONY: all dvi pdf info html
+-all: dvi
++all:
+ dvi: libc.dvi
+ pdf: libc.pdf
+
+@@ -41,7 +41,7 @@
+ TEXI2PDF = texi2dvi --pdf
+
+ ifneq ($(strip $(MAKEINFO)),:)
+-all: info
++all:
+ info: libc.info dir-add.info
+ endif
+
+@@ -176,28 +176,14 @@
+ -rm -f top-menu.texi chapters.texi
+
+ .PHONY: install subdir_install installdirs install-data
+-install-data subdir_install: install
++install-data subdir_install:
+ ifneq ($(strip $(MAKEINFO)),:)
+ # There are two variants of install-info out there. The GNU version
+ # knows about the INFO-DIR-SECTION tag, the Debian version doesn't.
+ ifneq ($(OLD_DEBIAN_INSTALL_INFO),yes)
+-install: $(inst_infodir)/libc.info dir-add.info
+- @if $(SHELL) -c '$(INSTALL_INFO) --version' >/dev/null 2>&1; then \
+- test -f $(inst_infodir)/dir || $(INSTALL_DATA) dir $(inst_infodir);\
+- $(INSTALL_INFO) --info-dir=$(inst_infodir) $(inst_infodir)/libc.info;\
+- $(INSTALL_INFO) --info-dir=$(inst_infodir) dir-add.info;\
+- else : ; fi
++install:
+ else
+-install: $(inst_infodir)/libc.info dir-add.info
+- @if $(SHELL) -c '$(INSTALL_INFO) --version' >/dev/null 2>&1; then \
+- test -f $(inst_infodir)/dir || $(INSTALL_DATA) dir $(inst_infodir);\
+- $(INSTALL_INFO) --info-dir=$(inst_infodir) \
+- --section '^GNU Libraries:' 'GNU Libraries:' \
+- $(inst_infodir)/libc.info;\
+- $(INSTALL_INFO) --info-dir=$(inst_infodir) \
+- --section '^GNU C Library functions:' 'GNU C Library functions:' \
+- dir-add.info;\
+- else : ; fi
++install:
+ endif
+ endif
+ # 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 @@
+From 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
+Return-Path: <libc-alpha-return-16890-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
+Delivered-To: listarch-libc-alpha at sources dot redhat dot com
+Received: (qmail 26073 invoked by alias); 19 Jan 2005 18:02:41 -0000
+Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
+Precedence: bulk
+List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
+List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
+List-Post: <mailto:libc-alpha at sources dot redhat dot com>
+List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
+Sender: libc-alpha-owner at sources dot redhat dot com
+Delivered-To: mailing list libc-alpha at sources dot redhat dot com
+Received: (qmail 25420 invoked from network); 19 Jan 2005 18:01:47 -0000
+Received: from unknown (HELO mail.codesourcery.com) (65.74.133.9)
+ by sourceware dot org with SMTP; 19 Jan 2005 18:01:47 -0000
+Received: (qmail 7456 invoked from network); 19 Jan 2005 18:01:44 -0000
+Received: from localhost (HELO ?192.168.0.100?) (mitchell@127.0.0.1)
+ by mail dot codesourcery dot com with SMTP; 19 Jan 2005 18:01:44 -0000
+Message-ID: <41EEA082.1020000@codesourcery.com>
+Date: Wed, 19 Jan 2005 10:01:38 -0800
+From: Mark Mitchell <mark at codesourcery dot com>
+Organization: CodeSourcery, LLC
+User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103)
+MIME-Version: 1.0
+To: Daniel Jacobowitz <drow at false dot org>
+CC: libc-alpha at sources dot redhat dot com
+Subject: Re: PATCH: ARM dl-trampoline.S
+References: <200501191631.j0JGVVRA002591@sirius.codesourcery.com> <20050119170217.GA3137@nevyn.them.org>
+In-Reply-To: <20050119170217 dot GA3137 at nevyn dot them dot org>
+Content-Type: multipart/mixed;
+ boundary="------------050601050507020101060100"
+
+This is a multi-part message in MIME format.
+--------------050601050507020101060100
+Content-Type: text/plain; charset=ISO-8859-1; format=flowed
+Content-Transfer-Encoding: 7bit
+
+Daniel Jacobowitz wrote:
+> On Wed, Jan 19, 2005 at 08:31:31AM -0800, Mark Mitchell wrote:
+>
+>>This patch updates the ARM port for the recent dl-trampoline.S and
+>>link.h changes. OK to apply?
+>
+>
+> Did you test this? I'm pretty sure that RESOLVE_MAP returns a link
+> map, unlike RESOLVE.
+
+No, I didn't test -- except by building glibc. (There are other
+problems at the moment, AFAICT, with actually running the library on ARM.)
+
+However, you're definitely correct -- good catch! -- and, in fact, in
+looking at my logs I see compiler warnings about the mismatched type
+assignment. Here is a more plausible version. How about this one?
+
+Thanks,
+
+--
+Mark Mitchell
+CodeSourcery, LLC
+mark@codesourcery.com
+(916) 791-8304
+
+--------------050601050507020101060100
+Content-Type: text/plain;
+ name="glibc.patch"
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline;
+ filename="glibc.patch"
+
+2005-01-19 Mark Mitchell <mark@codesourcery.com>
+
+ * elf/tst-auditmod1.c: Add ARM support.
+ * sysdeps/arm/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE):
+ Remove.
+ (RESOLVE): Do not use it; use ...
+ (RESOLVE_MAP): ... instead.
+ (ARCH_LA_PLTENTER): Define.
+ (ARCH_LA_PLTEXIT): Likewise.
+ (elf_machine_rel): Use RESOLVE_MAP, not RESOLVE.
+ (elf_machine_rela): Likewise.
+ * sysdeps/arm/dl-trampoline.S: New file.
+ * sysdeps/arm/bits/link.h: Likewise.
+ * sysdeps/generic/ldsodefs.h (struct La_arm_regs): Declare.
+ (struct audit_ifaces): Add ARM functions.
+
+Index: elf/tst-auditmod1.c
+===================================================================
+RCS file: /cvs/glibc/libc/elf/tst-auditmod1.c,v
+retrieving revision 1.7
+diff -c -5 -p -r1.7 tst-auditmod1.c
+*** elf/tst-auditmod1.c 16 Jan 2005 06:24:59 -0000 1.7
+--- elf/tst-auditmod1.c 19 Jan 2005 17:54:32 -0000
+*************** la_symbind64 (Elf64_Sym *sym, unsigned i
+*** 100,110 ****
+ symname, (long int) sym->st_value, ndx, *flags);
+
+ return sym->st_value;
+ }
+
+! #ifdef __i386__
+ # define pltenter la_i86_gnu_pltenter
+ # define pltexit la_i86_gnu_pltexit
+ # define La_regs La_i86_regs
+ # define La_retval La_i86_retval
+ # define int_retval lrv_eax
+--- 100,116 ----
+ symname, (long int) sym->st_value, ndx, *flags);
+
+ return sym->st_value;
+ }
+
+! #ifdef __arm__
+! # define pltenter la_arm_gnu_plteneter
+! # define pltext la_arm_gnu_pltexit
+! # define La_regs La_arm_regs
+! # define La_retval La_arm_retval
+! # define int_retval lvr_r0
+! #elif defined __i386__
+ # define pltenter la_i86_gnu_pltenter
+ # define pltexit la_i86_gnu_pltexit
+ # define La_regs La_i86_regs
+ # define La_retval La_i86_retval
+ # define int_retval lrv_eax
+Index: sysdeps/arm/dl-trampoline.S
+===================================================================
+RCS file: sysdeps/arm/dl-trampoline.S
+diff -N sysdeps/arm/dl-trampoline.S
+*** /dev/null 1 Jan 1970 00:00:00 -0000
+--- sysdeps/arm/dl-trampoline.S 19 Jan 2005 17:54:32 -0000
+***************
+*** 0 ****
+--- 1,135 ----
++ /* PLT trampolines. ARM version.
++ Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++ #include <sysdep.h>
++
++ #if defined(__USE_BX__)
++ #define BX(x) bx x
++ #else
++ #define BX(x) mov pc, x
++ #endif
++
++ #ifndef PROF
++ .text
++ .globl _dl_runtime_resolve
++ .type _dl_runtime_resolve, #function
++ .align 2
++ _dl_runtime_resolve:
++ @ we get called with
++ @ stack[0] contains the return address from this call
++ @ ip contains &GOT[n+3] (pointer to function)
++ @ lr points to &GOT[2]
++
++ @ stack arguments
++ stmdb sp!,{r0-r3}
++
++ @ get pointer to linker struct
++ ldr r0, [lr, #-4]
++
++ @ prepare to call _dl_fixup()
++ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
++ sub r1, ip, lr
++ sub r1, r1, #4
++ add r1, r1, r1
++
++ @ call fixup routine
++ bl _dl_fixup
++
++ @ save the return
++ mov ip, r0
++
++ @ get arguments and return address back
++ ldmia sp!, {r0-r3,lr}
++
++ @ jump to the newly found address
++ BX(ip)
++
++ .size _dl_runtime_resolve, .-_dl_runtime_resolve
++
++ .globl _dl_runtime_profile
++ .type _dl_runtime_profile, #function
++ .align 2
++ _dl_runtime_profile:
++ @ stack arguments
++ stmdb sp!, {r0-r3}
++
++ @ get pointer to linker struct
++ ldr r0, [lr, #-4]
++
++ @ prepare to call _dl_profile_fixup()
++ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
++ sub r1, ip, lr
++ sub r1, r1, #4
++ add r1, r1, r1
++
++ @ call profiling fixup routine
++ bl _dl_profile_fixup
++
++ @ save the return
++ mov ip, r0
++
++ @ get arguments and return address back
++ ldmia sp!, {r0-r3,lr}
++
++ @ jump to the newly found address
++ BX(ip)
++
++ .size _dl_runtime_resolve, .-_dl_runtime_resolve
++ .previous
++ #else
++ .text
++ .globl _dl_runtime_resolve
++ .globl _dl_runtime_profile
++ .type _dl_runtime_resolve, #function
++ .type _dl_runtime_profile, #function
++ .align 2
++ _dl_runtime_resolve:
++ _dl_runtime_profile:
++ @ we get called with
++ @ stack[0] contains the return address from this call
++ @ ip contains &GOT[n+3] (pointer to function)
++ @ lr points to &GOT[2]
++
++ @ stack arguments
++ stmdb sp!, {r0-r3}
++
++ @ get pointer to linker struct
++ ldr r0, [lr, #-4]
++
++ @ prepare to call _dl_fixup()
++ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
++ sub r1, ip, lr
++ sub r1, r1, #4
++ add r1, r1, r1
++
++ @ call profiling fixup routine
++ bl _dl_fixup
++
++ @ save the return
++ mov ip, r0
++
++ @ get arguments and return address back
++ ldmia sp!, {r0-r3,lr}
++
++ @ jump to the newly found address
++ BX(ip)
++
++ .size _dl_runtime_profile, .-_dl_runtime_profile
++ .previous
++ #endif
+Index: sysdeps/arm/bits/link.h
+===================================================================
+RCS file: /cvs/glibc/libc/sysdeps/arm/bits/link.h,v
+retrieving revision 1.2
+diff -c -5 -p -r1.2 link.h
+*** sysdeps/arm/bits/link.h 6 Jan 2005 22:40:20 -0000 1.2
+--- sysdeps/arm/bits/link.h 19 Jan 2005 17:54:32 -0000
+***************
+*** 0 ****
+--- 1,57 ----
++ /* Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++ #ifndef _LINK_H
++ # error "Never include <bits/link.h> directly; use <link.h> instead."
++ #endif
++
++
++ /* Registers for entry into PLT on ARM. */
++ typedef struct La_arm_regs
++ {
++ uint32_t lvr_r0;
++ uint32_t lvr_r1;
++ uint32_t lvr_r2;
++ uint32_t lvr_r3;
++ } La_arm_regs;
++
++ /* Return values for calls from PLT on ARM. */
++ typedef struct La_arm_retval
++ {
++ uint32_t lvr_r0;
++ uint32_t lvr_r1;
++ } La_arm_retval;
++
++
++ __BEGIN_DECLS
++
++ extern Elf32_Addr la_arm_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
++ uintptr_t *__refcook,
++ uintptr_t *__defcook,
++ La_arm_regs *__regs,
++ unsigned int *__flags,
++ const char *__symname,
++ long int *__framesizep);
++ extern unsigned int la_arm_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
++ uintptr_t *__refcook,
++ uintptr_t *__defcook,
++ const La_arm_regs *__inregs,
++ La_arm_retval *__outregs,
++ const char *symname);
++
++ __END_DECLS
+Index: sysdeps/generic/ldsodefs.h
+===================================================================
+RCS file: /cvs/glibc/libc/sysdeps/generic/ldsodefs.h,v
+retrieving revision 1.112
+diff -c -5 -p -r1.112 ldsodefs.h
+*** sysdeps/generic/ldsodefs.h 16 Jan 2005 02:07:29 -0000 1.112
+--- sysdeps/generic/ldsodefs.h 19 Jan 2005 17:54:32 -0000
+*************** enum allowmask
+*** 173,182 ****
+--- 173,183 ----
+ allow_ldso = 8
+ };
+
+
+ /* Type for list of auditing interfaces. */
++ struct La_arm_regs;
+ struct La_i86_regs;
+ struct La_i86_retval;
+ struct La_x86_64_regs;
+ struct La_x86_64_retval;
+ struct La_ppc32_regs;
+*************** struct audit_ifaces
+*** 202,211 ****
+--- 203,216 ----
+ uintptr_t (*symbind64) (Elf64_Sym *, unsigned int, uintptr_t *,
+ uintptr_t *, unsigned int *, const char *);
+ };
+ union
+ {
++ Elf32_Addr (*arm_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *,
++ uintptr_t *, struct La_arm_regs *,
++ unsigned int *, const char *name,
++ long int *framesizep);
+ Elf32_Addr (*i86_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *,
+ uintptr_t *, struct La_i86_regs *,
+ unsigned int *, const char *name,
+ long int *framesizep);
+ Elf64_Addr (*x86_64_gnu_pltenter) (Elf64_Sym *, unsigned int, uintptr_t *,
+*************** struct audit_ifaces
+*** 229,238 ****
+--- 234,246 ----
+ unsigned int *, const char *name,
+ long int *framesizep);
+ };
+ union
+ {
++ unsigned int (*arm_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *,
++ uintptr_t *, const struct La_arm_regs *,
++ struct La_i86_retval *, const char *);
+ unsigned int (*i86_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *,
+ uintptr_t *, const struct La_i86_regs *,
+ struct La_i86_retval *, const char *);
+ unsigned int (*x86_64_gnu_pltexit) (Elf64_Sym *, unsigned int, uintptr_t *,
+ uintptr_t *,
+
+--------------050601050507020101060100--
+
+diff -u -r1.52 dl-machine.h
+--- sysdeps/arm/dl-machine.h 15 Mar 2005 22:57:26 -0000 1.52
++++ sysdeps/arm/dl-machine.h 22 Apr 2005 03:38:15 -0000
+@@ -129,119 +129,6 @@
+ #define BX(x) "mov\tpc, " #x
+ #endif
+
+-#ifndef PROF
+-# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
+- .text\n\
+- .globl _dl_runtime_resolve\n\
+- .type _dl_runtime_resolve, #function\n\
+- .align 2\n\
+-_dl_runtime_resolve:\n\
+- @ we get called with\n\
+- @ stack[0] contains the return address from this call\n\
+- @ ip contains &GOT[n+3] (pointer to function)\n\
+- @ lr points to &GOT[2]\n\
+-\n\
+- @ stack arguments\n\
+- stmdb sp!,{r0-r3}\n\
+-\n\
+- @ get pointer to linker struct\n\
+- ldr r0, [lr, #-4]\n\
+-\n\
+- @ prepare to call fixup()\n\
+- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
+- sub r1, ip, lr\n\
+- sub r1, r1, #4\n\
+- add r1, r1, r1\n\
+-\n\
+- @ call fixup routine\n\
+- bl fixup\n\
+-\n\
+- @ save the return\n\
+- mov ip, r0\n\
+-\n\
+- @ get arguments and return address back\n\
+- ldmia sp!, {r0-r3,lr}\n\
+-\n\
+- @ jump to the newly found address\n\
+- " BX(ip) "\n\
+-\n\
+- .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
+-\n\
+- .globl _dl_runtime_profile\n\
+- .type _dl_runtime_profile, #function\n\
+- .align 2\n\
+-_dl_runtime_profile:\n\
+- @ stack arguments\n\
+- stmdb sp!, {r0-r3}\n\
+-\n\
+- @ get pointer to linker struct\n\
+- ldr r0, [lr, #-4]\n\
+-\n\
+- @ prepare to call fixup()\n\
+- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
+- sub r1, ip, lr\n\
+- sub r1, r1, #4\n\
+- add r1, r1, r1\n\
+-\n\
+- @ call profiling fixup routine\n\
+- bl profile_fixup\n\
+-\n\
+- @ save the return\n\
+- mov ip, r0\n\
+-\n\
+- @ get arguments and return address back\n\
+- ldmia sp!, {r0-r3,lr}\n\
+-\n\
+- @ jump to the newly found address\n\
+- " BX(ip) "\n\
+-\n\
+- .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
+- .previous\n\
+-");
+-#else // PROF
+-# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
+- .text\n\
+- .globl _dl_runtime_resolve\n\
+- .globl _dl_runtime_profile\n\
+- .type _dl_runtime_resolve, #function\n\
+- .type _dl_runtime_profile, #function\n\
+- .align 2\n\
+-_dl_runtime_resolve:\n\
+-_dl_runtime_profile:\n\
+- @ we get called with\n\
+- @ stack[0] contains the return address from this call\n\
+- @ ip contains &GOT[n+3] (pointer to function)\n\
+- @ lr points to &GOT[2]\n\
+-\n\
+- @ stack arguments\n\
+- stmdb sp!, {r0-r3}\n\
+-\n\
+- @ get pointer to linker struct\n\
+- ldr r0, [lr, #-4]\n\
+-\n\
+- @ prepare to call fixup()\n\
+- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
+- sub r1, ip, lr\n\
+- sub r1, r1, #4\n\
+- add r1, r1, r1\n\
+-\n\
+- @ call profiling fixup routine\n\
+- bl fixup\n\
+-\n\
+- @ save the return\n\
+- mov ip, r0\n\
+-\n\
+- @ get arguments and return address back\n\
+- ldmia sp!, {r0-r3,lr}\n\
+-\n\
+- @ jump to the newly found address\n\
+- " BX(ip) "\n\
+-\n\
+- .size _dl_runtime_profile, .-_dl_runtime_profile\n\
+- .previous\n\
+-");
+-#endif //PROF
+-
+ /* Mask identifying addresses reserved for the user program,
+ where the dynamic linker should not map anything. */
+ #define ELF_MACHINE_USER_ADDRESS_MASK 0xf8000000UL
+@@ -348,6 +235,10 @@
+ return value;
+ }
+
++/* Names of the architecture-specific auditing callback functions. */
++#define ARCH_LA_PLTENTER arm_gnu_pltenter
++#define ARCH_LA_PLTEXIT arm_gnu_pltexit
++
+ #endif /* !dl_machine_h */
+
+
+@@ -355,7 +246,7 @@
+ Prelinked libraries may use Elf32_Rela though. */
+ #define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP
+
+-#ifdef RESOLVE
++#ifdef RESOLVE_MAP
+
+ /* Deal with an out-of-range PC24 reloc. */
+ static Elf32_Addr
+@@ -425,7 +316,8 @@
+ #endif
+ {
+ const Elf32_Sym *const refsym = sym;
+- Elf32_Addr value = RESOLVE (&sym, version, r_type);
++ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
++ Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
+ if (sym)
+ value += sym->st_value;
+
+@@ -535,7 +427,8 @@
+ # ifndef RESOLVE_CONFLICT_FIND_MAP
+ const Elf32_Sym *const refsym = sym;
+ # endif
+- Elf32_Addr value = RESOLVE (&sym, version, r_type);
++ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
++ Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
+ if (sym)
+ value += sym->st_value;
+
+@@ -637,4 +530,4 @@
+ _dl_reloc_bad_type (map, r_type, 1);
+ }
+
+-#endif /* RESOLVE */
++#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 @@
+SECTION = "libs"
+include glibc_${PV}.bb
+
+DEPENDS = "linux-libc-headers"
+PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
+FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-cvs', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
+
+PACKAGES = ""
+
+do_configure () {
+ sed -ie 's,{ (exit 1); exit 1; }; },{ (exit 0); }; },g' ${S}/configure
+ chmod +x ${S}/configure
+ CC="${BUILD_CC}" CPP="${BUILD_CPP}" LD="${BUILD_LD}" ${S}/configure --host=${TARGET_SYS} --build=${BUILD_SYS} \
+ --without-cvs --disable-sanity-checks \
+ --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \
+ --enable-hacker-mode
+ if grep -q GLIBC_2.3 ${S}/ChangeLog; then
+ # glibc-2.3.x passes cross options to $(CC) when generating errlist-compat.c, which fails without a real cross-compiler.
+ # Fortunately, we don't need errlist-compat.c, since we just need .h files,
+ # so work around this by creating a fake errlist-compat.c and satisfying its dependencies.
+ # Another workaround might be to tell configure to not use any cross options to $(CC).
+ # The real fix would be to get install-headers to not generate errlist-compat.c.
+ make sysdeps/gnu/errlist.c
+ mkdir -p stdio-common
+ touch stdio-common/errlist-compat.c
+ fi
+}
+
+do_compile () {
+ :
+}
+
+do_stage () {
+ oe_runmake cross-compiling=yes install_root=${CROSS_DIR}/${TARGET_SYS} prefix="" install-headers
+
+ # Two headers -- stubs.h and features.h -- aren't installed by install-headers,
+ # so do them by hand. We can tolerate an empty stubs.h for the moment.
+ # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html
+ mkdir -p ${CROSS_DIR}/${TARGET_SYS}/include/gnu
+ touch ${CROSS_DIR}/${TARGET_SYS}/include/gnu/stubs.h
+ cp ${S}/include/features.h ${CROSS_DIR}/${TARGET_SYS}/include/features.h
+}
+
+do_install () {
+ :
+}
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 @@
+SECTION = "libs"
+include glibc_${PV}.bb
+
+DEFAULT_PREFERENCE = "-1"
+
+do_install () {
+ :
+}
+
+PACKAGES = ""
+PROVIDES = "virtual/${TARGET_PREFIX}libc-for-gcc"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial linux-libc-headers"
+GLIBC_ADDONS = "nptl,ports"
+GLIBC_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 @@
+#
+# For now, we will skip building of a gcc package if it is a uclibc one
+# and our build is not a uclibc one, and we skip a glibc one if our build
+# is a uclibc build.
+#
+# See the note in gcc/gcc_3.4.0.oe
+#
+
+python __anonymous () {
+ import bb, re
+ uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
+ if uc_os:
+ raise bb.parse.SkipPackage("incompatible with target %s" %
+ bb.data.getVar('TARGET_OS', d, 1))
+}
+
+# Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION
+# is set. The idea is to avoid running localedef on the target (at first boot)
+# to decrease initial boot time and avoid localedef being killed by the OOM
+# killer which used to effectively break i18n on machines with < 128MB RAM.
+
+# default to disabled until qemu works for everyone
+ENABLE_BINARY_LOCALE_GENERATION ?= "0"
+
+# BINARY_LOCALE_ARCHES is a space separated list of regular expressions
+BINARY_LOCALE_ARCHES ?= "arm.*"
+
+PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
+PACKAGES_DYNAMIC = "glibc-gconv-* glibc-charmap-* glibc-localedata-*"
+
+libc_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*"
+
+FILES_${PN} = "${sysconfdir} ${libc_baselibs} /sbin/ldconfig ${libexecdir} ${datadir}/zoneinfo"
+FILES_ldd = "${bindir}/ldd"
+FILES_libsegfault = "/lib/libSegFault*"
+FILES_glibc-extra-nss = "/lib/libnss*"
+FILES_sln = "/sbin/sln"
+FILES_glibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen"
+FILES_nscd = "${sbindir}/nscd*"
+FILES_glibc-utils = "${bindir} ${sbindir}"
+FILES_glibc-gconv = "${libdir}/gconv"
+FILES_catchsegv = "${bindir}/catchsegv"
+RDEPENDS_catchsegv = "libsegfault"
+FILES_glibc-pcprofile = "/lib/libpcprofile.so"
+FILES_glibc-thread-db = "/lib/libthread_db*"
+FILES_localedef = "${bindir}/localedef"
+RPROVIDES_glibc-dev += "libc-dev"
+
+DESCRIPTION_sln = "glibc: create symbolic links between files"
+DESCRIPTION_nscd = "glibc: name service cache daemon for passwd, group, and hosts"
+DESCRIPTION_glibc-extra-nss = "glibc: nis, nisplus and hesiod search services"
+DESCRIPTION_ldd = "glibc: print shared library dependencies"
+DESCRIPTION_localedef = "glibc: compile locale definition files"
+DESCRIPTION_glibc-utils = "glibc: misc utilities like iconf, local, gencat, tzselect, rpcinfo, ..."
+
+def get_glibc_fpu_setting(bb, d):
+ if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
+ return "--without-fp"
+ return ""
+
+EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
+
+OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
+EXTRA_OECONF_append_arm-linuxeabi = " --without-fp"
+
+do_install() {
+ oe_runmake install_root=${D} install
+ for r in ${rpcsvc}; do
+ h=`echo $r|sed -e's,\.x$,.h,'`
+ install -m 0644 ${S}/sunrpc/rpcsvc/$h ${D}/${includedir}/rpcsvc/
+ done
+ install -m 0644 ${WORKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/
+ install -d ${D}${libdir}/locale
+ make -f ${WORKDIR}/generate-supported.mk IN="${S}/localedata/SUPPORTED" OUT="${WORKDIR}/SUPPORTED"
+ # get rid of some broken files...
+ for i in ${GLIBC_BROKEN_LOCALES}; do
+ grep -v $i ${WORKDIR}/SUPPORTED > ${WORKDIR}/SUPPORTED.tmp
+ mv ${WORKDIR}/SUPPORTED.tmp ${WORKDIR}/SUPPORTED
+ done
+ rm -f ${D}/etc/rpc
+}
+
+TMP_LOCALE="/tmp/locale/${libdir}/locale"
+
+locale_base_postinst() {
+#!/bin/sh
+
+if [ "x$D" != "x" ]; then
+ exit 1
+fi
+
+rm -rf ${TMP_LOCALE}
+mkdir -p ${TMP_LOCALE}
+if [ -f ${libdir}/locale/locale-archive ]; then
+ cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/
+fi
+localedef --inputfile=${datadir}/i18n/locales/%s --charmap=%s --prefix=/tmp/locale %s
+mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/
+rm -rf ${TMP_LOCALE}
+}
+
+locale_base_postrm() {
+#!/bin/sh
+
+rm -rf ${TMP_LOCALE}
+mkdir -p ${TMP_LOCALE}
+if [ -f ${libdir}/locale/locale-archive ]; then
+ cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/
+fi
+localedef --delete-from-archive --inputfile=${datadir}/locales/%s --charmap=%s --prefix=/tmp/locale %s
+mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/
+rm -rf ${TMP_LOCALE}
+}
+
+python __anonymous () {
+ enabled = bb.data.getVar("ENABLE_BINARY_LOCALE_GENERATION", d, 1)
+
+ if enabled and int(enabled):
+ import re
+
+ target_arch = bb.data.getVar("TARGET_ARCH", d, 1)
+ binary_arches = bb.data.getVar("BINARY_LOCALE_ARCHES", d, 1) or ""
+
+ for regexp in binary_arches.split(" "):
+ r = re.compile(regexp)
+
+ if r.match(target_arch):
+ depends = bb.data.getVar("DEPENDS", d, 1)
+ depends = "%s qemu-native" % depends
+ bb.data.setVar("DEPENDS", depends, d)
+ bb.data.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "1", d)
+ break
+}
+
+do_prep_locale_tree() {
+ treedir=${WORKDIR}/locale-tree
+ rm -rf $treedir
+ mkdir -p $treedir/bin $treedir/lib $treedir/${datadir} $treedir/${libdir}/locale
+ cp -a ${D}${datadir}/i18n $treedir/${datadir}/i18n
+ # unzip to avoid parsing errors
+ for i in $treedir/${datadir}/i18n/charmaps/*gz; do
+ gunzip $i
+ done
+ cp -a ${STAGING_LIBDIR}/* $treedir/lib
+ if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* ]; then
+ cp -a ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* $treedir/lib
+ fi
+ install -m 0755 ${D}${bindir}/localedef $treedir/bin
+}
+
+do_collect_bins_from_locale_tree() {
+ treedir=${WORKDIR}/locale-tree
+
+ mkdir -p ${D}${libdir}
+ cp -a $treedir/${libdir}/locale ${D}${libdir}
+}
+
+python package_do_split_gconvs () {
+ import os, re
+ if (bb.data.getVar('PACKAGE_NO_GCONV', d, 1) == '1'):
+ bb.note("package requested not splitting gconvs")
+ return
+
+ if not bb.data.getVar('PACKAGES', d, 1):
+ return
+
+ libdir = bb.data.getVar('libdir', d, 1)
+ if not libdir:
+ bb.error("libdir not defined")
+ return
+ datadir = bb.data.getVar('datadir', d, 1)
+ if not datadir:
+ bb.error("datadir not defined")
+ return
+
+ gconv_libdir = os.path.join(libdir, "gconv")
+ charmap_dir = os.path.join(datadir, "i18n", "charmaps")
+ locales_dir = os.path.join(datadir, "i18n", "locales")
+ binary_locales_dir = os.path.join(libdir, "locale")
+
+ 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')
+
+ do_split_packages(d, charmap_dir, file_regex='^(.*)\.gz$', output_pattern='glibc-charmap-%s', description='character map for %s encoding', extra_depends='')
+
+ def calc_locale_deps(fn, pkg, file_regex, output_pattern, group):
+ deps = []
+ f = open(fn, "r")
+ c_re = re.compile('^copy "(.*)"')
+ i_re = re.compile('^include "(\w+)".*')
+ for l in f.readlines():
+ m = c_re.match(l) or i_re.match(l)
+ if m:
+ dp = legitimize_package_name('glibc-localedata-%s' % m.group(1))
+ if not dp in deps:
+ deps.append(dp)
+ f.close()
+ if deps != []:
+ bb.data.setVar('RDEPENDS_%s' % pkg, " ".join(deps), d)
+
+ use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1)
+ if use_bin:
+ 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')
+ else:
+ do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern='glibc-localedata-%s', description='locale definition for %s', hook=calc_locale_deps, extra_depends='')
+ bb.note("generation of binary locales disabled. this may break i18n!")
+ bb.data.setVar('PACKAGES', bb.data.getVar('PACKAGES', d) + ' glibc-gconv', d)
+
+ f = open(os.path.join(bb.data.getVar('WORKDIR', d, 1), "SUPPORTED"), "r")
+ supported = f.readlines()
+ f.close()
+
+ dot_re = re.compile("(.*)\.(.*)")
+
+ # Collate the locales by base and encoding
+ encodings = {}
+ for l in supported:
+ l = l[:-1]
+ (locale, charset) = l.split(" ")
+ m = dot_re.match(locale)
+ if m:
+ locale = m.group(1)
+ if not encodings.has_key(locale):
+ encodings[locale] = []
+ encodings[locale].append(charset)
+
+ def output_locale_source(name, locale, encoding):
+ pkgname = 'locale-base-' + legitimize_package_name(name)
+
+ bb.data.setVar('RDEPENDS_%s' % pkgname, 'localedef glibc-localedata-%s glibc-charmap-%s' % (legitimize_package_name(locale), legitimize_package_name(encoding)), d)
+ rprovides = 'virtual-locale-%s' % legitimize_package_name(name)
+ m = re.match("(.*)_(.*)", name)
+ if m:
+ rprovides += ' virtual-locale-%s' % m.group(1)
+ bb.data.setVar('RPROVIDES_%s' % pkgname, rprovides, d)
+ bb.data.setVar('PACKAGES', '%s %s' % (pkgname, bb.data.getVar('PACKAGES', d, 1)), d)
+ bb.data.setVar('ALLOW_EMPTY_%s' % pkgname, '1', d)
+ bb.data.setVar('pkg_postinst_%s' % pkgname, bb.data.getVar('locale_base_postinst', d, 1) % (locale, encoding, locale), d)
+ bb.data.setVar('pkg_postrm_%s' % pkgname, bb.data.getVar('locale_base_postrm', d, 1) % (locale, encoding, locale), d)
+
+ def output_locale_binary(name, locale, encoding):
+ target_arch = bb.data.getVar("TARGET_ARCH", d, 1)
+ qemu = "qemu-%s" % target_arch
+ pkgname = 'locale-base-' + legitimize_package_name(name)
+
+ bb.data.setVar('RDEPENDS_%s' % pkgname, 'glibc-localedata-%s glibc-charmap-%s' % (legitimize_package_name(locale), legitimize_package_name(encoding)), d)
+ rprovides = 'virtual-locale-%s' % legitimize_package_name(name)
+ m = re.match("(.*)_(.*)", name)
+ if m:
+ rprovides += ' virtual-locale-%s' % m.group(1)
+ bb.data.setVar('RPROVIDES_%s' % pkgname, rprovides, d)
+ bb.data.setVar('ALLOW_EMPTY_%s' % pkgname, '1', d)
+ bb.data.setVar('PACKAGES', '%s %s' % (pkgname, bb.data.getVar('PACKAGES', d, 1)), d)
+
+ treedir = os.path.join(bb.data.getVar("WORKDIR", d, 1), "locale-tree")
+ path = bb.data.getVar("PATH", d, 1)
+ i18npath = os.path.join(treedir, datadir, "i18n")
+
+ localedef_opts = "--force --old-style --no-archive --prefix=%s --inputfile=%s/i18n/locales/%s --charmap=%s %s" % (treedir, datadir, locale, encoding, locale)
+ cmd = "PATH=\"%s\" I18NPATH=\"%s\" %s -L %s %s/bin/localedef %s" % (path, i18npath, qemu, treedir, treedir, localedef_opts)
+ bb.note("generating locale %s (%s)" % (locale, encoding))
+ if os.system(cmd):
+ raise bb.build.FuncFailed("localedef returned an error.")
+
+ def output_locale(name, locale, encoding):
+ use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1)
+ if use_bin:
+ output_locale_binary(name, locale, encoding)
+ else:
+ output_locale_source(name, locale, encoding)
+
+ use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1)
+ if use_bin:
+ bb.note("preparing tree for binary locale generation")
+ bb.build.exec_func("do_prep_locale_tree", d)
+
+ # Reshuffle names so that UTF-8 is preferred over other encodings
+ for l in encodings.keys():
+ if len(encodings[l]) == 1:
+ output_locale(l, l, encodings[l][0])
+ else:
+ if "UTF-8" in encodings[l]:
+ output_locale(l, l, "UTF-8")
+ encodings[l].remove("UTF-8")
+ for e in encodings[l]:
+ output_locale('%s-%s' % (l, e), l, e)
+
+ use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1)
+ if use_bin:
+ bb.note("collecting binary locales from locale tree")
+ bb.build.exec_func("do_collect_bins_from_locale_tree", d)
+}
+
+# We want to do this indirection so that we can safely 'return'
+# from the called function even though we're prepending
+python populate_packages_prepend () {
+ if bb.data.getVar('DEBIAN_NAMES', d, 1):
+ bb.data.setVar('PKG_glibc', 'libc6', d)
+ bb.data.setVar('PKG_glibc-dev', 'libc6-dev', d)
+ bb.build.exec_func('package_do_split_gconvs', d)
+}
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 @@
+DESCRIPTION = "GNU C Library"
+HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
+LICENSE = "LGPL"
+SECTION = "libs"
+PRIORITY = "required"
+MAINTAINER = "Phil Blundell <pb@handhelds.org>"
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-cvs-2.3.5"
+SRCDATE = "20050627"
+PR = "r3"
+
+GLIBC_ADDONS ?= "ports,linuxthreads"
+GLIBC_EXTRA_OECONF ?= ""
+
+GLIBC_BROKEN_LOCALES = "sid_ET tr_TR mn_MN"
+
+#
+# For now, we will skip building of a gcc package if it is a uclibc one
+# and our build is not a uclibc one, and we skip a glibc one if our build
+# is a uclibc build.
+#
+# See the note in gcc/gcc_3.4.0.oe
+#
+
+python __anonymous () {
+ import bb, re
+ uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
+ if uc_os:
+ raise bb.parse.SkipPackage("incompatible with target %s" %
+ bb.data.getVar('TARGET_OS', d, 1))
+}
+
+# nptl needs unwind support in gcc, which can't be built without glibc.
+PROVIDES = "virtual/libc ${@['virtual/${TARGET_PREFIX}libc-for-gcc', '']['nptl' in '${GLIBC_ADDONS}']}"
+PROVIDES += "virtual/libintl virtual/libiconv"
+DEPENDS = "${@['virtual/${TARGET_PREFIX}gcc-initial', 'virtual/${TARGET_PREFIX}gcc']['nptl' in '${GLIBC_ADDONS}']} linux-libc-headers"
+RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
+INHIBIT_DEFAULT_DEPS = "1"
+
+# file://noinfo.patch;patch=1
+# file://ldconfig.patch;patch=1;pnum=0
+# file://arm-machine-gmon.patch;patch=1;pnum=0 \
+# \
+# file://arm-ioperm.patch;patch=1;pnum=0 \
+# file://ldd.patch;patch=1;pnum=0 \
+SRC_URI = "http://familiar.handhelds.org/source/v0.8.3/stash_libc_sources.redhat.com__20050627.tar.gz \
+ http://familiar.handhelds.org/source/v0.8.3/stash_ports_sources.redhat.com__20050627.tar.gz \
+ file://arm-audit.patch;patch=1 \
+ file://arm-audit2.patch;patch=1 \
+ file://arm-no-hwcap.patch;patch=1 \
+ file://arm-memcpy.patch;patch=1 \
+ file://arm-longlong.patch;patch=1;pnum=0 \
+ file://fhs-linux-paths.patch;patch=1 \
+ file://dl-cache-libcmp.patch;patch=1 \
+ file://ldsocache-varrun.patch;patch=1 \
+ file://5090_all_stubs-rule-fix.patch;patch=1 \
+ file://etc/ld.so.conf \
+ file://generate-supported.mk"
+
+# seems to fail on tls platforms
+SRC_URI_append_arm = " file://dyn-ldconfig-20041128.patch;patch=1"
+
+S = "${WORKDIR}/libc"
+B = "${WORKDIR}/build-${TARGET_SYS}"
+
+inherit autotools
+
+EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
+ --without-cvs --disable-profile --disable-debug --without-gd \
+ --enable-clocale=gnu \
+ --enable-add-ons=${GLIBC_ADDONS} \
+ --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \
+ --without-selinux \
+ ${GLIBC_EXTRA_OECONF}"
+
+EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
+
+def get_glibc_fpu_setting(bb, d):
+ if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
+ return "--without-fp"
+ return ""
+
+do_munge() {
+ # Integrate ports into tree
+ mv ${WORKDIR}/ports ${S}
+
+ # http://www.handhelds.org/hypermail/oe/51/5135.html
+ # Some files were moved around between directories on
+ # 2005-12-21, which means that any attempt to check out
+ # from CVS using a datestamp older than that will be doomed.
+ #
+ # This is a workaround for that problem.
+ rm -rf ${S}/bits
+}
+
+addtask munge before do_patch after do_unpack
+
+do_configure () {
+# override this function to avoid the autoconf/automake/aclocal/autoheader
+# calls for now
+# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
+# version check and doesn't really help with anything
+ if [ -z "`which rpcgen`" ]; then
+ echo "rpcgen not found. Install glibc-devel."
+ exit 1
+ fi
+ (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
+ CPPFLAGS="" oe_runconf
+}
+
+rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
+ yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
+ rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
+
+do_compile () {
+ # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
+ unset LDFLAGS
+ base_do_compile
+ (
+ cd ${S}/sunrpc/rpcsvc
+ for r in ${rpcsvc}; do
+ h=`echo $r|sed -e's,\.x$,.h,'`
+ rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
+ done
+ )
+}
+
+do_stage() {
+ rm -f ${STAGING_LIBDIR}/libc.so.6
+ oe_runmake 'install_root=${STAGING_DIR}/${HOST_SYS}' \
+ 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \
+ '${STAGING_LIBDIR}/libc.so.6' \
+ install-headers install-lib
+
+ install -d ${STAGING_INCDIR}/gnu \
+ ${STAGING_INCDIR}/bits \
+ ${STAGING_INCDIR}/rpcsvc
+ install -m 0644 ${S}/include/gnu/stubs.h ${STAGING_INCDIR}/gnu/
+ install -m 0644 ${B}/bits/stdio_lim.h ${STAGING_INCDIR}/bits/
+ install -m 0644 misc/syscall-list.h ${STAGING_INCDIR}/bits/syscall.h
+ for r in ${rpcsvc}; do
+ h=`echo $r|sed -e's,\.x$,.h,'`
+ install -m 0644 ${S}/sunrpc/rpcsvc/$h ${STAGING_INCDIR}/rpcsvc/
+ done
+ for i in libc.a libc_pic.a libc_nonshared.a; do
+ install -m 0644 ${B}/$i ${STAGING_LIBDIR}/ || die "failed to install $i"
+ done
+ echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${STAGING_LIBDIR}/libpthread.so
+ echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${STAGING_LIBDIR}/libc.so
+
+ rm -f ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6
+ oe_runmake 'install_root=${CROSS_DIR}/${TARGET_SYS}' \
+ 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \
+ '${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6' \
+ install-headers install-lib
+
+ install -d ${CROSS_DIR}/${TARGET_SYS}/include/gnu \
+ ${CROSS_DIR}/${TARGET_SYS}/include/bits \
+ ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc
+ install -m 0644 ${S}/include/gnu/stubs.h ${CROSS_DIR}/${TARGET_SYS}/include/gnu/
+ install -m 0644 ${B}/bits/stdio_lim.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/
+ install -m 0644 misc/syscall-list.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/syscall.h
+ for r in ${rpcsvc}; do
+ h=`echo $r|sed -e's,\.x$,.h,'`
+ install -m 0644 ${S}/sunrpc/rpcsvc/$h ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc/
+ done
+
+ for i in libc.a libc_pic.a libc_nonshared.a; do
+ install -m 0644 ${B}/$i ${CROSS_DIR}/${TARGET_SYS}/lib/ || die "failed to install $i"
+ done
+ echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libpthread.so
+ echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so
+}
+
+include 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 @@
+DESCRIPTION = "GNU C Library"
+HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
+LICENSE = "LGPL"
+SECTION = "libs"
+PRIORITY = "required"
+DEFAULT_PREFERENCE = "-1"
+PR = "r4"
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-2.4"
+
+GLIBC_ADDONS ?= "ports,nptl,libidn"
+GLIBC_EXTRA_OECONF ?= ""
+
+GLIBC_BROKEN_LOCALES = "sid_ET tr_TR mn_MN"
+
+#
+# For now, we will skip building of a gcc package if it is a uclibc one
+# and our build is not a uclibc one, and we skip a glibc one if our build
+# is a uclibc build.
+#
+# See the note in gcc/gcc_3.4.0.oe
+#
+
+python __anonymous () {
+ import bb, re
+ uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
+ if uc_os:
+ raise bb.parse.SkipPackage("incompatible with target %s" %
+ bb.data.getVar('TARGET_OS', d, 1))
+}
+
+# nptl needs unwind support in gcc, which can't be built without glibc.
+PROVIDES = "virtual/libc ${@['virtual/${TARGET_PREFIX}libc-for-gcc', '']['nptl' in '${GLIBC_ADDONS}']}"
+PROVIDES += "virtual/libintl virtual/libiconv"
+DEPENDS = "${@['virtual/${TARGET_PREFIX}gcc-initial', 'virtual/${TARGET_PREFIX}gcc']['nptl' in '${GLIBC_ADDONS}']} linux-libc-headers"
+RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
+INHIBIT_DEFAULT_DEPS = "1"
+
+# file://noinfo.patch;patch=1
+# file://ldconfig.patch;patch=1;pnum=0
+# file://arm-machine-gmon.patch;patch=1;pnum=0 \
+# \
+# file://arm-ioperm.patch;patch=1;pnum=0 \
+# file://ldd.patch;patch=1;pnum=0 \
+SRC_URI = "ftp://ftp.gnu.org/pub/gnu/glibc/glibc-2.4.tar.bz2 \
+ ftp://ftp.gnu.org/pub/gnu/glibc/glibc-ports-2.4.tar.bz2 \
+ ftp://ftp.gnu.org/pub/gnu/glibc/glibc-libidn-2.4.tar.bz2 \
+ file://arm-memcpy.patch;patch=1 \
+ file://arm-longlong.patch;patch=1 \
+ file://fhs-linux-paths.patch;patch=1 \
+ file://dl-cache-libcmp.patch;patch=1 \
+ file://ldsocache-varrun.patch;patch=1 \
+ file://nptl-crosscompile.patch;patch=1 \
+ file://glibc-2.4-compile.patch;patch=1 \
+ file://fixup-aeabi-syscalls.patch;patch=1 \
+ file://generic-bits_select.h \
+ file://generic-bits_types.h \
+ file://generic-bits_typesizes.h \
+ file://generic-bits_time.h \
+ file://etc/ld.so.conf \
+ file://generate-supported.mk"
+
+S = "${WORKDIR}/glibc-2.4"
+B = "${WORKDIR}/build-${TARGET_SYS}"
+
+inherit autotools
+
+EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
+ --without-cvs --disable-profile --disable-debug --without-gd \
+ --enable-clocale=gnu \
+ --enable-add-ons=${GLIBC_ADDONS} \
+ --with-headers=${STAGING_INCDIR} \
+ --without-selinux \
+ ${GLIBC_EXTRA_OECONF}"
+
+EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
+
+def get_glibc_fpu_setting(bb, d):
+ if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
+ return "--without-fp"
+ return ""
+
+do_munge() {
+ # Integrate ports and libidn into tree
+ mv ${WORKDIR}/glibc-ports-${PV} ${S}/ports
+ mv ${WORKDIR}/glibc-libidn-${PV} ${S}/libidn
+
+ # Ports isn't really working... Fix it
+ # Some of this is rather dirty, but it seems to be the only
+ # quick way to get this cruft to compile
+ rm -rf ${S}/ports/sysdeps/unix/sysv/linux/arm/linuxthreads
+ ln -s nptl ${S}/ports/sysdeps/unix/sysv/linux/arm/linuxthreads
+ cp ${S}/sysdeps/unix/sysv/linux/i386/bits/wchar.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
+ cp ${S}/sysdeps/wordsize-32/bits/wordsize.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
+ cp ${WORKDIR}/generic-bits_select.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/select.h
+ cp ${WORKDIR}/generic-bits_types.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/types.h
+ cp ${WORKDIR}/generic-bits_typesizes.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/typesizes.h
+ cp ${WORKDIR}/generic-bits_time.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/time.h
+ # Copy in generic stuff for not yet implemented headers
+ for i in ${S}/bits/*.h; do
+ F=`basename $i`
+ [ "$F" = "local_lim.h" ] && continue
+ [ "$F" = "errno.h" ] && continue
+ 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/
+ done
+ # This is harmful; we need to get the one from nptl/sysdeps/pthreads
+ rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/libc-lock.h
+ # Obsoleted by sysdeps/arm/{fpu,eabi}/bits/fenv.h
+ rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/fenv.h
+ # Obsoleted by sysdeps/gnu/bits/utmp.h
+ rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/utmp.h
+
+ # http://www.handhelds.org/hypermail/oe/51/5135.html
+ # Some files were moved around between directories on
+ # 2005-12-21, which means that any attempt to check out
+ # from CVS using a datestamp older than that will be doomed.
+ #
+ # This is a workaround for that problem.
+ rm -rf ${S}/bits
+}
+
+addtask munge before do_patch after do_unpack
+
+do_configure () {
+# override this function to avoid the autoconf/automake/aclocal/autoheader
+# calls for now
+# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
+# version check and doesn't really help with anything
+ if [ -z "`which rpcgen`" ]; then
+ echo "rpcgen not found. Install glibc-devel."
+ exit 1
+ fi
+ (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
+ CPPFLAGS="" oe_runconf
+}
+
+rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
+ yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
+ rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
+
+do_compile () {
+ # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
+ unset LDFLAGS
+ base_do_compile
+ (
+ cd ${S}/sunrpc/rpcsvc
+ for r in ${rpcsvc}; do
+ h=`echo $r|sed -e's,\.x$,.h,'`
+ rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
+ done
+ )
+}
+
+do_stage() {
+ rm -f ${STAGING_LIBDIR}/libc.so.6
+ oe_runmake 'install_root=${STAGING_DIR}/${HOST_SYS}' \
+ 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \
+ '${STAGING_LIBDIR}/libc.so.6' \
+ install-headers install-lib
+
+ install -d ${STAGING_INCDIR}/gnu \
+ ${STAGING_INCDIR}/bits \
+ ${STAGING_INCDIR}/rpcsvc
+ install -m 0644 ${S}/include/gnu/stubs.h ${STAGING_INCDIR}/gnu/
+ install -m 0644 ${B}/bits/stdio_lim.h ${STAGING_INCDIR}/bits/
+ install -m 0644 misc/syscall-list.h ${STAGING_INCDIR}/bits/syscall.h
+ for r in ${rpcsvc}; do
+ h=`echo $r|sed -e's,\.x$,.h,'`
+ install -m 0644 ${S}/sunrpc/rpcsvc/$h ${STAGING_INCDIR}/rpcsvc/
+ done
+ for i in libc.a libc_pic.a libc_nonshared.a; do
+ install -m 0644 ${B}/$i ${STAGING_LIBDIR}/ || die "failed to install $i"
+ done
+ echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${STAGING_LIBDIR}/libpthread.so
+ echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${STAGING_LIBDIR}/libc.so
+
+ rm -f ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6
+ oe_runmake 'install_root=${CROSS_DIR}/${TARGET_SYS}' \
+ 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \
+ '${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6' \
+ install-headers install-lib
+
+ install -d ${CROSS_DIR}/${TARGET_SYS}/include/gnu \
+ ${CROSS_DIR}/${TARGET_SYS}/include/bits \
+ ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc
+ install -m 0644 ${S}/include/gnu/stubs.h ${CROSS_DIR}/${TARGET_SYS}/include/gnu/
+ install -m 0644 ${B}/bits/stdio_lim.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/
+ install -m 0644 misc/syscall-list.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/syscall.h
+ for r in ${rpcsvc}; do
+ h=`echo $r|sed -e's,\.x$,.h,'`
+ install -m 0644 ${S}/sunrpc/rpcsvc/$h ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc/
+ done
+
+ for i in libc.a libc_pic.a libc_nonshared.a; do
+ install -m 0644 ${B}/$i ${CROSS_DIR}/${TARGET_SYS}/lib/ || die "failed to install $i"
+ done
+ echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libpthread.so
+ echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so
+}
+
+include glibc-package.bbclass