summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2013-06-10 14:18:42 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2013-12-19 16:12:46 +0100
commit0a49bd8f7cecec31cdb881a6d9d4e1d441eb7f8a (patch)
tree6568946b930ce50f674e5717fa889478dd6e6da1
parentd77d1c19c72003806147c002a63122512470a75f (diff)
downloadOSELAS.Toolchain-0a49bd8f7cecec31cdb881a6d9d4e1d441eb7f8a.tar.gz
OSELAS.Toolchain-0a49bd8f7cecec31cdb881a6d9d4e1d441eb7f8a.tar.xz
remove old patches
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--patches/binutils-2.19/0001-HACK-disable-some-docs-to-avoid-using-makeinfo.patch23
-rw-r--r--patches/binutils-2.19/series4
-rw-r--r--patches/binutils-2.21.1a/0001-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch36
-rw-r--r--patches/binutils-2.21.1a/0002-warn-on-all-TEXTRELs.patch80
-rw-r--r--patches/binutils-2.21.1a/0003-2011-05-31-Paul-Brook-paul-codesourcery.com.patch127
-rw-r--r--patches/binutils-2.21.1a/series6
-rw-r--r--patches/binutils-2.21/gentoo/08_all_binutils-RPATH_ENVVAR-smack.patch19
-rw-r--r--patches/binutils-2.21/gentoo/30_all_binutils-multitarget-fixup.patch234
-rw-r--r--patches/binutils-2.21/gentoo/33_all_binutils-gnu-relro-fixups.patch109
-rw-r--r--patches/binutils-2.21/gentoo/42_all_012_check_ldrunpath_length.patch61
-rw-r--r--patches/binutils-2.21/gentoo/66_all_binutils-2.17.50.0.2-warn-textrel.patch75
-rw-r--r--patches/binutils-2.21/gentoo/76_all_only-use-new-ld-dtags.patch.disabled31
-rw-r--r--patches/binutils-2.21/gentoo/91_all_libiberty-pic.patch16
-rw-r--r--patches/binutils-2.21/gentoo/no_63_all_binutils-2.18-pt-pax-flags-20070828.patch263
-rw-r--r--patches/binutils-2.21/gentoo/no_76_all_use-new-ld-dtags.patch10
-rw-r--r--patches/binutils-2.21/gentoo/no_77_all_generate-gnu-hash.patch6
-rw-r--r--patches/binutils-2.21/gentoo/no_78_all_use-relro.patch6
-rw-r--r--patches/binutils-2.21/oe/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch39
-rw-r--r--patches/binutils-2.21/series8
-rw-r--r--patches/binutils-2.22/0001-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch36
-rw-r--r--patches/binutils-2.22/series4
-rw-r--r--patches/gcc-4.6.2/0001-Volatile-bitfields-vs.-inline-asm-memory-constraints.patch36
-rw-r--r--patches/gcc-4.6.2/0002-Fix-compilation-with-host-gcc-4.7.patch35
-rw-r--r--patches/gcc-4.6.2/0003-PR-tree-optimization-52445.patch164
-rw-r--r--patches/gcc-4.6.2/0100-no-host-includes.patch55
-rw-r--r--patches/gcc-4.6.2/0101-arm-softfloat.patch45
-rw-r--r--patches/gcc-4.6.2/0102-fix-arith_adjacentmem-LDM-splitting-code.patch39
-rw-r--r--patches/gcc-4.6.2/0200-also-match-uclibc-when-checking-host-os.patch49
-rw-r--r--patches/gcc-4.6.2/0201-missing-execinfo.h.patch24
-rw-r--r--patches/gcc-4.6.2/0202-c99-snprintf.patch24
-rw-r--r--patches/gcc-4.6.2/0203-libmudflap-susv3-legacy.patch62
-rw-r--r--patches/gcc-4.6.2/0300-gcc-trampolinewarn.patch46
-rw-r--r--patches/gcc-4.6.2/0301-flatten-switch-stmt-into-if-else-chain-for-Os.patch83
-rw-r--r--patches/gcc-4.6.2/0302-libiberty-pic.patch24
-rw-r--r--patches/gcc-4.6.2/0303-libstdc-pic.patch58
-rw-r--r--patches/gcc-4.6.2/0304-gcc-i386-use-pure64-CLFS-patch.patch47
-rw-r--r--patches/gcc-4.6.2/series22
-rw-r--r--patches/gcc-linaro-4.7-2012.11/series21
-rw-r--r--patches/gdb-7.2/0001-sim-ppc-remove-bogus-dependency.patch29
-rw-r--r--patches/gdb-7.2/series3
-rw-r--r--patches/gdb-7.5/0001-sim-ppc-remove-bogus-dependency.patch30
-rw-r--r--patches/gdb-7.5/series4
-rw-r--r--patches/glibc-2.14.1/0001-add-install-lib-all-target.patch35
-rw-r--r--patches/glibc-2.14.1/0002-fix-build-error-with-static-nss.patch56
-rw-r--r--patches/glibc-2.14.1/0003-configure.in-detect-readelf-with-AC_CHECK_TARGET_TOO.patch43
-rw-r--r--patches/glibc-2.14.1/0004-stdlib-longlong.patch41
-rw-r--r--patches/glibc-2.14.1/0005-respect-env-CPPFLAGS.patch40
-rw-r--r--patches/glibc-2.14.1/0006-i586-chk.patch39
-rw-r--r--patches/glibc-2.14.1/0007-i386-x86_64-revert-clone-cfi.patch58
-rw-r--r--patches/glibc-2.14.1/0008-queue-header-updates.patch92
-rw-r--r--patches/glibc-2.14.1/0009-don-t-regen-docs-if-perl-is-not-found.patch35
-rw-r--r--patches/glibc-2.14.1/0010-localedef-fix-trampoline.patch67
-rw-r--r--patches/glibc-2.14.1/0011-posix-awk.patch24
-rw-r--r--patches/glibc-2.14.1/0012-resolv-dynamic.patch47
-rw-r--r--patches/glibc-2.14.1/0013-section-comments.patch34
-rw-r--r--patches/glibc-2.14.1/0014-no-inline-gmon.patch38
-rw-r--r--patches/glibc-2.14.1/0015-strict-aliasing.patch94
-rw-r--r--patches/glibc-2.14.1/0016-undefine-__i686.patch52
-rw-r--r--patches/glibc-2.14.1/0017-fpscr-values.patch42
-rw-r--r--patches/glibc-2.14.1/0018-optimized-string-functions-for-NEON-from-Linaro.patch1292
-rw-r--r--patches/glibc-2.14.1/0019-add-libc_hidden_builtin_def-for-all-cortex-functions.patch76
-rw-r--r--patches/glibc-2.14.1/0020-revert-sunrpc-removal.patch80
-rw-r--r--patches/glibc-2.14.1/0021-fix-libdl-crash.patch148
-rwxr-xr-xpatches/glibc-2.14.1/autogen.sh9
-rw-r--r--patches/glibc-2.14.1/series24
-rw-r--r--patches/glibc-2.16.0/0001-add-install-lib-all-target.patch35
-rw-r--r--patches/glibc-2.16.0/0002-don-t-regen-docs-if-perl-is-not-found.patch35
-rw-r--r--patches/glibc-2.16.0/0100-Fix-localedef-segfault-when-run-under-exec-shield-Pa.patch67
-rw-r--r--patches/glibc-2.16.0/0200-resolv-dynamic.patch47
-rw-r--r--patches/glibc-2.16.0/0300-optimized-string-functions-for-NEON-from-Linaro.patch1292
-rw-r--r--patches/glibc-2.16.0/0301-add-libc_hidden_builtin_def-for-all-cortex-functions.patch76
-rwxr-xr-xpatches/glibc-2.16.0/autogen.sh9
-rw-r--r--patches/glibc-2.16.0/series13
-rw-r--r--patches/uClibc-0.9.29/generic/check-lxdialog-fix-comparison.diff17
-rw-r--r--patches/uClibc-0.9.29/generic/series10
-rw-r--r--patches/uClibc-0.9.29/generic/uClibc-0.9.29-001-fix-mmap.patch91
-rw-r--r--patches/uClibc-0.9.29/generic/uClibc-0.9.29-conditional-sched_affinity.patch53
-rw-r--r--patches/uClibc-0.9.29/generic/uClibc-0.9.29-filter-gnu99-from-assembly-flags.patch12
-rw-r--r--patches/uClibc-0.9.29/generic/uClibc-0.9.29-fix-fget_putc.diff396
-rw-r--r--patches/uClibc-0.9.29/generic/uClibc-0.9.29-fix-gethostent_r-failure-retval.patch12
-rw-r--r--patches/uClibc-0.9.29/generic/uClibc-0.9.29-fix-internal_function-definition.patch51
-rw-r--r--patches/uClibc-0.9.29/generic/uClibc-0.9.29-linuxthreads.patch145
-rw-r--r--patches/uClibc-0.9.29/generic/uClibc-0.9.29-rm-whitespace.patch86
83 files changed, 0 insertions, 7006 deletions
diff --git a/patches/binutils-2.19/0001-HACK-disable-some-docs-to-avoid-using-makeinfo.patch b/patches/binutils-2.19/0001-HACK-disable-some-docs-to-avoid-using-makeinfo.patch
deleted file mode 100644
index 95d2c5b..0000000
--- a/patches/binutils-2.19/0001-HACK-disable-some-docs-to-avoid-using-makeinfo.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Mon, 10 Jun 2013 09:11:36 +0200
-Subject: [PATCH] HACK: disable some docs to avoid using makeinfo
-
-Patching Makefile.in because running automake fails.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- bfd/Makefile.in | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/bfd/Makefile.in b/bfd/Makefile.in
-index 54edfc6..bd8c202 100644
---- a/bfd/Makefile.in
-+++ b/bfd/Makefile.in
-@@ -275,7 +275,6 @@ RELEASE = y
- INCDIR = $(srcdir)/../include
- CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
- MKDEP = gcc -MM
--SUBDIRS = doc po
- bfddocdir = doc
- bfdlib_LTLIBRARIES = libbfd.la
- AM_CFLAGS = $(WARN_CFLAGS)
diff --git a/patches/binutils-2.19/series b/patches/binutils-2.19/series
deleted file mode 100644
index ff7a892..0000000
--- a/patches/binutils-2.19/series
+++ /dev/null
@@ -1,4 +0,0 @@
-# generated by git-ptx-patches
-#tag:base --start-number 1
-0001-HACK-disable-some-docs-to-avoid-using-makeinfo.patch
-# 5ad8282d13b48de2214ed37cb52a339c - git-ptx-patches magic
diff --git a/patches/binutils-2.21.1a/0001-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch b/patches/binutils-2.21.1a/0001-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
deleted file mode 100644
index 2701694..0000000
--- a/patches/binutils-2.21.1a/0001-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Tue, 1 Nov 2011 16:45:55 +0100
-Subject: [PATCH] Only generate an RPATH entry if LD_RUN_PATH is not empty,
- for cases where -rpath isn't specified.
-
-This is http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=151024
-
-This patch is still used in debian binutils 2.21.90.20111025-1
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- ld/emultempl/elf32.em | 4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
-index 62a86ca..a0f3ee0 100644
---- a/ld/emultempl/elf32.em
-+++ b/ld/emultempl/elf32.em
-@@ -1272,6 +1272,8 @@ fragment <<EOF
- && 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;
-@@ -1499,6 +1501,8 @@ gld${EMULATION_NAME}_before_allocation (void)
- rpath = command_line.rpath;
- if (rpath == NULL)
- rpath = (const char *) getenv ("LD_RUN_PATH");
-+ if ((rpath) && (strlen (rpath) == 0))
-+ rpath = NULL;
-
- for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
- if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
diff --git a/patches/binutils-2.21.1a/0002-warn-on-all-TEXTRELs.patch b/patches/binutils-2.21.1a/0002-warn-on-all-TEXTRELs.patch
deleted file mode 100644
index 3be8fae..0000000
--- a/patches/binutils-2.21.1a/0002-warn-on-all-TEXTRELs.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From: unknown author <unknown.author@example.com>
-Date: Tue, 1 Nov 2011 16:44:50 +0100
-Subject: [PATCH] warn on all TEXTRELs
-
-textrels are bad for forcing copy-on-write (this affects everyone),
-and for security/runtime code generation, this affects security ppl.
-But in either case, it doesn't matter who needs textrels, it's
-the very fact that they're needed at all.
-
-2006-06-10 Ned Ludd <solar@gentoo.org>, Mike Frysinger <vapier@gentoo.org>
-
- * bfd/elflink.c (bfd_elf_final_link): Check all objects for TEXTRELs.
- * ld/ldmain.c (main): Change textrel warning default to true.
- * ld/testsuite/lib/ld-lib.exp (default_ld_simple_link): Scrub TEXTREL
- warnings from ld output.
-
-Original patch from gentoo. Also used by crosstool-ng (binutils-2.20.1a).
----
- bfd/elflink.c | 8 +++-----
- ld/ldmain.c | 1 +
- ld/testsuite/lib/ld-lib.exp | 4 ++++
- 3 files changed, 8 insertions(+), 5 deletions(-)
-
-diff --git a/bfd/elflink.c b/bfd/elflink.c
-index 9e69ec6..0396659 100644
---- a/bfd/elflink.c
-+++ b/bfd/elflink.c
-@@ -11114,14 +11114,12 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
- goto error_return;
-
- /* Check for DT_TEXTREL (late, in case the backend removes it). */
-- if (info->warn_shared_textrel && info->shared)
-+ o = bfd_get_section_by_name (dynobj, ".dynamic");
-+ if (info->warn_shared_textrel && o != NULL)
- {
- bfd_byte *dyncon, *dynconend;
-
- /* Fix up .dynamic entries. */
-- o = bfd_get_section_by_name (dynobj, ".dynamic");
-- BFD_ASSERT (o != NULL);
--
- dyncon = o->contents;
- dynconend = o->contents + o->size;
- for (; dyncon < dynconend; dyncon += bed->s->sizeof_dyn)
-@@ -11133,7 +11131,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
- if (dyn.d_tag == DT_TEXTREL)
- {
- info->callbacks->einfo
-- (_("%P: warning: creating a DT_TEXTREL in a shared object.\n"));
-+ (_("%P: warning: creating a DT_TEXTREL in object.\n"));
- break;
- }
- }
-diff --git a/ld/ldmain.c b/ld/ldmain.c
-index 96f3bda..9f88cc4 100644
---- a/ld/ldmain.c
-+++ b/ld/ldmain.c
-@@ -287,6 +287,7 @@ main (int argc, char **argv)
- emulation = get_emulation (argc, argv);
- ldemul_choose_mode (emulation);
- default_target = ldemul_choose_target (argc, argv);
-+ link_info.warn_shared_textrel = TRUE;
- config.maxpagesize = bfd_emul_get_maxpagesize (default_target);
- config.commonpagesize = bfd_emul_get_commonpagesize (default_target);
- lang_init ();
-diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
-index f444da7..f935f12 100644
---- a/ld/testsuite/lib/ld-lib.exp
-+++ b/ld/testsuite/lib/ld-lib.exp
-@@ -206,6 +206,10 @@ proc default_ld_simple_link { ld target objects } {
- # symbol, since the default linker script might use ENTRY.
- regsub -all "(^|\n)(\[^\n\]*: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output
-
-+ # Gentoo tweak:
-+ # We want to ignore TEXTREL warnings since we force enable them by default
-+ regsub -all "^lt-ld-new: warning: creating a DT_TEXTREL in object\." $exec_output "\\1" exec_output
-+
- if [string match "" $exec_output] then {
- return 1
- } else {
diff --git a/patches/binutils-2.21.1a/0003-2011-05-31-Paul-Brook-paul-codesourcery.com.patch b/patches/binutils-2.21.1a/0003-2011-05-31-Paul-Brook-paul-codesourcery.com.patch
deleted file mode 100644
index 4006573..0000000
--- a/patches/binutils-2.21.1a/0003-2011-05-31-Paul-Brook-paul-codesourcery.com.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From: Paul Brook <paul@codesourcery.com>
-Date: Tue, 31 May 2011 14:10:06 +0000
-Subject: [PATCH] 2011-05-31 Paul Brook <paul@codesourcery.com>
-
- gas/
- * config/tc-arm.c (arm_force_relocation): Resolve all pc-relative
- loads.
-
- gas/testsuite/
- * gas/arm/ldr-global.d: New test.
- * gas/arm/ldr-global.s: New test.
----
- gas/ChangeLog | 5 +++++
- gas/config/tc-arm.c | 15 +++++++++++++--
- gas/testsuite/ChangeLog | 5 +++++
- gas/testsuite/gas/arm/ldr-global.d | 14 ++++++++++++++
- gas/testsuite/gas/arm/ldr-global.s | 22 ++++++++++++++++++++++
- 5 files changed, 59 insertions(+), 2 deletions(-)
- create mode 100644 gas/testsuite/gas/arm/ldr-global.d
- create mode 100644 gas/testsuite/gas/arm/ldr-global.s
-
-diff --git a/gas/ChangeLog b/gas/ChangeLog
-index 596029f..29dd697 100644
---- a/gas/ChangeLog
-+++ b/gas/ChangeLog
-@@ -1,3 +1,8 @@
-+2011-05-31 Paul Brook <paul@codesourcery.com>
-+
-+ * config/tc-arm.c (arm_force_relocation): Resolve all pc-relative
-+ loads.
-+
- 2011-05-29 Alan Modra <amodra@gmail.com>
-
- Apply from mainline
-diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
-index 4addafc..48b7bb4 100644
---- a/gas/config/tc-arm.c
-+++ b/gas/config/tc-arm.c
-@@ -21675,14 +21675,25 @@ arm_force_relocation (struct fix * fixp)
- }
- #endif
-
-- /* Resolve these relocations even if the symbol is extern or weak. */
-+ /* Resolve these relocations even if the symbol is extern or weak.
-+ Technically this is probably wrong due to symbol preemption.
-+ In practice these relocations do not have enough range to be useful
-+ at dynamic link time, and some code (e.g. in the Linux kernel)
-+ expects these references to be resolved. */
- if (fixp->fx_r_type == BFD_RELOC_ARM_IMMEDIATE
- || fixp->fx_r_type == BFD_RELOC_ARM_OFFSET_IMM
-+ || fixp->fx_r_type == BFD_RELOC_ARM_OFFSET_IMM8
- || fixp->fx_r_type == BFD_RELOC_ARM_ADRL_IMMEDIATE
-+ || fixp->fx_r_type == BFD_RELOC_ARM_CP_OFF_IMM
-+ || fixp->fx_r_type == BFD_RELOC_ARM_CP_OFF_IMM_S2
-+ || fixp->fx_r_type == BFD_RELOC_ARM_THUMB_OFFSET
- || fixp->fx_r_type == BFD_RELOC_ARM_T32_ADD_IMM
- || fixp->fx_r_type == BFD_RELOC_ARM_T32_IMMEDIATE
- || fixp->fx_r_type == BFD_RELOC_ARM_T32_IMM12
-- || fixp->fx_r_type == BFD_RELOC_ARM_T32_ADD_PC12)
-+ || fixp->fx_r_type == BFD_RELOC_ARM_T32_OFFSET_IMM
-+ || fixp->fx_r_type == BFD_RELOC_ARM_T32_ADD_PC12
-+ || fixp->fx_r_type == BFD_RELOC_ARM_T32_CP_OFF_IMM
-+ || fixp->fx_r_type == BFD_RELOC_ARM_T32_CP_OFF_IMM_S2)
- return 0;
-
- /* Always leave these relocations for the linker. */
-diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
-index 356db30..b3d10ec 100644
---- a/gas/testsuite/ChangeLog
-+++ b/gas/testsuite/ChangeLog
-@@ -1,3 +1,8 @@
-+2011-05-31 Paul Brook <paul@codesourcery.com>
-+
-+ * gas/arm/ldr-global.d: New test.
-+ * gas/arm/ldr-global.s: New test.
-+
- 2011-05-29 Alan Modra <amodra@gmail.com>
-
- Apply from mainline
-diff --git a/gas/testsuite/gas/arm/ldr-global.d b/gas/testsuite/gas/arm/ldr-global.d
-new file mode 100644
-index 0000000..3528d4e
---- /dev/null
-+++ b/gas/testsuite/gas/arm/ldr-global.d
-@@ -0,0 +1,14 @@
-+#objdump: -dr --prefix-addresses --show-raw-insn
-+#name: PC-relative LDR from global
-+
-+.*: +file format .*arm.*
-+
-+Disassembly of section .text:
-+0+00 <[^>]*> e59f0010 ? ldr r0, \[pc, #16\] ; 0+18 <[^>]*>
-+0+04 <[^>]*> e1df00fc ? ldrsh r0, \[pc, #12\] ; 0+18 <[^>]*>
-+0+08 <[^>]*> ed9f0a02 ? vldr s0, \[pc, #8\] ; 0+18 <[^>]*>
-+0+0c <[^>]*> 4802 ? ldr r0, \[pc, #8\] ; \(0+18 <[^>]*>\)
-+0+0e <[^>]*> 4802 ? ldr r0, \[pc, #8\] ; \(0+18 <[^>]*>\)
-+0+10 <[^>]*> ed9f 0a01 ? vldr s0, \[pc, #4\] ; 0+18 <[^>]*>
-+0+14 <[^>]*> f8df 0000 ? ldr\.w r0, \[pc\] ; 0+18 <[^>]*>
-+#...
-diff --git a/gas/testsuite/gas/arm/ldr-global.s b/gas/testsuite/gas/arm/ldr-global.s
-new file mode 100644
-index 0000000..ef3960c
---- /dev/null
-+++ b/gas/testsuite/gas/arm/ldr-global.s
-@@ -0,0 +1,22 @@
-+@ Test pc-relative loads from global objects defined in the same text segment.
-+@ See tc-arm.c:arm_force_relocation.
-+.arch armv7-a
-+.fpu vfp
-+.syntax unified
-+.text
-+foo_arm:
-+ ldr r0, bar
-+ ldrsh r0, bar
-+ vldr s0, bar
-+.thumb
-+foo_thumb:
-+ ldr r0, bar
-+ ldr.n r0, bar
-+ vldr s0, bar
-+ ldr.w r0, bar
-+
-+.align 2
-+.globl bar
-+bar:
-+ .word 42
-+
diff --git a/patches/binutils-2.21.1a/series b/patches/binutils-2.21.1a/series
deleted file mode 100644
index bab2133..0000000
--- a/patches/binutils-2.21.1a/series
+++ /dev/null
@@ -1,6 +0,0 @@
-# generated by git-ptx-patches
-#tag:base --start-number 1
-0001-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
-0002-warn-on-all-TEXTRELs.patch
-0003-2011-05-31-Paul-Brook-paul-codesourcery.com.patch
-# df7383a34a1fb7245bbcc4a517757b0a - git-ptx-patches magic
diff --git a/patches/binutils-2.21/gentoo/08_all_binutils-RPATH_ENVVAR-smack.patch b/patches/binutils-2.21/gentoo/08_all_binutils-RPATH_ENVVAR-smack.patch
deleted file mode 100644
index 63b1c2e..0000000
--- a/patches/binutils-2.21/gentoo/08_all_binutils-RPATH_ENVVAR-smack.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-http://sourceware.org/ml/binutils/2007-07/msg00401.html
-http://sourceware.org/bugzilla/show_bug.cgi?id=4970
-
----
- configure | 1 +
- 1 file changed, 1 insertion(+)
-
-Index: binutils-2.21/configure
-===================================================================
---- binutils-2.21.orig/configure
-+++ binutils-2.21/configure
-@@ -5530,6 +5530,7 @@ case $with_host_libstdcxx in
- as_fn_error "-with-host-libstdcxx needs an argument" "$LINENO" 5
- ;;
- esac
-+RPATH_ENVVAR="cant_touch_this_nah_nah_nah"
-
- # Linker flags to use for stage1 or when not boostrapping.
-
diff --git a/patches/binutils-2.21/gentoo/30_all_binutils-multitarget-fixup.patch b/patches/binutils-2.21/gentoo/30_all_binutils-multitarget-fixup.patch
deleted file mode 100644
index ff815e1..0000000
--- a/patches/binutils-2.21/gentoo/30_all_binutils-multitarget-fixup.patch
+++ /dev/null
@@ -1,234 +0,0 @@
-Fix from upstream for --enable-targets=all on an x86_64 multilib system.
-
-http://sourceware.org/ml/binutils/2007-09/msg00137.html
-http://sourceware.org/ml/binutils/2007-09/msg00162.html
-
-2007-09-14 Alan Modra <amodra@bigpond.net.au>
-
- * format.c (bfd_check_format_matches): Record matching targets even
- when "matching" is NULL to allow bfd_associated_vector matches.
- Consolidate error return code. Consolidate ok return code. Always
- restore original target and format on error.
-
----
- bfd/format.c | 112 ++++++++++++++++++-----------------------------------------
- 1 file changed, 35 insertions(+), 77 deletions(-)
-
-Index: binutils-2.18/bfd/format.c
-===================================================================
---- binutils-2.18.orig/bfd/format.c
-+++ binutils-2.18/bfd/format.c
-@@ -125,6 +125,9 @@ bfd_check_format_matches (bfd *abfd, bfd
- int match_count;
- int ar_match_index;
-
-+ if (matching != NULL)
-+ *matching = NULL;
-+
- if (!bfd_read_p (abfd)
- || (unsigned int) abfd->format >= (unsigned int) bfd_type_end)
- {
-@@ -141,11 +144,10 @@ bfd_check_format_matches (bfd *abfd, bfd
- match_count = 0;
- ar_match_index = _bfd_target_vector_entries;
-
-- if (matching)
-+ if (matching != NULL || *bfd_associated_vector != NULL)
- {
- bfd_size_type amt;
-
-- *matching = NULL;
- amt = sizeof (*matching_vector) * 2 * _bfd_target_vector_entries;
- matching_vector = bfd_malloc (amt);
- if (!matching_vector)
-@@ -162,31 +164,12 @@ bfd_check_format_matches (bfd *abfd, bfd
- if (!abfd->target_defaulted)
- {
- if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) /* rewind! */
-- {
-- if (matching)
-- free (matching_vector);
-- return FALSE;
-- }
-+ goto err_ret;
-
- right_targ = BFD_SEND_FMT (abfd, _bfd_check_format, (abfd));
-
- if (right_targ)
-- {
-- abfd->xvec = right_targ; /* Set the target as returned. */
--
-- if (matching)
-- free (matching_vector);
--
-- /* If the file was opened for update, then `output_has_begun'
-- some time ago when the file was created. Do not recompute
-- sections sizes or alignments in _bfd_set_section_contents.
-- We can not set this flag until after checking the format,
-- because it will interfere with creation of BFD sections. */
-- if (abfd->direction == both_direction)
-- abfd->output_has_begun = TRUE;
--
-- return TRUE; /* File position has moved, BTW. */
-- }
-+ goto ok_ret;
-
- /* For a long time the code has dropped through to check all
- targets if the specified target was wrong. I don't know why,
-@@ -201,17 +184,7 @@ bfd_check_format_matches (bfd *abfd, bfd
- this sort, I changed this test to check only for the binary
- target. */
- if (format == bfd_archive && save_targ == &binary_vec)
-- {
-- abfd->xvec = save_targ;
-- abfd->format = bfd_unknown;
--
-- if (matching)
-- free (matching_vector);
--
-- bfd_set_error (bfd_error_file_not_recognized);
--
-- return FALSE;
-- }
-+ goto err_unrecog;
- }
-
- for (target = bfd_target_vector; *target != NULL; target++)
-@@ -227,11 +200,7 @@ bfd_check_format_matches (bfd *abfd, bfd
- abfd->xvec = *target; /* Change BFD's target temporarily. */
-
- if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
-- {
-- if (matching)
-- free (matching_vector);
-- return FALSE;
-- }
-+ goto err_ret;
-
- /* If _bfd_check_format neglects to set bfd_error, assume
- bfd_error_wrong_format. We didn't used to even pay any
-@@ -255,9 +224,8 @@ bfd_check_format_matches (bfd *abfd, bfd
- break;
- }
-
-- if (matching)
-+ if (matching_vector)
- matching_vector[match_count] = temp;
--
- match_count++;
- }
- else if ((err = bfd_get_error ()) == bfd_error_wrong_object_format
-@@ -268,20 +236,12 @@ bfd_check_format_matches (bfd *abfd, bfd
- no better matches. */
- if (ar_right_targ != bfd_default_vector[0])
- ar_right_targ = *target;
-- if (matching)
-+ if (matching_vector)
- matching_vector[ar_match_index] = *target;
- ar_match_index++;
- }
- else if (err != bfd_error_wrong_format)
-- {
-- abfd->xvec = save_targ;
-- abfd->format = bfd_unknown;
--
-- if (matching)
-- free (matching_vector);
--
-- return FALSE;
-- }
-+ goto err_ret;
- }
-
- if (match_count == 0)
-@@ -297,16 +257,14 @@ bfd_check_format_matches (bfd *abfd, bfd
- {
- match_count = ar_match_index - _bfd_target_vector_entries;
-
-- if (matching && match_count > 1)
-+ if (matching_vector && match_count > 1)
- memcpy (matching_vector,
- matching_vector + _bfd_target_vector_entries,
- sizeof (*matching_vector) * match_count);
- }
- }
-
-- if (match_count > 1
-- && bfd_associated_vector != NULL
-- && matching)
-+ if (match_count > 1)
- {
- const bfd_target * const *assoc = bfd_associated_vector;
-
-@@ -328,11 +286,9 @@ bfd_check_format_matches (bfd *abfd, bfd
-
- if (match_count == 1)
- {
-+ ok_ret:
- abfd->xvec = right_targ; /* Change BFD's target permanently. */
-
-- if (matching)
-- free (matching_vector);
--
- /* If the file was opened for update, then `output_has_begun'
- some time ago when the file was created. Do not recompute
- sections sizes or alignments in _bfd_set_section_contents.
-@@ -341,37 +297,39 @@ bfd_check_format_matches (bfd *abfd, bfd
- if (abfd->direction == both_direction)
- abfd->output_has_begun = TRUE;
-
-+ if (matching_vector)
-+ free (matching_vector);
- return TRUE; /* File position has moved, BTW. */
- }
-
-- abfd->xvec = save_targ; /* Restore original target type. */
-- abfd->format = bfd_unknown; /* Restore original format. */
--
- if (match_count == 0)
- {
-+ err_unrecog:
- bfd_set_error (bfd_error_file_not_recognized);
--
-- if (matching)
-+ err_ret:
-+ abfd->xvec = save_targ;
-+ abfd->format = bfd_unknown;
-+ if (matching_vector)
- free (matching_vector);
-+ return FALSE;
- }
-- else
-- {
-- bfd_set_error (bfd_error_file_ambiguously_recognized);
-
-- if (matching)
-+ abfd->xvec = save_targ; /* Restore original target type. */
-+ abfd->format = bfd_unknown; /* Restore original format. */
-+ bfd_set_error (bfd_error_file_ambiguously_recognized);
-+
-+ if (matching)
-+ {
-+ *matching = (char **) matching_vector;
-+ matching_vector[match_count] = NULL;
-+ /* Return target names. This is a little nasty. Maybe we
-+ should do another bfd_malloc? */
-+ while (--match_count >= 0)
- {
-- *matching = (char **) matching_vector;
-- matching_vector[match_count] = NULL;
-- /* Return target names. This is a little nasty. Maybe we
-- should do another bfd_malloc? */
-- while (--match_count >= 0)
-- {
-- const char *name = matching_vector[match_count]->name;
-- *(const char **) &matching_vector[match_count] = name;
-- }
-+ const char *name = matching_vector[match_count]->name;
-+ *(const char **) &matching_vector[match_count] = name;
- }
- }
--
- return FALSE;
- }
-
diff --git a/patches/binutils-2.21/gentoo/33_all_binutils-gnu-relro-fixups.patch b/patches/binutils-2.21/gentoo/33_all_binutils-gnu-relro-fixups.patch
deleted file mode 100644
index b734cfd..0000000
--- a/patches/binutils-2.21/gentoo/33_all_binutils-gnu-relro-fixups.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-http://bugs.gentoo.org/192584
-http://sourceware.org/bugzilla/show_bug.cgi?id=5037
-http://sourceware.org/ml/binutils/2007-09/msg00208.html
-
-bfd/
-
-2007-09-16 H.J. Lu <hongjiu.lu@intel.com>
-
- PR binutils/3281
- PR binutils/5037
- * elf-bfd.h (elf_obj_tdata): Remove relro.
-
- * elf.c (get_program_header_size): Check info->relro instead
- of elf_tdata (abfd)->relro.
- (_bfd_elf_map_sections_to_segments): Likewise.
- (assign_file_positions_for_load_sections): Don't set
- PT_GNU_RELRO segment alignment here.
- (assign_file_positions_for_non_load_sections): Properly set up
- PT_GNU_RELRO segment for copying executable/shared library.
- (rewrite_elf_program_header): Remove PT_GNU_RELRO segment.
- (copy_elf_program_header): Set p_size and p_size_valid fields for
- PT_GNU_RELRO segment.
-
-include/elf/
-
-2007-09-16 H.J. Lu <hongjiu.lu@intel.com>
-
- PR binutils/3281
- PR binutils/5037
- * internal.h (elf_segment_map): Add p_size and p_size_valid.
- (ELF_IS_SECTION_IN_SEGMENT): Allow SHF_TLS sections in
- PT_GNU_RELRO segments.
-
-ld/
-
-2007-09-16 H.J. Lu <hongjiu.lu@intel.com>
-
- PR binutils/3281
- PR binutils/5037
- * ldexp.h (ldexp_control): Add relro, relro_start_stat and
- relro_end_stat.
-
- * ldexp.c (fold_binary): Set expld.dataseg.relro to
- exp_dataseg_relro_start or exp_dataseg_relro_end when
- seeing DATA_SEGMENT_ALIGN or DATA_SEGMENT_RELRO_END,
- respectively.
-
- * ldlang.c (lang_size_sections_1): Properly set
- expld.dataseg.relro_start_stat and
- expld.dataseg.relro_end_stat.
- (find_relro_section_callback): New function.
- (lang_find_relro_sections_1): Likewise.
- (lang_find_relro_sections): Likewise.
- (lang_process): Call lang_find_relro_sections for
- non-relocatable link.
-
-ld/testsuite/
-
-2007-09-16 H.J. Lu <hongjiu.lu@intel.com>
-
- PR binutils/3281
- PR binutils/5037
- * ld-elf/binutils.exp: Update "-z relro" tests to use relro1.s.
- Add "-z relro" tests with relro2.s. Add "-z relro" tests with
- TLS for objcopy.
-
- * ld-elf/relro1.s: New file.
- * ld-elf/relro2.s: Likewise.
-
----
- bfd/elf.c | 11 +++++++++++
- ld/ldexp.h | 2 ++
- 2 files changed, 13 insertions(+)
-
-Index: binutils-2.20.1/bfd/elf.c
-===================================================================
---- binutils-2.20.1.orig/bfd/elf.c
-+++ binutils-2.20.1/bfd/elf.c
-@@ -5398,6 +5398,17 @@ rewrite_elf_program_header (bfd *ibfd, b
- map->p_paddr_valid = p_paddr_valid;
- }
-
-+ if (map->p_type == PT_GNU_RELRO
-+ && segment->p_filesz == segment->p_memsz)
-+ {
-+ /* The PT_GNU_RELRO segment may contain the first a few
-+ bytes in the .got.plt section even if the whole .got.plt
-+ section isn't in the PT_GNU_RELRO segment. We won't
-+ change the size of the PT_GNU_RELRO segment. */
-+ map->p_size = segment->p_filesz;
-+ map->p_size_valid = 1;
-+ }
-+
- /* Determine if this segment contains the ELF file header
- and if it contains the program headers themselves. */
- map->includes_filehdr = (segment->p_offset == 0
-Index: binutils-2.20.1/ld/ldexp.h
-===================================================================
---- binutils-2.20.1.orig/ld/ldexp.h
-+++ binutils-2.20.1/ld/ldexp.h
-@@ -117,6 +117,8 @@ enum relro_enum {
- exp_dataseg_relro_end,
- };
-
-+union lang_statement_union;
-+
- struct ldexp_control {
- /* Modify expression evaluation depending on this. */
- lang_phase_type phase;
diff --git a/patches/binutils-2.21/gentoo/42_all_012_check_ldrunpath_length.patch b/patches/binutils-2.21/gentoo/42_all_012_check_ldrunpath_length.patch
deleted file mode 100644
index b8c8eb6..0000000
--- a/patches/binutils-2.21/gentoo/42_all_012_check_ldrunpath_length.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Subject: Only generate an RPATH if LD_RUN_PATH is not empty
-
-This is http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=151024.
-
-FIXME: Is this patch still necessary?
-
----
-
-#!/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@
-
----
- ld/emultempl/elf32.em | 4 ++++
- 1 file changed, 4 insertions(+)
-
-Index: binutils-2.21/ld/emultempl/elf32.em
-===================================================================
---- binutils-2.21.orig/ld/emultempl/elf32.em
-+++ binutils-2.21/ld/emultempl/elf32.em
-@@ -1270,6 +1270,8 @@ fragment <<EOF
- && 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;
-@@ -1497,6 +1499,8 @@ gld${EMULATION_NAME}_before_allocation (
- rpath = command_line.rpath;
- if (rpath == NULL)
- rpath = (const char *) getenv ("LD_RUN_PATH");
-+ if ((rpath) && (strlen (rpath) == 0))
-+ rpath = NULL;
-
- for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
- if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
diff --git a/patches/binutils-2.21/gentoo/66_all_binutils-2.17.50.0.2-warn-textrel.patch b/patches/binutils-2.21/gentoo/66_all_binutils-2.17.50.0.2-warn-textrel.patch
deleted file mode 100644
index ffda581..0000000
--- a/patches/binutils-2.21/gentoo/66_all_binutils-2.17.50.0.2-warn-textrel.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-textrels are bad for forcing copy-on-write (this affects everyone),
-and for security/runtime code generation, this affects security ppl.
-But in either case, it doesn't matter who needs textrels, it's
-the very fact that they're needed at all.
-
-2006-06-10 Ned Ludd <solar@gentoo.org>, Mike Frysinger <vapier@gentoo.org>
-
- * bfd/elflink.c (bfd_elf_final_link): Check all objects for TEXTRELs.
- * ld/ldmain.c (main): Change textrel warning default to true.
- * ld/testsuite/lib/ld-lib.exp (default_ld_simple_link): Scrub TEXTREL
- warnings from ld output.
-
----
- bfd/elflink.c | 8 +++-----
- ld/ldmain.c | 1 +
- ld/testsuite/lib/ld-lib.exp | 4 ++++
- 3 files changed, 8 insertions(+), 5 deletions(-)
-
-Index: binutils-2.21/bfd/elflink.c
-===================================================================
---- binutils-2.21.orig/bfd/elflink.c
-+++ binutils-2.21/bfd/elflink.c
-@@ -11080,14 +11080,12 @@ bfd_elf_final_link (bfd *abfd, struct bf
- goto error_return;
-
- /* Check for DT_TEXTREL (late, in case the backend removes it). */
-- if (info->warn_shared_textrel && info->shared)
-+ o = bfd_get_section_by_name (dynobj, ".dynamic");
-+ if (info->warn_shared_textrel && o != NULL)
- {
- bfd_byte *dyncon, *dynconend;
-
- /* Fix up .dynamic entries. */
-- o = bfd_get_section_by_name (dynobj, ".dynamic");
-- BFD_ASSERT (o != NULL);
--
- dyncon = o->contents;
- dynconend = o->contents + o->size;
- for (; dyncon < dynconend; dyncon += bed->s->sizeof_dyn)
-@@ -11099,7 +11097,7 @@ bfd_elf_final_link (bfd *abfd, struct bf
- if (dyn.d_tag == DT_TEXTREL)
- {
- info->callbacks->einfo
-- (_("%P: warning: creating a DT_TEXTREL in a shared object.\n"));
-+ (_("%P: warning: creating a DT_TEXTREL in object.\n"));
- break;
- }
- }
-Index: binutils-2.21/ld/ldmain.c
-===================================================================
---- binutils-2.21.orig/ld/ldmain.c
-+++ binutils-2.21/ld/ldmain.c
-@@ -287,6 +287,7 @@ main (int argc, char **argv)
- emulation = get_emulation (argc, argv);
- ldemul_choose_mode (emulation);
- default_target = ldemul_choose_target (argc, argv);
-+ link_info.warn_shared_textrel = TRUE;
- config.maxpagesize = bfd_emul_get_maxpagesize (default_target);
- config.commonpagesize = bfd_emul_get_commonpagesize (default_target);
- lang_init ();
-Index: binutils-2.21/ld/testsuite/lib/ld-lib.exp
-===================================================================
---- binutils-2.21.orig/ld/testsuite/lib/ld-lib.exp
-+++ binutils-2.21/ld/testsuite/lib/ld-lib.exp
-@@ -199,6 +199,10 @@ proc default_ld_simple_link { ld target
- # symbol, since the default linker script might use ENTRY.
- regsub -all "(^|\n)(\[^\n\]*: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output
-
-+ # Gentoo tweak:
-+ # We want to ignore TEXTREL warnings since we force enable them by default
-+ regsub -all "^lt-ld-new: warning: creating a DT_TEXTREL in object\." $exec_output "\\1" exec_output
-+
- if [string match "" $exec_output] then {
- return 1
- } else {
diff --git a/patches/binutils-2.21/gentoo/76_all_only-use-new-ld-dtags.patch.disabled b/patches/binutils-2.21/gentoo/76_all_only-use-new-ld-dtags.patch.disabled
deleted file mode 100644
index 2560463..0000000
--- a/patches/binutils-2.21/gentoo/76_all_only-use-new-ld-dtags.patch.disabled
+++ /dev/null
@@ -1,31 +0,0 @@
-Don't generate RPATH if we're going to be generating RUNPATH.
-
-need to ponder what ramifications this has before enabling it
-
----
- bfd/elflink.c | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
-
-Index: binutils-2.21/bfd/elflink.c
-===================================================================
---- binutils-2.21.orig/bfd/elflink.c
-+++ binutils-2.21/bfd/elflink.c
-@@ -5629,11 +5629,15 @@ bfd_elf_size_dynamic_sections (bfd *outp
-
- indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, rpath,
- TRUE);
-- if (indx == (bfd_size_type) -1
-- || !_bfd_elf_add_dynamic_entry (info, DT_RPATH, indx))
-+ if (indx == (bfd_size_type) -1)
- return FALSE;
-
-- if (info->new_dtags)
-+ if (!info->new_dtags)
-+ {
-+ if (!_bfd_elf_add_dynamic_entry (info, DT_RPATH, indx))
-+ return FALSE;
-+ }
-+ else
- {
- _bfd_elf_strtab_addref (elf_hash_table (info)->dynstr, indx);
- if (!_bfd_elf_add_dynamic_entry (info, DT_RUNPATH, indx))
diff --git a/patches/binutils-2.21/gentoo/91_all_libiberty-pic.patch b/patches/binutils-2.21/gentoo/91_all_libiberty-pic.patch
deleted file mode 100644
index f3ab4f1..0000000
--- a/patches/binutils-2.21/gentoo/91_all_libiberty-pic.patch
+++ /dev/null
@@ -1,16 +0,0 @@
----
- libiberty/Makefile.in | 1 +
- 1 file changed, 1 insertion(+)
-
-Index: binutils-2.21/libiberty/Makefile.in
-===================================================================
---- binutils-2.21.orig/libiberty/Makefile.in
-+++ binutils-2.21/libiberty/Makefile.in
-@@ -246,6 +246,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA
- $(AR) $(AR_FLAGS) $(TARGETLIB) \
- $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
- $(RANLIB) $(TARGETLIB); \
-+ cp $(TARGETLIB) ../ ; \
- cd ..; \
- else true; fi
-
diff --git a/patches/binutils-2.21/gentoo/no_63_all_binutils-2.18-pt-pax-flags-20070828.patch b/patches/binutils-2.21/gentoo/no_63_all_binutils-2.18-pt-pax-flags-20070828.patch
deleted file mode 100644
index 4c0c1a5..0000000
--- a/patches/binutils-2.21/gentoo/no_63_all_binutils-2.18-pt-pax-flags-20070828.patch
+++ /dev/null
@@ -1,263 +0,0 @@
----
- bfd/elf-bfd.h | 3 +++
- bfd/elf.c | 27 ++++++++++++++++++++++++++-
- bfd/elflink.c | 24 +++++++++++++++++++++---
- binutils/readelf.c | 1 +
- include/bfdlink.h | 8 ++++++++
- include/elf/common.h | 16 ++++++++++++++++
- ld/emultempl/elf32.em | 12 ++++++++++++
- ld/ldgram.y | 2 ++
- 8 files changed, 89 insertions(+), 4 deletions(-)
-
-Index: binutils-2.18/bfd/elf-bfd.h
-===================================================================
---- binutils-2.18.orig/bfd/elf-bfd.h
-+++ binutils-2.18/bfd/elf-bfd.h
-@@ -1428,6 +1428,9 @@ struct elf_obj_tdata
- /* Segment flags for the PT_GNU_STACK segment. */
- unsigned int stack_flags;
-
-+ /* Segment flags for the PT_PAX_FLAGS segment. */
-+ unsigned int pax_flags;
-+
- /* Symbol version definitions in external objects. */
- Elf_Internal_Verdef *verdef;
-
-Index: binutils-2.18/bfd/elf.c
-===================================================================
---- binutils-2.18.orig/bfd/elf.c
-+++ binutils-2.18/bfd/elf.c
-@@ -1085,6 +1085,7 @@ get_segment_type (unsigned int p_type)
- case PT_GNU_EH_FRAME: pt = "EH_FRAME"; break;
- case PT_GNU_STACK: pt = "STACK"; break;
- case PT_GNU_RELRO: pt = "RELRO"; break;
-+ case PT_PAX_FLAGS: pt = "PAX_FLAGS"; break;
- default: pt = NULL; break;
- }
- return pt;
-@@ -2361,6 +2362,9 @@ bfd_section_from_phdr (bfd *abfd, Elf_In
- case PT_GNU_RELRO:
- return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "relro");
-
-+ case PT_PAX_FLAGS:
-+ return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "pax_flags");
-+
- default:
- /* Check for any processor-specific program segment types. */
- bed = get_elf_backend_data (abfd);
-@@ -3341,6 +3345,11 @@ get_program_header_size (bfd *abfd, stru
- ++segs;
- }
-
-+ {
-+ /* We need a PT_PAX_FLAGS segment. */
-+ ++segs;
-+ }
-+
- for (s = abfd->sections; s != NULL; s = s->next)
- {
- if ((s->flags & SEC_LOAD) != 0
-@@ -3868,6 +3877,20 @@ _bfd_elf_map_sections_to_segments (bfd *
- pm = &m->next;
- }
-
-+ {
-+ amt = sizeof (struct elf_segment_map);
-+ m = bfd_zalloc (abfd, amt);
-+ if (m == NULL)
-+ goto error_return;
-+ m->next = NULL;
-+ m->p_type = PT_PAX_FLAGS;
-+ m->p_flags = elf_tdata (abfd)->pax_flags;
-+ m->p_flags_valid = 1;
-+
-+ *pm = m;
-+ pm = &m->next;
-+ }
-+
- free (sections);
- elf_tdata (abfd)->segment_map = mfirst;
- }
-@@ -5043,7 +5066,8 @@ rewrite_elf_program_header (bfd *ibfd, b
- 6. PT_TLS segment includes only SHF_TLS sections.
- 7. SHF_TLS sections are only in PT_TLS or PT_LOAD segments.
- 8. PT_DYNAMIC should not contain empty sections at the beginning
-- (with the possible exception of .dynamic). */
-+ (with the possible exception of .dynamic).
-+ 9. PT_PAX_FLAGS segments does not include any sections. */
- #define IS_SECTION_IN_INPUT_SEGMENT(section, segment, bed) \
- ((((segment->p_paddr \
- ? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \
-@@ -5051,6 +5075,7 @@ rewrite_elf_program_header (bfd *ibfd, b
- && (section->flags & SEC_ALLOC) != 0) \
- || IS_COREFILE_NOTE (segment, section)) \
- && segment->p_type != PT_GNU_STACK \
-+ && segment->p_type != PT_PAX_FLAGS \
- && (segment->p_type != PT_TLS \
- || (section->flags & SEC_THREAD_LOCAL)) \
- && (segment->p_type == PT_LOAD \
-Index: binutils-2.18/bfd/elflink.c
-===================================================================
---- binutils-2.18.orig/bfd/elflink.c
-+++ binutils-2.18/bfd/elflink.c
-@@ -5327,16 +5327,30 @@ bfd_elf_size_dynamic_sections (bfd *outp
- return TRUE;
-
- bed = get_elf_backend_data (output_bfd);
-+ elf_tdata (output_bfd)->pax_flags = PF_NORANDEXEC;
-+
-+ if (info->execheap)
-+ elf_tdata (output_bfd)->pax_flags |= PF_NOMPROTECT;
-+ else if (info->noexecheap)
-+ elf_tdata (output_bfd)->pax_flags |= PF_MPROTECT;
-+
- if (info->execstack)
-- elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X;
-+ {
-+ elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X;
-+ elf_tdata (output_bfd)->pax_flags |= PF_EMUTRAMP;
-+ }
- else if (info->noexecstack)
-- elf_tdata (output_bfd)->stack_flags = PF_R | PF_W;
-+ {
-+ elf_tdata (output_bfd)->stack_flags = PF_R | PF_W;
-+ elf_tdata (output_bfd)->pax_flags |= PF_NOEMUTRAMP;
-+ }
- else
- {
- bfd *inputobj;
- asection *notesec = NULL;
- int exec = 0;
-
-+ elf_tdata (output_bfd)->pax_flags |= PF_NOEMUTRAMP;
- for (inputobj = info->input_bfds;
- inputobj;
- inputobj = inputobj->link_next)
-@@ -5349,7 +5363,11 @@ bfd_elf_size_dynamic_sections (bfd *outp
- if (s)
- {
- if (s->flags & SEC_CODE)
-- exec = PF_X;
-+ {
-+ elf_tdata (output_bfd)->pax_flags &= ~PF_NOEMUTRAMP;
-+ elf_tdata (output_bfd)->pax_flags |= PF_EMUTRAMP;
-+ exec = PF_X;
-+ }
- notesec = s;
- }
- else if (bed->default_execstack)
-Index: binutils-2.18/binutils/readelf.c
-===================================================================
---- binutils-2.18.orig/binutils/readelf.c
-+++ binutils-2.18/binutils/readelf.c
-@@ -2469,6 +2469,7 @@ get_segment_type (unsigned long p_type)
- return "GNU_EH_FRAME";
- case PT_GNU_STACK: return "GNU_STACK";
- case PT_GNU_RELRO: return "GNU_RELRO";
-+ case PT_PAX_FLAGS: return "PAX_FLAGS";
-
- default:
- if ((p_type >= PT_LOPROC) && (p_type <= PT_HIPROC))
-Index: binutils-2.18/include/bfdlink.h
-===================================================================
---- binutils-2.18.orig/include/bfdlink.h
-+++ binutils-2.18/include/bfdlink.h
-@@ -321,6 +321,14 @@ struct bfd_link_info
- /* TRUE if PT_GNU_RELRO segment should be created. */
- unsigned int relro: 1;
-
-+ /* TRUE if PT_PAX_FLAGS segment should be created with PF_NOMPROTECT
-+ flags. */
-+ unsigned int execheap: 1;
-+
-+ /* TRUE if PT_PAX_FLAGS segment should be created with PF_MPROTECT
-+ flags. */
-+ unsigned int noexecheap: 1;
-+
- /* TRUE if we should warn when adding a DT_TEXTREL to a shared object. */
- unsigned int warn_shared_textrel: 1;
-
-Index: binutils-2.18/include/elf/common.h
-===================================================================
---- binutils-2.18.orig/include/elf/common.h
-+++ binutils-2.18/include/elf/common.h
-@@ -309,6 +309,7 @@
- #define PT_SUNW_EH_FRAME PT_GNU_EH_FRAME /* Solaris uses the same value */
- #define PT_GNU_STACK (PT_LOOS + 0x474e551) /* Stack flags */
- #define PT_GNU_RELRO (PT_LOOS + 0x474e552) /* Read-only after relocation */
-+#define PT_PAX_FLAGS (PT_LOOS + 0x5041580) /* PaX flags */
-
- /* Program segment permissions, in program header p_flags field. */
-
-@@ -319,6 +320,21 @@
- #define PF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */
- #define PF_MASKPROC 0xF0000000 /* Processor-specific reserved bits */
-
-+/* Flags to control PaX behavior. */
-+
-+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */
-+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */
-+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */
-+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */
-+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */
-+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */
-+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */
-+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */
-+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */
-+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */
-+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */
-+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */
-+
- /* Values for section header, sh_type field. */
-
- #define SHT_NULL 0 /* Section header table entry unused */
-Index: binutils-2.18/ld/emultempl/elf32.em
-===================================================================
---- binutils-2.18.orig/ld/emultempl/elf32.em
-+++ binutils-2.18/ld/emultempl/elf32.em
-@@ -2136,6 +2136,16 @@ fragment <<EOF
- link_info.noexecstack = TRUE;
- link_info.execstack = FALSE;
- }
-+ else if (strcmp (optarg, "execheap") == 0)
-+ {
-+ link_info.execheap = TRUE;
-+ link_info.noexecheap = FALSE;
-+ }
-+ else if (strcmp (optarg, "noexecheap") == 0)
-+ {
-+ link_info.noexecheap = TRUE;
-+ link_info.execheap = FALSE;
-+ }
- EOF
-
- if test -n "$COMMONPAGESIZE"; then
-@@ -2209,6 +2219,7 @@ fragment <<EOF
- fprintf (file, _(" -z combreloc\t\tMerge dynamic relocs into one section and sort\n"));
- fprintf (file, _(" -z defs\t\tReport unresolved symbols in object files.\n"));
- fprintf (file, _(" -z execstack\t\tMark executable as requiring executable stack\n"));
-+ fprintf (file, _(" -z execheap\t\tMark executable as requiring executable heap\n"));
- fprintf (file, _(" -z initfirst\t\tMark DSO to be initialized first at runtime\n"));
- fprintf (file, _(" -z interpose\t\tMark object to interpose all DSOs but executable\n"));
- fprintf (file, _(" -z lazy\t\tMark object lazy runtime binding (default)\n"));
-@@ -2221,6 +2232,7 @@ fragment <<EOF
- fprintf (file, _(" -z nodlopen\t\tMark DSO not available to dlopen\n"));
- fprintf (file, _(" -z nodump\t\tMark DSO not available to dldump\n"));
- fprintf (file, _(" -z noexecstack\tMark executable as not requiring executable stack\n"));
-+ fprintf (file, _(" -z noexecheap\tMark executable as not requiring executable heap\n"));
- EOF
-
- if test -n "$COMMONPAGESIZE"; then
-Index: binutils-2.18/ld/ldgram.y
-===================================================================
---- binutils-2.18.orig/ld/ldgram.y
-+++ binutils-2.18/ld/ldgram.y
-@@ -1099,6 +1099,8 @@ phdr_type:
- $$ = exp_intop (0x6474e550);
- else if (strcmp (s, "PT_GNU_STACK") == 0)
- $$ = exp_intop (0x6474e551);
-+ else if (strcmp (s, "PT_PAX_FLAGS") == 0)
-+ $$ = exp_intop (0x65041580);
- else
- {
- einfo (_("\
diff --git a/patches/binutils-2.21/gentoo/no_76_all_use-new-ld-dtags.patch b/patches/binutils-2.21/gentoo/no_76_all_use-new-ld-dtags.patch
deleted file mode 100644
index 84e20f7..0000000
--- a/patches/binutils-2.21/gentoo/no_76_all_use-new-ld-dtags.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- binutils/ld/ldmain.c
-+++ binutils/ld/ldmain.c
-@@ -296,6 +296,7 @@ main (int argc, char **argv)
-
- link_info.allow_undefined_version = TRUE;
- link_info.keep_memory = TRUE;
-+ link_info.new_dtags = TRUE;
- link_info.combreloc = TRUE;
- link_info.strip_discarded = TRUE;
- link_info.callbacks = &link_callbacks;
diff --git a/patches/binutils-2.21/gentoo/no_77_all_generate-gnu-hash.patch b/patches/binutils-2.21/gentoo/no_77_all_generate-gnu-hash.patch
deleted file mode 100644
index eb8da88..0000000
--- a/patches/binutils-2.21/gentoo/no_77_all_generate-gnu-hash.patch
+++ /dev/null
@@ -1,6 +0,0 @@
---- binutils/ld/ldmain.c
-+++ binutils/ld/ldmain.c
-@@ -273,2 +273,3 @@ main (int argc, char **argv)
- link_info.emit_hash = TRUE;
-+ link_info.emit_gnu_hash = TRUE;
- link_info.callbacks = &link_callbacks;
diff --git a/patches/binutils-2.21/gentoo/no_78_all_use-relro.patch b/patches/binutils-2.21/gentoo/no_78_all_use-relro.patch
deleted file mode 100644
index abd5187..0000000
--- a/patches/binutils-2.21/gentoo/no_78_all_use-relro.patch
+++ /dev/null
@@ -1,6 +0,0 @@
---- binutils/ld/ldmain.c
-+++ binutils/ld/ldmain.c
-@@ -293,2 +293,3 @@ main (int argc, char **argv)
- link_info.combreloc = TRUE;
-+ link_info.relro = TRUE;
- link_info.strip_discarded = TRUE;
diff --git a/patches/binutils-2.21/oe/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch b/patches/binutils-2.21/oe/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
deleted file mode 100644
index 1485bf4..0000000
--- a/patches/binutils-2.21/oe/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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/objcopy.c | 8 +++++---
-# 1 file changed, 5 insertions(+), 3 deletions(-)
-#
-Index: binutils-2.18/binutils/objcopy.c
-===================================================================
---- binutils-2.18.orig/binutils/objcopy.c
-+++ binutils-2.18/binutils/objcopy.c
-@@ -2787,8 +2787,9 @@ strip_main (int argc, char *argv[])
- if (preserve_dates)
- set_times (tmpname, &statbuf);
- if (output_file != tmpname)
-- smart_rename (tmpname, output_file ? output_file : argv[i],
-- preserve_dates);
-+ if (smart_rename (tmpname, output_file ? output_file : argv[i],
-+ preserve_dates))
-+ hold_status = 1;
- status = hold_status;
- }
- else
-@@ -3411,7 +3412,8 @@ copy_main (int argc, char *argv[])
- if (preserve_dates)
- set_times (tmpname, &statbuf);
- if (tmpname != output_filename)
-- smart_rename (tmpname, input_filename, preserve_dates);
-+ if (smart_rename (tmpname, input_filename, preserve_dates))
-+ status = 1;
- }
- else
- unlink_if_ordinary (tmpname);
diff --git a/patches/binutils-2.21/series b/patches/binutils-2.21/series
deleted file mode 100644
index dd28bfc..0000000
--- a/patches/binutils-2.21/series
+++ /dev/null
@@ -1,8 +0,0 @@
-# fragwürdig
-gentoo/08_all_binutils-RPATH_ENVVAR-smack.patch
-# still necessary?
-gentoo/42_all_012_check_ldrunpath_length.patch
-# ok
-gentoo/66_all_binutils-2.17.50.0.2-warn-textrel.patch
-gentoo/76_all_only-use-new-ld-dtags.patch.disabled
-gentoo/91_all_libiberty-pic.patch
diff --git a/patches/binutils-2.22/0001-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch b/patches/binutils-2.22/0001-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
deleted file mode 100644
index c0c778c..0000000
--- a/patches/binutils-2.22/0001-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Tue, 1 Nov 2011 16:45:55 +0100
-Subject: [PATCH] Only generate an RPATH entry if LD_RUN_PATH is not empty,
- for cases where -rpath isn't specified.
-
-This is http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=151024
-
-This patch is still used in debian binutils 2.21.90.20111025-1
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- ld/emultempl/elf32.em | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
-index 78a708b..53e8919 100644
---- a/ld/emultempl/elf32.em
-+++ b/ld/emultempl/elf32.em
-@@ -1273,6 +1273,8 @@ fragment <<EOF
- && 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;
-@@ -1500,6 +1502,8 @@ gld${EMULATION_NAME}_before_allocation (void)
- rpath = command_line.rpath;
- if (rpath == NULL)
- rpath = (const char *) getenv ("LD_RUN_PATH");
-+ if ((rpath) && (strlen (rpath) == 0))
-+ rpath = NULL;
-
- for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
- if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
diff --git a/patches/binutils-2.22/series b/patches/binutils-2.22/series
deleted file mode 100644
index 59e5333..0000000
--- a/patches/binutils-2.22/series
+++ /dev/null
@@ -1,4 +0,0 @@
-# generated by git-ptx-patches
-#tag:base --start-number 1
-0001-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
-# 2bc8f5caabd1d41386e8713e7cb558dc - git-ptx-patches magic
diff --git a/patches/gcc-4.6.2/0001-Volatile-bitfields-vs.-inline-asm-memory-constraints.patch b/patches/gcc-4.6.2/0001-Volatile-bitfields-vs.-inline-asm-memory-constraints.patch
deleted file mode 100644
index b262326..0000000
--- a/patches/gcc-4.6.2/0001-Volatile-bitfields-vs.-inline-asm-memory-constraints.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Wed, 23 Nov 2011 15:43:22 +0100
-Subject: [PATCH] Volatile bitfields vs. inline asm memory constraints
-
-taken from trunk.
-http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01477.html
-
-gcc/
-* expr.c (expand_expr_real_1): Only use BLKmode for volatile
-accesses which are not naturally aligned.
-
-Patch taken from Debian
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- gcc/expr.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/expr.c b/gcc/expr.c
-index c4a00aa..03f51f4 100644
---- a/gcc/expr.c
-+++ b/gcc/expr.c
-@@ -9189,8 +9189,11 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
- && modifier != EXPAND_CONST_ADDRESS
- && modifier != EXPAND_INITIALIZER)
- /* If the field is volatile, we always want an aligned
-- access. */
-- || (volatilep && flag_strict_volatile_bitfields > 0)
-+ access. Only do this if the access is not already naturally
-+ aligned, otherwise "normal" (non-bitfield) volatile fields
-+ become non-addressable. */
-+ || (volatilep && flag_strict_volatile_bitfields > 0
-+ && (bitpos % GET_MODE_ALIGNMENT (mode) != 0))
- /* If the field isn't aligned enough to fetch as a memref,
- fetch it as a bit field. */
- || (mode1 != BLKmode
diff --git a/patches/gcc-4.6.2/0002-Fix-compilation-with-host-gcc-4.7.patch b/patches/gcc-4.6.2/0002-Fix-compilation-with-host-gcc-4.7.patch
deleted file mode 100644
index 2527f37..0000000
--- a/patches/gcc-4.6.2/0002-Fix-compilation-with-host-gcc-4.7.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From: Bernhard Walle <bernhard@bwalle.de>
-Date: Mon, 26 Mar 2012 21:30:06 +0200
-Subject: [PATCH] Fix compilation with host gcc 4.7
-
-From upstream SVN
-http://gcc.gnu.org/viewcvs?view=revision&revision=184239
-http://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=35e5dc9fa7f94c0cab5897abfd677034b584539c
-
-Fixes PR #51969 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51969).
-
-Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
----
- gcc/gengtype.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/gcc/gengtype.c b/gcc/gengtype.c
-index abf17f8..6c0ca4a 100644
---- a/gcc/gengtype.c
-+++ b/gcc/gengtype.c
-@@ -3594,14 +3594,13 @@ write_field_root (outf_p f, pair_p v, type_p type, const char *name,
- int has_length, struct fileloc *line, const char *if_marked,
- bool emit_pch, type_p field_type, const char *field_name)
- {
-+ struct pair newv;
- /* If the field reference is relative to V, rather than to some
- subcomponent of V, we can mark any subarrays with a single stride.
- We're effectively treating the field as a global variable in its
- own right. */
- if (v && type == v->type)
- {
-- struct pair newv;
--
- newv = *v;
- newv.type = field_type;
- newv.name = ACONCAT ((v->name, ".", field_name, NULL));
diff --git a/patches/gcc-4.6.2/0003-PR-tree-optimization-52445.patch b/patches/gcc-4.6.2/0003-PR-tree-optimization-52445.patch
deleted file mode 100644
index f9a324f..0000000
--- a/patches/gcc-4.6.2/0003-PR-tree-optimization-52445.patch
+++ /dev/null
@@ -1,164 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Wed, 12 Sep 2012 20:24:00 +0200
-Subject: [PATCH] PR tree-optimization/52445
-
-Upstream commit that fixes broken code generation on ARM
-(e.g. http://www.spinics.net/lists/arm-kernel/msg193914.html)
-
-[backport from gcc-4.8/trunk r184743 <mikpe@it.uu.se>]
-
-gcc/
-
-2012-03-01 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/52445
- * tree-ssa-phiopt.c (struct name_to_bb): Remove ssa_name field,
- add ssa_name_ver, offset and size fields and change store field
- to bool.
- (name_to_bb_hash, name_to_bb_eq): Adjust for the above changes.
- (add_or_mark_expr): Likewise. Only consider previous stores
- with the same size and offset.
- (nt_init_block): Only look at gimple_assign_single_p stmts,
- doesn't look at rhs2.
-
-gcc/testsuite/
-
-2012-03-01 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/52445
- * gcc.dg/pr52445.c: New test.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- gcc/testsuite/gcc.dg/pr52445.c | 15 +++++++++++++++
- gcc/tree-ssa-phiopt.c | 40 +++++++++++++++++++++++++---------------
- 2 files changed, 40 insertions(+), 15 deletions(-)
- create mode 100644 gcc/testsuite/gcc.dg/pr52445.c
-
-diff --git a/gcc/testsuite/gcc.dg/pr52445.c b/gcc/testsuite/gcc.dg/pr52445.c
-new file mode 100644
-index 0000000..0977821
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/pr52445.c
-@@ -0,0 +1,15 @@
-+/* PR tree-optimization/52445 */
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -ftree-cselim -fdump-tree-cselim" } */
-+
-+void
-+foo (char *buf, unsigned long len)
-+{
-+ buf[0] = '\n';
-+ if (len > 1)
-+ buf[1] = '\0'; /* We can't cselim "optimize" this, while
-+ buf[0] doesn't trap, buf[1] could. */
-+}
-+
-+/* { dg-final { scan-tree-dump-not "cstore\." "cselim" } } */
-+/* { dg-final { cleanup-tree-dump "cselim" } } */
-diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
-index d197bdd..af221ed 100644
---- a/gcc/tree-ssa-phiopt.c
-+++ b/gcc/tree-ssa-phiopt.c
-@@ -1050,9 +1050,10 @@ abs_replacement (basic_block cond_bb, basic_block middle_bb,
- same accesses. */
- struct name_to_bb
- {
-- tree ssa_name;
-+ unsigned int ssa_name_ver;
-+ bool store;
-+ HOST_WIDE_INT offset, size;
- basic_block bb;
-- unsigned store : 1;
- };
-
- /* The hash table for remembering what we've seen. */
-@@ -1061,23 +1062,26 @@ static htab_t seen_ssa_names;
- /* The set of MEM_REFs which can't trap. */
- static struct pointer_set_t *nontrap_set;
-
--/* The hash function, based on the pointer to the pointer SSA_NAME. */
-+/* The hash function. */
- static hashval_t
- name_to_bb_hash (const void *p)
- {
-- const_tree n = ((const struct name_to_bb *)p)->ssa_name;
-- return htab_hash_pointer (n) ^ ((const struct name_to_bb *)p)->store;
-+ const struct name_to_bb *n = (const struct name_to_bb *) p;
-+ return n->ssa_name_ver ^ (((hashval_t) n->store) << 31)
-+ ^ (n->offset << 6) ^ (n->size << 3);
- }
-
--/* The equality function of *P1 and *P2. SSA_NAMEs are shared, so
-- it's enough to simply compare them for equality. */
-+/* The equality function of *P1 and *P2. */
- static int
- name_to_bb_eq (const void *p1, const void *p2)
- {
- const struct name_to_bb *n1 = (const struct name_to_bb *)p1;
- const struct name_to_bb *n2 = (const struct name_to_bb *)p2;
-
-- return n1->ssa_name == n2->ssa_name && n1->store == n2->store;
-+ return n1->ssa_name_ver == n2->ssa_name_ver
-+ && n1->store == n2->store
-+ && n1->offset == n2->offset
-+ && n1->size == n2->size;
- }
-
- /* We see the expression EXP in basic block BB. If it's an interesting
-@@ -1089,8 +1093,12 @@ static void
- add_or_mark_expr (basic_block bb, tree exp,
- struct pointer_set_t *nontrap, bool store)
- {
-+ HOST_WIDE_INT size;
-+
- if (TREE_CODE (exp) == MEM_REF
-- && TREE_CODE (TREE_OPERAND (exp, 0)) == SSA_NAME)
-+ && TREE_CODE (TREE_OPERAND (exp, 0)) == SSA_NAME
-+ && host_integerp (TREE_OPERAND (exp, 1), 0)
-+ && (size = int_size_in_bytes (TREE_TYPE (exp))) > 0)
- {
- tree name = TREE_OPERAND (exp, 0);
- struct name_to_bb map;
-@@ -1100,9 +1108,12 @@ add_or_mark_expr (basic_block bb, tree exp,
-
- /* Try to find the last seen MEM_REF through the same
- SSA_NAME, which can trap. */
-- map.ssa_name = name;
-+ map.ssa_name_ver = SSA_NAME_VERSION (name);
- map.bb = 0;
- map.store = store;
-+ map.offset = tree_low_cst (TREE_OPERAND (exp, 1), 0);
-+ map.size = size;
-+
- slot = htab_find_slot (seen_ssa_names, &map, INSERT);
- n2bb = (struct name_to_bb *) *slot;
- if (n2bb)
-@@ -1125,9 +1136,11 @@ add_or_mark_expr (basic_block bb, tree exp,
- else
- {
- n2bb = XNEW (struct name_to_bb);
-- n2bb->ssa_name = name;
-+ n2bb->ssa_name_ver = SSA_NAME_VERSION (name);
- n2bb->bb = bb;
- n2bb->store = store;
-+ n2bb->offset = map.offset;
-+ n2bb->size = size;
- *slot = n2bb;
- }
- }
-@@ -1147,13 +1160,10 @@ nt_init_block (struct dom_walk_data *data ATTRIBUTE_UNUSED, basic_block bb)
- {
- gimple stmt = gsi_stmt (gsi);
-
-- if (is_gimple_assign (stmt))
-+ if (gimple_assign_single_p (stmt))
- {
- add_or_mark_expr (bb, gimple_assign_lhs (stmt), nontrap_set, true);
- add_or_mark_expr (bb, gimple_assign_rhs1 (stmt), nontrap_set, false);
-- if (get_gimple_rhs_num_ops (gimple_assign_rhs_code (stmt)) > 1)
-- add_or_mark_expr (bb, gimple_assign_rhs2 (stmt), nontrap_set,
-- false);
- }
- }
- }
diff --git a/patches/gcc-4.6.2/0100-no-host-includes.patch b/patches/gcc-4.6.2/0100-no-host-includes.patch
deleted file mode 100644
index c17e446..0000000
--- a/patches/gcc-4.6.2/0100-no-host-includes.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From: Marc Kleine-Budde <m.kleine-budde@pengutronix.de>
-Date: Tue, 1 Nov 2011 18:25:06 +0100
-Subject: [PATCH] no host includes
-
-With this patch gcc bails out if you include a host include path into
-the searchlist (-I). This patch is not intended for upstream and was
-inspired by
-
-http://www.openembedded.org/repo/org.openembedded.dev/packages/gcc/gcc-4.1.1/zecke-no-host-includes.patch
-
-Signed-off-by: Marc Kleine-Budde <m.kleine-budde@pengutronix.de>
-Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
----
- gcc/incpath.c | 28 ++++++++++++++++++++++++++++
- 1 files changed, 28 insertions(+), 0 deletions(-)
-
-diff --git a/gcc/incpath.c b/gcc/incpath.c
-index baf904f..65397e2 100644
---- a/gcc/incpath.c
-+++ b/gcc/incpath.c
-@@ -417,6 +417,34 @@ add_path (char *path, int chain, int cxx_aware, bool user_supplied_p)
- p->construct = 0;
- p->user_supplied_p = user_supplied_p;
-
-+#ifdef CROSS_COMPILE
-+ /* A common error when cross compiling is including
-+ host headers. This code below will try to fail fast
-+ for cross compiling. Currently we consider /usr/include,
-+ /opt/include and /sw/include as harmful. */
-+ {
-+ unsigned int i;
-+ const char *bad_path[] = {
-+ "/usr/include",
-+ "/usr/local/include",
-+ "/sw/include",
-+ "/opt/include",
-+ };
-+
-+ for (i = 0; i < sizeof(bad_path)/sizeof(bad_path[0]); i++) {
-+ if( strstr(p->name, bad_path[i]) == p->name ) {
-+ fprintf(stderr,_("\n"
-+ "CROSS COMPILE Badness: %s in INCLUDEPATH: %s\n"
-+ "\n"),
-+
-+ bad_path[i], p->name);
-+
-+ exit (FATAL_EXIT_CODE);
-+ }
-+ }
-+ }
-+#endif
-+
- add_cpp_dir_path (p, chain);
- }
-
diff --git a/patches/gcc-4.6.2/0101-arm-softfloat.patch b/patches/gcc-4.6.2/0101-arm-softfloat.patch
deleted file mode 100644
index bc639db..0000000
--- a/patches/gcc-4.6.2/0101-arm-softfloat.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From: Marc Kleine-Budde <m.kleine-budde@pengutronix.de>
-Date: Tue, 1 Nov 2011 18:25:06 +0100
-Subject: [PATCH] arm softfloat
-
-Link assembler softfloat functions into gcc. As the functions are there
-in that case anyway, don't add switches for float lib.
-
-Upstream will not fix this because oabi is dead.
-
-Signed-off-by: Marc Kleine-Budde <m.kleine-budde@pengutronix.de>
-Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
----
- gcc/config/arm/linux-elf.h | 2 +-
- gcc/config/arm/t-linux | 5 ++++-
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
-index 81d27bb..77bd193 100644
---- a/gcc/config/arm/linux-elf.h
-+++ b/gcc/config/arm/linux-elf.h
-@@ -60,7 +60,7 @@
- %{shared:-lc} \
- %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
-
--#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
-+#define LIBGCC_SPEC "-lgcc"
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-
-diff --git a/gcc/config/arm/t-linux b/gcc/config/arm/t-linux
-index a6fddad..4191a29 100644
---- a/gcc/config/arm/t-linux
-+++ b/gcc/config/arm/t-linux
-@@ -23,7 +23,10 @@ TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC
-
- LIB1ASMSRC = arm/lib1funcs.asm
- LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
-- _arm_addsubdf3 _arm_addsubsf3
-+ _arm_addsubdf3 _arm_addsubsf3 \
-+ _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/patches/gcc-4.6.2/0102-fix-arith_adjacentmem-LDM-splitting-code.patch b/patches/gcc-4.6.2/0102-fix-arith_adjacentmem-LDM-splitting-code.patch
deleted file mode 100644
index 3b845c4..0000000
--- a/patches/gcc-4.6.2/0102-fix-arith_adjacentmem-LDM-splitting-code.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Tue, 1 Nov 2011 18:25:07 +0100
-Subject: [PATCH] fix arith_adjacentmem LDM splitting code
-
-This is http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39429
-
-This is the patch fromt the gcc bugzilla.
-
-Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
----
- gcc/config/arm/arm.md | 15 +++++++++++++++
- 1 files changed, 15 insertions(+), 0 deletions(-)
-
-diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
-index cc6d34b..b5d0d05 100644
---- a/gcc/config/arm/arm.md
-+++ b/gcc/config/arm/arm.md
-@@ -9869,6 +9869,21 @@
- else
- {
- /* Offset is out of range for a single add, so use two ldr. */
-+
-+ /* Swap the ldrs if the first ldr would clobber the shared base_reg. */
-+ if (REGNO (ldm[1]) == REGNO (base_reg))
-+ {
-+ rtx tmp_reg;
-+ HOST_WIDE_INT tmp_val;
-+
-+ tmp_reg = ldm[1];
-+ ldm[1] = ldm[2];
-+ ldm[2] = tmp_reg;
-+ tmp_val = val1;
-+ val1 = val2;
-+ val2 = tmp_val;
-+ }
-+
- ops[0] = ldm[1];
- ops[1] = base_reg;
- ops[2] = GEN_INT (val1);
diff --git a/patches/gcc-4.6.2/0200-also-match-uclibc-when-checking-host-os.patch b/patches/gcc-4.6.2/0200-also-match-uclibc-when-checking-host-os.patch
deleted file mode 100644
index d6eb3bc..0000000
--- a/patches/gcc-4.6.2/0200-also-match-uclibc-when-checking-host-os.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From: unknown author <unknown.author@example.com>
-Date: Tue, 1 Nov 2011 18:25:07 +0100
-Subject: [PATCH] also match uclibc when checking host os
-
-This patch was taken from uclibc.
-
-Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
----
- contrib/regression/objs-gcc.sh | 4 ++++
- libjava/classpath/ltconfig | 4 ++--
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh
-index 60b0497..6dc7ead 100755
---- a/contrib/regression/objs-gcc.sh
-+++ b/contrib/regression/objs-gcc.sh
-@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ]
- then
- make all-gdb all-dejagnu all-ld || exit 1
- make install-gdb install-dejagnu install-ld || exit 1
-+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
-+ then
-+ make all-gdb all-dejagnu all-ld || exit 1
-+ make install-gdb install-dejagnu install-ld || exit 1
- elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
- make bootstrap || exit 1
- make install || exit 1
-diff --git a/libjava/classpath/ltconfig b/libjava/classpath/ltconfig
-index 743d951..ae4ea60 100755
---- a/libjava/classpath/ltconfig
-+++ b/libjava/classpath/ltconfig
-@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
- # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
- case $host_os in
--linux-gnu*) ;;
-+linux-gnu*|linux-uclibc*) ;;
- linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
- esac
-
-@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
- ;;
-
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
diff --git a/patches/gcc-4.6.2/0201-missing-execinfo.h.patch b/patches/gcc-4.6.2/0201-missing-execinfo.h.patch
deleted file mode 100644
index 3374522..0000000
--- a/patches/gcc-4.6.2/0201-missing-execinfo.h.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From: unknown author <unknown.author@example.com>
-Date: Tue, 1 Nov 2011 18:25:07 +0100
-Subject: [PATCH] missing execinfo.h
-
-This patch was taken from uclibc.
-
-Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
----
- boehm-gc/include/gc.h | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h
-index c51e017..a7ba8dc 100644
---- a/boehm-gc/include/gc.h
-+++ b/boehm-gc/include/gc.h
-@@ -503,7 +503,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb));
- #if defined(__linux__) || defined(__GLIBC__)
- # include <features.h>
- # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
-- && !defined(__ia64__)
-+ && !defined(__ia64__) && !defined(__UCLIBC__)
- # ifndef GC_HAVE_BUILTIN_BACKTRACE
- # define GC_HAVE_BUILTIN_BACKTRACE
- # endif
diff --git a/patches/gcc-4.6.2/0202-c99-snprintf.patch b/patches/gcc-4.6.2/0202-c99-snprintf.patch
deleted file mode 100644
index 75f5e36..0000000
--- a/patches/gcc-4.6.2/0202-c99-snprintf.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From: unknown author <unknown.author@example.com>
-Date: Tue, 1 Nov 2011 18:25:07 +0100
-Subject: [PATCH] c99 snprintf
-
-This patch was taken from uclibc.
-
-Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
----
- libstdc++-v3/include/c_global/cstdio | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/libstdc++-v3/include/c_global/cstdio b/libstdc++-v3/include/c_global/cstdio
-index 049704d..407bd2d 100644
---- a/libstdc++-v3/include/c_global/cstdio
-+++ b/libstdc++-v3/include/c_global/cstdio
-@@ -137,7 +137,7 @@ namespace std
- using ::vsprintf;
- } // namespace
-
--#if _GLIBCXX_USE_C99
-+#if _GLIBCXX_USE_C99 || defined __UCLIBC__
-
- #undef snprintf
- #undef vfscanf
diff --git a/patches/gcc-4.6.2/0203-libmudflap-susv3-legacy.patch b/patches/gcc-4.6.2/0203-libmudflap-susv3-legacy.patch
deleted file mode 100644
index 295d19c..0000000
--- a/patches/gcc-4.6.2/0203-libmudflap-susv3-legacy.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From: unknown author <unknown.author@example.com>
-Date: Tue, 1 Nov 2011 18:25:07 +0100
-Subject: [PATCH] libmudflap susv3 legacy
-
-uclibc does not provide bzero, bcopy, index ...
-
-This patch was taken from uclibc.
-
-Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
----
- libmudflap/mf-hooks2.c | 10 +++++-----
- 1 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/libmudflap/mf-hooks2.c b/libmudflap/mf-hooks2.c
-index 5649e1c..65000c6 100644
---- a/libmudflap/mf-hooks2.c
-+++ b/libmudflap/mf-hooks2.c
-@@ -421,7 +421,7 @@ WRAPPER2(void, bzero, void *s, size_t n)
- {
- TRACE ("%s\n", __PRETTY_FUNCTION__);
- MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
-- bzero (s, n);
-+ memset (s, 0, n);
- }
-
-
-@@ -431,7 +431,7 @@ WRAPPER2(void, bcopy, const void *src, void *dest, size_t n)
- TRACE ("%s\n", __PRETTY_FUNCTION__);
- MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
- MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
-- bcopy (src, dest, n);
-+ memmove (dest, src, n);
- }
-
-
-@@ -441,7 +441,7 @@ WRAPPER2(int, bcmp, const void *s1, const void *s2, size_t n)
- TRACE ("%s\n", __PRETTY_FUNCTION__);
- MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
- MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
-- return bcmp (s1, s2, n);
-+ return n == 0 ? 0 : memcmp (s1, s2, n);
- }
-
-
-@@ -450,7 +450,7 @@ WRAPPER2(char *, index, const char *s, int c)
- size_t n = strlen (s);
- TRACE ("%s\n", __PRETTY_FUNCTION__);
- MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
-- return index (s, c);
-+ return strchr (s, c);
- }
-
-
-@@ -459,7 +459,7 @@ WRAPPER2(char *, rindex, const char *s, int c)
- size_t n = strlen (s);
- TRACE ("%s\n", __PRETTY_FUNCTION__);
- MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
-- return rindex (s, c);
-+ return strrchr (s, c);
- }
-
- /* XXX: stpcpy, memccpy */
diff --git a/patches/gcc-4.6.2/0300-gcc-trampolinewarn.patch b/patches/gcc-4.6.2/0300-gcc-trampolinewarn.patch
deleted file mode 100644
index 5817b06..0000000
--- a/patches/gcc-4.6.2/0300-gcc-trampolinewarn.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From: "Kevin F. Quinn" <kevquinn@gentoo.org>
-Date: Tue, 1 Nov 2011 18:25:08 +0100
-Subject: [PATCH] gcc trampolinewarn
-
-Taken from gentoo, original description:
-
-This trivial patch causes gcc to emit a warning whenever it generates a
-trampoline. These are otherwise hard to locate. It is rigged to default
-ON - to have it default to OFF remove the text 'Init(1)' from the
-common.opt patch, leaving just 'Common Var(warn_trampolines)'.
-
-Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
----
- gcc/builtins.c | 3 +++
- gcc/common.opt | 4 ++++
- 2 files changed, 7 insertions(+), 0 deletions(-)
-
-diff --git a/gcc/builtins.c b/gcc/builtins.c
-index fd99611..bc91aa8 100644
---- a/gcc/builtins.c
-+++ b/gcc/builtins.c
-@@ -4947,6 +4947,9 @@ expand_builtin_va_copy (tree exp)
- emit_block_move (dstb, srcb, size, BLOCK_OP_NORMAL);
- }
-
-+ if (warn_trampolines)
-+ warning (OPT_Wtrampolines, "generating trampoline in object (requires executable stack)");
-+
- return const0_rtx;
- }
-
-diff --git a/gcc/common.opt b/gcc/common.opt
-index 6056551..dde2546 100644
---- a/gcc/common.opt
-+++ b/gcc/common.opt
-@@ -627,6 +627,10 @@ Wtype-limits
- Common Var(warn_type_limits) Init(-1) Warning
- Warn if a comparison is always true or always false due to the limited range of the data type
-
-+Wtrampolines
-+Common Var(warn_trampolines) Init(1)
-+Warn whenever a trampoline is generated
-+
- Wuninitialized
- Common Var(warn_uninitialized) Init(-1) Warning
- Warn about uninitialized automatic variables
diff --git a/patches/gcc-4.6.2/0301-flatten-switch-stmt-into-if-else-chain-for-Os.patch b/patches/gcc-4.6.2/0301-flatten-switch-stmt-into-if-else-chain-for-Os.patch
deleted file mode 100644
index 13a7f65..0000000
--- a/patches/gcc-4.6.2/0301-flatten-switch-stmt-into-if-else-chain-for-Os.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From: Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
-Date: Tue, 1 Nov 2011 18:25:08 +0100
-Subject: [PATCH] flatten switch-stmt into if-else chain for -Os
-
-This is http://gcc.gnu.org/ml/gcc-patches/2007-04/msg00927.html
-
-Hi,
-
-The attached patch makes sure that we create smaller object code for
-simple switch statements. We just make sure to flatten the switch
-statement into an if-else chain, basically.
-
-This fixes a size-regression as compared to gcc-3.4, as can be seen
-below.
-
-2007-04-15 Bernhard Fischer <..>
-
- * stmt.c (expand_case): Do not create a complex binary tree when
- optimizing for size but rather use the simple ordered list.
- (emit_case_nodes): do not emit jumps to the default_label when
- optimizing for size.
-
-Not regtested so far.
-Comments?
-
-Attached is the test switch.c mentioned below.
-
-$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
-gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done
-$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
-gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done
-
-$ size switch-*.o
- text data bss dec hex filename
- 169 0 0 169 a9 switch-2.95.o
- 115 0 0 115 73 switch-3.3.o
- 103 0 0 103 67 switch-3.4.o
- 124 0 0 124 7c switch-4.0.o
- 124 0 0 124 7c switch-4.1.o
- 124 0 0 124 7c switch-4.2.orig-HEAD.o
- 95 0 0 95 5f switch-4.3-HEAD.o
- 124 0 0 124 7c switch-4.3.orig-HEAD.o
- 166 0 0 166 a6 switch-CHAIN-2.95.o
- 111 0 0 111 6f switch-CHAIN-3.3.o
- 95 0 0 95 5f switch-CHAIN-3.4.o
- 95 0 0 95 5f switch-CHAIN-4.0.o
- 95 0 0 95 5f switch-CHAIN-4.1.o
- 95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o
- 95 0 0 95 5f switch-CHAIN-4.3-HEAD.o
- 95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o
-
-Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
----
- gcc/stmt.c | 9 ++++++++-
- 1 files changed, 8 insertions(+), 1 deletions(-)
-
-diff --git a/gcc/stmt.c b/gcc/stmt.c
-index b65c6db..0315d80 100644
---- a/gcc/stmt.c
-+++ b/gcc/stmt.c
-@@ -2478,7 +2478,13 @@ expand_case (gimple stmt)
- default code is emitted. */
-
- use_cost_table = estimate_case_costs (case_list);
-- balance_case_nodes (&case_list, NULL);
-+
-+ /* When optimizing for size, we want a straight list to avoid
-+ jumps as much as possible. This basically creates an if-else
-+ chain. */
-+
-+ if (!optimize_size)
-+ balance_case_nodes (&case_list, NULL);
- emit_case_nodes (index, case_list, default_label, index_type);
- if (default_label)
- emit_jump (default_label);
-@@ -3046,6 +3052,7 @@ emit_case_nodes (rtx index, case_node_ptr node, rtx default_label,
- {
- if (!node_has_low_bound (node, index_type))
- {
-+ if (!optimize_size) /* don't jl to the .default_label. */
- emit_cmp_and_jump_insns (index,
- convert_modes
- (mode, imode,
diff --git a/patches/gcc-4.6.2/0302-libiberty-pic.patch b/patches/gcc-4.6.2/0302-libiberty-pic.patch
deleted file mode 100644
index 4d13b41..0000000
--- a/patches/gcc-4.6.2/0302-libiberty-pic.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From: Marc Kleine-Budde <m.kleine-budde@pengutronix.de>
-Date: Tue, 1 Nov 2011 18:25:08 +0100
-Subject: [PATCH] libiberty pic
-
-Taken from gentoo.
-
-Signed-off-by: Marc Kleine-Budde <m.kleine-budde@pengutronix.de>
-Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
----
- libiberty/Makefile.in | 1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
-index ef35453..1c57edb 100644
---- a/libiberty/Makefile.in
-+++ b/libiberty/Makefile.in
-@@ -246,6 +246,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
- $(AR) $(AR_FLAGS) $(TARGETLIB) \
- $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
- $(RANLIB) $(TARGETLIB); \
-+ cp $(TARGETLIB) ../ ; \
- cd ..; \
- else true; fi
-
diff --git a/patches/gcc-4.6.2/0303-libstdc-pic.patch b/patches/gcc-4.6.2/0303-libstdc-pic.patch
deleted file mode 100644
index cd33067..0000000
--- a/patches/gcc-4.6.2/0303-libstdc-pic.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From: Marc Kleine-Budde <m.kleine-budde@pengutronix.de>
-Date: Tue, 1 Nov 2011 18:25:08 +0100
-Subject: [PATCH] libstdc++ pic
-
-Install libstdc++_pic.a if we have pic objs. Taken from gentoo.
-
-Signed-off-by: Marc Kleine-Budde <m.kleine-budde@pengutronix.de>
-Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
----
- libstdc++-v3/src/Makefile.am | 7 +++++++
- libstdc++-v3/src/Makefile.in | 9 ++++++++-
- 2 files changed, 15 insertions(+), 1 deletions(-)
-
-diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
-index 9a35685..dd0c8a3 100644
---- a/libstdc++-v3/src/Makefile.am
-+++ b/libstdc++-v3/src/Makefile.am
-@@ -445,6 +445,13 @@ CXXLINK = $(LIBTOOL) --tag CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
- $(CXX) $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
-
-
-+install-exec-local:
-+ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \
-+ if [ x"$$pic_objs" != x ]; then \
-+ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \
-+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \
-+ fi
-+
- # Added bits to build debug library.
- if GLIBCXX_BUILD_DEBUG
- all-local: build_debug
-diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
-index b454f66..1231363 100644
---- a/libstdc++-v3/src/Makefile.in
-+++ b/libstdc++-v3/src/Makefile.in
-@@ -725,7 +725,7 @@ install-dvi: install-dvi-am
-
- install-dvi-am:
-
--install-exec-am: install-toolexeclibLTLIBRARIES
-+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
-
- install-html: install-html-am
-
-@@ -1021,6 +1021,13 @@ install_debug:
- (cd ${debugdir} && $(MAKE) \
- toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
-
-+install-exec-local:
-+ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \
-+ if [ x"$$pic_objs" != x ]; then \
-+ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \
-+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \
-+ fi
-+
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
- .NOEXPORT:
diff --git a/patches/gcc-4.6.2/0304-gcc-i386-use-pure64-CLFS-patch.patch b/patches/gcc-4.6.2/0304-gcc-i386-use-pure64-CLFS-patch.patch
deleted file mode 100644
index 9e3f822..0000000
--- a/patches/gcc-4.6.2/0304-gcc-i386-use-pure64-CLFS-patch.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= <andreas@biessmann.de>
-Date: Thu, 9 Feb 2012 13:59:12 +0100
-Subject: [PATCH] gcc/i386: use pure64 CLFS patch
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This is a modified version of
-http://trac.cross-lfs.org/browser/patches/gcc-4.6.0-pure64-1.patch to use /lib
-instead of /lib64 for x86_64.
-This will only work as generic patch, if we do _not_ build multilib x86
-toolchains.
-
-Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
----
- gcc/config/i386/linux64.h | 4 ++--
- gcc/config/i386/t-linux64 | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
-index 103ab0c..a3aab5a 100644
---- a/gcc/config/i386/linux64.h
-+++ b/gcc/config/i386/linux64.h
-@@ -62,8 +62,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- When the -shared link option is used a final link is not being
- done. */
-
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2"
-
- #if TARGET_64BIT_DEFAULT
- #define SPEC_32 "m32"
-diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
-index 5d5a476..2a999f1 100644
---- a/gcc/config/i386/t-linux64
-+++ b/gcc/config/i386/t-linux64
-@@ -25,7 +25,7 @@
-
- MULTILIB_OPTIONS = m64/m32
- MULTILIB_DIRNAMES = 64 32
--MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
-+MULTILIB_OSDIRNAMES = ../lib ../lib32
-
- LIBGCC = stmp-multilib
- INSTALL_LIBGCC = install-multilib
diff --git a/patches/gcc-4.6.2/series b/patches/gcc-4.6.2/series
deleted file mode 100644
index 22460aa..0000000
--- a/patches/gcc-4.6.2/series
+++ /dev/null
@@ -1,22 +0,0 @@
-# generated by git-ptx-patches
-#tag:base
-#tag:upstream --start-number 1
-0001-Volatile-bitfields-vs.-inline-asm-memory-constraints.patch
-0002-Fix-compilation-with-host-gcc-4.7.patch
-0003-PR-tree-optimization-52445.patch
-#tag:OSELAS.toolchain --start-number 100
-0100-no-host-includes.patch
-0101-arm-softfloat.patch
-0102-fix-arith_adjacentmem-LDM-splitting-code.patch
-#tag:uclibc --start-number 200
-0200-also-match-uclibc-when-checking-host-os.patch
-0201-missing-execinfo.h.patch
-0202-c99-snprintf.patch
-0203-libmudflap-susv3-legacy.patch
-#tag:gentoo --start-number 300
-0300-gcc-trampolinewarn.patch
-0301-flatten-switch-stmt-into-if-else-chain-for-Os.patch
-0302-libiberty-pic.patch
-0303-libstdc-pic.patch
-0304-gcc-i386-use-pure64-CLFS-patch.patch
-# ab95a5806890e21a52e7073adde58db0 - git-ptx-patches magic
diff --git a/patches/gcc-linaro-4.7-2012.11/series b/patches/gcc-linaro-4.7-2012.11/series
deleted file mode 100644
index 3d90e59..0000000
--- a/patches/gcc-linaro-4.7-2012.11/series
+++ /dev/null
@@ -1,21 +0,0 @@
-# generated by git-ptx-patches
-#tag:base
-#tag:Upstream --start-number 050
-../gcc-4.7.2/0050-Backport-PR-target-55981-from-mainline.patch
-../gcc-4.7.2/0051-Backport-PR-target-56028-from-mainline.patch
-#tag:OSELAS.toolchain --start-number 100
-../gcc-4.7.2/0100-no-host-includes.patch
-../gcc-4.7.2/0101-gcc-i386-use-pure64-CLFS-patch.patch
-../gcc-4.7.2/0102-libgcc-reorder-tmake_file-for-arm-uclinux.patch
-#tag:uclibc --start-number 200
-../gcc-4.7.2/0200-also-match-uclibc-when-checking-host-os.patch
-../gcc-4.7.2/0201-missing-execinfo.h.patch
-../gcc-4.7.2/0202-c99-snprintf.patch
-../gcc-4.7.2/0203-libmudflap-susv3-legacy.patch
-#tag:gentoo --start-number 300
-../gcc-4.7.2/0300-libiberty-pic.patch
-../gcc-4.7.2/0301-libstdc-pic.patch
-#tag:debian --start-number 400
-../gcc-4.7.2/0400-add-support-for-arm-linux-eabi-triplets-useful-for-a.patch
-#tag:OpenEmbedded --start-number 500
-../gcc-4.7.2/0500-Fix-Argument-list-too-long-error.patch
diff --git a/patches/gdb-7.2/0001-sim-ppc-remove-bogus-dependency.patch b/patches/gdb-7.2/0001-sim-ppc-remove-bogus-dependency.patch
deleted file mode 100644
index b7422fa..0000000
--- a/patches/gdb-7.2/0001-sim-ppc-remove-bogus-dependency.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Mon, 31 Oct 2011 14:09:45 +0100
-Subject: [PATCH] sim/ppc: remove bogus dependency
-
-Otherwise compiling may fail for PPC with:
-
-make[4]: *** No rule to make target `-lz', needed by `psim'. Stop.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- sim/ppc/Makefile.in | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
-index 71c65cf..968620f 100644
---- a/sim/ppc/Makefile.in
-+++ b/sim/ppc/Makefile.in
-@@ -551,7 +551,7 @@ PACKAGE_SRC = @sim_pk_src@
- PACKAGE_OBJ = @sim_pk_obj@
-
-
--psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBS) $(LIBINTL_DEP)
-+psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBINTL_DEP)
- $(CC) $(CFLAGS) $(SIM_CFLAGS) $(LDFLAGS) -o psim$(EXEEXT) main.o $(TARGETLIB) $(BFD_LIB) $(LIBINTL) $(LIBIBERTY_LIB) $(LIBS)
-
- run: psim
---
-1.7.7
-
diff --git a/patches/gdb-7.2/series b/patches/gdb-7.2/series
deleted file mode 100644
index 1226c91..0000000
--- a/patches/gdb-7.2/series
+++ /dev/null
@@ -1,3 +0,0 @@
-# generated by git-ptx-patches
-0001-sim-ppc-remove-bogus-dependency.patch
-# 18833ab705cbd8d8f51a9f8220d3ea31 - git-ptx-patches magic
diff --git a/patches/gdb-7.5/0001-sim-ppc-remove-bogus-dependency.patch b/patches/gdb-7.5/0001-sim-ppc-remove-bogus-dependency.patch
deleted file mode 100644
index 15f5073..0000000
--- a/patches/gdb-7.5/0001-sim-ppc-remove-bogus-dependency.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Mon, 31 Oct 2011 14:09:45 +0100
-Subject: [PATCH] sim/ppc: remove bogus dependency
-
-Otherwise compiling may fail for PPC with:
-
-make[4]: *** No rule to make target `-lz', needed by `psim'. Stop.
-
-The problem is that while make can resolve '-lz' as a dependency, this only
-works if zlib is in the default search path or VPATH. sysroot-host/lib is
-not searched. As a result '-lz' may not be resolved.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- sim/ppc/Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
-index 71c65cf..968620f 100644
---- a/sim/ppc/Makefile.in
-+++ b/sim/ppc/Makefile.in
-@@ -551,7 +551,7 @@ PACKAGE_SRC = @sim_pk_src@
- PACKAGE_OBJ = @sim_pk_obj@
-
-
--psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBS) $(LIBINTL_DEP)
-+psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBINTL_DEP)
- $(CC) $(CFLAGS) $(SIM_CFLAGS) $(LDFLAGS) -o psim$(EXEEXT) main.o $(TARGETLIB) $(BFD_LIB) $(LIBINTL) $(LIBIBERTY_LIB) $(LIBS)
-
- run: psim
diff --git a/patches/gdb-7.5/series b/patches/gdb-7.5/series
deleted file mode 100644
index 997b0aa..0000000
--- a/patches/gdb-7.5/series
+++ /dev/null
@@ -1,4 +0,0 @@
-# generated by git-ptx-patches
-#tag:base --start-number 1
-0001-sim-ppc-remove-bogus-dependency.patch
-# 0c022cd0da9d4e74ed54e12281eeadc2 - git-ptx-patches magic
diff --git a/patches/glibc-2.14.1/0001-add-install-lib-all-target.patch b/patches/glibc-2.14.1/0001-add-install-lib-all-target.patch
deleted file mode 100644
index fe2f4a1..0000000
--- a/patches/glibc-2.14.1/0001-add-install-lib-all-target.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Tue, 1 Nov 2011 19:22:27 +0100
-Subject: [PATCH] add install-lib-all target
-
-From http://svn.exactcode.de/t2/trunk/package/base/glibc32/make-install-lib-all.patch
-
-Rule to install all needed libraries, not just the ones installed by install-lib,
-yet not install programs.
-Needed because we can't use the main install target, as we can't build programs before
-we have the final gcc installed; linking fails because libeh.a is not present,
-and glibc insists on linking programs with that library.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- Makerules | 7 +++++++
- 1 files changed, 7 insertions(+), 0 deletions(-)
-
-diff --git a/Makerules b/Makerules
-index 82ffa1e..3381d28 100644
---- a/Makerules
-+++ b/Makerules
-@@ -866,6 +866,13 @@ endef
- installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
- $(inst_libdir)/$(patsubst %,$(libtype$o),\
- $(libprefix)$(libc-name)))
-+
-+install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \
-+ $(inst_slibdir)/libc-$(version).so \
-+ $(inst_libdir)/libc.so \
-+ $(inst_libdir)/libc.a \
-+ install-lib
-+
- install: $(installed-libcs)
- $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
- $(make-target-directory)
diff --git a/patches/glibc-2.14.1/0002-fix-build-error-with-static-nss.patch b/patches/glibc-2.14.1/0002-fix-build-error-with-static-nss.patch
deleted file mode 100644
index d72b973..0000000
--- a/patches/glibc-2.14.1/0002-fix-build-error-with-static-nss.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From: Dan Kegel <dank@kegel.com>
-Date: Wed, 15 Jun 2005 09:12:43 -0700
-Subject: [PATCH] fix build error with static-nss
-
-This patch fixes
-
-build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
-build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
-... 53 lines deleted ...
-build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
-collect2: ld returned 1 exit status
-make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
-
-when building glibc with --enable-static-nss.
-
-See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
-
-Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
-[mol: adapted for glibc-2.14.1]
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- Makeconfig | 2 +-
- elf/Makefile | 7 +++++++
- 2 files changed, 8 insertions(+), 1 deletions(-)
-
-diff --git a/Makeconfig b/Makeconfig
-index b34cacf..1915afa 100644
---- a/Makeconfig
-+++ b/Makeconfig
-@@ -537,7 +537,7 @@ endif
-
- # The static libraries.
- ifeq (yes,$(build-static))
--link-libc-static = -Wl,--start-group $(common-objpfx)libc.a $(static-gnulib) -Wl,--end-group
-+link-libc-static = -Wl,--start-group $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) -Wl,--end-group
- else
- ifeq (yes,$(build-shared))
- # We can try to link the programs with lib*_pic.a...
-diff --git a/elf/Makefile b/elf/Makefile
-index 1c5bdee..e19e639 100644
---- a/elf/Makefile
-+++ b/elf/Makefile
-@@ -152,6 +152,13 @@ install-others = $(inst_slibdir)/$(rtld-installed-name)
- install-bin-script = ldd
- endif
-
-+ifeq (yes,$(build-static-nss))
-+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
-+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
-+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
-+ $(resolvobjdir)/libresolv.a
-+endif
-+
- others = sprof sln
- install-bin = sprof
- others-static = sln
diff --git a/patches/glibc-2.14.1/0003-configure.in-detect-readelf-with-AC_CHECK_TARGET_TOO.patch b/patches/glibc-2.14.1/0003-configure.in-detect-readelf-with-AC_CHECK_TARGET_TOO.patch
deleted file mode 100644
index d2aa4f9..0000000
--- a/patches/glibc-2.14.1/0003-configure.in-detect-readelf-with-AC_CHECK_TARGET_TOO.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Tue, 1 Nov 2011 23:45:06 +0100
-Subject: [PATCH] configure.in: detect readelf with AC_CHECK_TARGET_TOOL
-
-This patch was introduced with patches for Mac. Probably because
-a nonstandard readelf is needed there.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- configure.in | 6 ++++--
- 1 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index fbc64b9..f13cba3 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1457,6 +1457,8 @@ EOF
- fi
- fi
-
-+ AC_CHECK_TARGET_TOOL([READELF],[readelf],[readelf],[$PATH])
-+
- AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,
- libc_cv_initfini_array, [dnl
- cat > conftest.c <<EOF
-@@ -1468,7 +1470,7 @@ EOF
- if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest conftest.c
- -static -nostartfiles -nostdlib 1>&AS_MESSAGE_LOG_FD])
- then
-- if readelf -S conftest | fgrep INIT_ARRAY > /dev/null; then
-+ if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then
- libc_cv_initfini_array=yes
- else
- libc_cv_initfini_array=no
-@@ -1655,7 +1657,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without
- dnl introducing new options this is not easily doable. Instead use a tool
- dnl which always is cross-platform: readelf. To detect whether -z combreloc
- dnl look for a section named .rel.dyn.
-- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
-+ if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
- libc_cv_z_combreloc=yes
- else
- libc_cv_z_combreloc=no
diff --git a/patches/glibc-2.14.1/0004-stdlib-longlong.patch b/patches/glibc-2.14.1/0004-stdlib-longlong.patch
deleted file mode 100644
index a59cb95..0000000
--- a/patches/glibc-2.14.1/0004-stdlib-longlong.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From: unknown author <unknown.author@example.com>
-Date: Tue, 1 Nov 2011 18:58:26 +0100
-Subject: [PATCH] stdlib longlong
-
----
- stdlib/longlong.h | 14 ++++++++++++++
- 1 files changed, 14 insertions(+), 0 deletions(-)
-
-diff --git a/stdlib/longlong.h b/stdlib/longlong.h
-index 1bab76d..68596aa 100644
---- a/stdlib/longlong.h
-+++ b/stdlib/longlong.h
-@@ -220,6 +220,14 @@ UDItype __umulsidi3 (USItype, USItype);
- "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" \
-@@ -241,7 +249,13 @@ UDItype __umulsidi3 (USItype, USItype);
- : "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(__arm__)
diff --git a/patches/glibc-2.14.1/0005-respect-env-CPPFLAGS.patch b/patches/glibc-2.14.1/0005-respect-env-CPPFLAGS.patch
deleted file mode 100644
index 5aa9c88..0000000
--- a/patches/glibc-2.14.1/0005-respect-env-CPPFLAGS.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From: Robert Schwebel <r.schwebel@pengutronix.de>
-Date: Tue, 1 Nov 2011 23:51:05 +0100
-Subject: [PATCH] respect env CPPFLAGS
-
-Respect environment CPPFLAGS when we run ./configure so we can inject
-random -D things without having to set CFLAGS/ASFLAGS
-
-This patch was taken from gentoo.
-
-Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- Makeconfig | 1 +
- config.make.in | 1 +
- 2 files changed, 2 insertions(+), 0 deletions(-)
-
-diff --git a/Makeconfig b/Makeconfig
-index 1915afa..c5ead1d 100644
---- a/Makeconfig
-+++ b/Makeconfig
-@@ -699,6 +699,7 @@ CPPFLAGS = $($(subdir)-CPPFLAGS) $(+includes) $(defines) \
- $(foreach lib,$(libof-$(basename $(@F))) \
- $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
- $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
-+CPPFLAGS += $(CPPFLAGS-config)
- override CFLAGS = -std=gnu99 $(gnu89-inline-CFLAGS) \
- $(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
- $(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
-diff --git a/config.make.in b/config.make.in
-index d722a8b..e8f26ff 100644
---- a/config.make.in
-+++ b/config.make.in
-@@ -108,6 +108,7 @@ CC = @CC@
- CXX = @CXX@
- BUILD_CC = @BUILD_CC@
- CFLAGS = @CFLAGS@
-+CPPFLAGS-config = @CPPFLAGS@
- ASFLAGS-config = @ASFLAGS_config@
- AR = @AR@
- MAKEINFO = @MAKEINFO@
diff --git a/patches/glibc-2.14.1/0006-i586-chk.patch b/patches/glibc-2.14.1/0006-i586-chk.patch
deleted file mode 100644
index 3d3bbe4..0000000
--- a/patches/glibc-2.14.1/0006-i586-chk.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From: "H.J. Lu" <hongjiu.lu@intel.com>
-Date: Tue, 1 Nov 2011 18:58:26 +0100
-Subject: [PATCH] i586 chk
-
-2007-09-13 H.J. Lu <hongjiu.lu@intel.com>
-
- * sysdeps/i386/i586/memcpy_chk.S: New file.
- * sysdeps/i386/i586/mempcpy_chk.S: Likewise.
- * sysdeps/i386/i586/memset_chk.S: Likewise.
----
- i386/i586/memcpy_chk.S | 1 +
- i386/i586/mempcpy_chk.S | 1 +
- i386/i586/memset_chk.S | 1 +
- 3 files changed, 3 insertions(+), 0 deletions(-)
- create mode 100644 i386/i586/memcpy_chk.S
- create mode 100644 i386/i586/mempcpy_chk.S
- create mode 100644 i386/i586/memset_chk.S
-
-diff --git a/i386/i586/memcpy_chk.S b/i386/i586/memcpy_chk.S
-new file mode 100644
-index 0000000..ab8a95c
---- /dev/null
-+++ b/i386/i586/memcpy_chk.S
-@@ -0,0 +1 @@
-+#include <sysdeps/i386/i686/memcpy_chk.S>
-diff --git a/i386/i586/mempcpy_chk.S b/i386/i586/mempcpy_chk.S
-new file mode 100644
-index 0000000..9a1de1d
---- /dev/null
-+++ b/i386/i586/mempcpy_chk.S
-@@ -0,0 +1 @@
-+#include <sysdeps/i386/i686/mempcpy_chk.S>
-diff --git a/i386/i586/memset_chk.S b/i386/i586/memset_chk.S
-new file mode 100644
-index 0000000..09f9d42
---- /dev/null
-+++ b/i386/i586/memset_chk.S
-@@ -0,0 +1 @@
-+#include <sysdeps/i386/i686/memset_chk.S>
diff --git a/patches/glibc-2.14.1/0007-i386-x86_64-revert-clone-cfi.patch b/patches/glibc-2.14.1/0007-i386-x86_64-revert-clone-cfi.patch
deleted file mode 100644
index ea84891..0000000
--- a/patches/glibc-2.14.1/0007-i386-x86_64-revert-clone-cfi.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From: unknown author <unknown.author@example.com>
-Date: Tue, 1 Nov 2011 18:58:26 +0100
-Subject: [PATCH] i386/x86_64 revert clone cfi
-
-revert cfi additions to clone on i386/x86_64 to workaround problems in
-gcc's unwinder code. this is not a bug in glibc, it triggers problems
-elsewhere. this cfi code does not gain us a whole lot anyways.
-
-http://gcc.gnu.org/ml/gcc/2006-12/msg00293.html
----
- sysdeps/unix/sysv/linux/i386/clone.S | 4 ----
- sysdeps/unix/sysv/linux/x86_64/clone.S | 4 ----
- 2 files changed, 0 insertions(+), 8 deletions(-)
-
-diff --git a/sysdeps/unix/sysv/linux/i386/clone.S b/sysdeps/unix/sysv/linux/i386/clone.S
-index f73a4b5..54524ec 100644
---- a/sysdeps/unix/sysv/linux/i386/clone.S
-+++ b/sysdeps/unix/sysv/linux/i386/clone.S
-@@ -120,9 +120,6 @@ L(pseudo_end):
- ret
-
- L(thread_start):
-- cfi_startproc;
-- /* Clearing frame pointer is insufficient, use CFI. */
-- cfi_undefined (eip);
- /* Note: %esi is zero. */
- movl %esi,%ebp /* terminate the stack frame */
- #ifdef RESET_PID
-@@ -155,7 +152,6 @@ L(nomoregetpid):
- jmp L(haspid)
- .previous
- #endif
-- cfi_endproc;
-
- cfi_startproc
- PSEUDO_END (BP_SYM (__clone))
-diff --git a/sysdeps/unix/sysv/linux/x86_64/clone.S b/sysdeps/unix/sysv/linux/x86_64/clone.S
-index db42f20..8a12b09 100644
---- a/sysdeps/unix/sysv/linux/x86_64/clone.S
-+++ b/sysdeps/unix/sysv/linux/x86_64/clone.S
-@@ -89,9 +89,6 @@ L(pseudo_end):
- ret
-
- L(thread_start):
-- cfi_startproc;
-- /* Clearing frame pointer is insufficient, use CFI. */
-- cfi_undefined (rip);
- /* Clear the frame pointer. The ABI suggests this be done, to mark
- the outermost frame obviously. */
- xorl %ebp, %ebp
-@@ -116,7 +113,6 @@ L(thread_start):
- /* Call exit with return value from function call. */
- movq %rax, %rdi
- call HIDDEN_JUMPTARGET (_exit)
-- cfi_endproc;
-
- cfi_startproc;
- PSEUDO_END (BP_SYM (__clone))
diff --git a/patches/glibc-2.14.1/0008-queue-header-updates.patch b/patches/glibc-2.14.1/0008-queue-header-updates.patch
deleted file mode 100644
index c2d79ca..0000000
--- a/patches/glibc-2.14.1/0008-queue-header-updates.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From: unknown author <unknown.author@example.com>
-Date: Tue, 1 Nov 2011 18:58:26 +0100
-Subject: [PATCH] queue header updates
-
-grab some updates from FreeBSD
-
-http://bugs.gentoo.org/201979
----
- misc/sys/queue.h | 37 +++++++++++++++++++++++++++++++++++++
- 1 files changed, 37 insertions(+), 0 deletions(-)
-
-diff --git a/misc/sys/queue.h b/misc/sys/queue.h
-index daf4553..f2678ba 100644
---- a/misc/sys/queue.h
-+++ b/misc/sys/queue.h
-@@ -136,6 +136,11 @@ struct { \
- (var); \
- (var) = ((var)->field.le_next))
-
-+#define LIST_FOREACH_SAFE(var, head, field, tvar) \
-+ for ((var) = LIST_FIRST((head)); \
-+ (var) && ((tvar) = LIST_NEXT((var), field), 1); \
-+ (var) = (tvar))
-+
- /*
- * List access methods.
- */
-@@ -197,6 +202,16 @@ struct { \
- #define SLIST_FOREACH(var, head, field) \
- for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
-
-+#define SLIST_FOREACH_SAFE(var, head, field, tvar) \
-+ for ((var) = SLIST_FIRST((head)); \
-+ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \
-+ (var) = (tvar))
-+
-+#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \
-+ for ((varp) = &SLIST_FIRST((head)); \
-+ ((var) = *(varp)) != NULL; \
-+ (varp) = &SLIST_NEXT((var), field))
-+
- /*
- * Singly-linked List access methods.
- */
-@@ -242,6 +257,12 @@ struct { \
- (head)->stqh_last = &(elm)->field.stqe_next; \
- } while (/*CONSTCOND*/0)
-
-+#define STAILQ_LAST(head, type, field) \
-+ (STAILQ_EMPTY((head)) ? \
-+ NULL : \
-+ ((struct type *)(void *) \
-+ ((char *)((head)->stqh_last) - __offsetof(struct type, field))))
-+
- #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
- if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\
- (head)->stqh_last = &(elm)->field.stqe_next; \
-@@ -286,6 +307,11 @@ struct { \
- #define STAILQ_FIRST(head) ((head)->stqh_first)
- #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
-
-+#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \
-+ for ((var) = STAILQ_FIRST((head)); \
-+ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \
-+ (var) = (tvar))
-+
-
- /*
- * Simple queue definitions.
-@@ -437,11 +463,22 @@ struct { \
- (var); \
- (var) = ((var)->field.tqe_next))
-
-+#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \
-+ for ((var) = TAILQ_FIRST((head)); \
-+ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \
-+ (var) = (tvar))
-+
- #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
- for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \
- (var); \
- (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
-
-+#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \
-+ for ((var) = TAILQ_LAST((head), headname); \
-+ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \
-+ (var) = (tvar))
-+
-+
- #define TAILQ_CONCAT(head1, head2, field) do { \
- if (!TAILQ_EMPTY(head2)) { \
- *(head1)->tqh_last = (head2)->tqh_first; \
diff --git a/patches/glibc-2.14.1/0009-don-t-regen-docs-if-perl-is-not-found.patch b/patches/glibc-2.14.1/0009-don-t-regen-docs-if-perl-is-not-found.patch
deleted file mode 100644
index 9f96b21..0000000
--- a/patches/glibc-2.14.1/0009-don-t-regen-docs-if-perl-is-not-found.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Wed, 2 Nov 2011 00:14:37 +0100
-Subject: [PATCH] don't regen docs if perl is not found
-
-If we're using a cvs snapshot which updates the source files, and
-perl isn't installed yet, then we can't regen the docs. Not a big
-deal, so just whine a little and continue on our merry way.
-
-This patch was taken from gentoo.
-http://bugs.gentoo.org/60132
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- manual/Makefile | 5 +++++
- 1 files changed, 5 insertions(+), 0 deletions(-)
-
-diff --git a/manual/Makefile b/manual/Makefile
-index 46dd430..db96bdf 100644
---- a/manual/Makefile
-+++ b/manual/Makefile
-@@ -106,9 +106,14 @@ dir-add.texi: xtract-typefun.awk $(texis)
- libm-err.texi: stamp-libm-err
- stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
- $(dir)/libm-test-ulps))
-+ifneq ($(PERL),no)
- pwd=`pwd`; \
- $(PERL) $< $$pwd/.. > libm-err-tmp
- $(move-if-change) libm-err-tmp libm-err.texi
-+else
-+ echo "Unable to rebuild math docs, no perl installed"
-+ touch libm-err.texi
-+endif
- touch $@
-
- # Generate Texinfo files from the C source for the example programs.
diff --git a/patches/glibc-2.14.1/0010-localedef-fix-trampoline.patch b/patches/glibc-2.14.1/0010-localedef-fix-trampoline.patch
deleted file mode 100644
index 60f6add..0000000
--- a/patches/glibc-2.14.1/0010-localedef-fix-trampoline.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From: unknown author <unknown.author@example.com>
-Date: Tue, 1 Nov 2011 18:58:26 +0100
-Subject: [PATCH] localedef fix trampoline
-
-if [ $# -ne 2 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-case "$1" in
- -patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;;
- -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-esac
-exit 0
----
- locale/programs/3level.h | 36 ++++++++++++++++++++++++++++++++++++
- 1 files changed, 36 insertions(+), 0 deletions(-)
-
-diff --git a/locale/programs/3level.h b/locale/programs/3level.h
-index cce925e..6bf8b84 100644
---- a/locale/programs/3level.h
-+++ b/locale/programs/3level.h
-@@ -203,6 +203,42 @@ CONCAT(TABLE,_iterate) (struct TABLE *t,
- }
- }
- }
-+
-+/* GCC ATM seems to do a poor job with pointers to nested functions passed
-+ to inlined functions. Help it a little bit with this hack. */
-+#define wchead_table_iterate(tp, fn) \
-+do \
-+ { \
-+ struct wchead_table *t = (tp); \
-+ uint32_t index1; \
-+ for (index1 = 0; index1 < t->level1_size; index1++) \
-+ { \
-+ uint32_t lookup1 = t->level1[index1]; \
-+ if (lookup1 != ((uint32_t) ~0)) \
-+ { \
-+ uint32_t lookup1_shifted = lookup1 << t->q; \
-+ uint32_t index2; \
-+ for (index2 = 0; index2 < (1 << t->q); index2++) \
-+ { \
-+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \
-+ if (lookup2 != ((uint32_t) ~0)) \
-+ { \
-+ uint32_t lookup2_shifted = lookup2 << t->p; \
-+ uint32_t index3; \
-+ for (index3 = 0; index3 < (1 << t->p); index3++) \
-+ { \
-+ struct element_t *lookup3 \
-+ = t->level3[index3 + lookup2_shifted]; \
-+ if (lookup3 != NULL) \
-+ fn ((((index1 << t->q) + index2) << t->p) + index3, \
-+ lookup3); \
-+ } \
-+ } \
-+ } \
-+ } \
-+ } \
-+ } while (0)
-+
- #endif
-
- #ifndef NO_FINALIZE
diff --git a/patches/glibc-2.14.1/0011-posix-awk.patch b/patches/glibc-2.14.1/0011-posix-awk.patch
deleted file mode 100644
index b5e3738..0000000
--- a/patches/glibc-2.14.1/0011-posix-awk.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Tue, 1 Nov 2011 18:58:26 +0100
-Subject: [PATCH] posix awk
-
-2007-12-24 Mike Frysinger <vapier@gentoo.org>
-
- * elf/Makefile ($(objpfx)ld.so): Use POSIX (EF)? in awk.
----
- elf/Makefile | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/elf/Makefile b/elf/Makefile
-index e19e639..79949c9 100644
---- a/elf/Makefile
-+++ b/elf/Makefile
-@@ -428,7 +428,7 @@ $(objpfx)ld.so: $(objpfx)librtld.os $(ld-map)
- -Wl,-soname=$(rtld-installed-name) -T $@.lds
- rm -f $@.lds
- readelf -s $@ \
-- | $(AWK) '($$7 ~ /^UND(|EF)$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }'
-+ | $(AWK) '($$7 ~ /^UND(EF)?$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }'
-
- # interp.c exists just to get this string into the libraries.
- CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"' \
diff --git a/patches/glibc-2.14.1/0012-resolv-dynamic.patch b/patches/glibc-2.14.1/0012-resolv-dynamic.patch
deleted file mode 100644
index bc4921b..0000000
--- a/patches/glibc-2.14.1/0012-resolv-dynamic.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From: unknown author <unknown.author@example.com>
-Date: Tue, 1 Nov 2011 18:58:26 +0100
-Subject: [PATCH] resolv dynamic
-
-ripped from SuSE
-
-if /etc/resolv.conf is updated, then make sure applications
-already running get the updated information.
-
-http://bugs.gentoo.org/177416
----
- resolv/res_libc.c | 15 +++++++++++++++
- 1 files changed, 15 insertions(+), 0 deletions(-)
-
-diff --git a/resolv/res_libc.c b/resolv/res_libc.c
-index 810fbc8..aa465cd 100644
---- a/resolv/res_libc.c
-+++ b/resolv/res_libc.c
-@@ -22,6 +22,7 @@
- #include <arpa/nameser.h>
- #include <resolv.h>
- #include <bits/libc-lock.h>
-+#include <sys/stat.h>
-
-
- /* The following bit is copied from res_data.c (where it is #ifdef'ed
-@@ -95,6 +96,20 @@ int
- __res_maybe_init (res_state resp, int preinit)
- {
- if (resp->options & RES_INIT) {
-+ static time_t last_mtime, last_check;
-+ time_t now;
-+ struct stat statbuf;
-+
-+ time (&now);
-+ if (now != last_check) {
-+ last_check = now;
-+ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) {
-+ last_mtime = statbuf.st_mtime;
-+ atomicinclock (lock);
-+ atomicinc (__res_initstamp);
-+ atomicincunlock (lock);
-+ }
-+ }
- if (__res_initstamp != resp->_u._ext.initstamp) {
- if (resp->nscount > 0)
- __res_iclose (resp, true);
diff --git a/patches/glibc-2.14.1/0013-section-comments.patch b/patches/glibc-2.14.1/0013-section-comments.patch
deleted file mode 100644
index 2cd00ff..0000000
--- a/patches/glibc-2.14.1/0013-section-comments.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From: unknown author <unknown.author@example.com>
-Date: Tue, 1 Nov 2011 18:58:26 +0100
-Subject: [PATCH] section comments
-
-http://sources.redhat.com/ml/binutils/2004-04/msg00665.html
-
-fixes building on some architectures (like m68k/arm/cris/etc...) because
-it does the right thing
-
-This patch was taken from gentoo.
----
- include/libc-symbols.h | 6 +++---
- 1 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/include/libc-symbols.h b/include/libc-symbols.h
-index 67e1ca2..8cefa67 100644
---- a/include/libc-symbols.h
-+++ b/include/libc-symbols.h
-@@ -240,12 +240,12 @@
- # define __make_section_unallocated(section_string)
- # endif
-
--/* Tacking on "\n\t#" to the section name makes gcc put it's bogus
-+/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus
- section attributes on what looks like a comment to the assembler. */
- # ifdef HAVE_SECTION_QUOTES
--# define __sec_comment "\"\n\t#\""
-+# define __sec_comment "\"\n#APP\n\t#\""
- # else
--# define __sec_comment "\n\t#"
-+# define __sec_comment "\n#APP\n\t#"
- # endif
- # define link_warning(symbol, msg) \
- __make_section_unallocated (".gnu.warning." #symbol) \
diff --git a/patches/glibc-2.14.1/0014-no-inline-gmon.patch b/patches/glibc-2.14.1/0014-no-inline-gmon.patch
deleted file mode 100644
index f2bf698..0000000
--- a/patches/glibc-2.14.1/0014-no-inline-gmon.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From: Kazu Hirata <kazu@codesourcery.com>
-Date: Tue, 1 Nov 2011 18:58:26 +0100
-Subject: [PATCH] no inline gmon
-
-Attached is a patch to add __attribute__ ((noinline)) to
-call_gmon_start.
-
-Without this patch, the sec script that processed initfini.s removes a
-part of inlined call_gmon_start, causing undefined label errors.
-
-This patch solves the problem by forcing gcc not to inline
-call_gmon_start with __attribute__ ((noinline)).
-
-Tested by building for arm-none-lixux-gnueabi. OK to apply?
-
-Kazu Hirata
-
-2006-05-07 Kazu Hirata <kazu@codesourcery.com>
-
- * sysdeps/generic/initfini.c (call_gmon_start): Add
- __attribute__ ((noinline)).
----
- sysdeps/generic/initfini.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/sysdeps/generic/initfini.c b/sysdeps/generic/initfini.c
-index d5ef778..69208c2 100644
---- a/sysdeps/generic/initfini.c
-+++ b/sysdeps/generic/initfini.c
-@@ -70,7 +70,7 @@ asm ("\n/*@TESTS_END*/");
- /* The beginning of _init: */
- asm ("\n/*@_init_PROLOG_BEGINS*/");
-
--static void
-+static void __attribute__ ((noinline))
- call_gmon_start(void)
- {
- extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/
diff --git a/patches/glibc-2.14.1/0015-strict-aliasing.patch b/patches/glibc-2.14.1/0015-strict-aliasing.patch
deleted file mode 100644
index c6dd767..0000000
--- a/patches/glibc-2.14.1/0015-strict-aliasing.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From: unknown author <unknown.author@example.com>
-Date: Tue, 1 Nov 2011 18:58:26 +0100
-Subject: [PATCH] strict aliasing
-
-workaround strict aliasing warnings on individual files rather than
-forcing the whole build with -fno-strict-aliasing
-
-http://bugs.gentoo.org/155906
-
-note that we leave the logout.c and logwtmp.c warnings alone as the
-code path that invokes the warning should not be executed when the
-warning is applicable.
----
- libio/Makefile | 4 ++--
- nis/Makefile | 3 +++
- nptl/Makefile | 1 +
- nss/Makefile | 2 ++
- sunrpc/Makefile | 2 +-
- 5 files changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/libio/Makefile b/libio/Makefile
-index ec30904..15a797b 100644
---- a/libio/Makefile
-+++ b/libio/Makefile
-@@ -91,7 +91,7 @@ CFLAGS-fseeko.c = $(exceptions)
- CFLAGS-ftello64.c = $(exceptions)
- CFLAGS-ftello.c = $(exceptions)
- CFLAGS-fwide.c = $(exceptions)
--CFLAGS-genops.c = $(exceptions)
-+CFLAGS-genops.c = $(exceptions) -fno-strict-aliasing
- CFLAGS-getc.c = $(exceptions)
- CFLAGS-getchar.c = $(exceptions)
- CFLAGS-getwc.c = $(exceptions)
-@@ -133,7 +133,7 @@ CFLAGS-putwc.c = $(exceptions)
- CFLAGS-putwchar.c = $(exceptions)
- CFLAGS-rewind.c = $(exceptions)
- CFLAGS-wfileops.c = $(exceptions)
--CFLAGS-wgenops.c = $(exceptions)
-+CFLAGS-wgenops.c = $(exceptions) -fno-strict-aliasing
- CFLAGS-oldiofopen.c = $(exceptions)
- CFLAGS-iofopen.c = $(exceptions)
- CFLAGS-iofopen64.c = $(exceptions)
-diff --git a/nis/Makefile b/nis/Makefile
-index e7e5f0c..3a01142 100644
---- a/nis/Makefile
-+++ b/nis/Makefile
-@@ -67,6 +67,9 @@ libnss_nisplus-routines := $(addprefix nisplus-,$(databases)) nisplus-parser \
- nss-nisplus nisplus-initgroups
- libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes))
-
-+CFLAGS-nis_xdr.c += -fno-strict-aliasing
-+CFLAGS-yp_xdr.c += -fno-strict-aliasing
-+
- include ../Rules
-
-
-diff --git a/nptl/Makefile b/nptl/Makefile
-index 266f178..4ae2518 100644
---- a/nptl/Makefile
-+++ b/nptl/Makefile
-@@ -195,6 +195,7 @@ CFLAGS-tcdrain.c = -fexceptions -fasynchronous-unwind-tables
-
- CFLAGS-pt-system.c = -fexceptions
-
-+CFLAGS-unwind-dw2.c += -fno-strict-aliasing
-
- tests = tst-typesizes \
- tst-attr1 tst-attr2 tst-attr3 \
-diff --git a/nss/Makefile b/nss/Makefile
-index c49f375..7f0b6b4 100644
---- a/nss/Makefile
-+++ b/nss/Makefile
-@@ -73,6 +73,8 @@ ifneq ($(build-static-nss),yes)
- libnss_files-inhibit-o = $(filter-out .os,$(object-suffixes))
- endif
-
-+CFLAGS-nsswitch.c += -fno-strict-aliasing
-+
- include ../Rules
-
-
-diff --git a/sunrpc/Makefile b/sunrpc/Makefile
-index 7245deb..85dcdb1 100644
---- a/sunrpc/Makefile
-+++ b/sunrpc/Makefile
-@@ -150,7 +150,7 @@ CFLAGS-pmap_rmt.c = -fexceptions
- CFLAGS-clnt_perr.c = -fexceptions
- CFLAGS-openchild.c = -fexceptions
-
--CPPFLAGS += -D_RPC_THREAD_SAFE_
-+CPPFLAGS += -D_RPC_THREAD_SAFE_ -fno-strict-aliasing
-
- $(objpfx)tst-getmyaddr: $(common-objpfx)linkobj/libc.so
- $(objpfx)tst-xdrmem: $(common-objpfx)linkobj/libc.so
diff --git a/patches/glibc-2.14.1/0016-undefine-__i686.patch b/patches/glibc-2.14.1/0016-undefine-__i686.patch
deleted file mode 100644
index 130a60e..0000000
--- a/patches/glibc-2.14.1/0016-undefine-__i686.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Tue, 1 Nov 2011 18:58:26 +0100
-Subject: [PATCH] undefine __i686
-
-If gcc is configured to generate i686 code or better by default (like
-when using the --with-arch=pentium3 configure option), then the __i686
-macro will always be defined automatically and thus screw up the
-compilation of some .S files.
-http://bugs.gentoo.org/131108
-http://sourceware.org/ml/libc-alpha/2006-04/msg00090.html
-
-2006-04-25 Mike Frysinger <vapier@gentoo.org>
-
- * sysdeps/i386/sysdep.h (__i686): Undefine.
----
- nptl/sysdeps/pthread/pt-initfini.c | 3 +++
- sysdeps/i386/sysdep.h | 8 ++++++++
- 2 files changed, 11 insertions(+), 0 deletions(-)
-
-diff --git a/nptl/sysdeps/pthread/pt-initfini.c b/nptl/sysdeps/pthread/pt-initfini.c
-index 9c00dc0..4e46b3f 100644
---- a/nptl/sysdeps/pthread/pt-initfini.c
-+++ b/nptl/sysdeps/pthread/pt-initfini.c
-@@ -45,6 +45,9 @@
- /* Embed an #include to pull in the alignment and .end directives. */
- asm ("\n#include \"defs.h\"");
-
-+/* Embed an #include to pull in asm settings. */
-+asm ("\n#ifdef __i686__\n#include <sysdep.h>\n#endif");
-+
- /* The initial common code ends here. */
- asm ("\n/*@HEADER_ENDS*/");
-
-diff --git a/sysdeps/i386/sysdep.h b/sysdeps/i386/sysdep.h
-index efdc82d..3327c10 100644
---- a/sysdeps/i386/sysdep.h
-+++ b/sysdeps/i386/sysdep.h
-@@ -18,6 +18,14 @@
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-+/*
-+ * When building for i686 targets or better, gcc automatically defines
-+ * '__i686' to '1' for us which causes trouble when using section names
-+ * like '__i686.get_pc_thunk.reg'. Since we check for __i686__ in the
-+ * code, killing '__i686' shouldn't be a problem.
-+ */
-+#undef __i686
-+
- #include <sysdeps/generic/sysdep.h>
-
- #ifdef __ASSEMBLER__
diff --git a/patches/glibc-2.14.1/0017-fpscr-values.patch b/patches/glibc-2.14.1/0017-fpscr-values.patch
deleted file mode 100644
index 9987d94..0000000
--- a/patches/glibc-2.14.1/0017-fpscr-values.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From: unknown author <unknown.author@example.com>
-Date: Tue, 1 Nov 2011 18:58:26 +0100
-Subject: [PATCH] fpscr values
-
-http://rpm.sh-linux.org/rpm-2004/target/SRPMS/glibc-2.3.3-27.12.src.rpm
-
-http://bugs.gentoo.org/100696
----
- sysdeps/unix/sysv/linux/sh/Versions | 1 +
- sysdeps/unix/sysv/linux/sh/sysdep.S | 10 ++++++++++
- 2 files changed, 11 insertions(+), 0 deletions(-)
-
-diff --git a/sysdeps/unix/sysv/linux/sh/Versions b/sysdeps/unix/sysv/linux/sh/Versions
-index bd30f92..9fb8345 100644
---- a/sysdeps/unix/sysv/linux/sh/Versions
-+++ b/sysdeps/unix/sysv/linux/sh/Versions
-@@ -2,6 +2,7 @@ libc {
- GLIBC_2.2 {
- # functions used in other libraries
- __xstat64; __fxstat64; __lxstat64;
-+ __fpscr_values;
-
- # a*
- alphasort64;
-diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.S b/sysdeps/unix/sysv/linux/sh/sysdep.S
-index 176d99a..d61967a 100644
---- a/sysdeps/unix/sysv/linux/sh/sysdep.S
-+++ b/sysdeps/unix/sysv/linux/sh/sysdep.S
-@@ -32,3 +32,13 @@ ENTRY (__syscall_error)
-
- #define __syscall_error __syscall_error_1
- #include <sysdeps/unix/sh/sysdep.S>
-+
-+ .data
-+ .align 3
-+ .globl ___fpscr_values
-+ .type ___fpscr_values, @object
-+ .size ___fpscr_values, 8
-+___fpscr_values:
-+ .long 0
-+ .long 0x80000
-+weak_alias (___fpscr_values, __fpscr_values)
diff --git a/patches/glibc-2.14.1/0018-optimized-string-functions-for-NEON-from-Linaro.patch b/patches/glibc-2.14.1/0018-optimized-string-functions-for-NEON-from-Linaro.patch
deleted file mode 100644
index 80a9629..0000000
--- a/patches/glibc-2.14.1/0018-optimized-string-functions-for-NEON-from-Linaro.patch
+++ /dev/null
@@ -1,1292 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Thu, 15 Sep 2011 16:50:56 +0200
-Subject: [PATCH] optimized string functions for NEON from Linaro
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- .../sysdeps/arm/eabi/arm/cortex-a8/memchr.S | 150 +++++++
- .../sysdeps/arm/eabi/arm/cortex-a8/memcpy.S | 152 +++++++
- .../sysdeps/arm/eabi/arm/cortex-a8/memset.S | 118 +++++
- .../sysdeps/arm/eabi/arm/cortex-a8/strchr.S | 76 ++++
- .../sysdeps/arm/eabi/arm/cortex-a8/strcmp.c | 449 ++++++++++++++++++++
- .../sysdeps/arm/eabi/arm/cortex-a8/strcpy.c | 172 ++++++++
- .../sysdeps/arm/eabi/arm/cortex-a8/strlen.S | 111 +++++
- 7 files changed, 1228 insertions(+), 0 deletions(-)
- create mode 100644 cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memchr.S
- create mode 100644 cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memcpy.S
- create mode 100644 cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memset.S
- create mode 100644 cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strchr.S
- create mode 100644 cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strcmp.c
- create mode 100644 cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strcpy.c
- create mode 100644 cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strlen.S
-
-diff --git a/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memchr.S b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memchr.S
-new file mode 100644
-index 0000000..8f5aaa9
---- /dev/null
-+++ b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memchr.S
-@@ -0,0 +1,150 @@
-+/* Copyright (c) 2010-2011, Linaro Limited
-+ All rights reserved.
-+
-+ Redistribution and use in source and binary forms, with or without
-+ modification, are permitted provided that the following conditions
-+ are met:
-+
-+ * Redistributions of source code must retain the above copyright
-+ notice, this list of conditions and the following disclaimer.
-+
-+ * Redistributions in binary form must reproduce the above copyright
-+ notice, this list of conditions and the following disclaimer in the
-+ documentation and/or other materials provided with the distribution.
-+
-+ * Neither the name of Linaro Limited nor the names of its
-+ contributors may be used to endorse or promote products derived
-+ from this software without specific prior written permission.
-+
-+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+
-+ Written by Dave Gilbert <david.gilbert@linaro.org>
-+
-+ This memchr routine is optimised on a Cortex-A9 and should work on
-+ all ARMv7 processors. It has a fast past for short sizes, and has
-+ an optimised path for large data sets; the worst case is finding the
-+ match early in a large data set. */
-+
-+@ 2011-02-07 david.gilbert@linaro.org
-+@ Extracted from local git a5b438d861
-+@ 2011-07-14 david.gilbert@linaro.org
-+@ Import endianness fix from local git ea786f1b
-+
-+ .syntax unified
-+ .arch armv7-a
-+
-+@ this lets us check a flag in a 00/ff byte easily in either endianness
-+#ifdef __ARMEB__
-+#define CHARTSTMASK(c) 1<<(31-(c*8))
-+#else
-+#define CHARTSTMASK(c) 1<<(c*8)
-+#endif
-+ .text
-+ .thumb
-+
-+@ ---------------------------------------------------------------------------
-+ .thumb_func
-+ .align 2
-+ .p2align 4,,15
-+ .global memchr
-+ .type memchr,%function
-+memchr:
-+ @ r0 = start of memory to scan
-+ @ r1 = character to look for
-+ @ r2 = length
-+ @ returns r0 = pointer to character or NULL if not found
-+ and r1,r1,#0xff @ Don't think we can trust the caller to actually pass a char
-+
-+ cmp r2,#16 @ If it's short don't bother with anything clever
-+ blt 20f
-+
-+ tst r0, #7 @ If it's already aligned skip the next bit
-+ beq 10f
-+
-+ @ Work up to an aligned point
-+5:
-+ ldrb r3, [r0],#1
-+ subs r2, r2, #1
-+ cmp r3, r1
-+ beq 50f @ If it matches exit found
-+ tst r0, #7
-+ cbz r2, 40f @ If we run off the end, exit not found
-+ bne 5b @ If not aligned yet then do next byte
-+
-+10:
-+ @ At this point, we are aligned, we know we have at least 8 bytes to work with
-+ push {r4,r5,r6,r7}
-+ orr r1, r1, r1, lsl #8 @ expand the match word across to all bytes
-+ orr r1, r1, r1, lsl #16
-+ bic r4, r2, #7 @ Number of double words to work with
-+ mvns r7, #0 @ all F's
-+ movs r3, #0
-+
-+15:
-+ ldmia r0!,{r5,r6}
-+ subs r4, r4, #8
-+ eor r5,r5, r1 @ Get it so that r5,r6 have 00's where the bytes match the target
-+ eor r6,r6, r1
-+ uadd8 r5, r5, r7 @ Parallel add 0xff - sets the GE bits for anything that wasn't 0
-+ sel r5, r3, r7 @ bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION
-+ uadd8 r6, r6, r7 @ Parallel add 0xff - sets the GE bits for anything that wasn't 0
-+ sel r6, r5, r7 @ chained....bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION
-+ cbnz r6, 60f
-+ bne 15b @ (Flags from the subs above) If not run out of bytes then go around again
-+
-+ pop {r4,r5,r6,r7}
-+ and r1,r1,#0xff @ Get r1 back to a single character from the expansion above
-+ and r2,r2,#7 @ Leave the count remaining as the number after the double words have been done
-+
-+20:
-+ cbz r2, 40f @ 0 length or hit the end already then not found
-+
-+21: @ Post aligned section, or just a short call
-+ ldrb r3,[r0],#1
-+ subs r2,r2,#1
-+ eor r3,r3,r1 @ r3 = 0 if match - doesn't break flags from sub
-+ cbz r3, 50f
-+ bne 21b @ on r2 flags
-+
-+40:
-+ movs r0,#0 @ not found
-+ bx lr
-+
-+50:
-+ subs r0,r0,#1 @ found
-+ bx lr
-+
-+60: @ We're here because the fast path found a hit - now we have to track down exactly which word it was
-+ @ r0 points to the start of the double word after the one that was tested
-+ @ r5 has the 00/ff pattern for the first word, r6 has the chained value
-+ cmp r5, #0
-+ itte eq
-+ moveq r5, r6 @ the end is in the 2nd word
-+ subeq r0,r0,#3 @ Points to 2nd byte of 2nd word
-+ subne r0,r0,#7 @ or 2nd byte of 1st word
-+
-+ @ r0 currently points to the 3rd byte of the word containing the hit
-+ tst r5, # CHARTSTMASK(0) @ 1st character
-+ bne 61f
-+ adds r0,r0,#1
-+ tst r5, # CHARTSTMASK(1) @ 2nd character
-+ ittt eq
-+ addeq r0,r0,#1
-+ tsteq r5, # (3<<15) @ 2nd & 3rd character
-+ @ If not the 3rd must be the last one
-+ addeq r0,r0,#1
-+
-+61:
-+ pop {r4,r5,r6,r7}
-+ subs r0,r0,#1
-+ bx lr
-diff --git a/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memcpy.S b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memcpy.S
-new file mode 100644
-index 0000000..3be24ca
---- /dev/null
-+++ b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memcpy.S
-@@ -0,0 +1,152 @@
-+/* Copyright (c) 2010-2011, Linaro Limited
-+ All rights reserved.
-+
-+ Redistribution and use in source and binary forms, with or without
-+ modification, are permitted provided that the following conditions
-+ are met:
-+
-+ * Redistributions of source code must retain the above copyright
-+ notice, this list of conditions and the following disclaimer.
-+
-+ * Redistributions in binary form must reproduce the above copyright
-+ notice, this list of conditions and the following disclaimer in the
-+ documentation and/or other materials provided with the distribution.
-+
-+ * Neither the name of Linaro Limited nor the names of its
-+ contributors may be used to endorse or promote products derived
-+ from this software without specific prior written permission.
-+
-+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+
-+ Written by Dave Gilbert <david.gilbert@linaro.org>
-+
-+ This memcpy routine is optimised on a Cortex-A9 and should work on
-+ all ARMv7 processors with NEON. */
-+
-+@ 2011-09-01 david.gilbert@linaro.org
-+@ Extracted from local git 2f11b436
-+
-+ .syntax unified
-+ .arch armv7-a
-+
-+@ this lets us check a flag in a 00/ff byte easily in either endianness
-+#ifdef __ARMEB__
-+#define CHARTSTMASK(c) 1<<(31-(c*8))
-+#else
-+#define CHARTSTMASK(c) 1<<(c*8)
-+#endif
-+ .text
-+ .thumb
-+
-+@ ---------------------------------------------------------------------------
-+ .thumb_func
-+ .align 2
-+ .p2align 4,,15
-+ .global memcpy
-+ .type memcpy,%function
-+memcpy:
-+ @ r0 = dest
-+ @ r1 = source
-+ @ r2 = count
-+ @ returns dest in r0
-+ @ Overlaps of source/dest not allowed according to spec
-+ @ Note this routine relies on v7 misaligned loads/stores
-+ pld [r1]
-+ mov r12, r0 @ stash original r0
-+ cmp r2,#32
-+ blt 10f @ take the small copy case separately
-+
-+ @ test for either source or destination being misaligned
-+ @ (We only rely on word align)
-+ tst r0,#3
-+ it eq
-+ tsteq r1,#3
-+ bne 30f @ misaligned case
-+
-+4:
-+ @ at this point we are word (or better) aligned and have at least
-+ @ 32 bytes to play with
-+
-+ @ If it's a huge copy, try Neon
-+ cmp r2, #128*1024
-+ bge 35f @ Sharing general non-aligned case here, aligned could be faster
-+
-+ push {r3,r4,r5,r6,r7,r8,r10,r11}
-+5:
-+ ldmia r1!,{r3,r4,r5,r6,r7,r8,r10,r11}
-+ sub r2,r2,#32
-+ pld [r1,#96]
-+ cmp r2,#32
-+ stmia r0!,{r3,r4,r5,r6,r7,r8,r10,r11}
-+ bge 5b
-+
-+ pop {r3,r4,r5,r6,r7,r8,r10,r11}
-+ @ We are now down to less than 32 bytes
-+ cbz r2,15f @ quick exit for the case where we copied a multiple of 32
-+
-+10: @ small copies (not necessarily aligned - note might be slightly more than 32bytes)
-+ cmp r2,#4
-+ blt 12f
-+11:
-+ sub r2,r2,#4
-+ cmp r2,#4
-+ ldr r3, [r1],#4
-+ str r3, [r0],#4
-+ bge 11b
-+12:
-+ tst r2,#2
-+ itt ne
-+ ldrhne r3, [r1],#2
-+ strhne r3, [r0],#2
-+
-+ tst r2,#1
-+ itt ne
-+ ldrbne r3, [r1],#1
-+ strbne r3, [r0],#1
-+
-+15: @ exit
-+ mov r0,r12 @ restore r0
-+ bx lr
-+
-+ .align 2
-+ .p2align 4,,15
-+30: @ non-aligned - at least 32 bytes to play with
-+ @ Test for co-misalignment
-+ eor r3, r0, r1
-+ tst r3,#3
-+ beq 50f
-+
-+ @ Use Neon for misaligned
-+35:
-+ vld1.8 {d0,d1,d2,d3}, [r1]!
-+ sub r2,r2,#32
-+ cmp r2,#32
-+ pld [r1,#96]
-+ vst1.8 {d0,d1,d2,d3}, [r0]!
-+ bge 35b
-+ b 10b @ TODO: Probably a bad idea to switch to ARM at this point
-+
-+ .align 2
-+ .p2align 4,,15
-+50: @ Co-misaligned
-+ @ At this point we've got at least 32 bytes
-+51:
-+ ldrb r3,[r1],#1
-+ sub r2,r2,#1
-+ strb r3,[r0],#1
-+ tst r0,#7
-+ bne 51b
-+
-+ cmp r2,#32
-+ blt 10b
-+ b 4b
-diff --git a/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memset.S b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memset.S
-new file mode 100644
-index 0000000..921cb75
---- /dev/null
-+++ b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memset.S
-@@ -0,0 +1,118 @@
-+/* Copyright (c) 2010-2011, Linaro Limited
-+ All rights reserved.
-+
-+ Redistribution and use in source and binary forms, with or without
-+ modification, are permitted provided that the following conditions
-+ are met:
-+
-+ * Redistributions of source code must retain the above copyright
-+ notice, this list of conditions and the following disclaimer.
-+
-+ * Redistributions in binary form must reproduce the above copyright
-+ notice, this list of conditions and the following disclaimer in the
-+ documentation and/or other materials provided with the distribution.
-+
-+ * Neither the name of Linaro Limited nor the names of its
-+ contributors may be used to endorse or promote products derived
-+ from this software without specific prior written permission.
-+
-+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+
-+ Written by Dave Gilbert <david.gilbert@linaro.org>
-+
-+ This memset routine is optimised on a Cortex-A9 and should work on
-+ all ARMv7 processors. */
-+
-+ .syntax unified
-+ .arch armv7-a
-+
-+@ 2011-08-30 david.gilbert@linaro.org
-+@ Extracted from local git 2f11b436
-+
-+@ this lets us check a flag in a 00/ff byte easily in either endianness
-+#ifdef __ARMEB__
-+#define CHARTSTMASK(c) 1<<(31-(c*8))
-+#else
-+#define CHARTSTMASK(c) 1<<(c*8)
-+#endif
-+ .text
-+ .thumb
-+
-+@ ---------------------------------------------------------------------------
-+ .thumb_func
-+ .align 2
-+ .p2align 4,,15
-+ .global memset
-+ .type memset,%function
-+memset:
-+ @ r0 = address
-+ @ r1 = character
-+ @ r2 = count
-+ @ returns original address in r0
-+
-+ mov r3, r0 @ Leave r0 alone
-+ cbz r2, 10f @ Exit if 0 length
-+
-+ tst r0, #7
-+ beq 2f @ Already aligned
-+
-+ @ Ok, so we're misaligned here
-+1:
-+ strb r1, [r3], #1
-+ subs r2,r2,#1
-+ tst r3, #7
-+ cbz r2, 10f @ Exit if we hit the end
-+ bne 1b @ go round again if still misaligned
-+
-+2:
-+ @ OK, so we're aligned
-+ push {r4,r5,r6,r7}
-+ bics r4, r2, #15 @ if less than 16 bytes then need to finish it off
-+ beq 5f
-+
-+3:
-+ @ POSIX says that ch is cast to an unsigned char. A uxtb is one
-+ @ byte and takes two cycles, where an AND is four bytes but one
-+ @ cycle.
-+ and r1, #0xFF
-+ orr r1, r1, r1, lsl#8 @ Same character into all bytes
-+ orr r1, r1, r1, lsl#16
-+ mov r5,r1
-+ mov r6,r1
-+ mov r7,r1
-+
-+4:
-+ subs r4,r4,#16
-+ stmia r3!,{r1,r5,r6,r7}
-+ bne 4b
-+ and r2,r2,#15
-+
-+ @ At this point we're still aligned and we have upto align-1 bytes left to right
-+ @ we can avoid some of the byte-at-a time now by testing for some big chunks
-+ tst r2,#8
-+ itt ne
-+ subne r2,r2,#8
-+ stmiane r3!,{r1,r5}
-+
-+5:
-+ pop {r4,r5,r6,r7}
-+ cbz r2, 10f
-+
-+ @ Got to do any last < alignment bytes
-+6:
-+ subs r2,r2,#1
-+ strb r1,[r3],#1
-+ bne 6b
-+
-+10:
-+ bx lr @ goodbye
-diff --git a/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strchr.S b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strchr.S
-new file mode 100644
-index 0000000..8875dbf
---- /dev/null
-+++ b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strchr.S
-@@ -0,0 +1,76 @@
-+/* Copyright (c) 2010-2011, Linaro Limited
-+ All rights reserved.
-+
-+ Redistribution and use in source and binary forms, with or without
-+ modification, are permitted provided that the following conditions
-+ are met:
-+
-+ * Redistributions of source code must retain the above copyright
-+ notice, this list of conditions and the following disclaimer.
-+
-+ * Redistributions in binary form must reproduce the above copyright
-+ notice, this list of conditions and the following disclaimer in the
-+ documentation and/or other materials provided with the distribution.
-+
-+ * Neither the name of Linaro Limited nor the names of its
-+ contributors may be used to endorse or promote products derived
-+ from this software without specific prior written permission.
-+
-+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+
-+ Written by Dave Gilbert <david.gilbert@linaro.org>
-+
-+ A very simple strchr routine, from benchmarks on A9 it's a bit faster than
-+ the current version in eglibc (2.12.1-0ubuntu14 package)
-+ I don't think doing a word at a time version is worth it since a lot
-+ of strchr cases are very short anyway */
-+
-+@ 2011-02-07 david.gilbert@linaro.org
-+@ Extracted from local git a5b438d861
-+
-+ .syntax unified
-+ .arch armv7-a
-+
-+ .text
-+ .thumb
-+
-+@ ---------------------------------------------------------------------------
-+
-+ .thumb_func
-+ .align 2
-+ .p2align 4,,15
-+ .global strchr
-+ .type strchr,%function
-+strchr:
-+ @ r0 = start of string
-+ @ r1 = character to match
-+ @ returns NULL for no match, or a pointer to the match
-+ and r1,r1, #255
-+
-+1:
-+ ldrb r2,[r0],#1
-+ cmp r2,r1
-+ cbz r2,10f
-+ bne 1b
-+
-+ @ We're here if it matched
-+5:
-+ subs r0,r0,#1
-+ bx lr
-+
-+10:
-+ @ We're here if we ran off the end
-+ cmp r1, #0 @ Corner case - you're allowed to search for the nil and get a pointer to it
-+ beq 5b @ A bit messy, if it's common we should branch at the start to a special loop
-+ mov r0,#0
-+ bx lr
-diff --git a/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strcmp.c b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strcmp.c
-new file mode 100644
-index 0000000..fb2280d
---- /dev/null
-+++ b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strcmp.c
-@@ -0,0 +1,449 @@
-+/*
-+ * Copyright (c) 2008 ARM Ltd
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * 2. Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * 3. The name of the company may not be used to endorse or promote
-+ * products derived from this software without specific prior written
-+ * permission.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
-+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-+ * IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#include <string.h>
-+#include <memcopy.h>
-+
-+#undef strcmp
-+
-+
-+#ifdef __ARMEB__
-+#define SHFT2LSB "lsl"
-+#define SHFT2MSB "lsr"
-+#define MSB "0x000000ff"
-+#define LSB "0xff000000"
-+#else
-+#define SHFT2LSB "lsr"
-+#define SHFT2MSB "lsl"
-+#define MSB "0xff000000"
-+#define LSB "0x000000ff"
-+#endif
-+
-+#ifdef __thumb2__
-+#define magic1(REG) "#0x01010101"
-+#define magic2(REG) "#0x80808080"
-+#else
-+#define magic1(REG) #REG
-+#define magic2(REG) #REG ", lsl #7"
-+#endif
-+
-+int
-+__attribute__((naked)) strcmp (const char* s1, const char* s2)
-+{
-+ asm(
-+#if !(defined(__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) || \
-+ (defined (__thumb__) && !defined (__thumb2__)))
-+ "pld [r0, #0]\n\t"
-+ "pld [r1, #0]\n\t"
-+ "eor r2, r0, r1\n\t"
-+ "tst r2, #3\n\t"
-+ /* Strings not at same byte offset from a word boundary. */
-+ "bne strcmp_unaligned\n\t"
-+ "ands r2, r0, #3\n\t"
-+ "bic r0, r0, #3\n\t"
-+ "bic r1, r1, #3\n\t"
-+ "ldr ip, [r0], #4\n\t"
-+ "it eq\n\t"
-+ "ldreq r3, [r1], #4\n\t"
-+ "beq 1f\n\t"
-+ /* Although s1 and s2 have identical initial alignment, they are
-+ not currently word aligned. Rather than comparing bytes,
-+ make sure that any bytes fetched from before the addressed
-+ bytes are forced to 0xff. Then they will always compare
-+ equal. */
-+ "eor r2, r2, #3\n\t"
-+ "lsl r2, r2, #3\n\t"
-+ "mvn r3, #"MSB"\n\t"
-+ SHFT2LSB" r2, r3, r2\n\t"
-+ "ldr r3, [r1], #4\n\t"
-+ "orr ip, ip, r2\n\t"
-+ "orr r3, r3, r2\n"
-+ "1:\n\t"
-+#ifndef __thumb2__
-+ /* Load the 'magic' constant 0x01010101. */
-+ "str r4, [sp, #-4]!\n\t"
-+ "mov r4, #1\n\t"
-+ "orr r4, r4, r4, lsl #8\n\t"
-+ "orr r4, r4, r4, lsl #16\n"
-+#endif
-+ ".p2align 2\n"
-+ "4:\n\t"
-+ "pld [r0, #8]\n\t"
-+ "pld [r1, #8]\n\t"
-+ "sub r2, ip, "magic1(r4)"\n\t"
-+ "cmp ip, r3\n\t"
-+ "itttt eq\n\t"
-+ /* check for any zero bytes in first word */
-+ "biceq r2, r2, ip\n\t"
-+ "tsteq r2, "magic2(r4)"\n\t"
-+ "ldreq ip, [r0], #4\n\t"
-+ "ldreq r3, [r1], #4\n\t"
-+ "beq 4b\n"
-+ "2:\n\t"
-+ /* There's a zero or a different byte in the word */
-+ SHFT2MSB" r0, ip, #24\n\t"
-+ SHFT2LSB" ip, ip, #8\n\t"
-+ "cmp r0, #1\n\t"
-+ "it cs\n\t"
-+ "cmpcs r0, r3, "SHFT2MSB" #24\n\t"
-+ "it eq\n\t"
-+ SHFT2LSB"eq r3, r3, #8\n\t"
-+ "beq 2b\n\t"
-+ /* On a big-endian machine, r0 contains the desired byte in bits
-+ 0-7; on a little-endian machine they are in bits 24-31. In
-+ both cases the other bits in r0 are all zero. For r3 the
-+ interesting byte is at the other end of the word, but the
-+ other bits are not necessarily zero. We need a signed result
-+ representing the differnece in the unsigned bytes, so for the
-+ little-endian case we can't just shift the interesting bits
-+ up. */
-+#ifdef __ARMEB__
-+ "sub r0, r0, r3, lsr #24\n\t"
-+#else
-+ "and r3, r3, #255\n\t"
-+#ifdef __thumb2__
-+ /* No RSB instruction in Thumb2 */
-+ "lsr r0, r0, #24\n\t"
-+ "sub r0, r0, r3\n\t"
-+#else
-+ "rsb r0, r3, r0, lsr #24\n\t"
-+#endif
-+#endif
-+#ifndef __thumb2__
-+ "ldr r4, [sp], #4\n\t"
-+#endif
-+ "BX LR"
-+#elif (defined (__thumb__) && !defined (__thumb2__))
-+ "1:\n\t"
-+ "ldrb r2, [r0]\n\t"
-+ "ldrb r3, [r1]\n\t"
-+ "add r0, r0, #1\n\t"
-+ "add r1, r1, #1\n\t"
-+ "cmp r2, #0\n\t"
-+ "beq 2f\n\t"
-+ "cmp r2, r3\n\t"
-+ "beq 1b\n\t"
-+ "2:\n\t"
-+ "sub r0, r2, r3\n\t"
-+ "bx lr"
-+#else
-+ "3:\n\t"
-+ "ldrb r2, [r0], #1\n\t"
-+ "ldrb r3, [r1], #1\n\t"
-+ "cmp r2, #1\n\t"
-+ "it cs\n\t"
-+ "cmpcs r2, r3\n\t"
-+ "beq 3b\n\t"
-+ "sub r0, r2, r3\n\t"
-+ "BX LR"
-+#endif
-+ );
-+}
-+
-+#if !(defined(__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) || \
-+ (defined (__thumb__) && !defined (__thumb2__)))
-+static int __attribute__((naked, used))
-+strcmp_unaligned(const char* s1, const char* s2)
-+{
-+#if 0
-+ /* The assembly code below is based on the following alogrithm. */
-+#ifdef __ARMEB__
-+#define RSHIFT <<
-+#define LSHIFT >>
-+#else
-+#define RSHIFT >>
-+#define LSHIFT <<
-+#endif
-+
-+#define body(shift) \
-+ mask = 0xffffffffU RSHIFT shift; \
-+ w1 = *wp1++; \
-+ w2 = *wp2++; \
-+ do \
-+ { \
-+ t1 = w1 & mask; \
-+ if (__builtin_expect(t1 != w2 RSHIFT shift, 0)) \
-+ { \
-+ w2 RSHIFT= shift; \
-+ break; \
-+ } \
-+ if (__builtin_expect(((w1 - b1) & ~w1) & (b1 << 7), 0)) \
-+ { \
-+ /* See comment in assembler below re syndrome on big-endian */\
-+ if ((((w1 - b1) & ~w1) & (b1 << 7)) & mask) \
-+ w2 RSHIFT= shift; \
-+ else \
-+ { \
-+ w2 = *wp2; \
-+ t1 = w1 RSHIFT (32 - shift); \
-+ w2 = (w2 LSHIFT (32 - shift)) RSHIFT (32 - shift); \
-+ } \
-+ break; \
-+ } \
-+ w2 = *wp2++; \
-+ t1 ^= w1; \
-+ if (__builtin_expect(t1 != w2 LSHIFT (32 - shift), 0)) \
-+ { \
-+ t1 = w1 >> (32 - shift); \
-+ w2 = (w2 << (32 - shift)) RSHIFT (32 - shift); \
-+ break; \
-+ } \
-+ w1 = *wp1++; \
-+ } while (1)
-+
-+ const unsigned* wp1;
-+ const unsigned* wp2;
-+ unsigned w1, w2;
-+ unsigned mask;
-+ unsigned shift;
-+ unsigned b1 = 0x01010101;
-+ char c1, c2;
-+ unsigned t1;
-+
-+ while (((unsigned) s1) & 3)
-+ {
-+ c1 = *s1++;
-+ c2 = *s2++;
-+ if (c1 == 0 || c1 != c2)
-+ return c1 - (int)c2;
-+ }
-+ wp1 = (unsigned*) (((unsigned)s1) & ~3);
-+ wp2 = (unsigned*) (((unsigned)s2) & ~3);
-+ t1 = ((unsigned) s2) & 3;
-+ if (t1 == 1)
-+ {
-+ body(8);
-+ }
-+ else if (t1 == 2)
-+ {
-+ body(16);
-+ }
-+ else
-+ {
-+ body (24);
-+ }
-+
-+ do
-+ {
-+#ifdef __ARMEB__
-+ c1 = (char) t1 >> 24;
-+ c2 = (char) w2 >> 24;
-+#else
-+ c1 = (char) t1;
-+ c2 = (char) w2;
-+#endif
-+ t1 RSHIFT= 8;
-+ w2 RSHIFT= 8;
-+ } while (c1 != 0 && c1 == c2);
-+ return c1 - c2;
-+#endif
-+
-+ asm("wp1 .req r0\n\t"
-+ "wp2 .req r1\n\t"
-+ "b1 .req r2\n\t"
-+ "w1 .req r4\n\t"
-+ "w2 .req r5\n\t"
-+ "t1 .req ip\n\t"
-+ "@ r3 is scratch\n"
-+
-+ /* First of all, compare bytes until wp1(sp1) is word-aligned. */
-+ "1:\n\t"
-+ "tst wp1, #3\n\t"
-+ "beq 2f\n\t"
-+ "ldrb r2, [wp1], #1\n\t"
-+ "ldrb r3, [wp2], #1\n\t"
-+ "cmp r2, #1\n\t"
-+ "it cs\n\t"
-+ "cmpcs r2, r3\n\t"
-+ "beq 1b\n\t"
-+ "sub r0, r2, r3\n\t"
-+ "BX LR\n"
-+
-+ "2:\n\t"
-+ "str r5, [sp, #-4]!\n\t"
-+ "str r4, [sp, #-4]!\n\t"
-+ // "stmfd sp!, {r4, r5}\n\t"
-+ "mov b1, #1\n\t"
-+ "orr b1, b1, b1, lsl #8\n\t"
-+ "orr b1, b1, b1, lsl #16\n\t"
-+
-+ "and t1, wp2, #3\n\t"
-+ "bic wp2, wp2, #3\n\t"
-+ "ldr w1, [wp1], #4\n\t"
-+ "ldr w2, [wp2], #4\n\t"
-+ "cmp t1, #2\n\t"
-+ "beq 2f\n\t"
-+ "bhi 3f\n"
-+
-+ /* Critical inner Loop: Block with 3 bytes initial overlap */
-+ ".p2align 2\n"
-+ "1:\n\t"
-+ "bic t1, w1, #"MSB"\n\t"
-+ "cmp t1, w2, "SHFT2LSB" #8\n\t"
-+ "sub r3, w1, b1\n\t"
-+ "bic r3, r3, w1\n\t"
-+ "bne 4f\n\t"
-+ "ands r3, r3, b1, lsl #7\n\t"
-+ "it eq\n\t"
-+ "ldreq w2, [wp2], #4\n\t"
-+ "bne 5f\n\t"
-+ "eor t1, t1, w1\n\t"
-+ "cmp t1, w2, "SHFT2MSB" #24\n\t"
-+ "bne 6f\n\t"
-+ "ldr w1, [wp1], #4\n\t"
-+ "b 1b\n"
-+ "4:\n\t"
-+ SHFT2LSB" w2, w2, #8\n\t"
-+ "b 8f\n"
-+
-+ "5:\n\t"
-+#ifdef __ARMEB__
-+ /* The syndrome value may contain false ones if the string ends
-+ with the bytes 0x01 0x00 */
-+ "tst w1, #0xff000000\n\t"
-+ "itt ne\n\t"
-+ "tstne w1, #0x00ff0000\n\t"
-+ "tstne w1, #0x0000ff00\n\t"
-+ "beq 7f\n\t"
-+#else
-+ "bics r3, r3, #0xff000000\n\t"
-+ "bne 7f\n\t"
-+#endif
-+ "ldrb w2, [wp2]\n\t"
-+ SHFT2LSB" t1, w1, #24\n\t"
-+#ifdef __ARMEB__
-+ "lsl w2, w2, #24\n\t"
-+#endif
-+ "b 8f\n"
-+
-+ "6:\n\t"
-+ SHFT2LSB" t1, w1, #24\n\t"
-+ "and w2, w2, #"LSB"\n\t"
-+ "b 8f\n"
-+
-+ /* Critical inner Loop: Block with 2 bytes initial overlap */
-+ ".p2align 2\n"
-+ "2:\n\t"
-+ SHFT2MSB" t1, w1, #16\n\t"
-+ "sub r3, w1, b1\n\t"
-+ SHFT2LSB" t1, t1, #16\n\t"
-+ "bic r3, r3, w1\n\t"
-+ "cmp t1, w2, "SHFT2LSB" #16\n\t"
-+ "bne 4f\n\t"
-+ "ands r3, r3, b1, lsl #7\n\t"
-+ "it eq\n\t"
-+ "ldreq w2, [wp2], #4\n\t"
-+ "bne 5f\n\t"
-+ "eor t1, t1, w1\n\t"
-+ "cmp t1, w2, "SHFT2MSB" #16\n\t"
-+ "bne 6f\n\t"
-+ "ldr w1, [wp1], #4\n\t"
-+ "b 2b\n"
-+
-+ "5:\n\t"
-+#ifdef __ARMEB__
-+ /* The syndrome value may contain false ones if the string ends
-+ with the bytes 0x01 0x00 */
-+ "tst w1, #0xff000000\n\t"
-+ "it ne\n\t"
-+ "tstne w1, #0x00ff0000\n\t"
-+ "beq 7f\n\t"
-+#else
-+ "lsls r3, r3, #16\n\t"
-+ "bne 7f\n\t"
-+#endif
-+ "ldrh w2, [wp2]\n\t"
-+ SHFT2LSB" t1, w1, #16\n\t"
-+#ifdef __ARMEB__
-+ "lsl w2, w2, #16\n\t"
-+#endif
-+ "b 8f\n"
-+
-+ "6:\n\t"
-+ SHFT2MSB" w2, w2, #16\n\t"
-+ SHFT2LSB" t1, w1, #16\n\t"
-+ "4:\n\t"
-+ SHFT2LSB" w2, w2, #16\n\t"
-+ "b 8f\n\t"
-+
-+ /* Critical inner Loop: Block with 1 byte initial overlap */
-+ ".p2align 2\n"
-+ "3:\n\t"
-+ "and t1, w1, #"LSB"\n\t"
-+ "cmp t1, w2, "SHFT2LSB" #24\n\t"
-+ "sub r3, w1, b1\n\t"
-+ "bic r3, r3, w1\n\t"
-+ "bne 4f\n\t"
-+ "ands r3, r3, b1, lsl #7\n\t"
-+ "it eq\n\t"
-+ "ldreq w2, [wp2], #4\n\t"
-+ "bne 5f\n\t"
-+ "eor t1, t1, w1\n\t"
-+ "cmp t1, w2, "SHFT2MSB" #8\n\t"
-+ "bne 6f\n\t"
-+ "ldr w1, [wp1], #4\n\t"
-+ "b 3b\n"
-+ "4:\n\t"
-+ SHFT2LSB" w2, w2, #24\n\t"
-+ "b 8f\n"
-+ "5:\n\t"
-+ /* The syndrome value may contain false ones if the string ends
-+ with the bytes 0x01 0x00 */
-+ "tst w1, #"LSB"\n\t"
-+ "beq 7f\n\t"
-+ "ldr w2, [wp2], #4\n"
-+ "6:\n\t"
-+ SHFT2LSB" t1, w1, #8\n\t"
-+ "bic w2, w2, #"MSB"\n\t"
-+ "b 8f\n"
-+ "7:\n\t"
-+ "mov r0, #0\n\t"
-+ // "ldmfd sp!, {r4, r5}\n\t"
-+ "ldr r4, [sp], #4\n\t"
-+ "ldr r5, [sp], #4\n\t"
-+ "BX LR\n"
-+ "8:\n\t"
-+ "and r2, t1, #"LSB"\n\t"
-+ "and r0, w2, #"LSB"\n\t"
-+ "cmp r0, #1\n\t"
-+ "it cs\n\t"
-+ "cmpcs r0, r2\n\t"
-+ "itt eq\n\t"
-+ SHFT2LSB"eq t1, t1, #8\n\t"
-+ SHFT2LSB"eq w2, w2, #8\n\t"
-+ "beq 8b\n\t"
-+ "sub r0, r2, r0\n\t"
-+ // "ldmfd sp!, {r4, r5}\n\t"
-+ "ldr r4, [sp], #4\n\t"
-+ "ldr r5, [sp], #4\n\t"
-+ "BX LR");
-+}
-+
-+#endif
-+
-+libc_hidden_builtin_def (strcmp)
-diff --git a/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strcpy.c b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strcpy.c
-new file mode 100644
-index 0000000..aa8cb06
---- /dev/null
-+++ b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strcpy.c
-@@ -0,0 +1,172 @@
-+/*
-+ * Copyright (c) 2008 ARM Ltd
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * 2. Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * 3. The name of the company may not be used to endorse or promote
-+ * products derived from this software without specific prior written
-+ * permission.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
-+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-+ * IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#include <string.h>
-+#include <memcopy.h>
-+
-+#undef strcmp
-+
-+
-+#ifdef __thumb2__
-+#define magic1(REG) "#0x01010101"
-+#define magic2(REG) "#0x80808080"
-+#else
-+#define magic1(REG) #REG
-+#define magic2(REG) #REG ", lsl #7"
-+#endif
-+
-+char* __attribute__((naked))
-+strcpy (char* dst, const char* src)
-+{
-+ asm (
-+#if !(defined(__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) || \
-+ (defined (__thumb__) && !defined (__thumb2__)))
-+ "pld [r1, #0]\n\t"
-+ "eor r2, r0, r1\n\t"
-+ "mov ip, r0\n\t"
-+ "tst r2, #3\n\t"
-+ "bne 4f\n\t"
-+ "tst r1, #3\n\t"
-+ "bne 3f\n"
-+ "5:\n\t"
-+#ifndef __thumb2__
-+ "str r5, [sp, #-4]!\n\t"
-+ "mov r5, #0x01\n\t"
-+ "orr r5, r5, r5, lsl #8\n\t"
-+ "orr r5, r5, r5, lsl #16\n\t"
-+#endif
-+
-+ "str r4, [sp, #-4]!\n\t"
-+ "tst r1, #4\n\t"
-+ "ldr r3, [r1], #4\n\t"
-+ "beq 2f\n\t"
-+ "sub r2, r3, "magic1(r5)"\n\t"
-+ "bics r2, r2, r3\n\t"
-+ "tst r2, "magic2(r5)"\n\t"
-+ "itt eq\n\t"
-+ "streq r3, [ip], #4\n\t"
-+ "ldreq r3, [r1], #4\n"
-+ "bne 1f\n\t"
-+ /* Inner loop. We now know that r1 is 64-bit aligned, so we
-+ can safely fetch up to two words. This allows us to avoid
-+ load stalls. */
-+ ".p2align 2\n"
-+ "2:\n\t"
-+ "pld [r1, #8]\n\t"
-+ "ldr r4, [r1], #4\n\t"
-+ "sub r2, r3, "magic1(r5)"\n\t"
-+ "bics r2, r2, r3\n\t"
-+ "tst r2, "magic2(r5)"\n\t"
-+ "sub r2, r4, "magic1(r5)"\n\t"
-+ "bne 1f\n\t"
-+ "str r3, [ip], #4\n\t"
-+ "bics r2, r2, r4\n\t"
-+ "tst r2, "magic2(r5)"\n\t"
-+ "itt eq\n\t"
-+ "ldreq r3, [r1], #4\n\t"
-+ "streq r4, [ip], #4\n\t"
-+ "beq 2b\n\t"
-+ "mov r3, r4\n"
-+ "1:\n\t"
-+#ifdef __ARMEB__
-+ "rors r3, r3, #24\n\t"
-+#endif
-+ "strb r3, [ip], #1\n\t"
-+ "tst r3, #0xff\n\t"
-+#ifdef __ARMEL__
-+ "ror r3, r3, #8\n\t"
-+#endif
-+ "bne 1b\n\t"
-+ "ldr r4, [sp], #4\n\t"
-+#ifndef __thumb2__
-+ "ldr r5, [sp], #4\n\t"
-+#endif
-+ "BX LR\n"
-+
-+ /* Strings have the same offset from word alignment, but it's
-+ not zero. */
-+ "3:\n\t"
-+ "tst r1, #1\n\t"
-+ "beq 1f\n\t"
-+ "ldrb r2, [r1], #1\n\t"
-+ "strb r2, [ip], #1\n\t"
-+ "cmp r2, #0\n\t"
-+ "it eq\n"
-+ "BXEQ LR\n"
-+ "1:\n\t"
-+ "tst r1, #2\n\t"
-+ "beq 5b\n\t"
-+ "ldrh r2, [r1], #2\n\t"
-+#ifdef __ARMEB__
-+ "tst r2, #0xff00\n\t"
-+ "iteet ne\n\t"
-+ "strneh r2, [ip], #2\n\t"
-+ "lsreq r2, r2, #8\n\t"
-+ "streqb r2, [ip]\n\t"
-+ "tstne r2, #0xff\n\t"
-+#else
-+ "tst r2, #0xff\n\t"
-+ "itet ne\n\t"
-+ "strneh r2, [ip], #2\n\t"
-+ "streqb r2, [ip]\n\t"
-+ "tstne r2, #0xff00\n\t"
-+#endif
-+ "bne 5b\n\t"
-+ "BX LR\n"
-+
-+ /* src and dst do not have a common word-alignement. Fall back to
-+ byte copying. */
-+ "4:\n\t"
-+ "ldrb r2, [r1], #1\n\t"
-+ "strb r2, [ip], #1\n\t"
-+ "cmp r2, #0\n\t"
-+ "bne 4b\n\t"
-+ "BX LR"
-+
-+#elif !defined (__thumb__) || defined (__thumb2__)
-+ "mov r3, r0\n\t"
-+ "1:\n\t"
-+ "ldrb r2, [r1], #1\n\t"
-+ "strb r2, [r3], #1\n\t"
-+ "cmp r2, #0\n\t"
-+ "bne 1b\n\t"
-+ "BX LR"
-+#else
-+ "mov r3, r0\n\t"
-+ "1:\n\t"
-+ "ldrb r2, [r1]\n\t"
-+ "add r1, r1, #1\n\t"
-+ "strb r2, [r3]\n\t"
-+ "add r3, r3, #1\n\t"
-+ "cmp r2, #0\n\t"
-+ "bne 1b\n\t"
-+ "BX LR"
-+#endif
-+ );
-+}
-+libc_hidden_builtin_def (strcpy)
-diff --git a/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strlen.S b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strlen.S
-new file mode 100644
-index 0000000..125e92f
---- /dev/null
-+++ b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strlen.S
-@@ -0,0 +1,111 @@
-+/* Copyright (c) 2010-2011, Linaro Limited
-+ All rights reserved.
-+
-+ Redistribution and use in source and binary forms, with or without
-+ modification, are permitted provided that the following conditions
-+ are met:
-+
-+ * Redistributions of source code must retain the above copyright
-+ notice, this list of conditions and the following disclaimer.
-+
-+ * Redistributions in binary form must reproduce the above copyright
-+ notice, this list of conditions and the following disclaimer in the
-+ documentation and/or other materials provided with the distribution.
-+
-+ * Neither the name of Linaro Limited nor the names of its
-+ contributors may be used to endorse or promote products derived
-+ from this software without specific prior written permission.
-+
-+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+
-+ Written by Dave Gilbert <david.gilbert@linaro.org>
-+
-+ This strlen routine is optimised on a Cortex-A9 and should work on
-+ all ARMv7 processors. This routine is reasonably fast for short
-+ strings, but is probably slower than a simple implementation if all
-+ your strings are very short */
-+
-+@ 2011-02-08 david.gilbert@linaro.org
-+@ Extracted from local git 6848613a
-+
-+
-+@ this lets us check a flag in a 00/ff byte easily in either endianness
-+#ifdef __ARMEB__
-+#define CHARTSTMASK(c) 1<<(31-(c*8))
-+#else
-+#define CHARTSTMASK(c) 1<<(c*8)
-+#endif
-+
-+@-----------------------------------------------------------------------------------------------------------------------------
-+ .syntax unified
-+ .arch armv7-a
-+
-+ .thumb_func
-+ .align 2
-+ .p2align 4,,15
-+ .global strlen
-+ .type strlen,%function
-+strlen:
-+ @ r0 = string
-+ @ returns count of bytes in string not including terminator
-+ mov r1, r0
-+ push { r4,r6 }
-+ mvns r6, #0 @ all F
-+ movs r4, #0
-+ tst r0, #7
-+ beq 2f
-+
-+1:
-+ ldrb r2, [r1], #1
-+ tst r1, #7 @ Hit alignment yet?
-+ cbz r2, 10f @ Exit if we found the 0
-+ bne 1b
-+
-+ @ So we're now aligned
-+2:
-+ ldmia r1!,{r2,r3}
-+ uadd8 r2, r2, r6 @ Parallel add 0xff - sets the GE bits for anything that wasn't 0
-+ sel r2, r4, r6 @ bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION
-+ uadd8 r3, r3, r6 @ Parallel add 0xff - sets the GE bits for anything that wasn't 0
-+ sel r3, r2, r6 @ bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION
-+ cmp r3, #0
-+ beq 2b
-+
-+strlenendtmp:
-+ @ One (or more) of the bytes we loaded was 0 - but which one?
-+ @ r2 has the mask corresponding to the first loaded word
-+ @ r3 has a combined mask of the two words - but if r2 was all-non 0
-+ @ then it's just the 2nd words
-+ cmp r2, #0
-+ itte eq
-+ moveq r2, r3 @ the end is in the 2nd word
-+ subeq r1,r1,#3
-+ subne r1,r1,#7
-+
-+ @ r1 currently points to the 2nd byte of the word containing the 0
-+ tst r2, # CHARTSTMASK(0) @ 1st character
-+ bne 10f
-+ adds r1,r1,#1
-+ tst r2, # CHARTSTMASK(1) @ 2nd character
-+ ittt eq
-+ addeq r1,r1,#1
-+ tsteq r2, # (3<<15) @ 2nd & 3rd character
-+ @ If not the 3rd must be the last one
-+ addeq r1,r1,#1
-+
-+10:
-+ @ r0 is still at the beginning, r1 is pointing 1 byte after the terminator
-+ sub r0, r1, r0
-+ subs r0, r0, #1
-+ pop { r4, r6 }
-+ bx lr
diff --git a/patches/glibc-2.14.1/0019-add-libc_hidden_builtin_def-for-all-cortex-functions.patch b/patches/glibc-2.14.1/0019-add-libc_hidden_builtin_def-for-all-cortex-functions.patch
deleted file mode 100644
index 6a39044..0000000
--- a/patches/glibc-2.14.1/0019-add-libc_hidden_builtin_def-for-all-cortex-functions.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Thu, 15 Sep 2011 23:30:25 +0200
-Subject: [PATCH] add libc_hidden_builtin_def for all cortex functions
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- .../sysdeps/arm/eabi/arm/cortex-a8/memchr.S | 3 +++
- .../sysdeps/arm/eabi/arm/cortex-a8/memcpy.S | 2 ++
- .../sysdeps/arm/eabi/arm/cortex-a8/memset.S | 2 ++
- .../sysdeps/arm/eabi/arm/cortex-a8/strchr.S | 3 +++
- .../sysdeps/arm/eabi/arm/cortex-a8/strcpy.c | 1 +
- .../sysdeps/arm/eabi/arm/cortex-a8/strlen.S | 2 ++
- 6 files changed, 13 insertions(+), 0 deletions(-)
-
-diff --git a/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memchr.S b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memchr.S
-index 8f5aaa9..6d497cb 100644
---- a/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memchr.S
-+++ b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memchr.S
-@@ -148,3 +148,6 @@ memchr:
- pop {r4,r5,r6,r7}
- subs r0,r0,#1
- bx lr
-+
-+strong_alias (memchr, __memchr)
-+libc_hidden_builtin_def (memchr)
-diff --git a/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memcpy.S b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memcpy.S
-index 3be24ca..c274207 100644
---- a/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memcpy.S
-+++ b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memcpy.S
-@@ -150,3 +150,5 @@ memcpy:
- cmp r2,#32
- blt 10b
- b 4b
-+
-+libc_hidden_builtin_def (memcpy)
-diff --git a/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memset.S b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memset.S
-index 921cb75..d4c12a4 100644
---- a/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memset.S
-+++ b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/memset.S
-@@ -116,3 +116,5 @@ memset:
-
- 10:
- bx lr @ goodbye
-+
-+libc_hidden_builtin_def (memset)
-diff --git a/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strchr.S b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strchr.S
-index 8875dbf..05c832f 100644
---- a/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strchr.S
-+++ b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strchr.S
-@@ -74,3 +74,6 @@ strchr:
- beq 5b @ A bit messy, if it's common we should branch at the start to a special loop
- mov r0,#0
- bx lr
-+
-+weak_alias (strchr, index)
-+libc_hidden_builtin_def (strchr)
-diff --git a/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strcpy.c b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strcpy.c
-index aa8cb06..3bbaa86 100644
---- a/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strcpy.c
-+++ b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strcpy.c
-@@ -169,4 +169,5 @@ strcpy (char* dst, const char* src)
- #endif
- );
- }
-+
- libc_hidden_builtin_def (strcpy)
-diff --git a/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strlen.S b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strlen.S
-index 125e92f..a1e02ad 100644
---- a/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strlen.S
-+++ b/cortex-strings/sysdeps/arm/eabi/arm/cortex-a8/strlen.S
-@@ -109,3 +109,5 @@ strlenendtmp:
- subs r0, r0, #1
- pop { r4, r6 }
- bx lr
-+
-+libc_hidden_builtin_def (strlen)
diff --git a/patches/glibc-2.14.1/0020-revert-sunrpc-removal.patch b/patches/glibc-2.14.1/0020-revert-sunrpc-removal.patch
deleted file mode 100644
index ecad156..0000000
--- a/patches/glibc-2.14.1/0020-revert-sunrpc-removal.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Wed, 2 Nov 2011 17:47:58 +0100
-Subject: [PATCH] revert sunrpc removal
-
-Packages like busybox still need this. We can drop this patch
-later when the packages are adapted to use libtirpc.
-
-This patch was taken from OpenSUSE.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- NEWS | 10 ----------
- include/libc-symbols.h | 2 +-
- nis/Makefile | 4 ++--
- sunrpc/Makefile | 2 +-
- 4 files changed, 4 insertions(+), 14 deletions(-)
-
-diff --git a/NEWS b/NEWS
-index bb517c2..6504f81 100644
---- a/NEWS
-+++ b/NEWS
-@@ -27,16 +27,6 @@ Version 2.14
- 12724, 12734, 12738, 12746, 12766, 12775, 12777, 12782, 12788, 12792,
- 12795, 12811, 12813, 12814, 12841
-
--* The RPC implementation in libc is obsoleted. Old programs keep working
-- but new programs cannot be linked with the routines in libc anymore.
-- Programs in need of RPC functionality must be linked against TI-RPC.
-- The TI-RPC implementation is IPv6 enabled and there are other benefits.
--
-- Visible changes of this change include (obviously) the inability to link
-- programs using RPC functions without referencing the TI-RPC library and the
-- removal of the RPC headers from the glibc headers.
-- Implemented by Ulrich Drepper.
--
- * New Linux interfaces: clock_adjtime, name_to_handle_at, open_by_handle_at,
- syncfs, setns, sendmmsg
-
-diff --git a/include/libc-symbols.h b/include/libc-symbols.h
-index 8cefa67..1b21447 100644
---- a/include/libc-symbols.h
-+++ b/include/libc-symbols.h
-@@ -635,7 +635,7 @@ for linking")
- # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
- # define libc_hidden_def(name) hidden_def (name)
- # define libc_hidden_weak(name) hidden_weak (name)
--# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
-+# define libc_hidden_nolink(name, version) hidden_def (name)
- # define libc_hidden_ver(local, name) hidden_ver (local, name)
- # define libc_hidden_data_def(name) hidden_data_def (name)
- # define libc_hidden_data_weak(name) hidden_data_weak (name)
-diff --git a/nis/Makefile b/nis/Makefile
-index 3a01142..5256d61 100644
---- a/nis/Makefile
-+++ b/nis/Makefile
-@@ -23,9 +23,9 @@ subdir := nis
-
- aux := nis_hash
-
-+headers := $(wildcard rpcsvc/*.[hx])
- distribute := nss-nis.h nss-nisplus.h nis_intern.h Banner \
-- nisplus-parser.h nis_xdr.h nss \
-- $(wildcard rpcsvc/*.[hx])
-+ nisplus-parser.h nis_xdr.h nss
-
- # These are the databases available for the nis (and perhaps later nisplus)
- # service. This must be a superset of the services in nss.
-diff --git a/sunrpc/Makefile b/sunrpc/Makefile
-index 85dcdb1..925b862 100644
---- a/sunrpc/Makefile
-+++ b/sunrpc/Makefile
-@@ -53,7 +53,7 @@ headers-in-tirpc = $(addprefix rpc/,auth.h auth_unix.h clnt.h pmap_clnt.h \
- des_crypt.h)
- headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
- $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
--headers = rpc/netdb.h
-+headers = rpc/netdb.h $(headers-in-tirpc) $(headers-not-in-tirpc)
- install-others = $(inst_sysconfdir)/rpc
- generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
- $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
diff --git a/patches/glibc-2.14.1/0021-fix-libdl-crash.patch b/patches/glibc-2.14.1/0021-fix-libdl-crash.patch
deleted file mode 100644
index 6da75a5..0000000
--- a/patches/glibc-2.14.1/0021-fix-libdl-crash.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Thu, 5 Jan 2012 15:26:47 +0100
-Subject: [PATCH] fix libdl crash
-
-taken from openembedded:
-
-Without this patch programs using alsa-lib crash (alsamixer for example).
-Removed Copyright reverts
-
-Upstream-Status: Pending
-
-http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=675155e9
-http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html
-
-many distributions are using this already
-http://chakra-project.org/ccr/packages/glibc/glibc/PKGBUILD
-http://mailman.archlinux.org/pipermail/arch-commits/2011-June/137142.html
-http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/glibc/current/SOURCES/glibc-2.14-libdl-crash.patch?view=markup&pathrev=691343
-http://repos.archlinuxppc.org/wsvn/filedetails.php?repname=packages&path=%2Fglibc%2Ftrunk%2Fglibc-2.14-libdl-crash.patch
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- elf/dl-close.c | 13 ++-----------
- elf/dl-deps.c | 4 +++-
- elf/dl-libc.c | 6 +++++-
- elf/rtld.c | 1 +
- include/link.h | 6 +++---
- 5 files changed, 14 insertions(+), 16 deletions(-)
-
-diff --git a/elf/dl-close.c b/elf/dl-close.c
-index 02df0d0..831a662 100644
---- a/elf/dl-close.c
-+++ b/elf/dl-close.c
-@@ -119,17 +119,8 @@ _dl_close_worker (struct link_map *map)
- if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
- || dl_close_state != not_pending)
- {
-- if (map->l_direct_opencount == 0)
-- {
-- if (map->l_type == lt_loaded)
-- dl_close_state = rerun;
-- else if (map->l_type == lt_library)
-- {
-- struct link_map **oldp = map->l_initfini;
-- map->l_initfini = map->l_orig_initfini;
-- _dl_scope_free (oldp);
-- }
-- }
-+ if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
-+ dl_close_state = rerun;
-
- /* There are still references to this object. Do nothing more. */
- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
-diff --git a/elf/dl-deps.c b/elf/dl-deps.c
-index 7fa4d69..10a251f 100644
---- a/elf/dl-deps.c
-+++ b/elf/dl-deps.c
-@@ -478,6 +478,7 @@ _dl_map_object_deps (struct link_map *map,
- nneeded * sizeof needed[0]);
- atomic_write_barrier ();
- l->l_initfini = l_initfini;
-+ l->l_free_initfini = 1;
- }
-
- /* If we have no auxiliary objects just go on to the next map. */
-@@ -678,6 +679,7 @@ Filters not supported with LD_TRACE_PRELINKING"));
- l_initfini[nlist] = NULL;
- atomic_write_barrier ();
- map->l_initfini = l_initfini;
-+ map->l_free_initfini = 1;
- if (l_reldeps != NULL)
- {
- atomic_write_barrier ();
-@@ -686,7 +688,7 @@ Filters not supported with LD_TRACE_PRELINKING"));
- _dl_scope_free (old_l_reldeps);
- }
- if (old_l_initfini != NULL)
-- map->l_orig_initfini = old_l_initfini;
-+ _dl_scope_free (old_l_initfini);
-
- if (errno_reason)
- _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
-diff --git a/elf/dl-libc.c b/elf/dl-libc.c
-index 7be9483..a13fce3 100644
---- a/elf/dl-libc.c
-+++ b/elf/dl-libc.c
-@@ -265,13 +265,13 @@ libc_freeres_fn (free_mem)
-
- for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
- {
-- /* Remove all additional names added to the objects. */
- for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
- {
- struct libname_list *lnp = l->l_libname->next;
-
- l->l_libname->next = NULL;
-
-+ /* Remove all additional names added to the objects. */
- while (lnp != NULL)
- {
- struct libname_list *old = lnp;
-@@ -279,6 +279,10 @@ libc_freeres_fn (free_mem)
- if (! old->dont_free)
- free (old);
- }
-+
-+ /* Free the initfini dependency list. */
-+ if (l->l_free_initfini)
-+ free (l->l_initfini);
- }
-
- if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
-diff --git a/elf/rtld.c b/elf/rtld.c
-index 9eb9289..32d745a 100644
---- a/elf/rtld.c
-+++ b/elf/rtld.c
-@@ -2263,6 +2263,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
- lnp->dont_free = 1;
- lnp = lnp->next;
- }
-+ l->l_free_initfini = 0;
-
- if (l != &GL(dl_rtld_map))
- _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
-diff --git a/include/link.h b/include/link.h
-index e877104..b1b4065 100644
---- a/include/link.h
-+++ b/include/link.h
-@@ -192,6 +192,9 @@ struct link_map
- during LD_TRACE_PRELINKING=1
- contains any DT_SYMBOLIC
- libraries. */
-+ unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
-+ freed, ie. not allocated with
-+ the dummy malloc in ld.so. */
-
- /* Collected information about own RPATH directories. */
- struct r_search_path_struct l_rpath_dirs;
-@@ -240,9 +243,6 @@ struct link_map
-
- /* List of object in order of the init and fini calls. */
- struct link_map **l_initfini;
-- /* The init and fini list generated at startup, saved when the
-- object is also loaded dynamically. */
-- struct link_map **l_orig_initfini;
-
- /* List of the dependencies introduced through symbol binding. */
- struct link_map_reldeps
diff --git a/patches/glibc-2.14.1/autogen.sh b/patches/glibc-2.14.1/autogen.sh
deleted file mode 100755
index 2f7a28e..0000000
--- a/patches/glibc-2.14.1/autogen.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-# rebuild ./configure (required by
-# 0003-configure.in-detect-readelf-with-AC_CHECK_TARGET_TOO.patch) but do not
-# use autoreconf, this does not work on every system correctly. Even makefiles
-# do it that way!
-chmod +w configure
-autoconf configure.in > configure
-
diff --git a/patches/glibc-2.14.1/series b/patches/glibc-2.14.1/series
deleted file mode 100644
index d379bcc..0000000
--- a/patches/glibc-2.14.1/series
+++ /dev/null
@@ -1,24 +0,0 @@
-# generated by git-ptx-patches
-#tag:base --start-number 1
-0001-add-install-lib-all-target.patch
-0002-fix-build-error-with-static-nss.patch
-0003-configure.in-detect-readelf-with-AC_CHECK_TARGET_TOO.patch
-0004-stdlib-longlong.patch
-0005-respect-env-CPPFLAGS.patch
-0006-i586-chk.patch
-0007-i386-x86_64-revert-clone-cfi.patch
-0008-queue-header-updates.patch
-0009-don-t-regen-docs-if-perl-is-not-found.patch
-0010-localedef-fix-trampoline.patch
-0011-posix-awk.patch
-0012-resolv-dynamic.patch
-0013-section-comments.patch
-0014-no-inline-gmon.patch
-0015-strict-aliasing.patch
-0016-undefine-__i686.patch
-0017-fpscr-values.patch
-0018-optimized-string-functions-for-NEON-from-Linaro.patch
-0019-add-libc_hidden_builtin_def-for-all-cortex-functions.patch
-0020-revert-sunrpc-removal.patch
-0021-fix-libdl-crash.patch
-# 3609589c1fca6c85cdfb41d7b6bac0a2 - git-ptx-patches magic
diff --git a/patches/glibc-2.16.0/0001-add-install-lib-all-target.patch b/patches/glibc-2.16.0/0001-add-install-lib-all-target.patch
deleted file mode 100644
index 50544e4..0000000
--- a/patches/glibc-2.16.0/0001-add-install-lib-all-target.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Tue, 1 Nov 2011 19:22:27 +0100
-Subject: [PATCH] add install-lib-all target
-
-From http://svn.exactcode.de/t2/trunk/package/base/glibc32/make-install-lib-all.patch
-
-Rule to install all needed libraries, not just the ones installed by install-lib,
-yet not install programs.
-Needed because we can't use the main install target, as we can't build programs before
-we have the final gcc installed; linking fails because libeh.a is not present,
-and glibc insists on linking programs with that library.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- Makerules | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/Makerules b/Makerules
-index 685b1b8..0550a91 100644
---- a/Makerules
-+++ b/Makerules
-@@ -809,6 +809,13 @@ endef
- installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
- $(inst_libdir)/$(patsubst %,$(libtype$o),\
- $(libprefix)$(libc-name)))
-+
-+install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \
-+ $(inst_slibdir)/libc-$(version).so \
-+ $(inst_libdir)/libc.so \
-+ $(inst_libdir)/libc.a \
-+ install-lib
-+
- install: $(installed-libcs)
- $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
- $(make-target-directory)
diff --git a/patches/glibc-2.16.0/0002-don-t-regen-docs-if-perl-is-not-found.patch b/patches/glibc-2.16.0/0002-don-t-regen-docs-if-perl-is-not-found.patch
deleted file mode 100644
index bee6337..0000000
--- a/patches/glibc-2.16.0/0002-don-t-regen-docs-if-perl-is-not-found.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Wed, 2 Nov 2011 00:14:37 +0100
-Subject: [PATCH] don't regen docs if perl is not found
-
-If we're using a cvs snapshot which updates the source files, and
-perl isn't installed yet, then we can't regen the docs. Not a big
-deal, so just whine a little and continue on our merry way.
-
-This patch was taken from gentoo.
-http://bugs.gentoo.org/60132
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- manual/Makefile | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/manual/Makefile b/manual/Makefile
-index 67e1390..af214ec 100644
---- a/manual/Makefile
-+++ b/manual/Makefile
-@@ -108,9 +108,14 @@ $(objpfx)dir-add.texi: xtract-typefun.awk $(texis-path)
- $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err
- $(objpfx)stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
- $(dir)/libm-test-ulps))
-+ifneq ($(PERL),no)
- pwd=`pwd`; \
- $(PERL) $< $$pwd/.. > $(objpfx)libm-err-tmp
- $(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi
-+else
-+ echo "Unable to rebuild math docs, no perl installed"
-+ touch libm-err.texi
-+endif
- touch $@
-
- # Generate a file with the version number.
diff --git a/patches/glibc-2.16.0/0100-Fix-localedef-segfault-when-run-under-exec-shield-Pa.patch b/patches/glibc-2.16.0/0100-Fix-localedef-segfault-when-run-under-exec-shield-Pa.patch
deleted file mode 100644
index 02865b3..0000000
--- a/patches/glibc-2.16.0/0100-Fix-localedef-segfault-when-run-under-exec-shield-Pa.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From: Jakub Jelinek <jakub@redhat.com>
-Date: Tue, 1 Nov 2011 18:58:26 +0100
-Subject: [PATCH] Fix localedef segfault when run under exec-shield, PaX or
- similar
-
-# DP: Description: Fix localedef segfault when run under exec-shield,
-# PaX or similar. (#231438, #198099)
-# DP: Dpatch Author: James Troup <james@nocrew.org>
-# DP: Patch Author: (probably) Jakub Jelinek <jakub@redhat.com>
-# DP: Upstream status: Unknown
-# DP: Status Details: Unknown
-# DP: Date: 2004-03-16
-
-Taken from Debian.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- locale/programs/3level.h | 36 ++++++++++++++++++++++++++++++++++++
- 1 file changed, 36 insertions(+)
-
-diff --git a/locale/programs/3level.h b/locale/programs/3level.h
-index 6297720..4c6f4e1 100644
---- a/locale/programs/3level.h
-+++ b/locale/programs/3level.h
-@@ -202,6 +202,42 @@ CONCAT(TABLE,_iterate) (struct TABLE *t,
- }
- }
- }
-+
-+/* GCC ATM seems to do a poor job with pointers to nested functions passed
-+ to inlined functions. Help it a little bit with this hack. */
-+#define wchead_table_iterate(tp, fn) \
-+do \
-+ { \
-+ struct wchead_table *t = (tp); \
-+ uint32_t index1; \
-+ for (index1 = 0; index1 < t->level1_size; index1++) \
-+ { \
-+ uint32_t lookup1 = t->level1[index1]; \
-+ if (lookup1 != ((uint32_t) ~0)) \
-+ { \
-+ uint32_t lookup1_shifted = lookup1 << t->q; \
-+ uint32_t index2; \
-+ for (index2 = 0; index2 < (1 << t->q); index2++) \
-+ { \
-+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \
-+ if (lookup2 != ((uint32_t) ~0)) \
-+ { \
-+ uint32_t lookup2_shifted = lookup2 << t->p; \
-+ uint32_t index3; \
-+ for (index3 = 0; index3 < (1 << t->p); index3++) \
-+ { \
-+ struct element_t *lookup3 \
-+ = t->level3[index3 + lookup2_shifted]; \
-+ if (lookup3 != NULL) \
-+ fn ((((index1 << t->q) + index2) << t->p) + index3, \
-+ lookup3); \
-+ } \
-+ } \
-+ } \
-+ } \
-+ } \
-+ } while (0)
-+
- #endif
-
- #ifndef NO_FINALIZE
diff --git a/patches/glibc-2.16.0/0200-resolv-dynamic.patch b/patches/glibc-2.16.0/0200-resolv-dynamic.patch
deleted file mode 100644
index 076ea83..0000000
--- a/patches/glibc-2.16.0/0200-resolv-dynamic.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From: unknown author <unknown.author@example.com>
-Date: Tue, 1 Nov 2011 18:58:26 +0100
-Subject: [PATCH] resolv dynamic
-
-ripped from SuSE
-
-if /etc/resolv.conf is updated, then make sure applications
-already running get the updated information.
-
-http://bugs.gentoo.org/177416
----
- resolv/res_libc.c | 15 +++++++++++++++
- 1 file changed, 15 insertions(+)
-
-diff --git a/resolv/res_libc.c b/resolv/res_libc.c
-index 48d3200..a443345 100644
---- a/resolv/res_libc.c
-+++ b/resolv/res_libc.c
-@@ -22,6 +22,7 @@
- #include <arpa/nameser.h>
- #include <resolv.h>
- #include <bits/libc-lock.h>
-+#include <sys/stat.h>
-
-
- /* The following bit is copied from res_data.c (where it is #ifdef'ed
-@@ -95,6 +96,20 @@ int
- __res_maybe_init (res_state resp, int preinit)
- {
- if (resp->options & RES_INIT) {
-+ static time_t last_mtime, last_check;
-+ time_t now;
-+ struct stat statbuf;
-+
-+ time (&now);
-+ if (now != last_check) {
-+ last_check = now;
-+ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) {
-+ last_mtime = statbuf.st_mtime;
-+ atomicinclock (lock);
-+ atomicinc (__res_initstamp);
-+ atomicincunlock (lock);
-+ }
-+ }
- if (__res_initstamp != resp->_u._ext.initstamp) {
- if (resp->nscount > 0)
- __res_iclose (resp, true);
diff --git a/patches/glibc-2.16.0/0300-optimized-string-functions-for-NEON-from-Linaro.patch b/patches/glibc-2.16.0/0300-optimized-string-functions-for-NEON-from-Linaro.patch
deleted file mode 100644
index ef7dc02..0000000
--- a/patches/glibc-2.16.0/0300-optimized-string-functions-for-NEON-from-Linaro.patch
+++ /dev/null
@@ -1,1292 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Thu, 15 Sep 2011 16:50:56 +0200
-Subject: [PATCH] optimized string functions for NEON from Linaro
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- cortex-strings/sysdeps/arm/armv7/memchr.S | 150 ++++++++++
- cortex-strings/sysdeps/arm/armv7/memcpy.S | 152 ++++++++++
- cortex-strings/sysdeps/arm/armv7/memset.S | 118 ++++++++
- cortex-strings/sysdeps/arm/armv7/strchr.S | 76 +++++
- cortex-strings/sysdeps/arm/armv7/strcmp.c | 449 +++++++++++++++++++++++++++++
- cortex-strings/sysdeps/arm/armv7/strcpy.c | 172 +++++++++++
- cortex-strings/sysdeps/arm/armv7/strlen.S | 111 +++++++
- 7 files changed, 1228 insertions(+)
- create mode 100644 cortex-strings/sysdeps/arm/armv7/memchr.S
- create mode 100644 cortex-strings/sysdeps/arm/armv7/memcpy.S
- create mode 100644 cortex-strings/sysdeps/arm/armv7/memset.S
- create mode 100644 cortex-strings/sysdeps/arm/armv7/strchr.S
- create mode 100644 cortex-strings/sysdeps/arm/armv7/strcmp.c
- create mode 100644 cortex-strings/sysdeps/arm/armv7/strcpy.c
- create mode 100644 cortex-strings/sysdeps/arm/armv7/strlen.S
-
-diff --git a/cortex-strings/sysdeps/arm/armv7/memchr.S b/cortex-strings/sysdeps/arm/armv7/memchr.S
-new file mode 100644
-index 0000000..8f5aaa9
---- /dev/null
-+++ b/cortex-strings/sysdeps/arm/armv7/memchr.S
-@@ -0,0 +1,150 @@
-+/* Copyright (c) 2010-2011, Linaro Limited
-+ All rights reserved.
-+
-+ Redistribution and use in source and binary forms, with or without
-+ modification, are permitted provided that the following conditions
-+ are met:
-+
-+ * Redistributions of source code must retain the above copyright
-+ notice, this list of conditions and the following disclaimer.
-+
-+ * Redistributions in binary form must reproduce the above copyright
-+ notice, this list of conditions and the following disclaimer in the
-+ documentation and/or other materials provided with the distribution.
-+
-+ * Neither the name of Linaro Limited nor the names of its
-+ contributors may be used to endorse or promote products derived
-+ from this software without specific prior written permission.
-+
-+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+
-+ Written by Dave Gilbert <david.gilbert@linaro.org>
-+
-+ This memchr routine is optimised on a Cortex-A9 and should work on
-+ all ARMv7 processors. It has a fast past for short sizes, and has
-+ an optimised path for large data sets; the worst case is finding the
-+ match early in a large data set. */
-+
-+@ 2011-02-07 david.gilbert@linaro.org
-+@ Extracted from local git a5b438d861
-+@ 2011-07-14 david.gilbert@linaro.org
-+@ Import endianness fix from local git ea786f1b
-+
-+ .syntax unified
-+ .arch armv7-a
-+
-+@ this lets us check a flag in a 00/ff byte easily in either endianness
-+#ifdef __ARMEB__
-+#define CHARTSTMASK(c) 1<<(31-(c*8))
-+#else
-+#define CHARTSTMASK(c) 1<<(c*8)
-+#endif
-+ .text
-+ .thumb
-+
-+@ ---------------------------------------------------------------------------
-+ .thumb_func
-+ .align 2
-+ .p2align 4,,15
-+ .global memchr
-+ .type memchr,%function
-+memchr:
-+ @ r0 = start of memory to scan
-+ @ r1 = character to look for
-+ @ r2 = length
-+ @ returns r0 = pointer to character or NULL if not found
-+ and r1,r1,#0xff @ Don't think we can trust the caller to actually pass a char
-+
-+ cmp r2,#16 @ If it's short don't bother with anything clever
-+ blt 20f
-+
-+ tst r0, #7 @ If it's already aligned skip the next bit
-+ beq 10f
-+
-+ @ Work up to an aligned point
-+5:
-+ ldrb r3, [r0],#1
-+ subs r2, r2, #1
-+ cmp r3, r1
-+ beq 50f @ If it matches exit found
-+ tst r0, #7
-+ cbz r2, 40f @ If we run off the end, exit not found
-+ bne 5b @ If not aligned yet then do next byte
-+
-+10:
-+ @ At this point, we are aligned, we know we have at least 8 bytes to work with
-+ push {r4,r5,r6,r7}
-+ orr r1, r1, r1, lsl #8 @ expand the match word across to all bytes
-+ orr r1, r1, r1, lsl #16
-+ bic r4, r2, #7 @ Number of double words to work with
-+ mvns r7, #0 @ all F's
-+ movs r3, #0
-+
-+15:
-+ ldmia r0!,{r5,r6}
-+ subs r4, r4, #8
-+ eor r5,r5, r1 @ Get it so that r5,r6 have 00's where the bytes match the target
-+ eor r6,r6, r1
-+ uadd8 r5, r5, r7 @ Parallel add 0xff - sets the GE bits for anything that wasn't 0
-+ sel r5, r3, r7 @ bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION
-+ uadd8 r6, r6, r7 @ Parallel add 0xff - sets the GE bits for anything that wasn't 0
-+ sel r6, r5, r7 @ chained....bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION
-+ cbnz r6, 60f
-+ bne 15b @ (Flags from the subs above) If not run out of bytes then go around again
-+
-+ pop {r4,r5,r6,r7}
-+ and r1,r1,#0xff @ Get r1 back to a single character from the expansion above
-+ and r2,r2,#7 @ Leave the count remaining as the number after the double words have been done
-+
-+20:
-+ cbz r2, 40f @ 0 length or hit the end already then not found
-+
-+21: @ Post aligned section, or just a short call
-+ ldrb r3,[r0],#1
-+ subs r2,r2,#1
-+ eor r3,r3,r1 @ r3 = 0 if match - doesn't break flags from sub
-+ cbz r3, 50f
-+ bne 21b @ on r2 flags
-+
-+40:
-+ movs r0,#0 @ not found
-+ bx lr
-+
-+50:
-+ subs r0,r0,#1 @ found
-+ bx lr
-+
-+60: @ We're here because the fast path found a hit - now we have to track down exactly which word it was
-+ @ r0 points to the start of the double word after the one that was tested
-+ @ r5 has the 00/ff pattern for the first word, r6 has the chained value
-+ cmp r5, #0
-+ itte eq
-+ moveq r5, r6 @ the end is in the 2nd word
-+ subeq r0,r0,#3 @ Points to 2nd byte of 2nd word
-+ subne r0,r0,#7 @ or 2nd byte of 1st word
-+
-+ @ r0 currently points to the 3rd byte of the word containing the hit
-+ tst r5, # CHARTSTMASK(0) @ 1st character
-+ bne 61f
-+ adds r0,r0,#1
-+ tst r5, # CHARTSTMASK(1) @ 2nd character
-+ ittt eq
-+ addeq r0,r0,#1
-+ tsteq r5, # (3<<15) @ 2nd & 3rd character
-+ @ If not the 3rd must be the last one
-+ addeq r0,r0,#1
-+
-+61:
-+ pop {r4,r5,r6,r7}
-+ subs r0,r0,#1
-+ bx lr
-diff --git a/cortex-strings/sysdeps/arm/armv7/memcpy.S b/cortex-strings/sysdeps/arm/armv7/memcpy.S
-new file mode 100644
-index 0000000..3be24ca
---- /dev/null
-+++ b/cortex-strings/sysdeps/arm/armv7/memcpy.S
-@@ -0,0 +1,152 @@
-+/* Copyright (c) 2010-2011, Linaro Limited
-+ All rights reserved.
-+
-+ Redistribution and use in source and binary forms, with or without
-+ modification, are permitted provided that the following conditions
-+ are met:
-+
-+ * Redistributions of source code must retain the above copyright
-+ notice, this list of conditions and the following disclaimer.
-+
-+ * Redistributions in binary form must reproduce the above copyright
-+ notice, this list of conditions and the following disclaimer in the
-+ documentation and/or other materials provided with the distribution.
-+
-+ * Neither the name of Linaro Limited nor the names of its
-+ contributors may be used to endorse or promote products derived
-+ from this software without specific prior written permission.
-+
-+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+
-+ Written by Dave Gilbert <david.gilbert@linaro.org>
-+
-+ This memcpy routine is optimised on a Cortex-A9 and should work on
-+ all ARMv7 processors with NEON. */
-+
-+@ 2011-09-01 david.gilbert@linaro.org
-+@ Extracted from local git 2f11b436
-+
-+ .syntax unified
-+ .arch armv7-a
-+
-+@ this lets us check a flag in a 00/ff byte easily in either endianness
-+#ifdef __ARMEB__
-+#define CHARTSTMASK(c) 1<<(31-(c*8))
-+#else
-+#define CHARTSTMASK(c) 1<<(c*8)
-+#endif
-+ .text
-+ .thumb
-+
-+@ ---------------------------------------------------------------------------
-+ .thumb_func
-+ .align 2
-+ .p2align 4,,15
-+ .global memcpy
-+ .type memcpy,%function
-+memcpy:
-+ @ r0 = dest
-+ @ r1 = source
-+ @ r2 = count
-+ @ returns dest in r0
-+ @ Overlaps of source/dest not allowed according to spec
-+ @ Note this routine relies on v7 misaligned loads/stores
-+ pld [r1]
-+ mov r12, r0 @ stash original r0
-+ cmp r2,#32
-+ blt 10f @ take the small copy case separately
-+
-+ @ test for either source or destination being misaligned
-+ @ (We only rely on word align)
-+ tst r0,#3
-+ it eq
-+ tsteq r1,#3
-+ bne 30f @ misaligned case
-+
-+4:
-+ @ at this point we are word (or better) aligned and have at least
-+ @ 32 bytes to play with
-+
-+ @ If it's a huge copy, try Neon
-+ cmp r2, #128*1024
-+ bge 35f @ Sharing general non-aligned case here, aligned could be faster
-+
-+ push {r3,r4,r5,r6,r7,r8,r10,r11}
-+5:
-+ ldmia r1!,{r3,r4,r5,r6,r7,r8,r10,r11}
-+ sub r2,r2,#32
-+ pld [r1,#96]
-+ cmp r2,#32
-+ stmia r0!,{r3,r4,r5,r6,r7,r8,r10,r11}
-+ bge 5b
-+
-+ pop {r3,r4,r5,r6,r7,r8,r10,r11}
-+ @ We are now down to less than 32 bytes
-+ cbz r2,15f @ quick exit for the case where we copied a multiple of 32
-+
-+10: @ small copies (not necessarily aligned - note might be slightly more than 32bytes)
-+ cmp r2,#4
-+ blt 12f
-+11:
-+ sub r2,r2,#4
-+ cmp r2,#4
-+ ldr r3, [r1],#4
-+ str r3, [r0],#4
-+ bge 11b
-+12:
-+ tst r2,#2
-+ itt ne
-+ ldrhne r3, [r1],#2
-+ strhne r3, [r0],#2
-+
-+ tst r2,#1
-+ itt ne
-+ ldrbne r3, [r1],#1
-+ strbne r3, [r0],#1
-+
-+15: @ exit
-+ mov r0,r12 @ restore r0
-+ bx lr
-+
-+ .align 2
-+ .p2align 4,,15
-+30: @ non-aligned - at least 32 bytes to play with
-+ @ Test for co-misalignment
-+ eor r3, r0, r1
-+ tst r3,#3
-+ beq 50f
-+
-+ @ Use Neon for misaligned
-+35:
-+ vld1.8 {d0,d1,d2,d3}, [r1]!
-+ sub r2,r2,#32
-+ cmp r2,#32
-+ pld [r1,#96]
-+ vst1.8 {d0,d1,d2,d3}, [r0]!
-+ bge 35b
-+ b 10b @ TODO: Probably a bad idea to switch to ARM at this point
-+
-+ .align 2
-+ .p2align 4,,15
-+50: @ Co-misaligned
-+ @ At this point we've got at least 32 bytes
-+51:
-+ ldrb r3,[r1],#1
-+ sub r2,r2,#1
-+ strb r3,[r0],#1
-+ tst r0,#7
-+ bne 51b
-+
-+ cmp r2,#32
-+ blt 10b
-+ b 4b
-diff --git a/cortex-strings/sysdeps/arm/armv7/memset.S b/cortex-strings/sysdeps/arm/armv7/memset.S
-new file mode 100644
-index 0000000..921cb75
---- /dev/null
-+++ b/cortex-strings/sysdeps/arm/armv7/memset.S
-@@ -0,0 +1,118 @@
-+/* Copyright (c) 2010-2011, Linaro Limited
-+ All rights reserved.
-+
-+ Redistribution and use in source and binary forms, with or without
-+ modification, are permitted provided that the following conditions
-+ are met:
-+
-+ * Redistributions of source code must retain the above copyright
-+ notice, this list of conditions and the following disclaimer.
-+
-+ * Redistributions in binary form must reproduce the above copyright
-+ notice, this list of conditions and the following disclaimer in the
-+ documentation and/or other materials provided with the distribution.
-+
-+ * Neither the name of Linaro Limited nor the names of its
-+ contributors may be used to endorse or promote products derived
-+ from this software without specific prior written permission.
-+
-+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+
-+ Written by Dave Gilbert <david.gilbert@linaro.org>
-+
-+ This memset routine is optimised on a Cortex-A9 and should work on
-+ all ARMv7 processors. */
-+
-+ .syntax unified
-+ .arch armv7-a
-+
-+@ 2011-08-30 david.gilbert@linaro.org
-+@ Extracted from local git 2f11b436
-+
-+@ this lets us check a flag in a 00/ff byte easily in either endianness
-+#ifdef __ARMEB__
-+#define CHARTSTMASK(c) 1<<(31-(c*8))
-+#else
-+#define CHARTSTMASK(c) 1<<(c*8)
-+#endif
-+ .text
-+ .thumb
-+
-+@ ---------------------------------------------------------------------------
-+ .thumb_func
-+ .align 2
-+ .p2align 4,,15
-+ .global memset
-+ .type memset,%function
-+memset:
-+ @ r0 = address
-+ @ r1 = character
-+ @ r2 = count
-+ @ returns original address in r0
-+
-+ mov r3, r0 @ Leave r0 alone
-+ cbz r2, 10f @ Exit if 0 length
-+
-+ tst r0, #7
-+ beq 2f @ Already aligned
-+
-+ @ Ok, so we're misaligned here
-+1:
-+ strb r1, [r3], #1
-+ subs r2,r2,#1
-+ tst r3, #7
-+ cbz r2, 10f @ Exit if we hit the end
-+ bne 1b @ go round again if still misaligned
-+
-+2:
-+ @ OK, so we're aligned
-+ push {r4,r5,r6,r7}
-+ bics r4, r2, #15 @ if less than 16 bytes then need to finish it off
-+ beq 5f
-+
-+3:
-+ @ POSIX says that ch is cast to an unsigned char. A uxtb is one
-+ @ byte and takes two cycles, where an AND is four bytes but one
-+ @ cycle.
-+ and r1, #0xFF
-+ orr r1, r1, r1, lsl#8 @ Same character into all bytes
-+ orr r1, r1, r1, lsl#16
-+ mov r5,r1
-+ mov r6,r1
-+ mov r7,r1
-+
-+4:
-+ subs r4,r4,#16
-+ stmia r3!,{r1,r5,r6,r7}
-+ bne 4b
-+ and r2,r2,#15
-+
-+ @ At this point we're still aligned and we have upto align-1 bytes left to right
-+ @ we can avoid some of the byte-at-a time now by testing for some big chunks
-+ tst r2,#8
-+ itt ne
-+ subne r2,r2,#8
-+ stmiane r3!,{r1,r5}
-+
-+5:
-+ pop {r4,r5,r6,r7}
-+ cbz r2, 10f
-+
-+ @ Got to do any last < alignment bytes
-+6:
-+ subs r2,r2,#1
-+ strb r1,[r3],#1
-+ bne 6b
-+
-+10:
-+ bx lr @ goodbye
-diff --git a/cortex-strings/sysdeps/arm/armv7/strchr.S b/cortex-strings/sysdeps/arm/armv7/strchr.S
-new file mode 100644
-index 0000000..8875dbf
---- /dev/null
-+++ b/cortex-strings/sysdeps/arm/armv7/strchr.S
-@@ -0,0 +1,76 @@
-+/* Copyright (c) 2010-2011, Linaro Limited
-+ All rights reserved.
-+
-+ Redistribution and use in source and binary forms, with or without
-+ modification, are permitted provided that the following conditions
-+ are met:
-+
-+ * Redistributions of source code must retain the above copyright
-+ notice, this list of conditions and the following disclaimer.
-+
-+ * Redistributions in binary form must reproduce the above copyright
-+ notice, this list of conditions and the following disclaimer in the
-+ documentation and/or other materials provided with the distribution.
-+
-+ * Neither the name of Linaro Limited nor the names of its
-+ contributors may be used to endorse or promote products derived
-+ from this software without specific prior written permission.
-+
-+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+
-+ Written by Dave Gilbert <david.gilbert@linaro.org>
-+
-+ A very simple strchr routine, from benchmarks on A9 it's a bit faster than
-+ the current version in eglibc (2.12.1-0ubuntu14 package)
-+ I don't think doing a word at a time version is worth it since a lot
-+ of strchr cases are very short anyway */
-+
-+@ 2011-02-07 david.gilbert@linaro.org
-+@ Extracted from local git a5b438d861
-+
-+ .syntax unified
-+ .arch armv7-a
-+
-+ .text
-+ .thumb
-+
-+@ ---------------------------------------------------------------------------
-+
-+ .thumb_func
-+ .align 2
-+ .p2align 4,,15
-+ .global strchr
-+ .type strchr,%function
-+strchr:
-+ @ r0 = start of string
-+ @ r1 = character to match
-+ @ returns NULL for no match, or a pointer to the match
-+ and r1,r1, #255
-+
-+1:
-+ ldrb r2,[r0],#1
-+ cmp r2,r1
-+ cbz r2,10f
-+ bne 1b
-+
-+ @ We're here if it matched
-+5:
-+ subs r0,r0,#1
-+ bx lr
-+
-+10:
-+ @ We're here if we ran off the end
-+ cmp r1, #0 @ Corner case - you're allowed to search for the nil and get a pointer to it
-+ beq 5b @ A bit messy, if it's common we should branch at the start to a special loop
-+ mov r0,#0
-+ bx lr
-diff --git a/cortex-strings/sysdeps/arm/armv7/strcmp.c b/cortex-strings/sysdeps/arm/armv7/strcmp.c
-new file mode 100644
-index 0000000..fb2280d
---- /dev/null
-+++ b/cortex-strings/sysdeps/arm/armv7/strcmp.c
-@@ -0,0 +1,449 @@
-+/*
-+ * Copyright (c) 2008 ARM Ltd
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * 2. Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * 3. The name of the company may not be used to endorse or promote
-+ * products derived from this software without specific prior written
-+ * permission.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
-+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-+ * IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#include <string.h>
-+#include <memcopy.h>
-+
-+#undef strcmp
-+
-+
-+#ifdef __ARMEB__
-+#define SHFT2LSB "lsl"
-+#define SHFT2MSB "lsr"
-+#define MSB "0x000000ff"
-+#define LSB "0xff000000"
-+#else
-+#define SHFT2LSB "lsr"
-+#define SHFT2MSB "lsl"
-+#define MSB "0xff000000"
-+#define LSB "0x000000ff"
-+#endif
-+
-+#ifdef __thumb2__
-+#define magic1(REG) "#0x01010101"
-+#define magic2(REG) "#0x80808080"
-+#else
-+#define magic1(REG) #REG
-+#define magic2(REG) #REG ", lsl #7"
-+#endif
-+
-+int
-+__attribute__((naked)) strcmp (const char* s1, const char* s2)
-+{
-+ asm(
-+#if !(defined(__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) || \
-+ (defined (__thumb__) && !defined (__thumb2__)))
-+ "pld [r0, #0]\n\t"
-+ "pld [r1, #0]\n\t"
-+ "eor r2, r0, r1\n\t"
-+ "tst r2, #3\n\t"
-+ /* Strings not at same byte offset from a word boundary. */
-+ "bne strcmp_unaligned\n\t"
-+ "ands r2, r0, #3\n\t"
-+ "bic r0, r0, #3\n\t"
-+ "bic r1, r1, #3\n\t"
-+ "ldr ip, [r0], #4\n\t"
-+ "it eq\n\t"
-+ "ldreq r3, [r1], #4\n\t"
-+ "beq 1f\n\t"
-+ /* Although s1 and s2 have identical initial alignment, they are
-+ not currently word aligned. Rather than comparing bytes,
-+ make sure that any bytes fetched from before the addressed
-+ bytes are forced to 0xff. Then they will always compare
-+ equal. */
-+ "eor r2, r2, #3\n\t"
-+ "lsl r2, r2, #3\n\t"
-+ "mvn r3, #"MSB"\n\t"
-+ SHFT2LSB" r2, r3, r2\n\t"
-+ "ldr r3, [r1], #4\n\t"
-+ "orr ip, ip, r2\n\t"
-+ "orr r3, r3, r2\n"
-+ "1:\n\t"
-+#ifndef __thumb2__
-+ /* Load the 'magic' constant 0x01010101. */
-+ "str r4, [sp, #-4]!\n\t"
-+ "mov r4, #1\n\t"
-+ "orr r4, r4, r4, lsl #8\n\t"
-+ "orr r4, r4, r4, lsl #16\n"
-+#endif
-+ ".p2align 2\n"
-+ "4:\n\t"
-+ "pld [r0, #8]\n\t"
-+ "pld [r1, #8]\n\t"
-+ "sub r2, ip, "magic1(r4)"\n\t"
-+ "cmp ip, r3\n\t"
-+ "itttt eq\n\t"
-+ /* check for any zero bytes in first word */
-+ "biceq r2, r2, ip\n\t"
-+ "tsteq r2, "magic2(r4)"\n\t"
-+ "ldreq ip, [r0], #4\n\t"
-+ "ldreq r3, [r1], #4\n\t"
-+ "beq 4b\n"
-+ "2:\n\t"
-+ /* There's a zero or a different byte in the word */
-+ SHFT2MSB" r0, ip, #24\n\t"
-+ SHFT2LSB" ip, ip, #8\n\t"
-+ "cmp r0, #1\n\t"
-+ "it cs\n\t"
-+ "cmpcs r0, r3, "SHFT2MSB" #24\n\t"
-+ "it eq\n\t"
-+ SHFT2LSB"eq r3, r3, #8\n\t"
-+ "beq 2b\n\t"
-+ /* On a big-endian machine, r0 contains the desired byte in bits
-+ 0-7; on a little-endian machine they are in bits 24-31. In
-+ both cases the other bits in r0 are all zero. For r3 the
-+ interesting byte is at the other end of the word, but the
-+ other bits are not necessarily zero. We need a signed result
-+ representing the differnece in the unsigned bytes, so for the
-+ little-endian case we can't just shift the interesting bits
-+ up. */
-+#ifdef __ARMEB__
-+ "sub r0, r0, r3, lsr #24\n\t"
-+#else
-+ "and r3, r3, #255\n\t"
-+#ifdef __thumb2__
-+ /* No RSB instruction in Thumb2 */
-+ "lsr r0, r0, #24\n\t"
-+ "sub r0, r0, r3\n\t"
-+#else
-+ "rsb r0, r3, r0, lsr #24\n\t"
-+#endif
-+#endif
-+#ifndef __thumb2__
-+ "ldr r4, [sp], #4\n\t"
-+#endif
-+ "BX LR"
-+#elif (defined (__thumb__) && !defined (__thumb2__))
-+ "1:\n\t"
-+ "ldrb r2, [r0]\n\t"
-+ "ldrb r3, [r1]\n\t"
-+ "add r0, r0, #1\n\t"
-+ "add r1, r1, #1\n\t"
-+ "cmp r2, #0\n\t"
-+ "beq 2f\n\t"
-+ "cmp r2, r3\n\t"
-+ "beq 1b\n\t"
-+ "2:\n\t"
-+ "sub r0, r2, r3\n\t"
-+ "bx lr"
-+#else
-+ "3:\n\t"
-+ "ldrb r2, [r0], #1\n\t"
-+ "ldrb r3, [r1], #1\n\t"
-+ "cmp r2, #1\n\t"
-+ "it cs\n\t"
-+ "cmpcs r2, r3\n\t"
-+ "beq 3b\n\t"
-+ "sub r0, r2, r3\n\t"
-+ "BX LR"
-+#endif
-+ );
-+}
-+
-+#if !(defined(__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) || \
-+ (defined (__thumb__) && !defined (__thumb2__)))
-+static int __attribute__((naked, used))
-+strcmp_unaligned(const char* s1, const char* s2)
-+{
-+#if 0
-+ /* The assembly code below is based on the following alogrithm. */
-+#ifdef __ARMEB__
-+#define RSHIFT <<
-+#define LSHIFT >>
-+#else
-+#define RSHIFT >>
-+#define LSHIFT <<
-+#endif
-+
-+#define body(shift) \
-+ mask = 0xffffffffU RSHIFT shift; \
-+ w1 = *wp1++; \
-+ w2 = *wp2++; \
-+ do \
-+ { \
-+ t1 = w1 & mask; \
-+ if (__builtin_expect(t1 != w2 RSHIFT shift, 0)) \
-+ { \
-+ w2 RSHIFT= shift; \
-+ break; \
-+ } \
-+ if (__builtin_expect(((w1 - b1) & ~w1) & (b1 << 7), 0)) \
-+ { \
-+ /* See comment in assembler below re syndrome on big-endian */\
-+ if ((((w1 - b1) & ~w1) & (b1 << 7)) & mask) \
-+ w2 RSHIFT= shift; \
-+ else \
-+ { \
-+ w2 = *wp2; \
-+ t1 = w1 RSHIFT (32 - shift); \
-+ w2 = (w2 LSHIFT (32 - shift)) RSHIFT (32 - shift); \
-+ } \
-+ break; \
-+ } \
-+ w2 = *wp2++; \
-+ t1 ^= w1; \
-+ if (__builtin_expect(t1 != w2 LSHIFT (32 - shift), 0)) \
-+ { \
-+ t1 = w1 >> (32 - shift); \
-+ w2 = (w2 << (32 - shift)) RSHIFT (32 - shift); \
-+ break; \
-+ } \
-+ w1 = *wp1++; \
-+ } while (1)
-+
-+ const unsigned* wp1;
-+ const unsigned* wp2;
-+ unsigned w1, w2;
-+ unsigned mask;
-+ unsigned shift;
-+ unsigned b1 = 0x01010101;
-+ char c1, c2;
-+ unsigned t1;
-+
-+ while (((unsigned) s1) & 3)
-+ {
-+ c1 = *s1++;
-+ c2 = *s2++;
-+ if (c1 == 0 || c1 != c2)
-+ return c1 - (int)c2;
-+ }
-+ wp1 = (unsigned*) (((unsigned)s1) & ~3);
-+ wp2 = (unsigned*) (((unsigned)s2) & ~3);
-+ t1 = ((unsigned) s2) & 3;
-+ if (t1 == 1)
-+ {
-+ body(8);
-+ }
-+ else if (t1 == 2)
-+ {
-+ body(16);
-+ }
-+ else
-+ {
-+ body (24);
-+ }
-+
-+ do
-+ {
-+#ifdef __ARMEB__
-+ c1 = (char) t1 >> 24;
-+ c2 = (char) w2 >> 24;
-+#else
-+ c1 = (char) t1;
-+ c2 = (char) w2;
-+#endif
-+ t1 RSHIFT= 8;
-+ w2 RSHIFT= 8;
-+ } while (c1 != 0 && c1 == c2);
-+ return c1 - c2;
-+#endif
-+
-+ asm("wp1 .req r0\n\t"
-+ "wp2 .req r1\n\t"
-+ "b1 .req r2\n\t"
-+ "w1 .req r4\n\t"
-+ "w2 .req r5\n\t"
-+ "t1 .req ip\n\t"
-+ "@ r3 is scratch\n"
-+
-+ /* First of all, compare bytes until wp1(sp1) is word-aligned. */
-+ "1:\n\t"
-+ "tst wp1, #3\n\t"
-+ "beq 2f\n\t"
-+ "ldrb r2, [wp1], #1\n\t"
-+ "ldrb r3, [wp2], #1\n\t"
-+ "cmp r2, #1\n\t"
-+ "it cs\n\t"
-+ "cmpcs r2, r3\n\t"
-+ "beq 1b\n\t"
-+ "sub r0, r2, r3\n\t"
-+ "BX LR\n"
-+
-+ "2:\n\t"
-+ "str r5, [sp, #-4]!\n\t"
-+ "str r4, [sp, #-4]!\n\t"
-+ // "stmfd sp!, {r4, r5}\n\t"
-+ "mov b1, #1\n\t"
-+ "orr b1, b1, b1, lsl #8\n\t"
-+ "orr b1, b1, b1, lsl #16\n\t"
-+
-+ "and t1, wp2, #3\n\t"
-+ "bic wp2, wp2, #3\n\t"
-+ "ldr w1, [wp1], #4\n\t"
-+ "ldr w2, [wp2], #4\n\t"
-+ "cmp t1, #2\n\t"
-+ "beq 2f\n\t"
-+ "bhi 3f\n"
-+
-+ /* Critical inner Loop: Block with 3 bytes initial overlap */
-+ ".p2align 2\n"
-+ "1:\n\t"
-+ "bic t1, w1, #"MSB"\n\t"
-+ "cmp t1, w2, "SHFT2LSB" #8\n\t"
-+ "sub r3, w1, b1\n\t"
-+ "bic r3, r3, w1\n\t"
-+ "bne 4f\n\t"
-+ "ands r3, r3, b1, lsl #7\n\t"
-+ "it eq\n\t"
-+ "ldreq w2, [wp2], #4\n\t"
-+ "bne 5f\n\t"
-+ "eor t1, t1, w1\n\t"
-+ "cmp t1, w2, "SHFT2MSB" #24\n\t"
-+ "bne 6f\n\t"
-+ "ldr w1, [wp1], #4\n\t"
-+ "b 1b\n"
-+ "4:\n\t"
-+ SHFT2LSB" w2, w2, #8\n\t"
-+ "b 8f\n"
-+
-+ "5:\n\t"
-+#ifdef __ARMEB__
-+ /* The syndrome value may contain false ones if the string ends
-+ with the bytes 0x01 0x00 */
-+ "tst w1, #0xff000000\n\t"
-+ "itt ne\n\t"
-+ "tstne w1, #0x00ff0000\n\t"
-+ "tstne w1, #0x0000ff00\n\t"
-+ "beq 7f\n\t"
-+#else
-+ "bics r3, r3, #0xff000000\n\t"
-+ "bne 7f\n\t"
-+#endif
-+ "ldrb w2, [wp2]\n\t"
-+ SHFT2LSB" t1, w1, #24\n\t"
-+#ifdef __ARMEB__
-+ "lsl w2, w2, #24\n\t"
-+#endif
-+ "b 8f\n"
-+
-+ "6:\n\t"
-+ SHFT2LSB" t1, w1, #24\n\t"
-+ "and w2, w2, #"LSB"\n\t"
-+ "b 8f\n"
-+
-+ /* Critical inner Loop: Block with 2 bytes initial overlap */
-+ ".p2align 2\n"
-+ "2:\n\t"
-+ SHFT2MSB" t1, w1, #16\n\t"
-+ "sub r3, w1, b1\n\t"
-+ SHFT2LSB" t1, t1, #16\n\t"
-+ "bic r3, r3, w1\n\t"
-+ "cmp t1, w2, "SHFT2LSB" #16\n\t"
-+ "bne 4f\n\t"
-+ "ands r3, r3, b1, lsl #7\n\t"
-+ "it eq\n\t"
-+ "ldreq w2, [wp2], #4\n\t"
-+ "bne 5f\n\t"
-+ "eor t1, t1, w1\n\t"
-+ "cmp t1, w2, "SHFT2MSB" #16\n\t"
-+ "bne 6f\n\t"
-+ "ldr w1, [wp1], #4\n\t"
-+ "b 2b\n"
-+
-+ "5:\n\t"
-+#ifdef __ARMEB__
-+ /* The syndrome value may contain false ones if the string ends
-+ with the bytes 0x01 0x00 */
-+ "tst w1, #0xff000000\n\t"
-+ "it ne\n\t"
-+ "tstne w1, #0x00ff0000\n\t"
-+ "beq 7f\n\t"
-+#else
-+ "lsls r3, r3, #16\n\t"
-+ "bne 7f\n\t"
-+#endif
-+ "ldrh w2, [wp2]\n\t"
-+ SHFT2LSB" t1, w1, #16\n\t"
-+#ifdef __ARMEB__
-+ "lsl w2, w2, #16\n\t"
-+#endif
-+ "b 8f\n"
-+
-+ "6:\n\t"
-+ SHFT2MSB" w2, w2, #16\n\t"
-+ SHFT2LSB" t1, w1, #16\n\t"
-+ "4:\n\t"
-+ SHFT2LSB" w2, w2, #16\n\t"
-+ "b 8f\n\t"
-+
-+ /* Critical inner Loop: Block with 1 byte initial overlap */
-+ ".p2align 2\n"
-+ "3:\n\t"
-+ "and t1, w1, #"LSB"\n\t"
-+ "cmp t1, w2, "SHFT2LSB" #24\n\t"
-+ "sub r3, w1, b1\n\t"
-+ "bic r3, r3, w1\n\t"
-+ "bne 4f\n\t"
-+ "ands r3, r3, b1, lsl #7\n\t"
-+ "it eq\n\t"
-+ "ldreq w2, [wp2], #4\n\t"
-+ "bne 5f\n\t"
-+ "eor t1, t1, w1\n\t"
-+ "cmp t1, w2, "SHFT2MSB" #8\n\t"
-+ "bne 6f\n\t"
-+ "ldr w1, [wp1], #4\n\t"
-+ "b 3b\n"
-+ "4:\n\t"
-+ SHFT2LSB" w2, w2, #24\n\t"
-+ "b 8f\n"
-+ "5:\n\t"
-+ /* The syndrome value may contain false ones if the string ends
-+ with the bytes 0x01 0x00 */
-+ "tst w1, #"LSB"\n\t"
-+ "beq 7f\n\t"
-+ "ldr w2, [wp2], #4\n"
-+ "6:\n\t"
-+ SHFT2LSB" t1, w1, #8\n\t"
-+ "bic w2, w2, #"MSB"\n\t"
-+ "b 8f\n"
-+ "7:\n\t"
-+ "mov r0, #0\n\t"
-+ // "ldmfd sp!, {r4, r5}\n\t"
-+ "ldr r4, [sp], #4\n\t"
-+ "ldr r5, [sp], #4\n\t"
-+ "BX LR\n"
-+ "8:\n\t"
-+ "and r2, t1, #"LSB"\n\t"
-+ "and r0, w2, #"LSB"\n\t"
-+ "cmp r0, #1\n\t"
-+ "it cs\n\t"
-+ "cmpcs r0, r2\n\t"
-+ "itt eq\n\t"
-+ SHFT2LSB"eq t1, t1, #8\n\t"
-+ SHFT2LSB"eq w2, w2, #8\n\t"
-+ "beq 8b\n\t"
-+ "sub r0, r2, r0\n\t"
-+ // "ldmfd sp!, {r4, r5}\n\t"
-+ "ldr r4, [sp], #4\n\t"
-+ "ldr r5, [sp], #4\n\t"
-+ "BX LR");
-+}
-+
-+#endif
-+
-+libc_hidden_builtin_def (strcmp)
-diff --git a/cortex-strings/sysdeps/arm/armv7/strcpy.c b/cortex-strings/sysdeps/arm/armv7/strcpy.c
-new file mode 100644
-index 0000000..aa8cb06
---- /dev/null
-+++ b/cortex-strings/sysdeps/arm/armv7/strcpy.c
-@@ -0,0 +1,172 @@
-+/*
-+ * Copyright (c) 2008 ARM Ltd
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * 2. Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * 3. The name of the company may not be used to endorse or promote
-+ * products derived from this software without specific prior written
-+ * permission.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
-+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-+ * IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#include <string.h>
-+#include <memcopy.h>
-+
-+#undef strcmp
-+
-+
-+#ifdef __thumb2__
-+#define magic1(REG) "#0x01010101"
-+#define magic2(REG) "#0x80808080"
-+#else
-+#define magic1(REG) #REG
-+#define magic2(REG) #REG ", lsl #7"
-+#endif
-+
-+char* __attribute__((naked))
-+strcpy (char* dst, const char* src)
-+{
-+ asm (
-+#if !(defined(__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) || \
-+ (defined (__thumb__) && !defined (__thumb2__)))
-+ "pld [r1, #0]\n\t"
-+ "eor r2, r0, r1\n\t"
-+ "mov ip, r0\n\t"
-+ "tst r2, #3\n\t"
-+ "bne 4f\n\t"
-+ "tst r1, #3\n\t"
-+ "bne 3f\n"
-+ "5:\n\t"
-+#ifndef __thumb2__
-+ "str r5, [sp, #-4]!\n\t"
-+ "mov r5, #0x01\n\t"
-+ "orr r5, r5, r5, lsl #8\n\t"
-+ "orr r5, r5, r5, lsl #16\n\t"
-+#endif
-+
-+ "str r4, [sp, #-4]!\n\t"
-+ "tst r1, #4\n\t"
-+ "ldr r3, [r1], #4\n\t"
-+ "beq 2f\n\t"
-+ "sub r2, r3, "magic1(r5)"\n\t"
-+ "bics r2, r2, r3\n\t"
-+ "tst r2, "magic2(r5)"\n\t"
-+ "itt eq\n\t"
-+ "streq r3, [ip], #4\n\t"
-+ "ldreq r3, [r1], #4\n"
-+ "bne 1f\n\t"
-+ /* Inner loop. We now know that r1 is 64-bit aligned, so we
-+ can safely fetch up to two words. This allows us to avoid
-+ load stalls. */
-+ ".p2align 2\n"
-+ "2:\n\t"
-+ "pld [r1, #8]\n\t"
-+ "ldr r4, [r1], #4\n\t"
-+ "sub r2, r3, "magic1(r5)"\n\t"
-+ "bics r2, r2, r3\n\t"
-+ "tst r2, "magic2(r5)"\n\t"
-+ "sub r2, r4, "magic1(r5)"\n\t"
-+ "bne 1f\n\t"
-+ "str r3, [ip], #4\n\t"
-+ "bics r2, r2, r4\n\t"
-+ "tst r2, "magic2(r5)"\n\t"
-+ "itt eq\n\t"
-+ "ldreq r3, [r1], #4\n\t"
-+ "streq r4, [ip], #4\n\t"
-+ "beq 2b\n\t"
-+ "mov r3, r4\n"
-+ "1:\n\t"
-+#ifdef __ARMEB__
-+ "rors r3, r3, #24\n\t"
-+#endif
-+ "strb r3, [ip], #1\n\t"
-+ "tst r3, #0xff\n\t"
-+#ifdef __ARMEL__
-+ "ror r3, r3, #8\n\t"
-+#endif
-+ "bne 1b\n\t"
-+ "ldr r4, [sp], #4\n\t"
-+#ifndef __thumb2__
-+ "ldr r5, [sp], #4\n\t"
-+#endif
-+ "BX LR\n"
-+
-+ /* Strings have the same offset from word alignment, but it's
-+ not zero. */
-+ "3:\n\t"
-+ "tst r1, #1\n\t"
-+ "beq 1f\n\t"
-+ "ldrb r2, [r1], #1\n\t"
-+ "strb r2, [ip], #1\n\t"
-+ "cmp r2, #0\n\t"
-+ "it eq\n"
-+ "BXEQ LR\n"
-+ "1:\n\t"
-+ "tst r1, #2\n\t"
-+ "beq 5b\n\t"
-+ "ldrh r2, [r1], #2\n\t"
-+#ifdef __ARMEB__
-+ "tst r2, #0xff00\n\t"
-+ "iteet ne\n\t"
-+ "strneh r2, [ip], #2\n\t"
-+ "lsreq r2, r2, #8\n\t"
-+ "streqb r2, [ip]\n\t"
-+ "tstne r2, #0xff\n\t"
-+#else
-+ "tst r2, #0xff\n\t"
-+ "itet ne\n\t"
-+ "strneh r2, [ip], #2\n\t"
-+ "streqb r2, [ip]\n\t"
-+ "tstne r2, #0xff00\n\t"
-+#endif
-+ "bne 5b\n\t"
-+ "BX LR\n"
-+
-+ /* src and dst do not have a common word-alignement. Fall back to
-+ byte copying. */
-+ "4:\n\t"
-+ "ldrb r2, [r1], #1\n\t"
-+ "strb r2, [ip], #1\n\t"
-+ "cmp r2, #0\n\t"
-+ "bne 4b\n\t"
-+ "BX LR"
-+
-+#elif !defined (__thumb__) || defined (__thumb2__)
-+ "mov r3, r0\n\t"
-+ "1:\n\t"
-+ "ldrb r2, [r1], #1\n\t"
-+ "strb r2, [r3], #1\n\t"
-+ "cmp r2, #0\n\t"
-+ "bne 1b\n\t"
-+ "BX LR"
-+#else
-+ "mov r3, r0\n\t"
-+ "1:\n\t"
-+ "ldrb r2, [r1]\n\t"
-+ "add r1, r1, #1\n\t"
-+ "strb r2, [r3]\n\t"
-+ "add r3, r3, #1\n\t"
-+ "cmp r2, #0\n\t"
-+ "bne 1b\n\t"
-+ "BX LR"
-+#endif
-+ );
-+}
-+libc_hidden_builtin_def (strcpy)
-diff --git a/cortex-strings/sysdeps/arm/armv7/strlen.S b/cortex-strings/sysdeps/arm/armv7/strlen.S
-new file mode 100644
-index 0000000..125e92f
---- /dev/null
-+++ b/cortex-strings/sysdeps/arm/armv7/strlen.S
-@@ -0,0 +1,111 @@
-+/* Copyright (c) 2010-2011, Linaro Limited
-+ All rights reserved.
-+
-+ Redistribution and use in source and binary forms, with or without
-+ modification, are permitted provided that the following conditions
-+ are met:
-+
-+ * Redistributions of source code must retain the above copyright
-+ notice, this list of conditions and the following disclaimer.
-+
-+ * Redistributions in binary form must reproduce the above copyright
-+ notice, this list of conditions and the following disclaimer in the
-+ documentation and/or other materials provided with the distribution.
-+
-+ * Neither the name of Linaro Limited nor the names of its
-+ contributors may be used to endorse or promote products derived
-+ from this software without specific prior written permission.
-+
-+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+
-+ Written by Dave Gilbert <david.gilbert@linaro.org>
-+
-+ This strlen routine is optimised on a Cortex-A9 and should work on
-+ all ARMv7 processors. This routine is reasonably fast for short
-+ strings, but is probably slower than a simple implementation if all
-+ your strings are very short */
-+
-+@ 2011-02-08 david.gilbert@linaro.org
-+@ Extracted from local git 6848613a
-+
-+
-+@ this lets us check a flag in a 00/ff byte easily in either endianness
-+#ifdef __ARMEB__
-+#define CHARTSTMASK(c) 1<<(31-(c*8))
-+#else
-+#define CHARTSTMASK(c) 1<<(c*8)
-+#endif
-+
-+@-----------------------------------------------------------------------------------------------------------------------------
-+ .syntax unified
-+ .arch armv7-a
-+
-+ .thumb_func
-+ .align 2
-+ .p2align 4,,15
-+ .global strlen
-+ .type strlen,%function
-+strlen:
-+ @ r0 = string
-+ @ returns count of bytes in string not including terminator
-+ mov r1, r0
-+ push { r4,r6 }
-+ mvns r6, #0 @ all F
-+ movs r4, #0
-+ tst r0, #7
-+ beq 2f
-+
-+1:
-+ ldrb r2, [r1], #1
-+ tst r1, #7 @ Hit alignment yet?
-+ cbz r2, 10f @ Exit if we found the 0
-+ bne 1b
-+
-+ @ So we're now aligned
-+2:
-+ ldmia r1!,{r2,r3}
-+ uadd8 r2, r2, r6 @ Parallel add 0xff - sets the GE bits for anything that wasn't 0
-+ sel r2, r4, r6 @ bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION
-+ uadd8 r3, r3, r6 @ Parallel add 0xff - sets the GE bits for anything that wasn't 0
-+ sel r3, r2, r6 @ bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION
-+ cmp r3, #0
-+ beq 2b
-+
-+strlenendtmp:
-+ @ One (or more) of the bytes we loaded was 0 - but which one?
-+ @ r2 has the mask corresponding to the first loaded word
-+ @ r3 has a combined mask of the two words - but if r2 was all-non 0
-+ @ then it's just the 2nd words
-+ cmp r2, #0
-+ itte eq
-+ moveq r2, r3 @ the end is in the 2nd word
-+ subeq r1,r1,#3
-+ subne r1,r1,#7
-+
-+ @ r1 currently points to the 2nd byte of the word containing the 0
-+ tst r2, # CHARTSTMASK(0) @ 1st character
-+ bne 10f
-+ adds r1,r1,#1
-+ tst r2, # CHARTSTMASK(1) @ 2nd character
-+ ittt eq
-+ addeq r1,r1,#1
-+ tsteq r2, # (3<<15) @ 2nd & 3rd character
-+ @ If not the 3rd must be the last one
-+ addeq r1,r1,#1
-+
-+10:
-+ @ r0 is still at the beginning, r1 is pointing 1 byte after the terminator
-+ sub r0, r1, r0
-+ subs r0, r0, #1
-+ pop { r4, r6 }
-+ bx lr
diff --git a/patches/glibc-2.16.0/0301-add-libc_hidden_builtin_def-for-all-cortex-functions.patch b/patches/glibc-2.16.0/0301-add-libc_hidden_builtin_def-for-all-cortex-functions.patch
deleted file mode 100644
index be6993d..0000000
--- a/patches/glibc-2.16.0/0301-add-libc_hidden_builtin_def-for-all-cortex-functions.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Thu, 15 Sep 2011 23:30:25 +0200
-Subject: [PATCH] add libc_hidden_builtin_def for all cortex functions
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- cortex-strings/sysdeps/arm/armv7/memchr.S | 3 +++
- cortex-strings/sysdeps/arm/armv7/memcpy.S | 2 ++
- cortex-strings/sysdeps/arm/armv7/memset.S | 2 ++
- cortex-strings/sysdeps/arm/armv7/strchr.S | 3 +++
- cortex-strings/sysdeps/arm/armv7/strcpy.c | 1 +
- cortex-strings/sysdeps/arm/armv7/strlen.S | 2 ++
- 6 files changed, 13 insertions(+)
-
-diff --git a/cortex-strings/sysdeps/arm/armv7/memchr.S b/cortex-strings/sysdeps/arm/armv7/memchr.S
-index 8f5aaa9..6d497cb 100644
---- a/cortex-strings/sysdeps/arm/armv7/memchr.S
-+++ b/cortex-strings/sysdeps/arm/armv7/memchr.S
-@@ -148,3 +148,6 @@ memchr:
- pop {r4,r5,r6,r7}
- subs r0,r0,#1
- bx lr
-+
-+strong_alias (memchr, __memchr)
-+libc_hidden_builtin_def (memchr)
-diff --git a/cortex-strings/sysdeps/arm/armv7/memcpy.S b/cortex-strings/sysdeps/arm/armv7/memcpy.S
-index 3be24ca..c274207 100644
---- a/cortex-strings/sysdeps/arm/armv7/memcpy.S
-+++ b/cortex-strings/sysdeps/arm/armv7/memcpy.S
-@@ -150,3 +150,5 @@ memcpy:
- cmp r2,#32
- blt 10b
- b 4b
-+
-+libc_hidden_builtin_def (memcpy)
-diff --git a/cortex-strings/sysdeps/arm/armv7/memset.S b/cortex-strings/sysdeps/arm/armv7/memset.S
-index 921cb75..d4c12a4 100644
---- a/cortex-strings/sysdeps/arm/armv7/memset.S
-+++ b/cortex-strings/sysdeps/arm/armv7/memset.S
-@@ -116,3 +116,5 @@ memset:
-
- 10:
- bx lr @ goodbye
-+
-+libc_hidden_builtin_def (memset)
-diff --git a/cortex-strings/sysdeps/arm/armv7/strchr.S b/cortex-strings/sysdeps/arm/armv7/strchr.S
-index 8875dbf..05c832f 100644
---- a/cortex-strings/sysdeps/arm/armv7/strchr.S
-+++ b/cortex-strings/sysdeps/arm/armv7/strchr.S
-@@ -74,3 +74,6 @@ strchr:
- beq 5b @ A bit messy, if it's common we should branch at the start to a special loop
- mov r0,#0
- bx lr
-+
-+weak_alias (strchr, index)
-+libc_hidden_builtin_def (strchr)
-diff --git a/cortex-strings/sysdeps/arm/armv7/strcpy.c b/cortex-strings/sysdeps/arm/armv7/strcpy.c
-index aa8cb06..3bbaa86 100644
---- a/cortex-strings/sysdeps/arm/armv7/strcpy.c
-+++ b/cortex-strings/sysdeps/arm/armv7/strcpy.c
-@@ -169,4 +169,5 @@ strcpy (char* dst, const char* src)
- #endif
- );
- }
-+
- libc_hidden_builtin_def (strcpy)
-diff --git a/cortex-strings/sysdeps/arm/armv7/strlen.S b/cortex-strings/sysdeps/arm/armv7/strlen.S
-index 125e92f..a1e02ad 100644
---- a/cortex-strings/sysdeps/arm/armv7/strlen.S
-+++ b/cortex-strings/sysdeps/arm/armv7/strlen.S
-@@ -109,3 +109,5 @@ strlenendtmp:
- subs r0, r0, #1
- pop { r4, r6 }
- bx lr
-+
-+libc_hidden_builtin_def (strlen)
diff --git a/patches/glibc-2.16.0/autogen.sh b/patches/glibc-2.16.0/autogen.sh
deleted file mode 100755
index 2f7a28e..0000000
--- a/patches/glibc-2.16.0/autogen.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-# rebuild ./configure (required by
-# 0003-configure.in-detect-readelf-with-AC_CHECK_TARGET_TOO.patch) but do not
-# use autoreconf, this does not work on every system correctly. Even makefiles
-# do it that way!
-chmod +w configure
-autoconf configure.in > configure
-
diff --git a/patches/glibc-2.16.0/series b/patches/glibc-2.16.0/series
deleted file mode 100644
index b70db9b..0000000
--- a/patches/glibc-2.16.0/series
+++ /dev/null
@@ -1,13 +0,0 @@
-# generated by git-ptx-patches
-#tag:base --start-number 1
-#tag:build-system --start-number 1
-0001-add-install-lib-all-target.patch
-0002-don-t-regen-docs-if-perl-is-not-found.patch
-#tag:debian --start-number 100
-0100-Fix-localedef-segfault-when-run-under-exec-shield-Pa.patch
-#tag:gentoo --start-number 200
-0200-resolv-dynamic.patch
-#tag:linaro --start-number 300
-0300-optimized-string-functions-for-NEON-from-Linaro.patch
-0301-add-libc_hidden_builtin_def-for-all-cortex-functions.patch
-# a4ec378a1364c1c28fb1ae34aab4f545 - git-ptx-patches magic
diff --git a/patches/uClibc-0.9.29/generic/check-lxdialog-fix-comparison.diff b/patches/uClibc-0.9.29/generic/check-lxdialog-fix-comparison.diff
deleted file mode 100644
index eeae01c..0000000
--- a/patches/uClibc-0.9.29/generic/check-lxdialog-fix-comparison.diff
+++ /dev/null
@@ -1,17 +0,0 @@
----
- extra/config/lxdialog/check-lxdialog.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: uClibc-0.9.29/extra/config/lxdialog/check-lxdialog.sh
-===================================================================
---- uClibc-0.9.29.orig/extra/config/lxdialog/check-lxdialog.sh
-+++ uClibc-0.9.29/extra/config/lxdialog/check-lxdialog.sh
-@@ -57,7 +57,7 @@ usage() {
- printf "Usage: $0 [-check compiler options|-header|-library]\n"
- }
-
--if [ $# == 0 ]; then
-+if [ $# -eq 0 ]; then
- usage
- exit 1
- fi
diff --git a/patches/uClibc-0.9.29/generic/series b/patches/uClibc-0.9.29/generic/series
deleted file mode 100644
index 08e8b3c..0000000
--- a/patches/uClibc-0.9.29/generic/series
+++ /dev/null
@@ -1,10 +0,0 @@
-check-lxdialog-fix-comparison.diff
-
-uClibc-0.9.29-001-fix-mmap.patch
-uClibc-0.9.29-conditional-sched_affinity.patch
-uClibc-0.9.29-filter-gnu99-from-assembly-flags.patch
-uClibc-0.9.29-fix-fget_putc.diff
-uClibc-0.9.29-fix-gethostent_r-failure-retval.patch
-uClibc-0.9.29-fix-internal_function-definition.patch
-uClibc-0.9.29-linuxthreads.patch
-uClibc-0.9.29-rm-whitespace.patch
diff --git a/patches/uClibc-0.9.29/generic/uClibc-0.9.29-001-fix-mmap.patch b/patches/uClibc-0.9.29/generic/uClibc-0.9.29-001-fix-mmap.patch
deleted file mode 100644
index 4775e8c..0000000
--- a/patches/uClibc-0.9.29/generic/uClibc-0.9.29-001-fix-mmap.patch
+++ /dev/null
@@ -1,91 +0,0 @@
---- uClibc-0.9.29.oorig/test/mmap/mmap2.c (revision 0)
-+++ uClibc-0.9.29/test/mmap/mmap2.c (revision 18616)
-@@ -0,0 +1,41 @@
-+/* When trying to map /dev/mem with offset 0xFFFFF000 on the ARM platform, mmap
-+ * returns -EOVERFLOW.
-+ *
-+ * Since off_t is defined as a long int and the sign bit is set in the address,
-+ * the shift operation shifts in ones instead of zeroes
-+ * from the left. This results the offset sent to the kernel function becomes
-+ * 0xFFFFFFFF instead of 0x000FFFFF with MMAP2_PAGE_SHIFT set to 12.
-+ */
-+
-+#include <unistd.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <errno.h>
-+#include <fcntl.h>
-+#include <sys/mman.h>
-+
-+#define FATAL do { fprintf(stderr, "Error at line %d, file %s (%d) [%s]\n", \
-+ __LINE__, __FILE__, errno, strerror(errno)); exit(1); } while(0)
-+
-+#define MAP_SIZE 4096UL
-+#define MAP_MASK (MAP_SIZE - 1)
-+
-+int main(int argc, char **argv) {
-+ void* map_base = 0;
-+ int fd;
-+ off_t target = 0xfffff000;
-+ if((fd = open("/dev/mem", O_RDWR | O_SYNC)) == -1) FATAL;
-+ printf("/dev/mem opened.\n");
-+ fflush(stdout);
-+
-+ /* Map one page */
-+ map_base = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED,
-+ fd, target & ~MAP_MASK);
-+ if(map_base == (void *) -1) FATAL;
-+ printf("Memory mapped at address %p.\n", map_base);
-+ fflush(stdout);
-+ if(munmap(map_base, MAP_SIZE) == -1) FATAL;
-+ close(fd);
-+ return 0;
-+}
---- uClibc-0.9.29.oorig/libc/sysdeps/linux/arm/mmap.c (revision 18615)
-+++ uClibc-0.9.29/libc/sysdeps/linux/arm/mmap.c (revision 18616)
-@@ -27,7 +27,6 @@ __ptr_t mmap(__ptr_t addr, size_t len, i
-
- #elif defined (__NR_mmap2)
- #define __NR__mmap __NR_mmap2
--
- #ifndef MMAP2_PAGE_SHIFT
- # define MMAP2_PAGE_SHIFT 12
- #endif
-@@ -39,9 +38,17 @@ __ptr_t mmap(__ptr_t addr, size_t len, i
- {
- /* check if offset is page aligned */
- if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1))
-+ {
-+ __set_errno(EINVAL);
- return MAP_FAILED;
-+ }
-+#ifdef __USE_FILE_OFFSET64
-+ return (__ptr_t) _mmap (addr, len, prot, flags,
-+ fd,((__u_quad_t) offset >> MMAP2_PAGE_SHIFT));
-+#else
- return (__ptr_t) _mmap (addr, len, prot, flags,
-- fd,(off_t) (offset >> MMAP2_PAGE_SHIFT));
-+ fd,((__u_long) offset >> MMAP2_PAGE_SHIFT));
-+#endif
- }
- #elif defined (__NR_mmap)
- # define __NR__mmap __NR_mmap
---- uClibc-0.9.29.oorig/libc/sysdeps/linux/common/mmap64.c (revision 18615)
-+++ uClibc-0.9.29/libc/sysdeps/linux/common/mmap64.c (revision 18616)
-@@ -58,8 +58,13 @@ __ptr_t mmap64(__ptr_t addr, size_t len,
- __set_errno(EINVAL);
- return MAP_FAILED;
- }
--
-- return __syscall_mmap2(addr, len, prot, flags, fd, (off_t) (offset >> MMAP2_PAGE_SHIFT));
-+#ifdef __USE_FILE_OFFSET64
-+ return __syscall_mmap2(addr, len, prot, flags,
-+ fd,((__u_quad_t)offset >> MMAP2_PAGE_SHIFT));
-+#else
-+ return __syscall_mmap2(addr, len, prot, flags,
-+ fd,((__u_long)offset >> MMAP2_PAGE_SHIFT));
-+#endif
- }
-
- # endif
diff --git a/patches/uClibc-0.9.29/generic/uClibc-0.9.29-conditional-sched_affinity.patch b/patches/uClibc-0.9.29/generic/uClibc-0.9.29-conditional-sched_affinity.patch
deleted file mode 100644
index 509c42a..0000000
--- a/patches/uClibc-0.9.29/generic/uClibc-0.9.29-conditional-sched_affinity.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-diff -ur uClibc-0.9.29/libc/sysdeps/linux/common/sched_getaffinity.c uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_getaffinity.c
---- uClibc-0.9.29/libc/sysdeps/linux/common/sched_getaffinity.c 2007-02-12 16:52:32.000000000 -0600
-+++ uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_getaffinity.c 2007-05-09 18:05:09.397411811 -0500
-@@ -29,6 +29,7 @@
- #include <sys/param.h>
- #include <sys/types.h>
-
-+#ifdef __NR_sched_getaffinity
- libc_hidden_proto(memset)
-
- #define __NR___syscall_sched_getaffinity __NR_sched_getaffinity
-@@ -48,5 +49,15 @@
- }
- return res;
- }
-+#else
-+/*
-+int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *cpuset)
-+{
-+ __set_errno(ENOSYS);
-+ return -1;
-+}
-+*/
- #endif
- #endif
-+
-+#endif
-diff -ur uClibc-0.9.29/libc/sysdeps/linux/common/sched_setaffinity.c uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_setaffinity.c
---- uClibc-0.9.29/libc/sysdeps/linux/common/sched_setaffinity.c 2007-02-12 16:52:32.000000000 -0600
-+++ uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_setaffinity.c 2007-05-09 18:05:09.397411811 -0500
-@@ -31,6 +31,7 @@
- #include <sys/types.h>
- #include <alloca.h>
-
-+#ifdef __NR_sched_setaffinity
- libc_hidden_proto(getpid)
-
- #define __NR___syscall_sched_setaffinity __NR_sched_setaffinity
-@@ -74,5 +75,14 @@
-
- return INLINE_SYSCALL (sched_setaffinity, 3, pid, cpusetsize, cpuset);
- }
-+#else
-+/*
-+int sched_setaffinity(pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset)
-+{
-+ __set_errno(ENOSYS);
-+ return -1;
-+}
-+*/
-+#endif
- #endif
- #endif
diff --git a/patches/uClibc-0.9.29/generic/uClibc-0.9.29-filter-gnu99-from-assembly-flags.patch b/patches/uClibc-0.9.29/generic/uClibc-0.9.29-filter-gnu99-from-assembly-flags.patch
deleted file mode 100644
index d1a7e3a..0000000
--- a/patches/uClibc-0.9.29/generic/uClibc-0.9.29-filter-gnu99-from-assembly-flags.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur uClibc-0.9.29/Makerules uClibc-0.9.29-patched/Makerules
---- uClibc-0.9.29/Makerules 2006-12-10 18:25:23.000000000 -0600
-+++ uClibc-0.9.29-patched/Makerules 2008-01-26 17:04:50.965699518 -0600
-@@ -96,7 +96,7 @@
- disp_ld = $($(DISP)_disp_ld)
-
- cmd_compile.c = $(CC) -c $< -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(filter-out $(CFLAGS-OMIT-$(notdir $<)),$(CFLAGS-$(notdir $(^D)))) $(CFLAGS-$(subst $(top_srcdir),,$(dir $<))) $(CFLAGS-$(notdir $<)) $(CFLAGS-$(notdir $@))
--cmd_compile.S = $(cmd_compile.c) -D__ASSEMBLER__ $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$(notdir $<)) $(ASFLAGS-$(notdir $@))
-+cmd_compile.S = $(filter-out -std=gnu99, $(cmd_compile.c)) -D__ASSEMBLER__ $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$(notdir $<)) $(ASFLAGS-$(notdir $@))
- cmd_compile.m = $(cmd_compile.c) -DL_$(patsubst %$(suffix $(notdir $@)),%,$(notdir $@))
- cmd_compile-m = $(CC) $^ -c -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $(@D))) $(CFLAGS-$(notdir $@))
- cmd_strip = $(STRIPTOOL) $(STRIP_FLAGS) $^
diff --git a/patches/uClibc-0.9.29/generic/uClibc-0.9.29-fix-fget_putc.diff b/patches/uClibc-0.9.29/generic/uClibc-0.9.29-fix-fget_putc.diff
deleted file mode 100644
index 15d6149..0000000
--- a/patches/uClibc-0.9.29/generic/uClibc-0.9.29-fix-fget_putc.diff
+++ /dev/null
@@ -1,396 +0,0 @@
-diff -ur uClibc-0.9.29/libc/inet/rpc/rcmd.c uClibc-0.9.29-patched/libc/inet/rpc/rcmd.c
---- uClibc-0.9.29/libc/inet/rpc/rcmd.c 2007-01-10 11:46:19.000000000 -0600
-+++ uClibc-0.9.29-patched/libc/inet/rpc/rcmd.c 2007-05-09 18:05:21.638421151 -0500
-@@ -126,7 +126,7 @@
- libc_hidden_proto(listen)
- libc_hidden_proto(sigsetmask)
- libc_hidden_proto(getc_unlocked)
--libc_hidden_proto(__fgetc_unlocked)
-+//libc_hidden_proto(fgetc_unlocked)
- libc_hidden_proto(fopen)
- libc_hidden_proto(fclose)
- libc_hidden_proto(fprintf)
-diff -ur uClibc-0.9.29/libc/inet/rpc/ruserpass.c uClibc-0.9.29-patched/libc/inet/rpc/ruserpass.c
---- uClibc-0.9.29/libc/inet/rpc/ruserpass.c 2006-03-23 05:14:16.000000000 -0600
-+++ uClibc-0.9.29-patched/libc/inet/rpc/ruserpass.c 2007-05-09 18:05:21.638421151 -0500
-@@ -63,7 +63,7 @@
- libc_hidden_proto(fopen)
- libc_hidden_proto(fclose)
- libc_hidden_proto(getc_unlocked)
--libc_hidden_proto(__fgetc_unlocked)
-+//libc_hidden_proto(__fgetc_unlocked)
-
- #define _(X) (X)
- /* #include "ftp_var.h" */
-diff -ur uClibc-0.9.29/libc/misc/error/error.c uClibc-0.9.29-patched/libc/misc/error/error.c
---- uClibc-0.9.29/libc/misc/error/error.c 2006-05-04 09:44:13.000000000 -0500
-+++ uClibc-0.9.29-patched/libc/misc/error/error.c 2007-05-09 18:05:21.646421810 -0500
-@@ -30,11 +30,14 @@
- libc_hidden_proto(strerror)
- libc_hidden_proto(fprintf)
- libc_hidden_proto(exit)
-+//#undef putc
- libc_hidden_proto(putc)
-+libc_hidden_proto(fputc)
- libc_hidden_proto(vfprintf)
- libc_hidden_proto(fflush)
--libc_hidden_proto(fputc)
--libc_hidden_proto(__fputc_unlocked)
-+//#ifdef __UCLIBC_HAS_STDIO_PUTC_MACRO__
-+libc_hidden_proto(fputc_unlocked)
-+//#endif
-
- /* This variable is incremented each time `error' is called. */
- unsigned int error_message_count = 0;
-diff -ur uClibc-0.9.29/libc/misc/ttyent/getttyent.c uClibc-0.9.29-patched/libc/misc/ttyent/getttyent.c
---- uClibc-0.9.29/libc/misc/ttyent/getttyent.c 2006-12-07 17:24:02.000000000 -0600
-+++ uClibc-0.9.29-patched/libc/misc/ttyent/getttyent.c 2007-05-09 18:05:21.646421810 -0500
-@@ -44,8 +44,10 @@
- libc_hidden_proto(__fsetlocking)
- libc_hidden_proto(rewind)
- libc_hidden_proto(fgets_unlocked)
-+//#undef getc_unlocked
- libc_hidden_proto(getc_unlocked)
--libc_hidden_proto(__fgetc_unlocked)
-+//#undef fgetc_unlocked
-+libc_hidden_proto(fgetc_unlocked)
- libc_hidden_proto(fopen)
- libc_hidden_proto(fclose)
- libc_hidden_proto(abort)
-diff -ur uClibc-0.9.29/libc/pwd_grp/pwd_grp.c uClibc-0.9.29-patched/libc/pwd_grp/pwd_grp.c
---- uClibc-0.9.29/libc/pwd_grp/pwd_grp.c 2007-04-13 03:32:18.000000000 -0500
-+++ uClibc-0.9.29-patched/libc/pwd_grp/pwd_grp.c 2007-05-09 18:05:21.638421151 -0500
-@@ -43,11 +43,12 @@
- libc_hidden_proto(strtoul)
- libc_hidden_proto(rewind)
- libc_hidden_proto(fgets_unlocked)
--libc_hidden_proto(__fputc_unlocked)
- libc_hidden_proto(sprintf)
- libc_hidden_proto(fopen)
- libc_hidden_proto(fclose)
- libc_hidden_proto(fprintf)
-+//#undef fputc_unlocked
-+libc_hidden_proto(fputc_unlocked)
- #ifdef __UCLIBC_HAS_XLOCALE__
- libc_hidden_proto(__ctype_b_loc)
- #elif __UCLIBC_HAS_CTYPE_TABLES__
-@@ -801,7 +802,7 @@
-
- do {
- if (!*m) {
-- if (__fputc_unlocked('\n', f) >= 0) {
-+ if (fputc_unlocked('\n', f) >= 0) {
- rv = 0;
- }
- break;
-@@ -867,7 +868,7 @@
- goto DO_UNLOCK;
- }
-
-- if (__fputc_unlocked('\n', stream) > 0) {
-+ if (fputc_unlocked('\n', stream) > 0) {
- rv = 0;
- }
-
-diff -ur uClibc-0.9.29/libc/stdio/_scanf.c uClibc-0.9.29-patched/libc/stdio/_scanf.c
---- uClibc-0.9.29/libc/stdio/_scanf.c 2007-01-20 12:32:10.000000000 -0600
-+++ uClibc-0.9.29-patched/libc/stdio/_scanf.c 2007-05-09 18:05:21.642421481 -0500
-@@ -86,7 +86,8 @@
- libc_hidden_proto(vsscanf)
- libc_hidden_proto(fclose)
- libc_hidden_proto(getc_unlocked)
--libc_hidden_proto(__fgetc_unlocked)
-+//#undef fgetc_unlocked
-+libc_hidden_proto(fgetc_unlocked)
- #ifdef __UCLIBC_HAS_WCHAR__
- libc_hidden_proto(wcslen)
- libc_hidden_proto(vfwscanf)
-diff -ur uClibc-0.9.29/libc/stdio/fgetc.c uClibc-0.9.29-patched/libc/stdio/fgetc.c
---- uClibc-0.9.29/libc/stdio/fgetc.c 2006-01-15 16:41:03.000000000 -0600
-+++ uClibc-0.9.29-patched/libc/stdio/fgetc.c 2007-05-09 18:05:21.642421481 -0500
-@@ -13,13 +13,13 @@
- #undef getc
- #undef getc_unlocked
-
--libc_hidden_proto(__fgetc_unlocked)
-+libc_hidden_proto(fgetc_unlocked)
-
- #ifdef __DO_UNLOCKED
-
- libc_hidden_proto(fflush_unlocked)
-
--int __fgetc_unlocked(FILE *stream)
-+int fgetc_unlocked(FILE *stream)
- {
- __STDIO_STREAM_VALIDATE(stream);
-
-@@ -73,26 +73,22 @@
-
- return EOF;
- }
--libc_hidden_def(__fgetc_unlocked)
--
--libc_hidden_proto(fgetc_unlocked)
--strong_alias(__fgetc_unlocked,fgetc_unlocked)
- libc_hidden_def(fgetc_unlocked)
-
- //libc_hidden_proto(__getc_unlocked)
--//strong_alias(__fgetc_unlocked,__getc_unlocked)
-+//strong_alias(fgetc_unlocked,__getc_unlocked)
- //libc_hidden_def(__getc_unlocked)
-
- libc_hidden_proto(getc_unlocked)
--strong_alias(__fgetc_unlocked,getc_unlocked)
-+strong_alias(fgetc_unlocked,getc_unlocked)
- libc_hidden_def(getc_unlocked)
-
- #ifndef __UCLIBC_HAS_THREADS__
- libc_hidden_proto(fgetc)
--strong_alias(__fgetc_unlocked,fgetc)
-+strong_alias(fgetc_unlocked,fgetc)
- libc_hidden_def(fgetc)
-
--strong_alias(__fgetc_unlocked,getc)
-+strong_alias(fgetc_unlocked,getc)
- #endif
-
- #elif defined __UCLIBC_HAS_THREADS__
-diff -ur uClibc-0.9.29/libc/stdio/fgets.c uClibc-0.9.29-patched/libc/stdio/fgets.c
---- uClibc-0.9.29/libc/stdio/fgets.c 2006-01-15 16:41:03.000000000 -0600
-+++ uClibc-0.9.29-patched/libc/stdio/fgets.c 2007-05-09 18:05:21.638421151 -0500
-@@ -10,8 +10,7 @@
- libc_hidden_proto(fgets_unlocked)
-
- #ifdef __DO_UNLOCKED
--
--libc_hidden_proto(__fgetc_unlocked)
-+libc_hidden_proto(fgetc_unlocked)
-
- char *fgets_unlocked(char *__restrict s, int n,
- register FILE * __restrict stream)
-@@ -38,7 +37,7 @@
- break;
- }
- } else {
-- if ((c = __fgetc_unlocked(stream)) == EOF) {
-+ if ((c = fgetc_unlocked(stream)) == EOF) {
- if (__FERROR_UNLOCKED(stream)) {
- goto ERROR;
- }
-diff -ur uClibc-0.9.29/libc/stdio/fputc.c uClibc-0.9.29-patched/libc/stdio/fputc.c
---- uClibc-0.9.29/libc/stdio/fputc.c 2007-04-14 12:03:18.000000000 -0500
-+++ uClibc-0.9.29-patched/libc/stdio/fputc.c 2007-05-09 20:50:51.350629927 -0500
-@@ -16,7 +16,7 @@
-
- #ifdef __DO_UNLOCKED
-
--int __fputc_unlocked(int c, register FILE *stream)
-+int fputc_unlocked(int c, register FILE *stream)
- {
- __STDIO_STREAM_VALIDATE(stream);
-
-@@ -70,22 +70,22 @@
- BAD:
- return EOF;
- }
--libc_hidden_def(__fputc_unlocked)
-+libc_hidden_def(fputc_unlocked)
-
- /* exposing these would be fundamentally *wrong*! fix you, instead! */
- /* libc_hidden_proto(fputc_unlocked) */
--strong_alias(__fputc_unlocked,fputc_unlocked)
-+/* strong_alias(__fputc_unlocked,fputc_unlocked) */
- /* exposing these would be fundamentally *wrong*! fix you, instead! */
- /* libc_hidden_def(fputc_unlocked) */
-
- libc_hidden_proto(putc_unlocked)
--strong_alias(__fputc_unlocked,putc_unlocked)
-+strong_alias(fputc_unlocked,putc_unlocked)
- libc_hidden_def(putc_unlocked)
- #ifndef __UCLIBC_HAS_THREADS__
--strong_alias(__fputc_unlocked,fputc)
-+strong_alias(fputc_unlocked,fputc)
-
- libc_hidden_proto(putc)
--strong_alias(__fputc_unlocked,putc)
-+strong_alias(fputc_unlocked,putc)
- libc_hidden_def(putc)
- #endif
-
-diff -ur uClibc-0.9.29/libc/stdio/getchar.c uClibc-0.9.29-patched/libc/stdio/getchar.c
---- uClibc-0.9.29/libc/stdio/getchar.c 2006-12-19 22:30:25.000000000 -0600
-+++ uClibc-0.9.29-patched/libc/stdio/getchar.c 2007-05-09 18:05:21.642421481 -0500
-@@ -7,7 +7,8 @@
-
- #include "_stdio.h"
-
--libc_hidden_proto(__fgetc_unlocked)
-+//#undef fgetc_unlocked
-+libc_hidden_proto(fgetc_unlocked)
-
- #undef getchar
- #ifdef __DO_UNLOCKED
-diff -ur uClibc-0.9.29/libc/stdio/getdelim.c uClibc-0.9.29-patched/libc/stdio/getdelim.c
---- uClibc-0.9.29/libc/stdio/getdelim.c 2006-02-13 02:52:46.000000000 -0600
-+++ uClibc-0.9.29-patched/libc/stdio/getdelim.c 2007-05-09 18:05:21.642421481 -0500
-@@ -11,8 +11,8 @@
- #include "_stdio.h"
-
- libc_hidden_proto(getdelim)
--
--libc_hidden_proto(__fgetc_unlocked)
-+//#undef fgetc_unlocked
-+libc_hidden_proto(fgetc_unlocked)
-
- /* Note: There is a defect in this function. (size_t vs ssize_t). */
-
-diff -ur uClibc-0.9.29/libc/stdio/old_vfprintf.c uClibc-0.9.29-patched/libc/stdio/old_vfprintf.c
---- uClibc-0.9.29/libc/stdio/old_vfprintf.c 2006-01-22 13:35:08.000000000 -0600
-+++ uClibc-0.9.29-patched/libc/stdio/old_vfprintf.c 2007-05-09 18:05:21.642421481 -0500
-@@ -149,7 +149,8 @@
- libc_hidden_proto(strnlen)
- libc_hidden_proto(memcpy)
- libc_hidden_proto(putc_unlocked)
--libc_hidden_proto(__fputc_unlocked)
-+//#undef fputc_unlocked
-+libc_hidden_proto(fputc_unlocked)
- libc_hidden_proto(__glibc_strerror_r)
-
- /* #undef __UCLIBC_HAS_FLOATS__ */
-diff -ur uClibc-0.9.29/libc/stdio/putchar.c uClibc-0.9.29-patched/libc/stdio/putchar.c
---- uClibc-0.9.29/libc/stdio/putchar.c 2006-01-13 18:58:03.000000000 -0600
-+++ uClibc-0.9.29-patched/libc/stdio/putchar.c 2007-05-09 18:05:21.642421481 -0500
-@@ -7,7 +7,8 @@
-
- #include "_stdio.h"
-
--libc_hidden_proto(__fputc_unlocked)
-+//#undef fputc_unlocked
-+libc_hidden_proto(fputc_unlocked)
-
- #undef putchar
- #ifdef __DO_UNLOCKED
-diff -ur uClibc-0.9.29/libc/stdio/puts.c uClibc-0.9.29-patched/libc/stdio/puts.c
---- uClibc-0.9.29/libc/stdio/puts.c 2006-01-13 18:58:03.000000000 -0600
-+++ uClibc-0.9.29-patched/libc/stdio/puts.c 2007-05-09 18:05:21.642421481 -0500
-@@ -7,7 +7,8 @@
-
- #include "_stdio.h"
-
--libc_hidden_proto(__fputc_unlocked)
-+//#undef fputc_unlocked
-+libc_hidden_proto(fputc_unlocked)
- libc_hidden_proto(fputs_unlocked)
-
- int puts(register const char * __restrict s)
-@@ -25,7 +26,7 @@
- /* Note: Nonportable as fputs need only return nonnegative on success. */
- if ((n = fputs_unlocked(s, stream)) != EOF) {
- ++n;
-- if (__fputc_unlocked('\n', stream) == EOF) {
-+ if (fputc_unlocked('\n', stream) == EOF) {
- n = EOF;
- }
- }
-diff -ur uClibc-0.9.29/libc/stdio/putwchar.c uClibc-0.9.29-patched/libc/stdio/putwchar.c
---- uClibc-0.9.29/libc/stdio/putwchar.c 2006-01-14 14:16:19.000000000 -0600
-+++ uClibc-0.9.29-patched/libc/stdio/putwchar.c 2007-05-09 18:05:21.642421481 -0500
-@@ -22,7 +22,8 @@
-
- #elif defined __UCLIBC_HAS_THREADS__
-
--libc_hidden_proto(__fputc_unlocked)
-+//#undef fputc_unlocked
-+libc_hidden_proto(fputc_unlocked)
- /* psm: should this be fputwc? */
- libc_hidden_proto(fputc)
-
-diff -ur uClibc-0.9.29/libc/sysdeps/linux/common/bits/uClibc_stdio.h uClibc-0.9.29-patched/libc/sysdeps/linux/common/bits/uClibc_stdio.h
---- uClibc-0.9.29/libc/sysdeps/linux/common/bits/uClibc_stdio.h 2007-01-28 07:16:58.000000000 -0600
-+++ uClibc-0.9.29-patched/libc/sysdeps/linux/common/bits/uClibc_stdio.h 2007-05-09 20:56:02.408110608 -0500
-@@ -381,33 +381,29 @@
- # define __FEOF(__stream) __FEOF_UNLOCKED(__stream)
- #endif
-
--extern int __fgetc_unlocked(FILE *__stream);
--extern int __fputc_unlocked(int __c, FILE *__stream);
--
- /* First define the default definitions.
- They are overridden below as necessary. */
--#define __FGETC_UNLOCKED(__stream) (__fgetc_unlocked)((__stream))
-+#define __FGETC_UNLOCKED(__stream) (fgetc_unlocked)((__stream))
- #define __FGETC(__stream) (fgetc)((__stream))
--#define __GETC_UNLOCKED_MACRO(__stream) (__fgetc_unlocked)((__stream))
--#define __GETC_UNLOCKED(__stream) (__fgetc_unlocked)((__stream))
-+#define __GETC_UNLOCKED_MACRO(__stream) (fgetc_unlocked)((__stream))
-+#define __GETC_UNLOCKED(__stream) (fgetc_unlocked)((__stream))
- #define __GETC(__stream) (fgetc)((__stream))
-
--#define __FPUTC_UNLOCKED(__c, __stream) (__fputc_unlocked)((__c),(__stream))
-+#define __FPUTC_UNLOCKED(__c, __stream) (fputc_unlocked)((__c),(__stream))
- #define __FPUTC(__c, __stream) (fputc)((__c),(__stream))
--#define __PUTC_UNLOCKED_MACRO(__c, __stream) (__fputc_unlocked)((__c),(__stream))
--#define __PUTC_UNLOCKED(__c, __stream) (__fputc_unlocked)((__c),(__stream))
-+#define __PUTC_UNLOCKED_MACRO(__c, __stream) (fputc_unlocked)((__c),(__stream))
-+#define __PUTC_UNLOCKED(__c, __stream) (fputc_unlocked)((__c),(__stream))
- #define __PUTC(__c, __stream) (fputc)((__c),(__stream))
-
-
- #ifdef __STDIO_GETC_MACRO
--
- extern FILE *__stdin; /* For getchar() macro. */
-
- # undef __GETC_UNLOCKED_MACRO
- # define __GETC_UNLOCKED_MACRO(__stream) \
- ( ((__stream)->__bufpos < (__stream)->__bufgetc_u) \
- ? (*(__stream)->__bufpos++) \
-- : __fgetc_unlocked(__stream) )
-+ : fgetc_unlocked(__stream) )
-
- # if 0
- /* Classic macro approach. getc{_unlocked} can have side effects. */
-@@ -453,20 +449,17 @@
- # endif
- # endif
-
--#else
--
- #endif /* __STDIO_GETC_MACRO */
-
-
- #ifdef __STDIO_PUTC_MACRO
--
- extern FILE *__stdout; /* For putchar() macro. */
-
- # undef __PUTC_UNLOCKED_MACRO
- # define __PUTC_UNLOCKED_MACRO(__c, __stream) \
- ( ((__stream)->__bufpos < (__stream)->__bufputc_u) \
- ? (*(__stream)->__bufpos++) = (__c) \
-- : __fputc_unlocked((__c),(__stream)) )
-+ : (fputc_unlocked((__c),(__stream)) )
-
- # if 0
- /* Classic macro approach. putc{_unlocked} can have side effects.*/
-@@ -489,7 +482,8 @@
- }) )
-
- # undef __PUTC_UNLOCKED
--# define __PUTC_UNLOCKED(__c, __stream) __FPUTC_UNLOCKED((__c), (__stream))
-+# define __PUTC_UNLOCKED(__c, __stream) \
-+ __FPUTC_UNLOCKED((__c), (__stream))
-
- # ifdef __UCLIBC_HAS_THREADS__
- # undef __FPUTC
-diff -ur uClibc-0.9.29/libc/unistd/getpass.c uClibc-0.9.29-patched/libc/unistd/getpass.c
---- uClibc-0.9.29/libc/unistd/getpass.c 2006-07-05 05:58:38.000000000 -0500
-+++ uClibc-0.9.29-patched/libc/unistd/getpass.c 2007-05-09 18:05:21.642421481 -0500
-@@ -36,7 +36,8 @@
- libc_hidden_proto(fputs)
- libc_hidden_proto(fputc)
- libc_hidden_proto(putc)
--libc_hidden_proto(__fputc_unlocked)
-+//#undef fputc_unlocked
-+libc_hidden_proto(fputc_unlocked)
-
- /* It is desirable to use this bit on systems that have it.
- The only bit of terminal state we want to twiddle is echoing, which is
diff --git a/patches/uClibc-0.9.29/generic/uClibc-0.9.29-fix-gethostent_r-failure-retval.patch b/patches/uClibc-0.9.29/generic/uClibc-0.9.29-fix-gethostent_r-failure-retval.patch
deleted file mode 100644
index 7b246c1..0000000
--- a/patches/uClibc-0.9.29/generic/uClibc-0.9.29-fix-gethostent_r-failure-retval.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur uClibc-0.9.29/libc/inet/resolv.c uClibc-0.9.29-patched/libc/inet/resolv.c
---- uClibc-0.9.29/libc/inet/resolv.c 2007-04-23 12:01:05.000000000 -0500
-+++ uClibc-0.9.29-patched/libc/inet/resolv.c 2007-05-09 18:05:33.563404419 -0500
-@@ -1700,7 +1700,7 @@
- int gethostent_r(struct hostent *result_buf, char *buf, size_t buflen,
- struct hostent **result, int *h_errnop)
- {
-- int ret;
-+ int ret = HOST_NOT_FOUND;
-
- __UCLIBC_MUTEX_LOCK(mylock);
- if (__gethostent_fp == NULL) {
diff --git a/patches/uClibc-0.9.29/generic/uClibc-0.9.29-fix-internal_function-definition.patch b/patches/uClibc-0.9.29/generic/uClibc-0.9.29-fix-internal_function-definition.patch
deleted file mode 100644
index 9b88d82..0000000
--- a/patches/uClibc-0.9.29/generic/uClibc-0.9.29-fix-internal_function-definition.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-Index: uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h
-===================================================================
---- uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h (revision 18898)
-+++ uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h (working copy)
-@@ -42,6 +42,8 @@
- /* define if target supports IEEE signed zero floats */
- #define __UCLIBC_HAVE_SIGNED_ZERO__
-
-+#if defined _LIBC
- #define internal_function __attribute__ ((regparm (3), stdcall))
-+#endif
-
- #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
-Index: uClibc/include/libc-symbols.h
-===================================================================
---- uClibc/include/libc-symbols.h (revision 18898)
-+++ uClibc/include/libc-symbols.h (working copy)
-@@ -22,6 +22,16 @@
- #ifndef _LIBC_SYMBOLS_H
- #define _LIBC_SYMBOLS_H 1
-
-+/* This is defined for the compilation of all C library code. features.h
-+ tests this to avoid inclusion of stubs.h while compiling the library,
-+ before stubs.h has been generated. Some library code that is shared
-+ with other packages also tests this symbol to see if it is being
-+ compiled as part of the C library. We must define this before including
-+ config.h, because it makes some definitions conditional on whether libc
-+ itself is being compiled, or just some generator program. */
-+#define _LIBC 1
-+
-+
- /* This file's macros are included implicitly in the compilation of every
- file in the C library by -imacros.
-
-@@ -40,16 +50,6 @@
-
- #include <bits/uClibc_arch_features.h>
-
--
--/* This is defined for the compilation of all C library code. features.h
-- tests this to avoid inclusion of stubs.h while compiling the library,
-- before stubs.h has been generated. Some library code that is shared
-- with other packages also tests this symbol to see if it is being
-- compiled as part of the C library. We must define this before including
-- config.h, because it makes some definitions conditional on whether libc
-- itself is being compiled, or just some generator program. */
--#define _LIBC 1
--
- /* Enable declarations of GNU extensions, since we are compiling them. */
- #define _GNU_SOURCE 1
-
diff --git a/patches/uClibc-0.9.29/generic/uClibc-0.9.29-linuxthreads.patch b/patches/uClibc-0.9.29/generic/uClibc-0.9.29-linuxthreads.patch
deleted file mode 100644
index 8ce2439..0000000
--- a/patches/uClibc-0.9.29/generic/uClibc-0.9.29-linuxthreads.patch
+++ /dev/null
@@ -1,145 +0,0 @@
---- a/libpthread/linuxthreads.old/attr.c 2006-01-24 12:41:01.000000000 -0500
-+++ b/libpthread/linuxthreads.old/attr.c 2008-02-10 11:35:32.000000000 -0500
-@@ -25,6 +25,14 @@
- #include "pthread.h"
- #include "internals.h"
-
-+#include <sys/resource.h>
-+#include <inttypes.h>
-+#include <stdio.h>
-+#include <stdio_ext.h>
-+#include <stdlib.h>
-+#include <sys/resource.h>
-+
-+
- /* NOTE: With uClibc I don't think we need this versioning stuff.
- * Therefore, define the function pthread_attr_init() here using
- * a strong symbol. */
-@@ -209,4 +217,94 @@ int __pthread_attr_getstacksize(const pt
- *stacksize = attr->__stacksize;
- return 0;
- }
-+
-+
-+extern int *__libc_stack_end;
-+
- weak_alias (__pthread_attr_getstacksize, pthread_attr_getstacksize)
-+void* pthread_getattr_np(pthread_t thread, pthread_attr_t *attr)
-+{
-+ static void *stackBase = 0;
-+ static size_t stackSize = 0;
-+ int ret = 0;
-+ /* Stack size limit. */
-+ struct rlimit rl;
-+
-+ /* The safest way to get the top of the stack is to read
-+ /proc/self/maps and locate the line into which
-+ __libc_stack_end falls. */
-+ FILE *fp = fopen("/proc/self/maps", "rc");
-+ if (fp == NULL)
-+ ret = errno;
-+ /* We need the limit of the stack in any case. */
-+ else if (getrlimit (RLIMIT_STACK, &rl) != 0)
-+ ret = errno;
-+ else {
-+ /* We need no locking. */
-+ __fsetlocking (fp, FSETLOCKING_BYCALLER);
-+
-+ /* Until we found an entry (which should always be the case)
-+ mark the result as a failure. */
-+ ret = ENOENT;
-+
-+ char *line = NULL;
-+ size_t linelen = 0;
-+ uintptr_t last_to = 0;
-+
-+ while (! feof_unlocked (fp)) {
-+ if (getdelim (&line, &linelen, '\n', fp) <= 0)
-+ break;
-+
-+ uintptr_t from;
-+ uintptr_t to;
-+ if (sscanf (line, "%x-%x", &from, &to) != 2)
-+ continue;
-+ if (from <= (uintptr_t) __libc_stack_end
-+ && (uintptr_t) __libc_stack_end < to) {
-+ /* Found the entry. Now we have the info we need. */
-+ attr->__stacksize = rl.rlim_cur;
-+#ifdef _STACK_GROWS_UP
-+ /* Don't check to enforce a limit on the __stacksize */
-+ attr->__stackaddr = (void *) from;
-+#else
-+ attr->__stackaddr = (void *) to;
-+
-+ /* The limit might be too high. */
-+ if ((size_t) attr->__stacksize > (size_t) attr->__stackaddr - last_to)
-+ attr->__stacksize = (size_t) attr->__stackaddr - last_to;
-+#endif
-+
-+ /* We succeed and no need to look further. */
-+ ret = 0;
-+ break;
-+ }
-+ last_to = to;
-+ }
-+
-+ fclose (fp);
-+ free (line);
-+ }
-+#ifndef _STACK_GROWS_UP
-+ stackBase = (char *) attr->__stackaddr - attr->__stacksize;
-+#else
-+ stackBase = attr->__stackaddr;
-+#endif
-+ stackSize = attr->__stacksize;
-+ return (void*)(stackBase + stackSize);
-+}
-+
-+int __pthread_attr_getstack (const pthread_attr_t *attr, void **stackaddr,
-+ size_t *stacksize)
-+{
-+ /* XXX This function has a stupid definition. The standard specifies
-+ no error value but what is if no stack address was set? We simply
-+ return the value we have in the member. */
-+#ifndef _STACK_GROWS_UP
-+ *stackaddr = (char *) attr->__stackaddr - attr->__stacksize;
-+#else
-+ *stackaddr = attr->__stackaddr;
-+#endif
-+ *stacksize = attr->__stacksize;
-+ return 0;
-+}
-+weak_alias (__pthread_attr_getstack, pthread_attr_getstack)
-
---- a/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h 2006-12-07 22:19:36.000000000 -0500
-+++ b/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h 2008-02-10 11:42:35.000000000 -0500
-@@ -288,15 +288,11 @@ extern int pthread_attr_getstacksize (__
- __attr, size_t *__restrict __stacksize)
- __THROW;
-
--#if 0
--/* Not yet implemented in uClibc! */
--
- #ifdef __USE_GNU
- /* Initialize thread attribute *ATTR with attributes corresponding to the
- already running thread TH. It shall be called on unitialized ATTR
- and destroyed with pthread_attr_destroy when no longer needed. */
--extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __THROW;
--#endif
-+extern void* pthread_getattr_np(pthread_t thread, pthread_attr_t *attr);
- #endif
-
- /* Functions for scheduling control. */
-@@ -599,6 +595,11 @@ extern int pthread_cancel (pthread_t __c
- cancelled. */
- extern void pthread_testcancel (void);
-
-+/* Return the previously set address for the stack. */
-+extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
-+ void **__restrict __stackaddr,
-+ size_t *__restrict __stacksize) __THROW;
-+
-
- /* Install a cleanup handler: ROUTINE will be called with arguments ARG
- when the thread is cancelled or calls pthread_exit. ROUTINE will also
-
diff --git a/patches/uClibc-0.9.29/generic/uClibc-0.9.29-rm-whitespace.patch b/patches/uClibc-0.9.29/generic/uClibc-0.9.29-rm-whitespace.patch
deleted file mode 100644
index 6004f91..0000000
--- a/patches/uClibc-0.9.29/generic/uClibc-0.9.29-rm-whitespace.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-diff -urN uClibc-0.9.29-0rig/include/assert.h uClibc-0.9.29/include/assert.h
---- uClibc-0.9.29-0rig/include/assert.h 2005-11-03 23:42:46.000000000 +0100
-+++ uClibc-0.9.29/include/assert.h 2007-08-13 19:10:57.000000000 +0200
-@@ -31,7 +31,7 @@
- #define _ASSERT_H 1
- #include <features.h>
-
--#if defined __cplusplus && __GNUC_PREREQ (2,95)
-+#if defined __cplusplus && __GNUC_PREREQ(2,95)
- # define __ASSERT_VOID_CAST static_cast<void>
- #else
- # define __ASSERT_VOID_CAST (void)
-@@ -59,13 +59,17 @@
- (__ASSERT_VOID_CAST ((expr) ? 0 : \
- (__assert (__STRING(expr), __FILE__, __LINE__, \
- __ASSERT_FUNCTION), 0)))
--
-+
-+/* Define some temporaries to workaround tinyx makedepend bug */
-+#define __GNUC_PREREQ_2_6 __GNUC_PREREQ(2, 6)
-+#define __GNUC_PREREQ_2_4 __GNUC_PREREQ(2, 4)
- /* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__'
- which contains the name of the function currently being defined.
- This is broken in G++ before version 2.6.
- C9x has a similar variable called __func__, but prefer the GCC one since
- it demangles C++ function names. */
--# if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4)
-+
-+# if defined __cplusplus ? __GNUC_PREREQ_2_6 : __GNUC_PREREQ_2_4
- # define __ASSERT_FUNCTION __PRETTY_FUNCTION__
- # else
- # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
-diff -urN uClibc-0.9.29-0rig/include/complex.h uClibc-0.9.29/include/complex.h
---- uClibc-0.9.29-0rig/include/complex.h 2002-05-09 10:15:21.000000000 +0200
-+++ uClibc-0.9.29/include/complex.h 2007-08-13 17:55:29.000000000 +0200
-@@ -33,7 +33,7 @@
- /* We might need to add support for more compilers here. But since ISO
- C99 is out hopefully all maintained compilers will soon provide the data
- types `float complex' and `double complex'. */
--#if __GNUC_PREREQ (2, 7) && !__GNUC_PREREQ (2, 97)
-+#if __GNUC_PREREQ(2, 7) && !__GNUC_PREREQ(2, 97)
- # define _Complex __complex__
- #endif
-
-diff -urN uClibc-0.9.29-0rig/include/features.h uClibc-0.9.29/include/features.h
---- uClibc-0.9.29-0rig/include/features.h 2006-11-29 22:10:04.000000000 +0100
-+++ uClibc-0.9.29/include/features.h 2007-08-13 17:55:51.000000000 +0200
-@@ -143,7 +143,7 @@
-
- /* Convenience macros to test the versions of glibc and gcc.
- Use them like this:
-- #if __GNUC_PREREQ (2,8)
-+ #if __GNUC_PREREQ(2,8)
- ... code requiring gcc 2.8 or later ...
- #endif
- Note - they won't work for gcc1 or glibc1, since the _MINOR macros
-@@ -297,7 +297,7 @@
- /* uClibc does not support _FORTIFY_SOURCE */
- #undef _FORTIFY_SOURCE
- #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
-- && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
-+ && __GNUC_PREREQ(4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
- # if _FORTIFY_SOURCE > 1
- # define __USE_FORTIFY_LEVEL 2
- # else
-@@ -366,7 +366,7 @@
- #endif /* !ASSEMBLER */
-
- /* Decide whether we can define 'extern inline' functions in headers. */
--#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
-+#if __GNUC_PREREQ(2, 7) && defined __OPTIMIZE__ \
- && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__
- # define __USE_EXTERN_INLINES 1
- #endif
-diff -urN uClibc-0.9.29-0rig/include/tgmath.h uClibc-0.9.29/include/tgmath.h
---- uClibc-0.9.29-0rig/include/tgmath.h 2002-05-09 10:15:21.000000000 +0200
-+++ uClibc-0.9.29/include/tgmath.h 2007-08-13 17:56:17.000000000 +0200
-@@ -34,7 +34,7 @@
- do not try this for now and instead concentrate only on GNU CC. Once
- we have more information support for other compilers might follow. */
-
--#if __GNUC_PREREQ (2, 7)
-+#if __GNUC_PREREQ(2, 7)
-
- # ifdef __NO_LONG_DOUBLE_MATH
- # define __tgml(fct) fct