summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-05-09 16:35:43 +0000
committerRichard Purdie <richard@openedhand.com>2006-05-09 16:35:43 +0000
commit8e898fe29b4b621df383b49b4a1df8d7d12b9a8f (patch)
tree383d65ec1202a8bb5891e9c68ed5e681b1b8e53e
parent8100c3dbd30a3c28306c9d176323b4a69d101a6a (diff)
downloadopenembedded-core-8e898fe29b4b621df383b49b4a1df8d7d12b9a8f.tar.gz
openembedded-core-8e898fe29b4b621df383b49b4a1df8d7d12b9a8f.tar.bz2
openembedded-core-8e898fe29b4b621df383b49b4a1df8d7d12b9a8f.tar.xz
openembedded-core-8e898fe29b4b621df383b49b4a1df8d7d12b9a8f.zip
Add EABI toolchain
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@379 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch31
-rw-r--r--openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-100-uclibc-conf.patch139
-rw-r--r--openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-001_ld_makefile_patch.patch50
-rw-r--r--openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-006_better_file_error.patch43
-rw-r--r--openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-012_check_ldrunpath_length.patch47
-rw-r--r--openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-400-mips-ELF_MAXPAGESIZE-4K.patch26
-rw-r--r--openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-702-binutils-skip-comments.patch93
-rw-r--r--openembedded/packages/binutils/binutils-cross_2.16.91.0.7.bb32
-rw-r--r--openembedded/packages/binutils/binutils_2.15.94.0.1.bb3
-rw-r--r--openembedded/packages/binutils/binutils_2.16.91.0.7.bb123
-rw-r--r--openembedded/packages/binutils/files/objdump_fix.patch134
-rw-r--r--openembedded/packages/gcc/gcc-cross-initial_csl-arm-2005q3.bb28
-rw-r--r--openembedded/packages/gcc/gcc-cross_csl-arm-2005q3.bb15
-rw-r--r--openembedded/packages/gcc/gcc-csl-arm/15342.patch22
-rw-r--r--openembedded/packages/gcc/gcc-csl-arm/gcc-3.4.0-arm-lib1asm.patch24
-rw-r--r--openembedded/packages/gcc/gcc-csl-arm/gcc34-arm-tune.patch9
-rw-r--r--openembedded/packages/gcc/gcc-csl-arm/gcc_optab_arm.patch95
-rw-r--r--openembedded/packages/gcc/gcc-csl-arm/no-libfloat.patch11
-rw-r--r--openembedded/packages/gcc/gcc-csl-arm/pic-without-sl.patch303
-rw-r--r--openembedded/packages/gcc/gcc_csl-arm-2005q3.bb27
-rw-r--r--openembedded/packages/glibc/glibc-2.4/arm-longlong.patch58
-rw-r--r--openembedded/packages/glibc/glibc-2.4/arm-memcpy.patch758
-rw-r--r--openembedded/packages/glibc/glibc-2.4/dl-cache-libcmp.patch10
-rw-r--r--openembedded/packages/glibc/glibc-2.4/dyn-ldconfig-20041128.patch22
-rw-r--r--openembedded/packages/glibc/glibc-2.4/dyn-ldconfig.patch62
-rw-r--r--openembedded/packages/glibc/glibc-2.4/etc/ld.so.conf3
-rw-r--r--openembedded/packages/glibc/glibc-2.4/fixup-aeabi-syscalls.patch329
-rw-r--r--openembedded/packages/glibc/glibc-2.4/generic-bits_select.h35
-rw-r--r--openembedded/packages/glibc/glibc-2.4/generic-bits_time.h75
-rw-r--r--openembedded/packages/glibc/glibc-2.4/generic-bits_types.h200
-rw-r--r--openembedded/packages/glibc/glibc-2.4/generic-bits_typesizes.h66
-rw-r--r--openembedded/packages/glibc/glibc-2.4/glibc-2.4-compile.patch29
-rw-r--r--openembedded/packages/glibc/glibc-2.4/ldsocache-varrun.patch18
-rw-r--r--openembedded/packages/glibc/glibc-2.4/nptl-crosscompile.patch26
-rw-r--r--openembedded/packages/glibc/glibc-initial_2.4.bb46
-rw-r--r--openembedded/packages/glibc/glibc-intermediate_2.4.bb14
-rw-r--r--openembedded/packages/glibc/glibc_2.4.bb201
-rw-r--r--openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/3477-1.patch43
-rw-r--r--openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/asm-arch-irqs.patch19
-rw-r--r--openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-netdevice.patch11
-rw-r--r--openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-netfilter_ipv4.patch31
-rw-r--r--openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-rtc.patch11
-rw-r--r--openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-videodev2.patch45
-rw-r--r--openembedded/packages/linux-libc-headers/linux-libc-headers_2.6.15.99.bb80
44 files changed, 3446 insertions, 1 deletions
diff --git a/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
new file mode 100644
index 000000000..4461bedd4
--- /dev/null
+++ b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
@@ -0,0 +1,31 @@
+# strip (and objcopy) fail to set the error code if there is no
+# output file name and the rename of the stripped (or copied) file
+# fails, yet the command fails to do anything. This fixes both
+# objcopy and strip.
+#
+# modification by bero: Ported to 2.16.91.0.6
+#
+#Signed-off-by: John Bowler <jbowler@acm.org>
+#Signed-off-by: Bernhard Rosenkraenzer <bero@arklinux.org>
+--- binutils-2.16.91.0.6/binutils/objcopy.c.ark 2006-03-11 15:59:07.000000000 +0100
++++ binutils-2.16.91.0.6/binutils/objcopy.c 2006-03-11 15:59:45.000000000 +0100
+@@ -2593,7 +2593,8 @@
+ if (preserve_dates)
+ set_times (tmpname, &statbuf);
+ if (output_file == NULL)
+- smart_rename (tmpname, argv[i], preserve_dates);
++ if(smart_rename (tmpname, argv[i], preserve_dates))
++ hold_status = 1;
+ status = hold_status;
+ }
+ else
+@@ -3184,7 +3185,8 @@
+ {
+ if (preserve_dates)
+ set_times (tmpname, &statbuf);
+- smart_rename (tmpname, input_filename, preserve_dates);
++ if (smart_rename (tmpname, input_filename, preserve_dates))
++ status = 1;
+ }
+ else
+ unlink (tmpname);
diff --git a/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-100-uclibc-conf.patch b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-100-uclibc-conf.patch
new file mode 100644
index 000000000..25222e5df
--- /dev/null
+++ b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-100-uclibc-conf.patch
@@ -0,0 +1,139 @@
+--- binutils-2.16.91.0.7/bfd/configure
++++ binutils-2.16.91.0.7/bfd/configure
+@@ -3576,7 +3576,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/binutils/configure
++++ binutils-2.16.91.0.7/binutils/configure
+@@ -3411,7 +3411,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/configure
++++ binutils-2.16.91.0.7/configure
+@@ -1270,7 +1270,7 @@
+ am33_2.0-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+- sh-*-linux*)
++ sh*-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+ sh*-*-pe|mips*-*-pe|*arm-wince-pe)
+@@ -1578,7 +1578,7 @@
+ romp-*-*)
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
+ ;;
+- sh-*-* | sh64-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${host}" in
+ i[3456789]86-*-vsta) ;; # don't add gprof back in
+ i[3456789]86-*-go32*) ;; # don't add gprof back in
+--- binutils-2.16.91.0.7/configure.in
++++ binutils-2.16.91.0.7/configure.in
+@@ -468,7 +468,7 @@
+ am33_2.0-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+- sh-*-linux*)
++ sh*-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+ sh*-*-pe|mips*-*-pe|*arm-wince-pe)
+@@ -776,7 +776,7 @@
+ romp-*-*)
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
+ ;;
+- sh-*-* | sh64-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${host}" in
+ i[[3456789]]86-*-vsta) ;; # don't add gprof back in
+ i[[3456789]]86-*-go32*) ;; # don't add gprof back in
+--- binutils-2.16.91.0.7/gas/configure
++++ binutils-2.16.91.0.7/gas/configure
+@@ -3411,7 +3411,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/gprof/configure
++++ binutils-2.16.91.0.7/gprof/configure
+@@ -3419,6 +3419,11 @@
+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ ;;
+
++linux-uclibc*)
++ lt_cv_deplibs_check_method=pass_all
++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++ ;;
++
+ netbsd* | knetbsd*-gnu)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+--- binutils-2.16.91.0.7/ld/configure
++++ binutils-2.16.91.0.7/ld/configure
+@@ -3413,7 +3413,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/libtool.m4
++++ binutils-2.16.91.0.7/libtool.m4
+@@ -739,7 +739,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/ltconfig
++++ binutils-2.16.91.0.7/ltconfig
+@@ -602,6 +602,7 @@
+
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case $host_os in
++linux-uclibc*) ;;
+ linux-gnu*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+@@ -1247,7 +1248,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+--- binutils-2.16.91.0.7/opcodes/configure
++++ binutils-2.16.91.0.7/opcodes/configure
+@@ -3579,7 +3579,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
diff --git a/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-001_ld_makefile_patch.patch b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-001_ld_makefile_patch.patch
new file mode 100644
index 000000000..04a7e61e2
--- /dev/null
+++ b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.1/ld/Makefile.am
++++ binutils-2.16.91.0.1/ld/Makefile.am
+@@ -20,7 +20,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- binutils-2.16.91.0.1/ld/Makefile.in
++++ binutils-2.16.91.0.1/ld/Makefile.in
+@@ -268,7 +268,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-006_better_file_error.patch b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-006_better_file_error.patch
new file mode 100644
index 000000000..f337611ed
--- /dev/null
+++ b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-006_better_file_error.patch
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Specify which filename is causing an error if the filename is a
+## DP: directory. (#45832)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
+@@ -150,6 +150,13 @@
+ {
+ bfd *nbfd;
+ const bfd_target *target_vec;
++ struct stat s;
++
++ if (stat (filename, &s) == 0)
++ if (S_ISDIR(s.st_mode)) {
++ bfd_set_error (bfd_error_file_not_recognized);
++ return NULL;
++ }
+
+ nbfd = _bfd_new_bfd ();
+ if (nbfd == NULL)
diff --git a/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-012_check_ldrunpath_length.patch b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-012_check_ldrunpath_length.patch
new file mode 100644
index 000000000..498651a90
--- /dev/null
+++ b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-400-mips-ELF_MAXPAGESIZE-4K.patch b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-400-mips-ELF_MAXPAGESIZE-4K.patch
new file mode 100644
index 000000000..5959c718d
--- /dev/null
+++ b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-400-mips-ELF_MAXPAGESIZE-4K.patch
@@ -0,0 +1,26 @@
+--- binutils/bfd/elf32-mips.c~
++++ binutils/bfd/elf32-mips.c
+@@ -1613,7 +1613,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
+--- binutils/bfd/elfn32-mips.c~
++++ binutils/bfd/elfn32-mips.c
+@@ -2399,7 +2399,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
diff --git a/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-702-binutils-skip-comments.patch b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-702-binutils-skip-comments.patch
new file mode 100644
index 000000000..9ef7a7c9e
--- /dev/null
+++ b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-702-binutils-skip-comments.patch
@@ -0,0 +1,93 @@
+Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
+Fixes
+localealias.s:544: Error: junk at end of line, first unrecognized character is `,'
+when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
+
+Paths adjusted to match crosstool's patcher.
+
+Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
+From: Andreas Schwab <schwab at suse dot de>
+To: Nathan Sidwell <nathan at codesourcery dot com>
+Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
+Date: Fri, 23 Apr 2004 22:27:19 +0200
+Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
+
+Nathan Sidwell <nathan@codesourcery.com> writes:
+
+> Index: read.c
+> ===================================================================
+> RCS file: /cvs/src/src/gas/read.c,v
+> retrieving revision 1.76
+> diff -c -3 -p -r1.76 read.c
+> *** read.c 12 Mar 2004 17:48:12 -0000 1.76
+> --- read.c 18 Mar 2004 09:56:05 -0000
+> *************** read_a_source_file (char *name)
+> *** 1053,1059 ****
+> #endif
+> input_line_pointer--;
+> /* Report unknown char as ignored. */
+> ! ignore_rest_of_line ();
+> }
+>
+> #ifdef md_after_pass_hook
+> --- 1053,1059 ----
+> #endif
+> input_line_pointer--;
+> /* Report unknown char as ignored. */
+> ! demand_empty_rest_of_line ();
+> }
+>
+> #ifdef md_after_pass_hook
+
+This means that the unknown character is no longer ignored, despite the
+comment. As a side effect a line starting with a line comment character
+not followed by APP in NO_APP mode now triggers an error instead of just a
+warning, breaking builds of glibc on m68k-linux. Earlier in
+read_a_source_file where #APP is handled there is another comment that
+claims that unknown comments are ignored, when in fact they aren't (only
+the initial line comment character is skipped).
+
+Note that the presence of #APP will mess up the line counters, but
+that appears to be difficult to fix.
+
+Andreas.
+
+2004-04-23 Andreas Schwab <schwab@suse.de>
+
+ * read.c (read_a_source_file): Ignore unknown text after line
+ comment character. Fix misleading comment.
+
+--- binutils/gas/read.c.~1.78.~ 2004-04-23 08:58:23.000000000 +0200
++++ binutils/gas/read.c 2004-04-23 21:49:01.000000000 +0200
+@@ -950,10 +950,14 @@ read_a_source_file (char *name)
+ unsigned int new_length;
+ char *tmp_buf = 0;
+
+- bump_line_counters ();
+ s = input_line_pointer;
+ if (strncmp (s, "APP\n", 4))
+- continue; /* We ignore it */
++ {
++ /* We ignore it */
++ ignore_rest_of_line ();
++ continue;
++ }
++ bump_line_counters ();
+ s += 4;
+
+ sb_new (&sbuf);
+@@ -1052,7 +1056,7 @@ read_a_source_file (char *name)
+ continue;
+ #endif
+ input_line_pointer--;
+- /* Report unknown char as ignored. */
++ /* Report unknown char as error. */
+ demand_empty_rest_of_line ();
+ }
+
+
+--
+Andreas Schwab, SuSE Labs, schwab@suse.de
+SuSE Linux AG, Maxfeldstra&#xC3;e 5, 90409 N&#xC3;rnberg, Germany
+Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
+"And now for something completely different."
diff --git a/openembedded/packages/binutils/binutils-cross_2.16.91.0.7.bb b/openembedded/packages/binutils/binutils-cross_2.16.91.0.7.bb
new file mode 100644
index 000000000..7e165271d
--- /dev/null
+++ b/openembedded/packages/binutils/binutils-cross_2.16.91.0.7.bb
@@ -0,0 +1,32 @@
+SECTION = "devel"
+include binutils_${PV}.bb
+inherit cross
+DEPENDS += "flex-native bison-native"
+PROVIDES = "virtual/${TARGET_PREFIX}binutils"
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
+PACKAGES = ""
+EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
+ --program-prefix=${TARGET_PREFIX}"
+
+do_stage () {
+ oe_runmake install
+
+ # We don't really need these, so we'll remove them...
+ rm -rf ${CROSS_DIR}/lib/ldscripts
+ rm -rf ${CROSS_DIR}/share/info
+ rm -rf ${CROSS_DIR}/share/locale
+ rm -rf ${CROSS_DIR}/share/man
+ rmdir ${CROSS_DIR}/share || :
+ rmdir ${CROSS_DIR}/${libdir}/gcc-lib || :
+ rmdir ${CROSS_DIR}/${libdir} || :
+ rmdir ${CROSS_DIR}/${prefix} || :
+
+ # We want to move this into the target specific location
+ mkdir -p ${CROSS_DIR}/${TARGET_SYS}/lib
+ mv -f ${CROSS_DIR}/lib/libiberty.a ${CROSS_DIR}/${TARGET_SYS}/lib
+ rmdir ${CROSS_DIR}/lib || :
+}
+
+do_install () {
+ :
+}
diff --git a/openembedded/packages/binutils/binutils_2.15.94.0.1.bb b/openembedded/packages/binutils/binutils_2.15.94.0.1.bb
index 5edf4548a..2b2996abe 100644
--- a/openembedded/packages/binutils/binutils_2.15.94.0.1.bb
+++ b/openembedded/packages/binutils/binutils_2.15.94.0.1.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.gnu.org/software/binutils/"
SECTION = "devel"
LICENSE = "GPL"
MAINTAINER = "Gerald Britton <gbritton@doomcom.org>"
-PR = "r1"
+PR = "r2"
inherit autotools gettext
@@ -42,6 +42,7 @@ SRC_URI = \
file://ld_makefile.patch;patch=1 \
file://better_file_error.patch;patch=1 \
file://signed_char_fix.patch;patch=1 \
+ file://objdump_fix.patch;patch=1 \
file://binutils-100_cflags_for_build.patch;patch=1 \
file://binutils-2.15.91.0.1-uclibc-100-conf.patch;patch=1 \
file://binutils-2.15.90.0.3-uclibc-200-build_modules.patch;patch=1"
diff --git a/openembedded/packages/binutils/binutils_2.16.91.0.7.bb b/openembedded/packages/binutils/binutils_2.16.91.0.7.bb
new file mode 100644
index 000000000..664fce8cb
--- /dev/null
+++ b/openembedded/packages/binutils/binutils_2.16.91.0.7.bb
@@ -0,0 +1,123 @@
+DESCRIPTION = "A GNU collection of binary utilities"
+HOMEPAGE = "http://www.gnu.org/software/binutils/"
+SECTION = "devel"
+LICENSE = "GPL"
+DEFAULT_PREFERENCE = "-1"
+
+inherit autotools gettext
+
+PACKAGES = "${PN} ${PN}-dev ${PN}-doc ${PN}-symlinks"
+
+FILES_${PN} = " \
+ ${bindir}/${TARGET_PREFIX}* \
+ ${libdir}/lib*-*.so \
+ ${prefix}/${TARGET_SYS}/bin/*"
+
+FILES_${PN}-dev = " \
+ ${includedir} \
+ ${libdir}/*.a \
+ ${libdir}/*.la \
+ ${libdir}/libbfd.so \
+ ${libdir}/libopcodes.so"
+
+FILES_${PN}-symlinks = " \
+ ${bindir}/addr2line \
+ ${bindir}/ar \
+ ${bindir}/as \
+ ${bindir}/c++filt \
+ ${bindir}/gprof \
+ ${bindir}/ld \
+ ${bindir}/nm \
+ ${bindir}/objcopy \
+ ${bindir}/objdump \
+ ${bindir}/ranlib \
+ ${bindir}/readelf \
+ ${bindir}/size \
+ ${bindir}/strings \
+ ${bindir}/strip"
+
+SRC_URI = \
+ "http://ftp.kernel.org/pub/linux/devel/binutils/binutils-${PV}.tar.bz2 \
+ file://binutils-2.16.91.0.6-objcopy-rename-errorcode.patch;patch=1 \
+ file://binutils-uclibc-100-uclibc-conf.patch;patch=1 \
+ file://binutils-uclibc-300-001_ld_makefile_patch.patch;patch=1 \
+ file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \
+ file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
+ file://binutils-uclibc-400-mips-ELF_MAXPAGESIZE-4K.patch;patch=1 \
+ file://binutils-uclibc-702-binutils-skip-comments.patch;patch=1"
+
+S = "${WORKDIR}/binutils-${PV}"
+B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
+
+EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
+ --enable-shared"
+
+# This is necessary due to a bug in the binutils Makefiles
+EXTRA_OEMAKE = "configure-build-libiberty all"
+
+export AR = "${HOST_PREFIX}ar"
+export AS = "${HOST_PREFIX}as"
+export LD = "${HOST_PREFIX}ld"
+export NM = "${HOST_PREFIX}nm"
+export RANLIB = "${HOST_PREFIX}ranlib"
+export OBJCOPY = "${HOST_PREFIX}objcopy"
+export OBJDUMP = "${HOST_PREFIX}objdump"
+
+export AR_FOR_TARGET = "${TARGET_PREFIX}ar"
+export AS_FOR_TARGET = "${TARGET_PREFIX}as"
+export LD_FOR_TARGET = "${TARGET_PREFIX}ld"
+export NM_FOR_TARGET = "${TARGET_PREFIX}nm"
+export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib"
+
+export CC_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
+export CXX_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
+
+export CC_FOR_BUILD = "${BUILD_CC}"
+export CPP_FOR_BUILD = "${BUILD_CPP}"
+export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
+
+export CC = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
+
+do_configure () {
+ (cd ${S}; gnu-configize) || die "Failed to run gnu-configize"
+ oe_runconf
+}
+
+do_stage () {
+ oe_libinstall -so -a -C opcodes libopcodes ${STAGING_LIBDIR}/
+ oe_libinstall -a -C libiberty libiberty ${STAGING_LIBDIR}/
+ oe_libinstall -so -a -C bfd libbfd ${STAGING_LIBDIR}/
+ install -m 0644 ${S}/include/dis-asm.h ${STAGING_INCDIR}/
+ install -m 0644 ${S}/include/symcat.h ${STAGING_INCDIR}/
+ install -m 0644 ${S}/include/libiberty.h ${STAGING_INCDIR}/
+ install -m 0644 ${S}/include/ansidecl.h ${STAGING_INCDIR}/
+ install -m 0644 ${S}/include/bfdlink.h ${STAGING_INCDIR}/
+ install -m 0644 bfd/bfd.h ${STAGING_INCDIR}/
+}
+
+do_install () {
+ autotools_do_install
+
+ # We don't really need these, so we'll remove them...
+ rm -rf ${D}${libdir}/ldscripts
+
+ # Fix the /usr/${TARGET_SYS}/bin/* links
+ for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do
+ rm -f $l
+ ln -sf `echo ${prefix}/${TARGET_SYS}/bin \
+ | tr -s / \
+ | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l
+ done
+
+ # Install the libiberty header
+ install -d ${D}${includedir}
+ install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
+ install -m 644 ${S}/include/libiberty.h ${D}${includedir}
+
+ cd ${D}${bindir}
+
+ # Symlinks for ease of running these on the native target
+ for p in ${TARGET_SYS}-* ; do
+ ln -sf $p `echo $p | sed -e s,${TARGET_SYS}-,,`
+ done
+}
diff --git a/openembedded/packages/binutils/files/objdump_fix.patch b/openembedded/packages/binutils/files/objdump_fix.patch
new file mode 100644
index 000000000..90ad732c0
--- /dev/null
+++ b/openembedded/packages/binutils/files/objdump_fix.patch
@@ -0,0 +1,134 @@
+From binutils-return-38148-listarch-binutils=sources dot redhat dot com at sources dot redhat dot com Tue Feb 22 19:24:15 2005
+Return-Path: <binutils-return-38148-listarch-binutils=sources dot redhat dot com at sources dot redhat dot com>
+Delivered-To: listarch-binutils at sources dot redhat dot com
+Received: (qmail 4446 invoked by alias); 22 Feb 2005 19:24:15 -0000
+Mailing-List: contact binutils-help at sources dot redhat dot com; run by ezmlm
+Precedence: bulk
+List-Subscribe: <mailto:binutils-subscribe at sources dot redhat dot com>
+List-Archive: <http://sources.redhat.com/ml/binutils/>
+List-Post: <mailto:binutils at sources dot redhat dot com>
+List-Help: <mailto:binutils-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
+Sender: binutils-owner at sources dot redhat dot com
+Delivered-To: mailing list binutils at sources dot redhat dot com
+Received: (qmail 4401 invoked from network); 22 Feb 2005 19:24:08 -0000
+Received: from unknown (HELO bgo1smout1.broadpark.no) (217.13.4.94)
+ by sourceware dot org with SMTP; 22 Feb 2005 19:24:08 -0000
+Received: from bgo1sminn1.broadpark.no ([217.13.4.93])
+ by bgo1smout1 dot broadpark dot no
+ (Sun Java System Messaging Server 6 dot 1 HotFix 0 dot 05 (built Oct 21 2004))
+ with ESMTP id <0ICB007QZUZCC0C0 at bgo1smout1 dot broadpark dot no> for
+ binutils at sources dot redhat dot com; Tue, 22 Feb 2005 20:18:48 +0100 (CET)
+Received: from [127.0.0.1] ([80.202.165.9]) by bgo1sminn1.broadpark.no
+ (Sun Java System Messaging Server 6 dot 1 HotFix 0 dot 05 (built Oct 21 2004))
+ with ESMTP id <0ICB006NCVBVHE21 at bgo1sminn1 dot broadpark dot no> for
+ binutils at sources dot redhat dot com; Tue, 22 Feb 2005 20:26:20 +0100 (CET)
+Date: Tue, 22 Feb 2005 20:24:08 +0100
+From: =?ISO-8859-1?Q?Stig_Petter_Olsr=F8d?= <stigpo at users dot sourceforge dot net>
+Subject: [PATCH] objdump relocation fixes for ARM disassembly
+To: binutils at sources dot redhat dot com
+Message-id: <421B86D8.8080604@users.sourceforge.net>
+MIME-version: 1.0
+Content-type: text/plain; charset=ISO-8859-1; format=flowed
+Content-transfer-encoding: 7BIT
+User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
+
+Hello,
+
+objdump disassembly did not relocate correctly for the ARM processor. It seems
+that the test for triggering the INSN_HAS_RELOC flag was void (one test killed the other,
+since octets would always be zero) and all relocations would thus fail. I changed the test
+so the flag is set when we are about to disassemble an insn that the current relocation
+entry points to. I also changed objdump_print_addr to use the current relocation entry if
+the insn has such an entry. This causes the symbol printed to be correct for both external
+symbols (from the undefined section) and local symbols.
+
+This has only been tested for the ARM processor, but I don't think it should break other
+DISASSEMBLER_NEEDS_RELOCS processors either.
+
+
+binutils/
+
+2005-02-22 Stig Petter Olsroed <stigpo@users.sourceforge.net>
+
+ * objdump.c (disassemble_bytes): Fixed relocation check for
+ DISASSEMBLER_NEEDS_RELOCS platforms to properly trigger the
+ INSN_HAS_RELOC flag. Set the current relocation entry in
+ objdump_disasm_info to allow printing the proper symbol.
+ (objdump_print_addr): Use the relocation entry in
+ objdump_disasm_info to lookup the correct symbol for
+ DISASSEMBLER_NEEDS_RELOCS platforms.
+
+--- 1/binutils/objdump.c 2005-02-22 01:50:06.000000000 +0100
++++ 2/binutils/objdump.c 2005-02-22 14:27:33.066960900 +0100
+@@ -128,6 +128,7 @@
+ arelent ** dynrelbuf;
+ long dynrelcount;
+ disassembler_ftype disassemble_fn;
++ arelent * reloc;
+ };
+
+ /* Architecture to disassemble for, or default if NULL. */
+@@ -852,6 +853,8 @@
+ {
+ struct objdump_disasm_info *aux;
+ asymbol *sym;
++ arelent *q;
++ int skip_find = 0;
+
+ if (sorted_symcount < 1)
+ {
+@@ -861,6 +864,22 @@
+ }
+
+ aux = (struct objdump_disasm_info *) info->application_data;
++
++ q = aux->reloc;
++ if (q != NULL)
++ {
++ if (q->sym_ptr_ptr != NULL && *q->sym_ptr_ptr != NULL)
++ {
++ /* Adjust the vma to the reloc */
++ vma += bfd_asymbol_value (*q->sym_ptr_ptr);
++ if (bfd_is_und_section (bfd_get_section (*q->sym_ptr_ptr)))
++ {
++ skip_find = 1;
++ sym = *q->sym_ptr_ptr;
++ }
++ }
++ }
++ if (!skip_find)
+ sym = find_symbol_for_address (vma, info, NULL);
+ objdump_print_addr_with_sym (aux->abfd, aux->sec, sym, vma, info,
+ skip_zeroes);
+@@ -1350,16 +1369,22 @@
+ info->bytes_per_chunk = 0;
+
+ #ifdef DISASSEMBLER_NEEDS_RELOCS
+- /* FIXME: This is wrong. It tests the number of octets
+- in the last instruction, not the current one. */
+- if (*relppp < relppend
+- && (**relppp)->address >= rel_offset + addr_offset
+- && ((**relppp)->address
+- < rel_offset + addr_offset + octets / opb))
++ /* Check if the current relocation entry applies to the
++ instruction we are about to disassemble.
++ This works for ARM at least.
++ */
++ if ((*relppp) < relppend
++ && ((**relppp)->address == rel_offset + addr_offset))
++ {
+ info->flags = INSN_HAS_RELOC;
++ aux->reloc = **relppp;
++ }
+ else
+ #endif
++ {
+ info->flags = 0;
++ aux->reloc = NULL;
++ }
+
+ octets = (*disassemble_fn) (section->vma + addr_offset, info);
+ info->fprintf_func = (fprintf_ftype) fprintf;
+
+
+
diff --git a/openembedded/packages/gcc/gcc-cross-initial_csl-arm-2005q3.bb b/openembedded/packages/gcc/gcc-cross-initial_csl-arm-2005q3.bb
new file mode 100644
index 000000000..48c80864e
--- /dev/null
+++ b/openembedded/packages/gcc/gcc-cross-initial_csl-arm-2005q3.bb
@@ -0,0 +1,28 @@
+include gcc-cross_${PV}.bb
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils"
+DEPENDS += "${@['virtual/${TARGET_PREFIX}libc-initial',''][bb.data.getVar('TARGET_ARCH', d, 1) in ['arm', 'armeb', 'mips', 'mipsel']]}"
+PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial"
+PACKAGES = ""
+
+# This is intended to be a -very- basic config
+EXTRA_OECONF = "--with-local-prefix=${CROSS_DIR}/${TARGET_SYS} \
+ --with-newlib \
+ --disable-shared \
+ --disable-threads \
+ --disable-multilib \
+ --disable-__cxa_atexit \
+ --enable-languages=c \
+ --enable-target-optspace \
+ --program-prefix=${TARGET_PREFIX} \
+ ${@get_gcc_fpu_setting(bb, d)}"
+
+do_stage_prepend () {
+ mkdir -p ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}
+ ln -sf libgcc.a ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/libgcc_eh.a
+}
+
+# Override the method from gcc-cross so we don't try to install libgcc
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install
+}
diff --git a/openembedded/packages/gcc/gcc-cross_csl-arm-2005q3.bb b/openembedded/packages/gcc/gcc-cross_csl-arm-2005q3.bb
new file mode 100644
index 000000000..93c58aca5
--- /dev/null
+++ b/openembedded/packages/gcc/gcc-cross_csl-arm-2005q3.bb
@@ -0,0 +1,15 @@
+include gcc_csl-arm-2005q3.bb
+# path mangling, needed by the cross packaging
+include gcc-paths-cross.inc
+inherit cross
+# NOTE: split PR. If the main .oe changes something that affects its *build*
+# remember to increment this one too.
+PR = "r0"
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
+PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
+
+# cross build
+include gcc3-cross-build.inc
+# cross packaging
+include gcc-package-cross.inc
diff --git a/openembedded/packages/gcc/gcc-csl-arm/15342.patch b/openembedded/packages/gcc/gcc-csl-arm/15342.patch
new file mode 100644
index 000000000..d0f3e72d4
--- /dev/null
+++ b/openembedded/packages/gcc/gcc-csl-arm/15342.patch
@@ -0,0 +1,22 @@
+--- gcc/gcc/regrename.c~ 2004-01-14 17:55:20.000000000 +0000
++++ gcc/gcc/regrename.c 2005-02-28 07:24:25.893015200 +0000
+@@ -671,7 +671,8 @@
+
+ case SET:
+ scan_rtx (insn, &SET_SRC (x), class, action, OP_IN, 0);
+- scan_rtx (insn, &SET_DEST (x), class, action, OP_OUT, 0);
++ scan_rtx (insn, &SET_DEST (x), class, action,
++ GET_CODE (PATTERN (insn)) == COND_EXEC ? OP_INOUT : OP_OUT, 0);
+ return;
+
+ case STRICT_LOW_PART:
+@@ -696,7 +697,8 @@
+ abort ();
+
+ case CLOBBER:
+- scan_rtx (insn, &SET_DEST (x), class, action, OP_OUT, 1);
++ scan_rtx (insn, &SET_DEST (x), class, action,
++ GET_CODE (PATTERN (insn)) == COND_EXEC ? OP_INOUT : OP_OUT, 0);
+ return;
+
+ case EXPR_LIST:
diff --git a/openembedded/packages/gcc/gcc-csl-arm/gcc-3.4.0-arm-lib1asm.patch b/openembedded/packages/gcc/gcc-csl-arm/gcc-3.4.0-arm-lib1asm.patch
new file mode 100644
index 000000000..cf17da6a0
--- /dev/null
+++ b/openembedded/packages/gcc/gcc-csl-arm/gcc-3.4.0-arm-lib1asm.patch
@@ -0,0 +1,24 @@
+# Fixes errors like the following when building glibc (or any other executable
+# or shared library) when using gcc 3.4.0 for ARM with softfloat:
+#
+# .../libc_pic.os(.text+0x15834): In function `__modf': undefined reference to `__subdf3'
+# .../libc_pic.os(.text+0x158b8): In function `__modf': undefined reference to `__subdf3'
+# .../libc_pic.os(.text+0x1590c): In function `scalbn': undefined reference to `__muldf3'
+# .../libc_pic.os(.text+0x15e94): In function `__ldexpf': undefined reference to `__eqsf2'
+# .../libc_pic.os(.text+0xcee4c): In function `monstartup': undefined reference to `__fixsfsi'
+
+diff -urNd gcc-3.4.0-orig/gcc/config/arm/t-linux gcc-3.4.0/gcc/config/arm/t-linux
+--- gcc-3.4.0-orig/gcc/config/arm/t-linux 2003-09-20 23:09:07.000000000 +0200
++++ gcc-3.4.0/gcc/config/arm/t-linux 2004-05-01 20:31:59.102846400 +0200
+@@ -4,7 +4,10 @@
+ LIBGCC2_DEBUG_CFLAGS = -g0
+
+ LIB1ASMSRC = arm/lib1funcs.asm
+-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++ _fixsfsi _fixunssfsi _floatdidf _floatdisf
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # MULTILIB_DIRNAMES = hard-float soft-float
diff --git a/openembedded/packages/gcc/gcc-csl-arm/gcc34-arm-tune.patch b/openembedded/packages/gcc/gcc-csl-arm/gcc34-arm-tune.patch
new file mode 100644
index 000000000..cdb20bef9
--- /dev/null
+++ b/openembedded/packages/gcc/gcc-csl-arm/gcc34-arm-tune.patch
@@ -0,0 +1,9 @@
+--- gcc-3.4.0/gcc/config/arm/linux-elf.h.arm-tune 2004-01-31 01:18:11.000000000 -0500
++++ gcc-3.4.0/gcc/config/arm/linux-elf.h 2004-04-24 18:19:10.000000000 -0400
+@@ -126,3 +126,6 @@
+
+ #define LINK_GCC_C_SEQUENCE_SPEC \
+ "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
++
++/* Tune for XScale. */
++#define TARGET_TUNE_DEFAULT TARGET_CPU_xscale
diff --git a/openembedded/packages/gcc/gcc-csl-arm/gcc_optab_arm.patch b/openembedded/packages/gcc/gcc-csl-arm/gcc_optab_arm.patch
new file mode 100644
index 000000000..fa21b2655
--- /dev/null
+++ b/openembedded/packages/gcc/gcc-csl-arm/gcc_optab_arm.patch
@@ -0,0 +1,95 @@
+ARM is the only architecture that has a helper function that returns
+an unbiased result. This fix is trivial enough that we can show it
+doesn't effect any of the other arches. Can we consider this a
+regression fix since it used to work until the helper was added :}
+
+Tested with no regressions on x86_64-pc-linux-gnu and arm-none-eabi.
+
+Cheers,
+Carlos.
+--
+Carlos O'Donell
+CodeSourcery
+carlos@codesourcery.com
+(650) 331-3385 x716
+
+gcc/
+
+2006-01-27 Carlos O'Donell <carlos@codesourcery.com>
+
+ * optabs.c (prepare_cmp_insn): If unbaised and unsigned then bias
+ the comparison routine return.
+
+gcc/testsuite/
+
+2006-01-27 Carlos O'Donell <carlos@codesourcery.com>
+
+ * gcc.dg/unsigned-long-compare.c: New test.
+
+Index: gcc/optabs.c
+===================================================================
+--- 1/gcc/optabs.c (revision 110300)
++++ 2/gcc/optabs.c (working copy)
+@@ -3711,18 +3711,24 @@
+ result = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST_MAKE_BLOCK,
+ word_mode, 2, x, mode, y, mode);
+
++ /* There are two kinds of comparison routines. Biased routines
++ return 0/1/2, and unbiased routines return -1/0/1. Other parts
++ of gcc expect that the comparison operation is equivalent
++ to the modified comparison. For signed comparisons compare the
++ result against 1 in the unbiased case, and zero in the biased
++ case. For unsigned comparisons always compare against 1 after
++ biasing the unbased result by adding 1. This gives us a way to
++ represent LTU. */
+ *px = result;
+ *pmode = word_mode;
+- if (TARGET_LIB_INT_CMP_BIASED)
+- /* Integer comparison returns a result that must be compared
+- against 1, so that even if we do an unsigned compare
+- afterward, there is still a value that can represent the
+- result "less than". */
+- *py = const1_rtx;
+- else
++ *py = const1_rtx;
++
++ if (!TARGET_LIB_INT_CMP_BIASED)
+ {
+- *py = const0_rtx;
+- *punsignedp = 1;
++ if (*punsignedp)
++ *px = plus_constant (result, 1);
++ else
++ *py = const0_rtx;
+ }
+ return;
+ }
+Index: gcc/testsuite/gcc.dg/unsigned-long-compare.c
+===================================================================
+--- 1/gcc/testsuite/gcc.dg/unsigned-long-compare.c (revision 0)
++++ 2/gcc/testsuite/gcc.dg/unsigned-long-compare.c (revision 0)
+@@ -0,0 +1,24 @@
++/* Copyright (C) 2006 Free Software Foundation, Inc. */
++/* Contributed by Carlos O'Donell on 2006-01-27 */
++
++/* Test a division corner case where the expression simplifies
++ to a comparison, and the optab expansion is wrong. The optab
++ expansion emits a function whose return is unbiased and needs
++ adjustment. */
++/* Origin: Carlos O'Donell <carlos@codesourcery.com> */
++/* { dg-do run { target arm-*-*eabi* } } */
++/* { dg-options "" } */
++#include <stdlib.h>
++
++#define BIG_CONSTANT 0xFFFFFFFF80000000ULL
++
++int main (void)
++{
++ unsigned long long OneULL = 1ULL;
++ unsigned long long result;
++
++ result = OneULL / BIG_CONSTANT;
++ if (result)
++ abort ();
++ exit (0);
++}
diff --git a/openembedded/packages/gcc/gcc-csl-arm/no-libfloat.patch b/openembedded/packages/gcc/gcc-csl-arm/no-libfloat.patch
new file mode 100644
index 000000000..e5d12cfb4
--- /dev/null
+++ b/openembedded/packages/gcc/gcc-csl-arm/no-libfloat.patch
@@ -0,0 +1,11 @@
+--- gcc/gcc/config/arm/linux-elf.h.old 2005-04-20 00:46:28.923375320 +0100
++++ gcc/gcc/config/arm/linux-elf.h 2005-04-20 00:46:34.181575952 +0100
+@@ -56,7 +56,7 @@
+ %{shared:-lc} \
+ %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
+
+-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
++#define LIBGCC_SPEC "-lgcc"
+
+ /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
+ the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
diff --git a/openembedded/packages/gcc/gcc-csl-arm/pic-without-sl.patch b/openembedded/packages/gcc/gcc-csl-arm/pic-without-sl.patch
new file mode 100644
index 000000000..9a49794da
--- /dev/null
+++ b/openembedded/packages/gcc/gcc-csl-arm/pic-without-sl.patch
@@ -0,0 +1,303 @@
+Index: gcc/config/arm/arm-protos.h
+===================================================================
+RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm-protos.h,v
+retrieving revision 1.60.4.20
+diff -u -r1.60.4.20 arm-protos.h
+--- gcc/config/arm/arm-protos.h 29 Mar 2005 03:00:11 -0000 1.60.4.20
++++ gcc/config/arm/arm-protos.h 23 Apr 2005 04:41:06 -0000
+@@ -64,6 +64,7 @@
+ extern enum reg_class vfp_secondary_reload_class (enum machine_mode, rtx);
+ extern int tls_symbolic_operand (rtx, enum machine_mode);
+ extern bool arm_tls_operand_p (rtx x);
++extern bool arm_pc_pic_operand_p (rtx x);
+
+ /* Predicates. */
+ extern int s_register_operand (rtx, enum machine_mode);
+Index: gcc/config/arm/arm.c
+===================================================================
+RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.c,v
+retrieving revision 1.303.2.79
+diff -u -r1.303.2.79 arm.c
+--- gcc/config/arm/arm.c 12 Apr 2005 06:17:07 -0000 1.303.2.79
++++ gcc/config/arm/arm.c 23 Apr 2005 04:41:09 -0000
+@@ -1003,7 +1003,7 @@
+
+ /* If stack checking is disabled, we can use r10 as the PIC register,
+ which keeps r9 available. */
+- if (flag_pic)
++ if (0 && flag_pic)
+ arm_pic_register = TARGET_APCS_STACK ? 9 : 10;
+
+ if (TARGET_APCS_FLOAT)
+@@ -3120,6 +3120,10 @@
+ rtx
+ legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
+ {
++ if (GET_CODE (orig) == UNSPEC
++ && XINT (orig, 1) == UNSPEC_GOTSLOTPC)
++ abort ();
++
+ if (GET_CODE (orig) == SYMBOL_REF
+ || GET_CODE (orig) == LABEL_REF)
+ {
+@@ -3149,27 +3153,80 @@
+ else
+ address = reg;
+
+- if (TARGET_ARM)
+- emit_insn (gen_pic_load_addr_arm (address, orig));
+- else
+- emit_insn (gen_pic_load_addr_thumb (address, orig));
++ if (arm_pic_register != INVALID_REGNUM)
++ {
++ /* Using GP-based PIC addressing. */
++ if (TARGET_ARM)
++ emit_insn (gen_pic_load_addr_arm (address, orig));
++ else
++ emit_insn (gen_pic_load_addr_thumb (address, orig));
++
++ if ((GET_CODE (orig) == LABEL_REF
++ || (GET_CODE (orig) == SYMBOL_REF &&
++ SYMBOL_REF_LOCAL_P (orig)))
++ && NEED_GOT_RELOC)
++ pic_ref = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, address);
++ else
++ {
++ pic_ref = gen_rtx_MEM (Pmode,
++ gen_rtx_PLUS (Pmode, pic_offset_table_rtx,
++ address));
++ RTX_UNCHANGING_P (pic_ref) = 1;
++ }
+
+- if ((GET_CODE (orig) == LABEL_REF
+- || (GET_CODE (orig) == SYMBOL_REF &&
+- SYMBOL_REF_LOCAL_P (orig)))
+- && NEED_GOT_RELOC)
+- pic_ref = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, address);
++ current_function_uses_pic_offset_table = 1;
++ }
+ else
+ {
+- pic_ref = gen_rtx_MEM (Pmode,
+- gen_rtx_PLUS (Pmode, pic_offset_table_rtx,
+- address));
+- RTX_UNCHANGING_P (pic_ref) = 1;
++ /* Using PC-based PIC addressing. */
++ rtx label, tmp;
++ int offset;
++
++ label = gen_label_rtx ();
++ offset = TARGET_ARM ? 8 : 4;
++
++ if (GET_CODE (orig) == LABEL_REF
++ || (GET_CODE (orig) == SYMBOL_REF && SYMBOL_REF_LOCAL_P (orig)))
++ {
++ /* This symbol is defined locally. We don't need a GOT entry. */
++ tmp = gen_rtx_MINUS (Pmode, gen_rtx_UNSPEC (Pmode, gen_rtvec (1, orig), UNSPEC_PIC_SYM), gen_rtx_PLUS (Pmode,
++ gen_rtx_LABEL_REF (Pmode, label),
++ GEN_INT (offset)));
++
++ load_tls_operand (tmp, address);
++
++ if (TARGET_ARM)
++ emit_insn (gen_pic_add_dot_plus_eight (address, label));
++ else
++ emit_insn (gen_pic_add_dot_plus_four (address, label));
++ }
++ else
++ {
++ rtx x = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, orig), UNSPEC_GOTSLOTPC);
++ rtx dummy_label;
++
++ dummy_label = gen_label_rtx ();
++ LABEL_PRESERVE_P (dummy_label) = 1;
++ LABEL_NUSES (dummy_label) = 1;
++
++ tmp = gen_rtx_MINUS (Pmode, x, gen_rtx_PLUS (Pmode,
++ gen_rtx_LABEL_REF (Pmode, label),
++ GEN_INT (offset)));
++
++ load_tls_operand (tmp, address);
++
++ if (TARGET_ARM)
++ emit_insn (gen_tls_load_dot_plus_eight (address, address, label, dummy_label));
++ else
++ emit_insn (gen_tls_load_dot_plus_four (address, address, label, dummy_label));
++ }
++
++ pic_ref = address;
+ }
+
+ insn = emit_move_insn (reg, pic_ref);
+ #endif
+- current_function_uses_pic_offset_table = 1;
++
+ /* Put a REG_EQUAL note on this insn, so that it can be optimized
+ by loop. */
+ REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, orig,
+@@ -3179,11 +3236,17 @@
+ else if (GET_CODE (orig) == CONST)
+ {
+ rtx base, offset;
++ bool minus = FALSE;
+
+ if (GET_CODE (XEXP (orig, 0)) == PLUS
+ && XEXP (XEXP (orig, 0), 0) == pic_offset_table_rtx)
+ return orig;
+
++ if (GET_CODE (XEXP (orig, 0)) == MINUS
++ && GET_CODE (XEXP (XEXP (orig, 0), 0)) == UNSPEC
++ && XINT (XEXP (XEXP (orig, 0), 0), 1) == UNSPEC_GOTSLOTPC)
++ return orig;
++
+ if (GET_CODE (XEXP (orig, 0)) == UNSPEC)
+ return orig;
+
+@@ -3201,6 +3264,13 @@
+ offset = legitimize_pic_address (XEXP (XEXP (orig, 0), 1), Pmode,
+ base == reg ? 0 : reg);
+ }
++ else if (GET_CODE (XEXP (orig, 0)) == MINUS)
++ {
++ minus = TRUE;
++ base = legitimize_pic_address (XEXP (XEXP (orig, 0), 0), Pmode, reg);
++ offset = legitimize_pic_address (XEXP (XEXP (orig, 0), 1), Pmode,
++ base == reg ? 0 : reg);
++ }
+ else
+ abort ();
+
+@@ -3228,7 +3298,7 @@
+ return reg;
+ }
+
+- return gen_rtx_PLUS (Pmode, base, offset);
++ return minus ? gen_rtx_MINUS (Pmode, base, offset) : gen_rtx_PLUS (Pmode, base, offset);
+ }
+
+ return orig;
+@@ -3267,7 +3337,7 @@
+ rtx l1, pic_tmp, pic_tmp2, pic_rtx;
+ rtx global_offset_table;
+
+- if (current_function_uses_pic_offset_table == 0 || TARGET_SINGLE_PIC_BASE)
++ if (current_function_uses_pic_offset_table == 0 || TARGET_SINGLE_PIC_BASE || arm_pic_register == INVALID_REGNUM)
+ return;
+
+ if (!flag_pic)
+@@ -3341,8 +3411,11 @@
+ static int
+ pcrel_constant_p (rtx x)
+ {
++ if (GET_CODE (x) == CONST)
++ return pcrel_constant_p (XEXP (x, 0));
++
+ if (GET_CODE (x) == MINUS)
+- return symbol_mentioned_p (XEXP (x, 0)) && label_mentioned_p (XEXP (x, 1));
++ return (((GET_CODE (XEXP (x, 0)) == UNSPEC && XINT (XEXP (x, 0), 1) == UNSPEC_PIC_SYM)) || symbol_mentioned_p (XEXP (x, 0))) && label_mentioned_p (XEXP (x, 1));
+
+ if (GET_CODE (x) == UNSPEC
+ && XINT (x, 1) == UNSPEC_TLS
+@@ -3946,12 +4019,32 @@
+ return SYMBOL_REF_TLS_MODEL (op);
+ }
+
++bool
++arm_pc_pic_operand_p (rtx op)
++{
++ if (GET_CODE (op) == CONST
++ && GET_CODE (XEXP (op, 0)) == MINUS
++ && GET_CODE (XEXP (XEXP (op, 0), 0)) == UNSPEC
++ && XINT (XEXP (XEXP (op, 0), 0), 1) == UNSPEC_GOTSLOTPC)
++ return 1;
++
++ if (GET_CODE (op) == CONST
++ && GET_CODE (XEXP (op, 0)) == MINUS
++ && GET_CODE (XEXP (XEXP (op, 0), 0)) == UNSPEC
++ && XINT (XEXP (XEXP (op, 0), 0), 1) == UNSPEC_PIC_SYM)
++ return 1;
++
++ return 0;
++}
++
+ /* Valid input to a move instruction. */
+ int
+ move_input_operand (rtx op, enum machine_mode mode)
+ {
+ if (tls_symbolic_operand (op, mode))
+ return 0;
++ if (pcrel_constant_p (op))
++ return 1;
+ return general_operand (op, mode);
+ }
+
+@@ -15634,11 +15727,34 @@
+ return TRUE;
+ }
+
++static bool
++arm_emit_got_decoration (FILE *fp, rtx x)
++{
++ rtx val;
++
++ val = XVECEXP (x, 0, 0);
++
++ fputs ("_gotslotpc_(", fp);
++
++ output_addr_const (fp, val);
++
++ fputc (')', fp);
++
++ return TRUE;
++}
++
+ bool
+ arm_output_addr_const_extra (FILE *fp, rtx x)
+ {
+ if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_TLS)
+ return arm_emit_tls_decoration (fp, x);
++ else if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_GOTSLOTPC)
++ return arm_emit_got_decoration (fp, x);
++ else if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_PIC_SYM)
++ {
++ output_addr_const (fp, XVECEXP (x, 0, 0));
++ return TRUE;
++ }
+ else if (GET_CODE (x) == CONST_VECTOR)
+ return arm_emit_vector_const (fp, x);
+
+Index: gcc/config/arm/arm.md
+===================================================================
+RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.md,v
+retrieving revision 1.145.2.31
+diff -u -r1.145.2.31 arm.md
+--- gcc/config/arm/arm.md 28 Mar 2005 19:04:37 -0000 1.145.2.31
++++ gcc/config/arm/arm.md 23 Apr 2005 04:41:11 -0000
+@@ -88,6 +88,7 @@
+ (UNSPEC_WMADDS 18) ; Used by the intrinsic form of the iWMMXt WMADDS instruction.
+ (UNSPEC_WMADDU 19) ; Used by the intrinsic form of the iWMMXt WMADDU instruction.
+ (UNSPEC_TLS 20) ; A symbol that has been treated properly for TLS usage.
++ (UNSPEC_GOTSLOTPC 21)
+ ]
+ )
+
+@@ -4179,7 +4180,8 @@
+ && (CONSTANT_P (operands[1])
+ || symbol_mentioned_p (operands[1])
+ || label_mentioned_p (operands[1]))
+- && ! tls_mentioned_p (operands[1]))
++ && ! tls_mentioned_p (operands[1])
++ && ! arm_pc_pic_operand_p (operands[1]))
+ operands[1] = legitimize_pic_address (operands[1], SImode,
+ (no_new_pseudos ? operands[0] : 0));
+ }
+@@ -4412,7 +4414,8 @@
+ (mem:SI (unspec:SI [(plus:SI (match_dup 0)
+ (const (plus:SI (pc) (const_int 8))))]
+ UNSPEC_PIC_BASE)))
+- (use (label_ref (match_operand 1 "" "")))])]
++ (use (label_ref (match_operand 1 "" "")))
++ (use (label_ref (match_operand 1 "" "")))])]
+ ""
+ )
+
diff --git a/openembedded/packages/gcc/gcc_csl-arm-2005q3.bb b/openembedded/packages/gcc/gcc_csl-arm-2005q3.bb
new file mode 100644
index 000000000..62bacda14
--- /dev/null
+++ b/openembedded/packages/gcc/gcc_csl-arm-2005q3.bb
@@ -0,0 +1,27 @@
+DESCRIPTION = "The GNU cc and gcc C compilers."
+HOMEPAGE = "http://www.gnu.org/software/gcc/"
+SECTION = "devel"
+LICENSE = "GPL"
+BINV = "3.4.4"
+PV = "3.4.4+csl-arm-2005q3"
+PR = "r1"
+
+FILESDIR = "${FILE_DIRNAME}/gcc-csl-arm"
+
+inherit autotools gettext
+
+include gcc-package.inc
+
+SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm/2005q3-2/arm-2005q3-2-arm-none-linux-gnueabi.src.tar.bz2 \
+ file://gcc_optab_arm.patch;patch=1"
+
+do_unpack2() {
+ cd ${WORKDIR}
+ tar -xvjf ./arm-2005q3-2-arm-none-linux-gnueabi/gcc-2005q3-2.tar.bz2
+}
+
+addtask unpack2 after do_unpack before do_patch
+
+include gcc3-build.inc
+
+S = "${WORKDIR}/gcc-2005q3"
diff --git a/openembedded/packages/glibc/glibc-2.4/arm-longlong.patch b/openembedded/packages/glibc/glibc-2.4/arm-longlong.patch
new file mode 100644
index 000000000..320a55524
--- /dev/null
+++ b/openembedded/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/openembedded/packages/glibc/glibc-2.4/arm-memcpy.patch b/openembedded/packages/glibc/glibc-2.4/arm-memcpy.patch
new file mode 100644
index 000000000..bc2b3dab8
--- /dev/null
+++ b/openembedded/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/openembedded/packages/glibc/glibc-2.4/dl-cache-libcmp.patch b/openembedded/packages/glibc/glibc-2.4/dl-cache-libcmp.patch
new file mode 100644
index 000000000..2fedfa6db
--- /dev/null
+++ b/openembedded/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/openembedded/packages/glibc/glibc-2.4/dyn-ldconfig-20041128.patch b/openembedded/packages/glibc/glibc-2.4/dyn-ldconfig-20041128.patch
new file mode 100644
index 000000000..451b6d4af
--- /dev/null
+++ b/openembedded/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/openembedded/packages/glibc/glibc-2.4/dyn-ldconfig.patch b/openembedded/packages/glibc/glibc-2.4/dyn-ldconfig.patch
new file mode 100644
index 000000000..1041965d0
--- /dev/null
+++ b/openembedded/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/openembedded/packages/glibc/glibc-2.4/etc/ld.so.conf b/openembedded/packages/glibc/glibc-2.4/etc/ld.so.conf
new file mode 100644
index 000000000..3f9b41aab
--- /dev/null
+++ b/openembedded/packages/glibc/glibc-2.4/etc/ld.so.conf
@@ -0,0 +1,3 @@
+/usr/local/lib
+/opt/QtPalmtop/lib
+
diff --git a/openembedded/packages/glibc/glibc-2.4/fixup-aeabi-syscalls.patch b/openembedded/packages/glibc/glibc-2.4/fixup-aeabi-syscalls.patch
new file mode 100644
index 000000000..fb733b919
--- /dev/null
+++ b/openembedded/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/openembedded/packages/glibc/glibc-2.4/generic-bits_select.h b/openembedded/packages/glibc/glibc-2.4/generic-bits_select.h
new file mode 100644
index 000000000..47e7dedc3
--- /dev/null
+++ b/openembedded/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/openembedded/packages/glibc/glibc-2.4/generic-bits_time.h b/openembedded/packages/glibc/glibc-2.4/generic-bits_time.h
new file mode 100644
index 000000000..b3184d1de
--- /dev/null
+++ b/openembedded/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/openembedded/packages/glibc/glibc-2.4/generic-bits_types.h b/openembedded/packages/glibc/glibc-2.4/generic-bits_types.h
new file mode 100644
index 000000000..65c8a9fe9
--- /dev/null
+++ b/openembedded/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/openembedded/packages/glibc/glibc-2.4/generic-bits_typesizes.h b/openembedded/packages/glibc/glibc-2.4/generic-bits_typesizes.h
new file mode 100644
index 000000000..e9226c417
--- /dev/null
+++ b/openembedded/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/openembedded/packages/glibc/glibc-2.4/glibc-2.4-compile.patch b/openembedded/packages/glibc/glibc-2.4/glibc-2.4-compile.patch
new file mode 100644
index 000000000..ea9f55ae7
--- /dev/null
+++ b/openembedded/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/openembedded/packages/glibc/glibc-2.4/ldsocache-varrun.patch b/openembedded/packages/glibc/glibc-2.4/ldsocache-varrun.patch
new file mode 100644
index 000000000..9994d4f87
--- /dev/null
+++ b/openembedded/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/openembedded/packages/glibc/glibc-2.4/nptl-crosscompile.patch b/openembedded/packages/glibc/glibc-2.4/nptl-crosscompile.patch
new file mode 100644
index 000000000..18a46ad4f
--- /dev/null
+++ b/openembedded/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/openembedded/packages/glibc/glibc-initial_2.4.bb b/openembedded/packages/glibc/glibc-initial_2.4.bb
new file mode 100644
index 000000000..422e8b711
--- /dev/null
+++ b/openembedded/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/openembedded/packages/glibc/glibc-intermediate_2.4.bb b/openembedded/packages/glibc/glibc-intermediate_2.4.bb
new file mode 100644
index 000000000..819cd0950
--- /dev/null
+++ b/openembedded/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/openembedded/packages/glibc/glibc_2.4.bb b/openembedded/packages/glibc/glibc_2.4.bb
new file mode 100644
index 000000000..faaf27ced
--- /dev/null
+++ b/openembedded/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
diff --git a/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/3477-1.patch b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/3477-1.patch
new file mode 100644
index 000000000..1b207b3cd
--- /dev/null
+++ b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/3477-1.patch
@@ -0,0 +1,43 @@
+From: Nicolas Pitre <nico@cam.org>
+Date: Sat, 15 Apr 2006 15:10:43 +0000 (+0100)
+Subject: [ARM] 3477/1: ARM EABI: undefine removed syscalls
+X-Git-Url: http://git.infradead.org/?p=mtd-2.6.git;a=commitdiff;h=463b158aab247b600e4e93614b7b8f42a66331c9
+
+[ARM] 3477/1: ARM EABI: undefine removed syscalls
+
+Patch from Nicolas Pitre
+
+Avoid confusion for libraries assuming that a given syscall is available
+when corresponding symbol is defined.
+
+Signed-off-by: Nicolas Pitre <nico@cam.org>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+---
+
+--- a/include/asm-arm/unistd.h
++++ b/include/asm-arm/unistd.h
+@@ -360,6 +360,24 @@
+ #define __ARM_NR_usr32 (__ARM_NR_BASE+4)
+ #define __ARM_NR_set_tls (__ARM_NR_BASE+5)
+
++/*
++ * The following syscalls are obsolete and no longer available for EABI.
++ */
++#if defined(__ARM_EABI__)
++#undef __NR_time
++#undef __NR_umount
++#undef __NR_stime
++#undef __NR_alarm
++#undef __NR_utime
++#undef __NR_getrlimit
++#undef __NR_select
++#undef __NR_readdir
++#undef __NR_mmap
++#undef __NR_socketcall
++#undef __NR_syscall
++#undef __NR_ipc
++#endif
++
+ #define __sys2(x) #x
+ #define __sys1(x) __sys2(x)
+
diff --git a/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/asm-arch-irqs.patch b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/asm-arch-irqs.patch
new file mode 100644
index 000000000..4785275db
--- /dev/null
+++ b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/asm-arch-irqs.patch
@@ -0,0 +1,19 @@
+--- linux-libc-headers-2.6.15.99/include/asm-arm/arch-ebsa285/irqs.h.orig 2006-03-19 17:01:59.000000000 +0100
++++ linux-libc-headers-2.6.15.99/include/asm-arm/arch-ebsa285/irqs.h 2006-03-19 17:02:50.000000000 +0100
+@@ -8,7 +8,6 @@
+ * 20-Jan-1998 RMK Started merge of EBSA286, CATS and NetWinder
+ * 01-Feb-1999 PJB ISA IRQs start at 0 not 16
+ */
+-#include <asm/mach-types.h>
+
+ #define NR_IRQS 36
+ #define NR_DC21285_IRQS 16
+@@ -92,7 +91,7 @@
+ #undef RTC_IRQ
+ #define RTC_IRQ IRQ_ISA_RTC_ALARM
+ #define I8042_KBD_IRQ IRQ_ISA_KEYBOARD
+-#define I8042_AUX_IRQ (machine_is_netwinder() ? IRQ_NETWINDER_PS2MOUSE : IRQ_ISA_PS2MOUSE)
++#define I8042_AUX_IRQ IRQ_ISA_PS2MOUSE
+ #define IRQ_FLOPPYDISK IRQ_ISA_FLOPPY
+
+ #define irq_canonicalize(_i) (((_i) == IRQ_ISA_CASCADE) ? IRQ_ISA_2 : _i)
diff --git a/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-netdevice.patch b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-netdevice.patch
new file mode 100644
index 000000000..588aea4ba
--- /dev/null
+++ b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-netdevice.patch
@@ -0,0 +1,11 @@
+--- linux-libc-headers-2.6.15.99/include/linux/netdevice.h.orig 2006-04-29 14:10:39.245687500 +0200
++++ linux-libc-headers-2.6.15.99/include/linux/netdevice.h 2006-04-29 14:11:08.819535750 +0200
+@@ -100,8 +100,6 @@
+ unsigned long tx_compressed;
+ };
+
+-extern int __init netdev_boot_setup(char *str);
+-
+ /* Media selection options. */
+ enum {
+ IF_PORT_UNKNOWN = 0,
diff --git a/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-netfilter_ipv4.patch b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-netfilter_ipv4.patch
new file mode 100644
index 000000000..f7f77af0d
--- /dev/null
+++ b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-netfilter_ipv4.patch
@@ -0,0 +1,31 @@
+iptables 1.3.3 assumes that ipt_scpt.h defines ELEMCOUNT, but ipt_scpt.h
+moved to ARRAY_SIZE (which would be defined in linux/kernel.h).
+The ip_conntrack_dir definition now resides in linux/netfilter/ip_conntrack_common.h
+
+--- linux-libc-headers-2.6.15.99/include/linux/netfilter_ipv4/ipt_sctp.h.orig 2006-03-20 22:03:04.000000000 +0100
++++ linux-libc-headers-2.6.15.99/include/linux/netfilter_ipv4/ipt_sctp.h 2006-03-20 22:07:09.000000000 +0100
+@@ -7,6 +7,8 @@
+
+ #define IPT_SCTP_VALID_FLAGS 0x07
+
++#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
++#define ELEMCOUNT(x) (sizeof(x) / sizeof((x)[0]))
+
+ struct ipt_sctp_flag_info {
+ u_int8_t chunktype;
+--- linux-libc-headers-2.6.15.99/include/linux/netfilter_ipv4/ip_conntrack_tuple.h.orig 2006-03-20 21:51:10.000000000 +0100
++++ linux-libc-headers-2.6.15.99/include/linux/netfilter_ipv4/ip_conntrack_tuple.h 2006-03-20 21:51:12.000000000 +0100
+@@ -89,13 +89,6 @@
+ (tuple)->dst.u.all = 0; \
+ } while (0)
+
+-enum ip_conntrack_dir
+-{
+- IP_CT_DIR_ORIGINAL,
+- IP_CT_DIR_REPLY,
+- IP_CT_DIR_MAX
+-};
+-
+ static inline int ip_ct_tuple_src_equal(const struct ip_conntrack_tuple *t1,
+ const struct ip_conntrack_tuple *t2)
+ {
diff --git a/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-rtc.patch b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-rtc.patch
new file mode 100644
index 000000000..36b80fb9d
--- /dev/null
+++ b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-rtc.patch
@@ -0,0 +1,11 @@
+--- linux-libc-headers-2.6.15.99/include/linux/rtc.h.orig 2006-03-19 12:31:07.000000000 +0100
++++ linux-libc-headers-2.6.15.99/include/linux/rtc.h 2006-03-19 12:31:14.000000000 +0100
+@@ -11,8 +11,6 @@
+ #ifndef _LINUX_RTC_H_
+ #define _LINUX_RTC_H_
+
+-#include <linux/interrupt.h>
+-
+ /*
+ * The struct used to pass data via the following ioctl. Similar to the
+ * struct tm in <time.h>, but it needs to be here so that the kernel
diff --git a/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-videodev2.patch b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-videodev2.patch
new file mode 100644
index 000000000..95335c99b
--- /dev/null
+++ b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-videodev2.patch
@@ -0,0 +1,45 @@
+--- linux-libc-headers-2.6.15.99/include/linux/videodev2.h.orig 2006-03-20 11:14:35.000000000 +0100
++++ linux-libc-headers-2.6.15.99/include/linux/videodev2.h 2006-03-20 11:14:37.000000000 +0100
+@@ -15,7 +15,32 @@
+ */
+ #include <sys/time.h> /* need struct timeval */
+ #include <asm/types.h> /* needed __u64 */
+-
++
++#define OBSOLETE_OWNER 1 /* It will be removed for 2.6.15 */
++#define HAVE_V4L2 1
++
++/*
++ * Common stuff for both V4L1 and V4L2
++ * Moved from videodev.h
++ */
++
++#define VIDEO_MAX_FRAME 32
++
++#define VID_TYPE_CAPTURE 1 /* Can capture */
++#define VID_TYPE_TUNER 2 /* Can tune */
++#define VID_TYPE_TELETEXT 4 /* Does teletext */
++#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
++#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
++#define VID_TYPE_CLIPPING 32 /* Can clip */
++#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
++#define VID_TYPE_SCALES 128 /* Scalable */
++#define VID_TYPE_MONOCHROME 256 /* Monochrome only */
++#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
++#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */
++#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */
++#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */
++#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */
++
+ /*
+ * M I S C E L L A N E O U S
+ */
+@@ -464,7 +489,7 @@
+ struct v4l2_clip
+ {
+ struct v4l2_rect c;
+- struct v4l2_clip __user *next;
++ struct v4l2_clip *next;
+ };
+
+ struct v4l2_window
diff --git a/openembedded/packages/linux-libc-headers/linux-libc-headers_2.6.15.99.bb b/openembedded/packages/linux-libc-headers/linux-libc-headers_2.6.15.99.bb
new file mode 100644
index 000000000..28926f026
--- /dev/null
+++ b/openembedded/packages/linux-libc-headers/linux-libc-headers_2.6.15.99.bb
@@ -0,0 +1,80 @@
+SECTION = "devel"
+DESCRIPTION = "Sanitized set of 2.6 kernel headers for the C library's use."
+# This package is derived from the original linux-libc-headers at
+# http://ep09.pld-linux.org/~mmazur/linux-libc-headers/
+# More specifically, llh-2.6.12.0 was patched up to 2.6.16-rc6 with
+# the official linux patches (where applicable) and then fixed up just
+# enough to build glibc-2.4. BEWARE!
+#
+# license note from the linux-libc-headers package:
+# Linux-libc-headers are derived from linux kernel headers. For license of a
+# particular header, check it's content, and if copyright notice isn't present,
+# standard linux kernel license applies.
+# since we assume GPL for linux i think we can also assume it here
+LICENSE = "GPL"
+DEFAULT_PREFERENCE = "-1"
+INHIBIT_DEFAULT_DEPS = "1"
+PR = "r4"
+
+SRC_URI = "http://ewi546.ewi.utwente.nl/OE/eabi/linux-libc-headers-${PV}.tar.bz2 \
+ file://keyboard.patch;patch=1 \
+ file://asm-arch-irqs.patch;patch=1 \
+ file://linux-netdevice.patch;patch=1 \
+ file://linux-netfilter_ipv4.patch;patch=1 \
+ file://linux-rtc.patch;patch=1 \
+ file://linux-videodev2.patch;patch=1 \
+ file://3477-1.patch;patch=1"
+
+S = "${WORKDIR}/linux-libc-headers-${PV}"
+
+do_configure () {
+ case ${TARGET_ARCH} in
+ alpha*) ARCH=alpha ;;
+ arm*) ARCH=arm ;;
+ cris*) ARCH=cris ;;
+ hppa*) ARCH=parisc ;;
+ i*86*) ARCH=i386 ;;
+ ia64*) ARCH=ia64 ;;
+ mips*) ARCH=mips ;;
+ m68k*) ARCH=m68k ;;
+ powerpc*) ARCH=ppc ;;
+ s390*) ARCH=s390 ;;
+ sh*) ARCH=sh ;;
+ sparc64*) ARCH=sparc64 ;;
+ sparc*) ARCH=sparc ;;
+ x86_64*) ARCH=x86_64 ;;
+ esac
+ if test ! -e include/asm-$ARCH; then
+ oefatal unable to create asm symlink in kernel headers
+ fi
+ rm "include/asm"
+ cp -pPR "include/asm-$ARCH" "include/asm"
+ if test "$ARCH" = "arm"; then
+ cp -pPR include/asm/arch-ebsa285 include/asm/arch
+ elif test "$ARCH" = "sh"; then
+ cp -pPR include/asm/cpu-${TARGET_ARCH} include/asm/cpu || die "unable to create include/asm/cpu"
+ fi
+}
+
+do_stage () {
+ install -d ${STAGING_INCDIR}
+ rm -rf ${STAGING_INCDIR}/linux ${STAGING_INCDIR}/asm ${STAGING_INCDIR}/asm-generic
+ cp -pfLR include/linux ${STAGING_INCDIR}/
+ cp -pfLR include/asm ${STAGING_INCDIR}/
+ cp -pfLR include/asm-generic ${STAGING_INCDIR}/
+ rm -rf ${CROSS_DIR}/${TARGET_SYS}/include/linux
+ rm -rf ${CROSS_DIR}/${TARGET_SYS}/include/asm
+ rm -rf ${CROSS_DIR}/${TARGET_SYS}/include/asm-generic
+ install -d ${CROSS_DIR}/${TARGET_SYS}/include
+ cp -pfLR include/linux ${CROSS_DIR}/${TARGET_SYS}/include/
+ cp -pfLR include/asm ${CROSS_DIR}/${TARGET_SYS}/include/
+ cp -pfLR include/asm-generic ${CROSS_DIR}/${TARGET_SYS}/include/
+}
+
+do_install() {
+ install -d ${D}${includedir}
+ cp -pfLR include/linux ${D}${includedir}/
+ cp -pfLR include/asm ${D}${includedir}/
+ cp -pfLR include/asm-generic ${D}${includedir}/
+}
+