summaryrefslogtreecommitdiff
path: root/patches/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'patches/binutils')
-rw-r--r--patches/binutils/2.14/100-sh-relocs.patch38
-rw-r--r--patches/binutils/2.14/110-i386-no-divide-comment.patch38
-rw-r--r--patches/binutils/2.14/270-i386-no-divide-comment.patch38
-rw-r--r--patches/binutils/2.15/100-uclibc.patch144
-rw-r--r--patches/binutils/2.15/110-uclibc-conf.patch692
-rw-r--r--patches/binutils/2.15/120-cflags.patch32
-rw-r--r--patches/binutils/2.15/130-mips-ELF_MAXPAGESIZE-4K.patch26
-rw-r--r--patches/binutils/2.15/140-arm-textrel.patch63
-rw-r--r--patches/binutils/2.15/150-bfd-hash-tweak.patch24
-rw-r--r--patches/binutils/2.15/160-allow-gcc-4.0.patch75
-rw-r--r--patches/binutils/2.15/170-psignal.patch40
-rw-r--r--patches/binutils/2.15/180-solaris-qsort.patch22
-rw-r--r--patches/binutils/2.15/190-vmx.patch45
-rw-r--r--patches/binutils/2.15/200-arm-undef-imm.patch51
-rw-r--r--patches/binutils/2.15/210-skip-comments.patch101
-rw-r--r--patches/binutils/2.15/220-cross-gprof.patch22
-rw-r--r--patches/binutils/2.15/230-gccpr15247-fix.patch192
-rw-r--r--patches/binutils/2.15/240-ld-callahan.patch677
-rw-r--r--patches/binutils/2.15/250-ld-stabs-tweak.patch33
-rw-r--r--patches/binutils/2.15/260-s390-invalid-insn-format.patch42
-rw-r--r--patches/binutils/2.18.50.0.4/100-arm-uclibcgnueabi.patch35
-rw-r--r--patches/binutils/2.18.50.0.4/110-ld-makefile-path.patch35
-rw-r--r--patches/binutils/2.18.50.0.4/120-check-ldrunpath-length.patch31
-rw-r--r--patches/binutils/2.18.50.0.4/130-i386-no-divide-comment.patch69
-rw-r--r--patches/binutils/2.18.50.0.6/100-arm-uclibcgnueabi.patch30
-rw-r--r--patches/binutils/2.18.50.0.6/110-ld-makefile-path.patch30
-rw-r--r--patches/binutils/2.18.50.0.6/120-check-ldrunpath-length.patch26
-rw-r--r--patches/binutils/2.18.50.0.6/130-i386-no-divide-comment.patch64
-rw-r--r--patches/binutils/2.18.50.0.7/100-arm-uclibcgnueabi.patch30
-rw-r--r--patches/binutils/2.18.50.0.7/110-ld-makefile-path.patch30
-rw-r--r--patches/binutils/2.18.50.0.7/120-check-ldrunpath-length.patch26
-rw-r--r--patches/binutils/2.18.50.0.7/130-i386-no-divide-comment.patch64
-rw-r--r--patches/binutils/2.18.50.0.8/100-arm-uclibcgnueabi.patch24
-rw-r--r--patches/binutils/2.18.50.0.8/110-ld-makefile-path.patch24
-rw-r--r--patches/binutils/2.18.50.0.8/120-check-ldrunpath-length.patch21
-rw-r--r--patches/binutils/2.18.50.0.8/130-i386-no-divide-comment.patch64
-rw-r--r--patches/binutils/2.18.50.0.9/100-arm-uclibcgnueabi.patch24
-rw-r--r--patches/binutils/2.18.50.0.9/110-ld-makefile-path.patch24
-rw-r--r--patches/binutils/2.18.50.0.9/120-check-ldrunpath-length.patch21
-rw-r--r--patches/binutils/2.18.50.0.9/130-i386-no-divide-comment.patch64
-rw-r--r--patches/binutils/2.20/100-ppc64-pie.patch16
-rw-r--r--patches/binutils/2.20/110-RPATH_ENVVAR-smack.patch13
-rw-r--r--patches/binutils/2.20/120-sh-targets.patch47
-rw-r--r--patches/binutils/2.20/130-ld-sysroot.patch36
-rw-r--r--patches/binutils/2.20/140-check_ldrunpath_length.patch47
-rw-r--r--patches/binutils/2.20/150-pt-pax-flags-20090909.patch238
-rw-r--r--patches/binutils/2.20/160-amd64-32bit-path.patch16
-rw-r--r--patches/binutils/2.20/170-warn-textrel.patch59
-rw-r--r--patches/binutils/2.20/180-only-use-new-ld-dtags.patch.disabled25
-rw-r--r--patches/binutils/2.20/190-use-new-ld-dtags.patch10
-rw-r--r--patches/binutils/2.20/200-document-new-dtags-behaviour.patch16
-rw-r--r--patches/binutils/2.20/210-generate-gnu-hash.patch8
-rw-r--r--patches/binutils/2.20/220-use-relro.patch6
-rw-r--r--patches/binutils/2.20/230-libiberty-pic.patch10
54 files changed, 547 insertions, 3131 deletions
diff --git a/patches/binutils/2.14/100-sh-relocs.patch b/patches/binutils/2.14/100-sh-relocs.patch
deleted file mode 100644
index ca0f2ac..0000000
--- a/patches/binutils/2.14/100-sh-relocs.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Message-Id: <200307311239.h6VCdNe27056@r-rr.iij4u.or.jp>
-To: dank@kegel.com
-Cc: kkojima@rr.iij4u.or.jp
-Subject: Re: Writing PIC version of __udivsi3_i4? (was: Re: "make tests" fails
- with "libc.so: text relocations used" in glibc-2.3.2 for sh4)
-In-Reply-To: Your message of "Wed, 30 Jul 2003 21:55:54 -0700"
- <3F28A15A.5010400@kegel.com>
-References: <3F28A15A.5010400@kegel.com>
-Date: Thu, 31 Jul 2003 21:47:38 +0900
-From: kaz Kojima <kkojima@rr.iij4u.or.jp>
-
-Dan Kegel <dank@kegel.com> wrote:
->> I'll give binutils-2.14.90.0.5 a shot, then.
->
-> No joy - same problem. Guess I'll take this up on binutils and/or libc-alpha.
-
-Please try the patch below, though it's a diff against the current
-binutils CVS.
-
-Regards,
- kaz
---
-diff -u3p ORIG/src/bfd/elf32-sh.c LOCAL/src/bfd/elf32-sh.c
---- src/bfd/elf32-sh.c.old Fri Jul 25 14:46:58 2003
-+++ src/bfd/elf32-sh.c Thu Jul 31 21:09:38 2003
-@@ -6497,8 +6497,10 @@ sh_elf_check_relocs (bfd *abfd, struct b
- sreloc, 2))
- return FALSE;
- }
-+#if 0
- if (sec->flags & SEC_READONLY)
- info->flags |= DF_TEXTREL;
-+#endif
- elf_section_data (sec)->sreloc = sreloc;
- }
-
-
-
diff --git a/patches/binutils/2.14/110-i386-no-divide-comment.patch b/patches/binutils/2.14/110-i386-no-divide-comment.patch
deleted file mode 100644
index 699db8e..0000000
--- a/patches/binutils/2.14/110-i386-no-divide-comment.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff -durN binutils-2.14.orig/gas/config/tc-i386.c binutils-2.14/gas/config/tc-i386.c
---- binutils-2.14.orig/gas/config/tc-i386.c 2003-01-29 11:05:52.000000000 +0100
-+++ binutils-2.14/gas/config/tc-i386.c 2008-09-22 08:54:50.000000000 +0200
-@@ -189,15 +189,10 @@
- const char extra_symbol_chars[] = "*%-([";
- #endif
-
--#if (defined (TE_I386AIX) \
-- || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \
-- && !defined (TE_LINUX) \
-- && !defined (TE_FreeBSD) \
-- && !defined (TE_NetBSD)))
- /* This array holds the chars that always start a comment. If the
- pre-processor is disabled, these aren't very useful. */
--const char comment_chars[] = "#/";
--#define PREFIX_SEPARATOR '\\'
-+const char comment_chars[] = "#";
-+#define PREFIX_SEPARATOR '/'
-
- /* This array holds the chars that only start a comment at the beginning of
- a line. If the line seems to have the form '# 123 filename'
-@@ -207,16 +202,7 @@
- #NO_APP at the beginning of its output.
- Also note that comments started like this one will always work if
- '/' isn't otherwise defined. */
--const char line_comment_chars[] = "#";
--
--#else
--/* Putting '/' here makes it impossible to use the divide operator.
-- However, we need it for compatibility with SVR4 systems. */
--const char comment_chars[] = "#";
--#define PREFIX_SEPARATOR '/'
--
- const char line_comment_chars[] = "/#";
--#endif
-
- const char line_separator_chars[] = ";";
-
diff --git a/patches/binutils/2.14/270-i386-no-divide-comment.patch b/patches/binutils/2.14/270-i386-no-divide-comment.patch
deleted file mode 100644
index 47c56d0..0000000
--- a/patches/binutils/2.14/270-i386-no-divide-comment.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff -durN binutils-2.15.orig/gas/config/tc-i386.c binutils-2.15/gas/config/tc-i386.c
---- binutils-2.15.orig/gas/config/tc-i386.c 2004-05-17 21:36:09.000000000 +0200
-+++ binutils-2.15/gas/config/tc-i386.c 2008-09-22 08:57:14.000000000 +0200
-@@ -185,15 +185,10 @@
- const char extra_symbol_chars[] = "*%-([";
- #endif
-
--#if (defined (TE_I386AIX) \
-- || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \
-- && !defined (TE_LINUX) \
-- && !defined (TE_FreeBSD) \
-- && !defined (TE_NetBSD)))
- /* This array holds the chars that always start a comment. If the
- pre-processor is disabled, these aren't very useful. */
--const char comment_chars[] = "#/";
--#define PREFIX_SEPARATOR '\\'
-+const char comment_chars[] = "#";
-+#define PREFIX_SEPARATOR '/'
-
- /* This array holds the chars that only start a comment at the beginning of
- a line. If the line seems to have the form '# 123 filename'
-@@ -203,16 +198,7 @@
- #NO_APP at the beginning of its output.
- Also note that comments started like this one will always work if
- '/' isn't otherwise defined. */
--const char line_comment_chars[] = "#";
--
--#else
--/* Putting '/' here makes it impossible to use the divide operator.
-- However, we need it for compatibility with SVR4 systems. */
--const char comment_chars[] = "#";
--#define PREFIX_SEPARATOR '/'
--
- const char line_comment_chars[] = "/#";
--#endif
-
- const char line_separator_chars[] = ";";
-
diff --git a/patches/binutils/2.15/100-uclibc.patch b/patches/binutils/2.15/100-uclibc.patch
deleted file mode 100644
index c64e74f..0000000
--- a/patches/binutils/2.15/100-uclibc.patch
+++ /dev/null
@@ -1,144 +0,0 @@
-diff -uNr binutils-2.15-pristine/bfd/configure binutils-2.15/bfd/configure
---- binutils-2.15-pristine/bfd/configure 2004-05-17 12:35:57.000000000 -0700
-+++ binutils-2.15/bfd/configure 2004-07-19 16:36:19.000000000 -0700
-@@ -1009,7 +1009,7 @@
- bfd_version_string="\"${VERSION}\""
- if test x${is_release} = x; then
- bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
-- bfd_version_string="\"${VERSION} ${bfd_version_date}\""
-+ bfd_version_string="\"${VERSION} ${bfd_version_date} uClibc\""
- fi
-
-
-diff -uNr binutils-2.15-pristine/bfd/elf32-arm.h binutils-2.15/bfd/elf32-arm.h
---- binutils-2.15-pristine/bfd/elf32-arm.h 2004-05-17 12:35:58.000000000 -0700
-+++ binutils-2.15/bfd/elf32-arm.h 2004-07-19 16:37:06.000000000 -0700
-@@ -124,7 +124,7 @@
-
- /* The name of the dynamic interpreter. This is put in the .interp
- section. */
--#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
-+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
-
- #ifdef FOUR_WORD_PLT
-
-diff -uNr binutils-2.15-pristine/bfd/elf32-cris.c binutils-2.15/bfd/elf32-cris.c
---- binutils-2.15-pristine/bfd/elf32-cris.c 2004-05-17 12:35:58.000000000 -0700
-+++ binutils-2.15/bfd/elf32-cris.c 2004-07-19 16:49:59.000000000 -0700
-@@ -536,7 +536,7 @@
- /* The name of the dynamic interpreter. This is put in the .interp
- section. */
-
--#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
-+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
-
- /* The size in bytes of an entry in the procedure linkage table. */
-
-diff -uNr binutils-2.15-pristine/bfd/elf32-frv.c binutils-2.15/bfd/elf32-frv.c
---- binutils-2.15-pristine/bfd/elf32-frv.c 2004-05-17 12:35:58.000000000 -0700
-+++ binutils-2.15/bfd/elf32-frv.c 2004-07-19 16:49:59.000000000 -0700
-@@ -2913,7 +2913,7 @@
- /* The name of the dynamic interpreter. This is put in the .interp
- section. */
-
--#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
-+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
-
- #define DEFAULT_STACK_SIZE 0x20000
-
-diff -uNr binutils-2.15-pristine/bfd/elf32-hppa.c binutils-2.15/bfd/elf32-hppa.c
---- binutils-2.15-pristine/bfd/elf32-hppa.c 2004-05-17 12:35:58.000000000 -0700
-+++ binutils-2.15/bfd/elf32-hppa.c 2004-07-19 16:49:59.000000000 -0700
-@@ -115,7 +115,7 @@
-
- #define PLT_ENTRY_SIZE 8
- #define GOT_ENTRY_SIZE 4
--#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
-+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
-
- static const bfd_byte plt_stub[] =
- {
-diff -uNr binutils-2.15-pristine/bfd/elf32-ppc.c binutils-2.15/bfd/elf32-ppc.c
---- binutils-2.15-pristine/bfd/elf32-ppc.c 2004-05-17 12:35:59.000000000 -0700
-+++ binutils-2.15/bfd/elf32-ppc.c 2004-07-19 16:49:59.000000000 -0700
-@@ -49,7 +49,7 @@
-
- /* The name of the dynamic interpreter. This is put in the .interp
- section. */
--#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
-+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
-
- /* The size in bytes of an entry in the procedure linkage table. */
- #define PLT_ENTRY_SIZE 12
-diff -uNr binutils-2.15-pristine/bfd/elf32-s390.c binutils-2.15/bfd/elf32-s390.c
---- binutils-2.15-pristine/bfd/elf32-s390.c 2004-05-17 12:35:59.000000000 -0700
-+++ binutils-2.15/bfd/elf32-s390.c 2004-07-19 16:49:59.000000000 -0700
-@@ -452,7 +452,7 @@
- /* The name of the dynamic interpreter. This is put in the .interp
- section. */
-
--#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
-+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
-
- /* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
- copying dynamic variables from a shared lib into an app's dynbss
-diff -uNr binutils-2.15-pristine/bfd/elf32-sparc.c binutils-2.15/bfd/elf32-sparc.c
---- binutils-2.15-pristine/bfd/elf32-sparc.c 2004-05-17 12:36:00.000000000 -0700
-+++ binutils-2.15/bfd/elf32-sparc.c 2004-07-19 16:49:59.000000000 -0700
-@@ -536,7 +536,7 @@
- /* The name of the dynamic interpreter. This is put in the .interp
- section. */
-
--#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
-+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
-
- /* The nop opcode we use. */
-
-diff -uNr binutils-2.15-pristine/bfd/elf64-ppc.c binutils-2.15/bfd/elf64-ppc.c
---- binutils-2.15-pristine/bfd/elf64-ppc.c 2004-05-17 12:36:01.000000000 -0700
-+++ binutils-2.15/bfd/elf64-ppc.c 2004-07-19 16:49:59.000000000 -0700
-@@ -99,7 +99,7 @@
-
- /* The name of the dynamic interpreter. This is put in the .interp
- section. */
--#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
-+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
-
- /* The size in bytes of an entry in the procedure linkage table. */
- #define PLT_ENTRY_SIZE 24
-diff -uNr binutils-2.15-pristine/bfd/elf64-s390.c binutils-2.15/bfd/elf64-s390.c
---- binutils-2.15-pristine/bfd/elf64-s390.c 2004-05-17 12:36:01.000000000 -0700
-+++ binutils-2.15/bfd/elf64-s390.c 2004-07-19 16:49:59.000000000 -0700
-@@ -473,7 +473,7 @@
- /* The name of the dynamic interpreter. This is put in the .interp
- section. */
-
--#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
-+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
-
- /* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
- copying dynamic variables from a shared lib into an app's dynbss
-diff -uNr binutils-2.15-pristine/bfd/elf-m10300.c binutils-2.15/bfd/elf-m10300.c
---- binutils-2.15-pristine/bfd/elf-m10300.c 2004-05-17 12:35:57.000000000 -0700
-+++ binutils-2.15/bfd/elf-m10300.c 2004-07-19 16:49:59.000000000 -0700
-@@ -4026,7 +4026,7 @@
- /* The name of the dynamic interpreter. This is put in the .interp
- section. */
-
--#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
-+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
-
- /* Create dynamic sections when linking against a dynamic object. */
-
-diff -uNr binutils-2.15-pristine/bfd/elfxx-ia64.c binutils-2.15/bfd/elfxx-ia64.c
---- binutils-2.15-pristine/bfd/elfxx-ia64.c 2004-05-17 12:36:02.000000000 -0700
-+++ binutils-2.15/bfd/elfxx-ia64.c 2004-07-19 16:49:59.000000000 -0700
-@@ -643,7 +643,7 @@
- 0x60, 0x00, 0x80, 0x00 /* br.few b6;; */
- };
-
--#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
-+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
-
- static const bfd_byte oor_brl[16] =
- {
diff --git a/patches/binutils/2.15/110-uclibc-conf.patch b/patches/binutils/2.15/110-uclibc-conf.patch
deleted file mode 100644
index 1c7fa4a..0000000
--- a/patches/binutils/2.15/110-uclibc-conf.patch
+++ /dev/null
@@ -1,692 +0,0 @@
-diff -urN binutils-2.15-dist/bfd/config.bfd binutils-2.15/bfd/config.bfd
---- binutils-2.15-dist/bfd/config.bfd 2004-05-17 14:35:56.000000000 -0500
-+++ binutils-2.15/bfd/config.bfd 2004-08-04 12:01:44.000000000 -0500
-@@ -126,7 +126,7 @@
- targ_defvec=ecoffalpha_little_vec
- targ_selvecs=bfd_elf64_alpha_vec
- ;;
-- alpha*-*-linux-gnu* | alpha*-*-elf*)
-+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*)
- targ_defvec=bfd_elf64_alpha_vec
- targ_selvecs=ecoffalpha_little_vec
- ;;
-@@ -136,7 +136,7 @@
- alpha*-*-*)
- targ_defvec=ecoffalpha_little_vec
- ;;
-- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
-+ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-linux-uclibc* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
- targ_defvec=bfd_elf64_ia64_little_vec
- targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
- ;;
-@@ -213,7 +213,7 @@
- targ_defvec=bfd_elf32_littlearm_vec
- targ_selvecs=bfd_elf32_bigarm_vec
- ;;
-- armeb-*-elf | arm*b-*-linux-gnu*)
-+ armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*)
- targ_defvec=bfd_elf32_bigarm_vec
- targ_selvecs=bfd_elf32_littlearm_vec
- ;;
-@@ -221,7 +221,7 @@
- targ_defvec=bfd_elf32_littlearm_vec
- targ_selvecs=bfd_elf32_bigarm_vec
- ;;
-- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
-+ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | arm*-*-conix* | \
- arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
- targ_defvec=bfd_elf32_littlearm_vec
- targ_selvecs=bfd_elf32_bigarm_vec
-@@ -360,7 +360,7 @@
- ;;
-
- #ifdef BFD64
-- hppa*64*-*-linux-gnu*)
-+ hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*)
- targ_defvec=bfd_elf64_hppa_linux_vec
- targ_selvecs=bfd_elf64_hppa_vec
- ;;
-@@ -371,7 +371,7 @@
- ;;
- #endif
-
-- hppa*-*-linux-gnu* | hppa*-*-netbsd*)
-+ hppa*-*-linux-gnu* | hppa*-*-linux-uclibc* | hppa*-*-netbsd*)
- targ_defvec=bfd_elf32_hppa_linux_vec
- targ_selvecs=bfd_elf32_hppa_vec
- ;;
-@@ -494,7 +494,7 @@
- targ_selvecs=bfd_elf32_i386_vec
- targ_underscore=yes
- ;;
-- i[3-7]86-*-linux-gnu*)
-+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
- targ_defvec=bfd_elf32_i386_vec
- targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
- targ64_selvecs=bfd_elf64_x86_64_vec
-@@ -508,7 +508,7 @@
- targ_defvec=bfd_elf64_x86_64_vec
- targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
- ;;
-- x86_64-*-linux-gnu*)
-+ x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*)
- targ_defvec=bfd_elf64_x86_64_vec
- targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
- ;;
-@@ -683,7 +683,7 @@
- targ_selvecs=bfd_elf32_m68k_vec
- targ_underscore=yes
- ;;
-- m68*-*-linux-gnu*)
-+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
- targ_defvec=bfd_elf32_m68k_vec
- targ_selvecs=m68klinux_vec
- ;;
-@@ -955,7 +955,8 @@
- ;;
- #endif
- powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
-- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
-+ powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | \
-+ powerpc-*-rtems* | \
- powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
- targ_defvec=bfd_elf32_powerpc_vec
- targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
-@@ -987,8 +988,8 @@
- targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
- ;;
- powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
-- powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
-- powerpcle-*-rtems*)
-+ powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-linux-uclibc* |\
-+ powerpcle-*-vxworks* | powerpcle-*-rtems*)
- targ_defvec=bfd_elf32_powerpcle_vec
- targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
- targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
-@@ -1149,7 +1150,7 @@
- targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
- targ_underscore=yes
- ;;
-- sparc-*-linux-gnu*)
-+ sparc-*-linux-gnu* | sparc-*-linux-uclibc*)
- targ_defvec=bfd_elf32_sparc_vec
- targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
- ;;
-@@ -1196,7 +1197,7 @@
- targ_defvec=sunos_big_vec
- targ_underscore=yes
- ;;
-- sparc64-*-linux-gnu*)
-+ sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*)
- targ_defvec=bfd_elf64_sparc_vec
- targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
- ;;
-@@ -1265,7 +1266,7 @@
- targ_underscore=yes
- ;;
-
-- vax-*-linux-gnu*)
-+ vax-*-linux-gnu* | vax-*-linux-uclibc*)
- targ_defvec=bfd_elf32_vax_vec
- ;;
-
-diff -urN binutils-2.15-dist/bfd/configure binutils-2.15/bfd/configure
---- binutils-2.15-dist/bfd/configure 2004-05-17 14:35:57.000000000 -0500
-+++ binutils-2.15/bfd/configure 2004-08-04 12:01:44.000000000 -0500
-@@ -1699,6 +1699,11 @@
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-+linux-uclibc*)
-+ lt_cv_deplibs_check_method=pass_all
-+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
-+ ;;
-+
- netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
-@@ -5278,7 +5283,7 @@
- alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
- COREFILE=''
- ;;
-- alpha*-*-linux-gnu*)
-+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
- COREFILE=trad-core.lo
- TRAD_HEADER='"hosts/alphalinux.h"'
- ;;
-@@ -5338,7 +5343,7 @@
- COREFILE=trad-core.lo
- TRAD_HEADER='"hosts/i386mach3.h"'
- ;;
-- i[3-7]86-*-linux-gnu*)
-+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
- COREFILE=trad-core.lo
- TRAD_HEADER='"hosts/i386linux.h"'
- ;;
-@@ -5376,7 +5381,7 @@
- COREFILE=trad-core.lo
- TRAD_HEADER='"hosts/hp300bsd.h"'
- ;;
-- m68*-*-linux-gnu*)
-+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
- COREFILE=trad-core.lo
- TRAD_HEADER='"hosts/m68klinux.h"'
- ;;
-@@ -5477,7 +5482,7 @@
- COREFILE=trad-core.lo
- TRAD_HEADER='"hosts/vaxult2.h"'
- ;;
-- vax-*-linux-gnu*)
-+ vax-*-linux-gnu* | vax-*-linux-uclibc*)
- COREFILE=trad-core.lo
- TRAD_HEADER='"hosts/vaxlinux.h"'
- ;;
-diff -urN binutils-2.15-dist/bfd/configure.in binutils-2.15/bfd/configure.in
---- binutils-2.15-dist/bfd/configure.in 2004-05-17 14:35:57.000000000 -0500
-+++ binutils-2.15/bfd/configure.in 2004-08-04 12:01:44.000000000 -0500
-@@ -178,7 +178,7 @@
- alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
- COREFILE=''
- ;;
-- alpha*-*-linux-gnu*)
-+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
- COREFILE=trad-core.lo
- TRAD_HEADER='"hosts/alphalinux.h"'
- ;;
-@@ -259,7 +259,7 @@
- TRAD_HEADER='"hosts/i386mach3.h"'
- ;;
- changequote(,)dnl
-- i[3-7]86-*-linux-gnu*)
-+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
- changequote([,])dnl
- COREFILE=trad-core.lo
- TRAD_HEADER='"hosts/i386linux.h"'
-@@ -300,7 +300,7 @@
- COREFILE=trad-core.lo
- TRAD_HEADER='"hosts/hp300bsd.h"'
- ;;
-- m68*-*-linux-gnu*)
-+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
- COREFILE=trad-core.lo
- TRAD_HEADER='"hosts/m68klinux.h"'
- ;;
-@@ -385,7 +385,7 @@
- COREFILE=trad-core.lo
- TRAD_HEADER='"hosts/vaxult2.h"'
- ;;
-- vax-*-linux-gnu*)
-+ vax-*-linux-gnu* | vax-*-linux-uclibc*)
- COREFILE=trad-core.lo
- TRAD_HEADER='"hosts/vaxlinux.h"'
- ;;
-diff -urN binutils-2.15-dist/binutils/configure binutils-2.15/binutils/configure
---- binutils-2.15-dist/binutils/configure 2004-01-02 11:08:04.000000000 -0600
-+++ binutils-2.15/binutils/configure 2004-08-04 12:01:44.000000000 -0500
-@@ -1585,6 +1585,11 @@
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-+linux-uclibc*)
-+ lt_cv_deplibs_check_method=pass_all
-+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
-+ ;;
-+
- netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
-diff -urN binutils-2.15-dist/configure binutils-2.15/configure
---- binutils-2.15-dist/configure 2004-05-17 14:36:20.000000000 -0500
-+++ binutils-2.15/configure 2004-08-04 12:01:44.000000000 -0500
-@@ -1288,6 +1288,18 @@
- i[3456789]86-*-freebsd* | i[3456789]86-*-kfreebsd*-gnu)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- ;;
-+ i[3456789]86-*-linux-uclibc*)
-+ # This section makes it possible to build newlib natively on linux.
-+ # If we are using a cross compiler then don't configure newlib.
-+ if test x${is_cross_compiler} != xno ; then
-+ noconfigdirs="$noconfigdirs target-newlib"
-+ fi
-+ noconfigdirs="$noconfigdirs target-libgloss"
-+ # If we are not using a cross compiler, do configure newlib.
-+ # Note however, that newlib will only be configured in this situation
-+ # if the --with-newlib option has been given, because otherwise
-+ # 'target-newlib' will appear in skipdirs.
-+ ;;
- i[3456789]86-*-linux*)
- # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
- # not build java stuff by default.
-diff -urN binutils-2.15-dist/configure.in binutils-2.15/configure.in
---- binutils-2.15-dist/configure.in 2004-05-17 14:40:54.000000000 -0500
-+++ binutils-2.15/configure.in 2004-08-04 12:01:44.000000000 -0500
-@@ -521,6 +521,18 @@
- i[[3456789]]86-*-freebsd* | i[[3456789]]86-*-kfreebsd*-gnu)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- ;;
-+ i[[3456789]]86-*-linux-uclibc*)
-+ # This section makes it possible to build newlib natively on linux.
-+ # If we are using a cross compiler then don't configure newlib.
-+ if test x${is_cross_compiler} != xno ; then
-+ noconfigdirs="$noconfigdirs target-newlib"
-+ fi
-+ noconfigdirs="$noconfigdirs target-libgloss"
-+ # If we are not using a cross compiler, do configure newlib.
-+ # Note however, that newlib will only be configured in this situation
-+ # if the --with-newlib option has been given, because otherwise
-+ # 'target-newlib' will appear in skipdirs.
-+ ;;
- i[[3456789]]86-*-linux*)
- # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
- # not build java stuff by default.
-diff -urN binutils-2.15-dist/gas/configure binutils-2.15/gas/configure
---- binutils-2.15-dist/gas/configure 2004-05-17 14:36:07.000000000 -0500
-+++ binutils-2.15/gas/configure 2004-08-04 12:07:50.000000000 -0500
-@@ -3400,6 +3400,11 @@
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-+linux-uclibc*)
-+ lt_cv_deplibs_check_method=pass_all
-+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
-+ ;;
-+
- netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
-@@ -4224,6 +4229,7 @@
- alpha*-*-osf*) fmt=ecoff ;;
- alpha*-*-linuxecoff*) fmt=ecoff ;;
- alpha*-*-linux-gnu*) fmt=elf em=linux ;;
-+ alpha*-*-linux-uclibc*) fmt=elf em=linux ;;
- alpha*-*-netbsd*) fmt=elf em=nbsd ;;
- alpha*-*-openbsd*) fmt=elf em=obsd ;;
-
-@@ -4240,6 +4246,7 @@
- arm*-*-conix*) fmt=elf ;;
- arm-*-linux*aout*) fmt=aout em=linux ;;
- arm*-*-linux-gnu*) fmt=elf em=linux ;;
-+ arm*-*-linux-uclibc*) fmt=elf em=linux ;;
- arm*-*-uclinux*) fmt=elf em=linux ;;
- arm-*-netbsdelf*) fmt=elf em=nbsd ;;
- arm-*-*n*bsd*) fmt=aout em=nbsd ;;
-@@ -4253,6 +4260,7 @@
- avr-*-*) fmt=elf ;;
-
- cris-*-linux-gnu*) fmt=multi bfd_gas=yes em=linux ;;
-+ cris-*-linux-uclibc*) fmt=multi bfd_gas=yes em=linux ;;
- cris-*-*) fmt=multi bfd_gas=yes ;;
-
- d10v-*-*) fmt=elf ;;
-@@ -4310,7 +4318,9 @@
- i386-*-linux*oldld) fmt=aout em=linux ;;
- i386-*-linux*coff*) fmt=coff em=linux ;;
- i386-*-linux-gnu*) fmt=elf em=linux ;;
-+ i386-*-linux-uclibc*) fmt=elf em=linux ;;
- x86_64-*-linux-gnu*) fmt=elf em=linux ;;
-+ x86_64-*-linux-uclibc*) fmt=elf em=linux ;;
- i386-*-lynxos*) fmt=coff em=lynx ;;
- i386-*-sysv[45]*) fmt=elf ;;
- i386-*-solaris*) fmt=elf ;;
-@@ -4370,6 +4380,7 @@
- ia64-*-elf*) fmt=elf ;;
- ia64-*-aix*) fmt=elf em=ia64aix ;;
- ia64-*-linux-gnu*) fmt=elf em=linux ;;
-+ ia64-*-linux-uclibc*) fmt=elf em=linux ;;
- ia64-*-hpux*) fmt=elf em=hpux ;;
- ia64-*-netbsd*) fmt=elf em=nbsd ;;
-
-@@ -4397,6 +4408,7 @@
- m68k-*-hpux*) fmt=hp300 em=hp300 ;;
- m68k-*-linux*aout*) fmt=aout em=linux ;;
- m68k-*-linux-gnu*) fmt=elf em=linux ;;
-+ m68k-*-linux-uclibc*) fmt=elf em=linux ;;
- m68k-*-uclinux*) fmt=elf ;;
- m68k-*-gnu*) fmt=elf ;;
- m68k-*-lynxos*) fmt=coff em=lynx ;;
-@@ -4459,6 +4471,7 @@
- ppc-*-beos*) fmt=coff ;;
- ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;;
- ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;;
-+ ppc-*-linux-uclibc* | \
- ppc-*-linux-gnu*) fmt=elf em=linux
- case "$endian" in
- big) ;;
-@@ -4486,7 +4499,9 @@
- ppc-*-kaos*) fmt=elf ;;
-
- s390x-*-linux-gnu*) fmt=elf em=linux ;;
-+ s390x-*-linux-uclibc*) fmt=elf em=linux ;;
- s390-*-linux-gnu*) fmt=elf em=linux ;;
-+ s390-*-linux-uclibc*) fmt=elf em=linux ;;
-
- sh*-*-linux*) fmt=elf em=linux
- case ${cpu} in
-@@ -4519,6 +4534,7 @@
- sparc-*-coff) fmt=coff ;;
- sparc-*-linux*aout*) fmt=aout em=linux ;;
- sparc-*-linux-gnu*) fmt=elf em=linux ;;
-+ sparc-*-linux-uclibc*) fmt=elf em=linux ;;
- sparc-*-lynxos*) fmt=coff em=lynx ;;
- sparc-fujitsu-none) fmt=aout ;;
- sparc-*-elf) fmt=elf ;;
-diff -urN binutils-2.15-dist/gas/configure.in binutils-2.15/gas/configure.in
---- binutils-2.15-dist/gas/configure.in 2004-05-17 14:36:07.000000000 -0500
-+++ binutils-2.15/gas/configure.in 2004-08-04 12:07:21.000000000 -0500
-@@ -194,6 +194,7 @@
- alpha*-*-osf*) fmt=ecoff ;;
- alpha*-*-linuxecoff*) fmt=ecoff ;;
- alpha*-*-linux-gnu*) fmt=elf em=linux ;;
-+ alpha*-*-linux-uclibc*) fmt=elf em=linux ;;
- alpha*-*-netbsd*) fmt=elf em=nbsd ;;
- alpha*-*-openbsd*) fmt=elf em=obsd ;;
-
-@@ -210,6 +211,7 @@
- arm*-*-conix*) fmt=elf ;;
- arm-*-linux*aout*) fmt=aout em=linux ;;
- arm*-*-linux-gnu*) fmt=elf em=linux ;;
-+ arm*-*-linux-uclibc*) fmt=elf em=linux ;;
- arm*-*-uclinux*) fmt=elf em=linux ;;
- arm-*-netbsdelf*) fmt=elf em=nbsd ;;
- arm-*-*n*bsd*) fmt=aout em=nbsd ;;
-@@ -223,6 +225,7 @@
- avr-*-*) fmt=elf ;;
-
- cris-*-linux-gnu*) fmt=multi bfd_gas=yes em=linux ;;
-+ cris-*-linux-uclibc*) fmt=multi bfd_gas=yes em=linux ;;
- cris-*-*) fmt=multi bfd_gas=yes ;;
-
- d10v-*-*) fmt=elf ;;
-@@ -280,7 +283,9 @@
- i386-*-linux*oldld) fmt=aout em=linux ;;
- i386-*-linux*coff*) fmt=coff em=linux ;;
- i386-*-linux-gnu*) fmt=elf em=linux ;;
-+ i386-*-linux-uclibc*) fmt=elf em=linux ;;
- x86_64-*-linux-gnu*) fmt=elf em=linux ;;
-+ x86_64-*-linux-uclibc*) fmt=elf em=linux ;;
- i386-*-lynxos*) fmt=coff em=lynx ;;
- changequote(,)dnl
- i386-*-sysv[45]*) fmt=elf ;;
-@@ -333,6 +338,7 @@
- ia64-*-elf*) fmt=elf ;;
- ia64-*-aix*) fmt=elf em=ia64aix ;;
- ia64-*-linux-gnu*) fmt=elf em=linux ;;
-+ ia64-*-linux-uclibc*) fmt=elf em=linux ;;
- ia64-*-hpux*) fmt=elf em=hpux ;;
- ia64-*-netbsd*) fmt=elf em=nbsd ;;
-
-@@ -360,6 +366,7 @@
- m68k-*-hpux*) fmt=hp300 em=hp300 ;;
- m68k-*-linux*aout*) fmt=aout em=linux ;;
- m68k-*-linux-gnu*) fmt=elf em=linux ;;
-+ m68k-*-linux-uclibc*) fmt=elf em=linux ;;
- m68k-*-uclinux*) fmt=elf ;;
- m68k-*-gnu*) fmt=elf ;;
- m68k-*-lynxos*) fmt=coff em=lynx ;;
-@@ -419,6 +426,7 @@
- ppc-*-beos*) fmt=coff ;;
- ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;;
- ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;;
-+ ppc-*-linux-uclibc* | \
- ppc-*-linux-gnu*) fmt=elf em=linux
- case "$endian" in
- big) ;;
-@@ -439,7 +447,9 @@
- ppc-*-kaos*) fmt=elf ;;
-
- s390x-*-linux-gnu*) fmt=elf em=linux ;;
-+ s390x-*-linux-uclibc*) fmt=elf em=linux ;;
- s390-*-linux-gnu*) fmt=elf em=linux ;;
-+ s390-*-linux-uclibc*) fmt=elf em=linux ;;
-
- sh*-*-linux*) fmt=elf em=linux
- case ${cpu} in
-@@ -472,6 +482,7 @@
- sparc-*-coff) fmt=coff ;;
- sparc-*-linux*aout*) fmt=aout em=linux ;;
- sparc-*-linux-gnu*) fmt=elf em=linux ;;
-+ sparc-*-linux-uclibc*) fmt=elf em=linux ;;
- sparc-*-lynxos*) fmt=coff em=lynx ;;
- sparc-fujitsu-none) fmt=aout ;;
- sparc-*-elf) fmt=elf ;;
-diff -urN binutils-2.15-dist/gprof/configure binutils-2.15/gprof/configure
---- binutils-2.15-dist/gprof/configure 2003-08-26 12:19:19.000000000 -0500
-+++ binutils-2.15/gprof/configure 2004-08-04 12:01:45.000000000 -0500
-@@ -1581,6 +1581,11 @@
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-+linux-uclibc*)
-+ lt_cv_deplibs_check_method=pass_all
-+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
-+ ;;
-+
- netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
-diff -urN binutils-2.15-dist/ld/configure binutils-2.15/ld/configure
---- binutils-2.15-dist/ld/configure 2003-04-24 07:36:07.000000000 -0500
-+++ binutils-2.15/ld/configure 2004-08-04 12:01:45.000000000 -0500
-@@ -1589,6 +1589,11 @@
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-+linux-uclibc*)
-+ lt_cv_deplibs_check_method=pass_all
-+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
-+ ;;
-+
- netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
-diff -urN binutils-2.15-dist/ld/configure.tgt binutils-2.15/ld/configure.tgt
---- binutils-2.15-dist/ld/configure.tgt 2004-05-17 14:36:15.000000000 -0500
-+++ binutils-2.15/ld/configure.tgt 2004-08-04 12:01:45.000000000 -0500
-@@ -30,6 +30,7 @@
- targ_extra_emuls="criself crislinux"
- targ_extra_libpath=$targ_extra_emuls ;;
- cris-*-linux-gnu*) targ_emul=crislinux ;;
-+cris-*-linux-uclibc*) targ_emul=crislinux ;;
- cris-*-*) targ_emul=criself
- targ_extra_emuls="crisaout crislinux"
- targ_extra_libpath=$targ_extra_emuls ;;
-@@ -59,14 +60,16 @@
- tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
- tdir_sun4=sparc-sun-sunos4
- ;;
--sparc64-*-linux-gnu*) targ_emul=elf64_sparc
-+sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*) \
-+ targ_emul=elf64_sparc
- targ_extra_emuls="elf32_sparc sparclinux sun4"
- targ_extra_libpath=elf32_sparc
- tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
- tdir_sparclinux=${tdir_elf32_sparc}aout
- tdir_sun4=sparc-sun-sunos4
- ;;
--sparc*-*-linux-gnu*) targ_emul=elf32_sparc
-+sparc*-*-linux-gnu* | sparc*-*-linux-uclibc*) \
-+ targ_emul=elf32_sparc
- targ_extra_emuls="sparclinux elf64_sparc sun4"
- targ_extra_libpath=elf64_sparc
- tdir_sparclinux=${targ_alias}aout
-@@ -118,7 +121,9 @@
- m32r*le-*-elf*) targ_emul=m32rlelf ;;
- m32r*-*-elf*) targ_emul=m32relf ;;
- m32r*le-*-linux-gnu*) targ_emul=m32rlelf_linux ;;
-+m32r*le-*-linux-uclibc*) targ_emul=m32rlelf_linux ;;
- m32r*-*-linux-gnu*) targ_emul=m32relf_linux ;;
-+m32r*-*-linux-uclibc*) targ_emul=m32relf_linux ;;
- m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
- targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
- m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf
-@@ -128,7 +133,7 @@
- m68*-ericsson-ose) targ_emul=sun3 ;;
- m68*-apple-aux*) targ_emul=m68kaux ;;
- *-tandem-none) targ_emul=st2000 ;;
--i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;;
-+i370-*-elf* | i370-*-linux-gnu* | i370-*-linux-uclibc*) targ_emul=elf32i370 ;;
- i[3-7]86-*-nto-qnx*) targ_emul=i386nto ;;
- i[3-7]86-*-vsta) targ_emul=vsta ;;
- i[3-7]86-go32-rtems*) targ_emul=i386go32 ;;
-@@ -152,14 +157,16 @@
- tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'`
- ;;
- i[3-7]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
--i[3-7]86-*-linux-gnu*) targ_emul=elf_i386
-+i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) \
-+ targ_emul=elf_i386
- targ_extra_emuls=i386linux
- if test x${want64} = xtrue; then
- targ_extra_emuls="$targ_extra_emuls elf_x86_64"
- fi
- tdir_i386linux=${targ_alias}aout
- ;;
--x86_64-*-linux-gnu*) targ_emul=elf_x86_64
-+x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*) \
-+ targ_emul=elf_x86_64
- targ_extra_emuls="elf_i386 i386linux"
- targ_extra_libpath=elf_i386
- tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
-@@ -259,10 +266,13 @@
- arm9e-*-elf) targ_emul=armelf ;;
- arm-*-oabi) targ_emul=armelf_oabi ;;
- arm*b-*-linux-gnu*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
-+arm*b-*-linux-uclibc*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
- arm*-*-linux-gnu*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
-+arm*-*-linux-uclibc*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
- arm*-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
- arm*-*-conix*) targ_emul=armelf ;;
--thumb-*-linux-gnu* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
-+thumb-*-linux-gnu* | thumb-*-linux-uclibc* | thumb-*-uclinux*) \
-+ targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
- strongarm-*-coff) targ_emul=armcoff ;;
- strongarm-*-elf) targ_emul=armelf ;;
- strongarm-*-kaos*) targ_emul=armelf ;;
-@@ -364,7 +374,8 @@
- targ_extra_emuls=m68kelf
- tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'`
- ;;
--m68k-*-linux-gnu*) targ_emul=m68kelf
-+m68k-*-linux-gnu* | m68k-*-linux-uclibc*) \
-+ targ_emul=m68kelf
- targ_extra_emuls=m68klinux
- tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'`
- ;;
-@@ -381,9 +392,9 @@
- m68*-*-psos*) targ_emul=m68kpsos ;;
- m68*-*-rtemscoff*) targ_emul=m68kcoff ;;
- m68*-*-rtems*) targ_emul=m68kelf ;;
--hppa*64*-*-linux-gnu*) targ_emul=hppa64linux ;;
-+hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*) targ_emul=hppa64linux ;;
- hppa*64*-*) targ_emul=elf64hppa ;;
--hppa*-*-linux-gnu*) targ_emul=hppalinux ;;
-+hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*) targ_emul=hppalinux ;;
- hppa*-*-*elf*) targ_emul=hppaelf ;;
- hppa*-*-lites*) targ_emul=hppaelf ;;
- hppa*-*-netbsd*) targ_emul=hppanbsd ;;
-@@ -396,6 +407,7 @@
- targ_emul=vaxnbsd
- targ_extra_emuls=elf32vax ;;
- vax-*-linux-gnu*) targ_emul=elf32vax ;;
-+vax-*-linux-uclibc*) targ_emul=elf32vax ;;
- mips*-*-pe) targ_emul=mipspe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
- mips*-dec-ultrix*) targ_emul=mipslit ;;
-@@ -429,16 +441,16 @@
- mips*-*-vxworks*) targ_emul=elf32ebmip
- targ_extra_emuls="elf32elmip" ;;
- mips*-*-windiss) targ_emul=elf32mipswindiss ;;
--mips64*el-*-linux-gnu*) targ_emul=elf32ltsmipn32
-+mips64*el-*-linux-gnu* | mips64*el-*-linux-uclibc*) targ_emul=elf32ltsmipn32
- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
- ;;
--mips64*-*-linux-gnu*) targ_emul=elf32btsmipn32
-+mips64*-*-linux-gnu* | mips64*-*-linux-uclibc*) targ_emul=elf32btsmipn32
- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
- ;;
--mips*el-*-linux-gnu*) targ_emul=elf32ltsmip
-+mips*el-*-linux-gnu* | mips*el-*-linux-uclibc*) targ_emul=elf32ltsmip
- targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
- ;;
--mips*-*-linux-gnu*) targ_emul=elf32btsmip
-+mips*-*-linux-gnu* | mips*-*-linux-uclibc*) targ_emul=elf32btsmip
- targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
- ;;
- mips*-*-lnews*) targ_emul=mipslnews ;;
-@@ -461,6 +473,10 @@
- alpha*-*-linux-gnu*) targ_emul=elf64alpha targ_extra_emuls=alpha
- tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
- ;;
-+alpha*-*-linux-uclibc*) targ_emul=elf64alpha targ_extra_emuls=alpha
-+ # The following needs to be checked...
-+ tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
-+ ;;
- alpha*-*-osf*) targ_emul=alpha ;;
- alpha*-*-gnu*) targ_emul=elf64alpha ;;
- alpha*-*-netware*) targ_emul=alpha ;;
-diff -urN binutils-2.15-dist/libtool.m4 binutils-2.15/libtool.m4
---- binutils-2.15-dist/libtool.m4 2003-04-10 22:58:39.000000000 -0500
-+++ binutils-2.15/libtool.m4 2004-08-04 12:01:45.000000000 -0500
-@@ -645,6 +645,11 @@
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-+linux-uclibc*)
-+ lt_cv_deplibs_check_method=pass_all
-+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
-+ ;;
-+
- netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
-diff -urN binutils-2.15-dist/ltconfig binutils-2.15/ltconfig
---- binutils-2.15-dist/ltconfig 2003-10-03 23:54:47.000000000 -0500
-+++ binutils-2.15/ltconfig 2004-08-04 12:01:45.000000000 -0500
-@@ -603,6 +603,7 @@
- # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
- case $host_os in
- linux-gnu*) ;;
-+linux-uclibc*) ;;
- linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
- esac
-
-@@ -1259,6 +1260,24 @@
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-+linux-uclibc*)
-+ version_type=linux
-+ need_lib_prefix=no
-+ need_version=no
-+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-+ soname_spec='${libname}${release}.so$major'
-+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-+ shlibpath_var=LD_LIBRARY_PATH
-+ shlibpath_overrides_runpath=no
-+ # This implies no fast_install, which is unacceptable.
-+ # Some rework will be needed to allow for fast_install
-+ # before this can be enabled.
-+ # Note: copied from linux-gnu, and may not be appropriate.
-+ hardcode_into_libs=yes
-+ # Assume using the uClibc dynamic linker.
-+ dynamic_linker="uClibc ld.so"
-+ ;;
-+
- netbsd*)
- need_lib_prefix=no
- need_version=no
-diff -urN binutils-2.15-dist/opcodes/configure binutils-2.15/opcodes/configure
---- binutils-2.15-dist/opcodes/configure 2003-08-05 04:39:31.000000000 -0500
-+++ binutils-2.15/opcodes/configure 2004-08-04 12:01:45.000000000 -0500
-@@ -1700,6 +1700,11 @@
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-+linux-uclibc*)
-+ lt_cv_deplibs_check_method=pass_all
-+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
-+ ;;
-+
- netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
diff --git a/patches/binutils/2.15/120-cflags.patch b/patches/binutils/2.15/120-cflags.patch
deleted file mode 100644
index dc67d3c..0000000
--- a/patches/binutils/2.15/120-cflags.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff -urN binutils-2.14.90.0.6/bfd/doc/Makefile.am binutils-2.14.90.0.6.new/bfd/doc/Makefile.am
---- binutils-2.14.90.0.6/bfd/doc/Makefile.am 2003-07-23 10:08:09.000000000 -0500
-+++ binutils-2.14.90.0.6.new/bfd/doc/Makefile.am 2004-03-01 16:05:16.000000000 -0600
-@@ -55,10 +55,10 @@
- MKDOC = chew$(EXEEXT_FOR_BUILD)
-
- $(MKDOC): chew.o
-- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
-+ $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS)
-
- chew.o: chew.c
-- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
-+ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
-
- protos: libbfd.h libcoff.h bfd.h
-
-diff -urN binutils-2.14.90.0.6/bfd/doc/Makefile.in binutils-2.14.90.0.6.new/bfd/doc/Makefile.in
---- binutils-2.14.90.0.6/bfd/doc/Makefile.in 2003-07-23 10:08:09.000000000 -0500
-+++ binutils-2.14.90.0.6.new/bfd/doc/Makefile.in 2004-03-01 16:05:03.000000000 -0600
-@@ -469,10 +469,10 @@
-
-
- $(MKDOC): chew.o
-- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
-+ $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS)
-
- chew.o: chew.c
-- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
-+ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
-
- protos: libbfd.h libcoff.h bfd.h
-
diff --git a/patches/binutils/2.15/130-mips-ELF_MAXPAGESIZE-4K.patch b/patches/binutils/2.15/130-mips-ELF_MAXPAGESIZE-4K.patch
deleted file mode 100644
index e07a7e8..0000000
--- a/patches/binutils/2.15/130-mips-ELF_MAXPAGESIZE-4K.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- binutils/bfd/elf32-mips.c~
-+++ binutils/bfd/elf32-mips.c
-@@ -1611,7 +1611,9 @@
-
- /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
- page sizes of up to that limit, so we need to respect it. */
--#define ELF_MAXPAGESIZE 0x10000
-+/*#define ELF_MAXPAGESIZE 0x10000*/
-+/* Use 4K to shrink the elf header. NOT for general use! */
-+#define ELF_MAXPAGESIZE 0x1000
- #define elf32_bed elf32_tradbed
-
- /* Include the target file again for this target. */
---- binutils/bfd/elfn32-mips.c~
-+++ binutils/bfd/elfn32-mips.c
-@@ -1976,7 +1976,9 @@
-
- /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
- page sizes of up to that limit, so we need to respect it. */
--#define ELF_MAXPAGESIZE 0x10000
-+/*#define ELF_MAXPAGESIZE 0x10000*/
-+/* Use 4K to shrink the elf header. NOT for general use! */
-+#define ELF_MAXPAGESIZE 0x1000
- #define elf32_bed elf32_tradbed
-
- /* Include the target file again for this target. */
diff --git a/patches/binutils/2.15/140-arm-textrel.patch b/patches/binutils/2.15/140-arm-textrel.patch
deleted file mode 100644
index 73d5b9d..0000000
--- a/patches/binutils/2.15/140-arm-textrel.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-http://sources.redhat.com/ml/binutils/2004-06/msg00010.html
---- binutils-2.15.90.0.3-old/bfd/elf32-arm.h 2004-04-12 14:56:33.000000000 -0500
-+++ binutils-2.15.90.0.3/bfd/elf32-arm.h 2004-09-03 06:56:40.000000000 -0500
-@@ -87,6 +87,8 @@
- #endif
- static bfd_boolean allocate_dynrelocs
- PARAMS ((struct elf_link_hash_entry *h, PTR inf));
-+static bfd_boolean elf32_arm_readonly_dynrelocs
-+ PARAMS ((struct elf_link_hash_entry *, PTR));
- static bfd_boolean create_got_section
- PARAMS ((bfd * dynobj, struct bfd_link_info * info));
- static bfd_boolean elf32_arm_create_dynamic_sections
-@@ -3531,6 +3533,37 @@
- return TRUE;
- }
-
-+/* Find any dynamic relocs that apply to read-only sections. */
-+
-+static bfd_boolean
-+elf32_arm_readonly_dynrelocs (h, inf)
-+ struct elf_link_hash_entry *h;
-+ PTR inf;
-+{
-+ struct elf32_arm_link_hash_entry *eh;
-+ struct elf32_arm_relocs_copied *p;
-+
-+ if (h->root.type == bfd_link_hash_warning)
-+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
-+
-+ eh = (struct elf32_arm_link_hash_entry *) h;
-+ for (p = eh->relocs_copied; p != NULL; p = p->next)
-+ {
-+ asection *s = p->section;
-+
-+ if (s != NULL && (s->flags & SEC_READONLY) != 0)
-+ {
-+ struct bfd_link_info *info = (struct bfd_link_info *) inf;
-+
-+ info->flags |= DF_TEXTREL;
-+
-+ /* Not an error, just cut short the traversal. */
-+ return FALSE;
-+ }
-+ }
-+ return TRUE;
-+}
-+
- /* Set the sizes of the dynamic sections. */
-
- static bfd_boolean
-@@ -3740,6 +3773,12 @@
- return FALSE;
- }
-
-+ /* If any dynamic relocs apply to a read-only section,
-+ then we need a DT_TEXTREL entry. */
-+ if ((info->flags & DF_TEXTREL) == 0)
-+ elf_link_hash_traverse (&htab->root, elf32_arm_readonly_dynrelocs,
-+ (PTR) info);
-+
- if ((info->flags & DF_TEXTREL) != 0)
- {
- if (!add_dynamic_entry (DT_TEXTREL, 0))
diff --git a/patches/binutils/2.15/150-bfd-hash-tweak.patch b/patches/binutils/2.15/150-bfd-hash-tweak.patch
deleted file mode 100644
index 6b8fc41..0000000
--- a/patches/binutils/2.15/150-bfd-hash-tweak.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Signed-off-by: dank@kegel.com
-
-Raising the size of the hash table is a noticable win when linking
-at least one large app.
-
-There was a patch,
-http://sources.redhat.com/ml/binutils/2004-06/msg00165.html
-to do this dynamically. No idea why that didn't make it in.
-So this tiny change to raise the default size is just
-a stopgap for now.
-
-
---- binutils-2.15/bfd/hash.c.old 2003-12-01 01:33:01.000000000 -0500
-+++ binutils-2.15/bfd/hash.c 2006-03-01 16:26:26.701991000 -0500
-@@ -295,7 +295,7 @@
- */
-
- /* The default number of entries to use when creating a hash table. */
--#define DEFAULT_SIZE (4051)
-+#define DEFAULT_SIZE (32749)
-
- /* Create a new hash table, given a number of entries. */
-
-
diff --git a/patches/binutils/2.15/160-allow-gcc-4.0.patch b/patches/binutils/2.15/160-allow-gcc-4.0.patch
deleted file mode 100644
index 26e5a12..0000000
--- a/patches/binutils/2.15/160-allow-gcc-4.0.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-Fix found here: http://www.freelists.org/archives/openbeos/11-2005/msg00090.html
-
-Fixes:
-In file included from ./targ-cpu.h:1,
- from /home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/config/obj-elf.h:42,
- from ./obj-format.h:1,
- from /home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/config/te-linux.h:4,
- from ./targ-env.h:1,
- from /home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/as.h:626,
- from /home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/app.c:30:
-/home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/config/tc-i386.h:451: error: array type has incomplete element type
-make[3]: *** [app.o] Error 1
-make[3]: Leaving directory `/home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/build-binutils/gas'
-
-when building binutils-2.15 with gcc-4.0
-
-
-diff -ur binutils-2.15.old/gas/as.h binutils-2.15/gas/as.h
---- binutils-2.15.old/gas/as.h 2003-11-22 18:14:21.000000000 -0800
-+++ binutils-2.15/gas/as.h 2006-02-14 22:05:35.000000000 -0800
-@@ -605,7 +605,26 @@
- struct expressionS;
- struct fix;
- typedef struct symbol symbolS;
--struct relax_type;
-+
-+/* JF moved this here from as.h under the theory that nobody except MACHINE.c
-+ and write.c care about it anyway. */
-+/* [zooey]: the above no longer holds with gcc4, as it keeps bugging about
-+ incomplete element types in arrays, if relax_type isn't defined
-+ here. So I moved the definition back from tc.h to here. */
-+struct relax_type
-+{
-+ /* Forward reach. Signed number. > 0. */
-+ long rlx_forward;
-+ /* Backward reach. Signed number. < 0. */
-+ long rlx_backward;
-+
-+ /* Bytes length of this address. */
-+ unsigned char rlx_length;
-+
-+ /* Next longer relax-state. 0 means there is no 'next' relax-state. */
-+ relax_substateT rlx_more;
-+};
-+
- typedef struct frag fragS;
-
- #ifdef BFD_ASSEMBLER
-diff -ur binutils-2.15.old/gas/tc.h binutils-2.15/gas/tc.h
---- binutils-2.15.old/gas/tc.h 2003-12-03 15:39:38.000000000 -0800
-+++ binutils-2.15/gas/tc.h 2006-02-14 22:03:35.000000000 -0800
-@@ -24,23 +24,6 @@
-
- extern const pseudo_typeS md_pseudo_table[];
-
--/* JF moved this here from as.h under the theory that nobody except MACHINE.c
-- and write.c care about it anyway. */
--
--struct relax_type
--{
-- /* Forward reach. Signed number. > 0. */
-- long rlx_forward;
-- /* Backward reach. Signed number. < 0. */
-- long rlx_backward;
--
-- /* Bytes length of this address. */
-- unsigned char rlx_length;
--
-- /* Next longer relax-state. 0 means there is no 'next' relax-state. */
-- relax_substateT rlx_more;
--};
--
- typedef struct relax_type relax_typeS;
-
- extern const int md_reloc_size; /* Size of a relocation record */
diff --git a/patches/binutils/2.15/170-psignal.patch b/patches/binutils/2.15/170-psignal.patch
deleted file mode 100644
index 98fa600..0000000
--- a/patches/binutils/2.15/170-psignal.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Make psignal prototype in libiberty match that in glibc.
-
-Fixes:
-
-gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c: In function `psignal':
-gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:563: argument `signo' doesn't match prototype
-/usr/include/signal.h:131: prototype declaration
-gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:563: argument `message' doesn't match prototype
-/usr/include/signal.h:131: prototype declaration
-gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:568: warning: comparison between signed and unsigned
-mprotect... make[1]: *** [strsignal.o] Error 1
-make[1]: Leaving directory `/export/hda3/dkegel/queue/jobdir.produser_cpsm17/crosstool-0.32/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.1.3/build-binutils/libiberty'
-make: *** [all-libiberty] Error 2
-
-when building on red hat 7.1
-though it's a bit of a mystery why libiberty's psignal is being compiled at
-all, since red hat 7.1's glibc supports psignal (hence the error message)
-
---- binutils-2.15/libiberty/strsignal.c.old 2005-04-18 13:57:40.000000000 -0700
-+++ binutils-2.15/libiberty/strsignal.c 2005-04-18 13:59:09.000000000 -0700
-@@ -544,7 +544,7 @@
-
- /*
-
--@deftypefn Supplemental void psignal (unsigned @var{signo}, char *@var{message})
-+@deftypefn Supplemental void psignal (int @var{signo}, const char *@var{message})
-
- Print @var{message} to the standard error, followed by a colon,
- followed by the description of the signal specified by @var{signo},
-@@ -557,9 +557,7 @@
- #ifndef HAVE_PSIGNAL
-
- void
--psignal (signo, message)
-- unsigned signo;
-- char *message;
-+psignal (int signo, const char *message)
- {
- if (signal_names == NULL)
- {
diff --git a/patches/binutils/2.15/180-solaris-qsort.patch b/patches/binutils/2.15/180-solaris-qsort.patch
deleted file mode 100644
index 5fe3623..0000000
--- a/patches/binutils/2.15/180-solaris-qsort.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-See http://sources.redhat.com/ml/binutils/2004-06/msg00114.html
-
---- src/bfd/elflink.c.org 2004-07-05 09:11:42.920597000 -0400
-+++ src/bfd/elflink.c 2004-07-05 09:12:59.240847000 -0400
-@@ -2700,7 +2700,7 @@
- return vdiff > 0 ? 1 : -1;
- else
- {
-- long sdiff = h1->root.u.def.section - h2->root.u.def.section;
-+ long sdiff = h1->root.u.def.section->id - h2->root.u.def.section->id;
- if (sdiff != 0)
- return sdiff > 0 ? 1 : -1;
- }
-@@ -3954,7 +3954,7 @@
- i = idx + 1;
- else
- {
-- long sdiff = slook - h->root.u.def.section;
-+ long sdiff = slook->id - h->root.u.def.section->id;
- if (sdiff < 0)
- j = idx;
- else if (sdiff > 0)
diff --git a/patches/binutils/2.15/190-vmx.patch b/patches/binutils/2.15/190-vmx.patch
deleted file mode 100644
index 5ae9efe..0000000
--- a/patches/binutils/2.15/190-vmx.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Grabbed with
-wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/opcodes/ppc-opc.c.diff?r1=1.70&r2=1.71&cvsroot=src'
-See
-http://mail.gnu.org/archive/html/bug-binutils/2004-05/msg00071.html
-and
-http://sources.redhat.com/ml/binutils-cvs/2004-05/msg00111.html
-
-This fixes problems like
-{standard input}: Assembler messages:
-{standard input}:1: Error: Unrecognized opcode: `dssall'
-which show up in binutils-2.15 when building the Linux kernel,
-or possibly failed compilations when building setjmp/longjmp in glibc.
-
-An alternative fix would be to pass -many to the assembler.
-A patch to do that for glibc is at
-wget 'http://sources.redhat.com/cgi-bin/get-raw-msg?listname=libc-alpha&date=2004-05&msgid=40B36E8C.9030609%40us.ibm.com'
-Yet another, better, fix would be for gcc to generate assembly
-that told the assembler which processor type to use.
-Presumably the Linux kernel sources would need a fix, too.
-Probably better to just fix binutils to accept sources that it used to.
-
-
-===================================================================
-RCS file: /cvs/src/src/opcodes/ppc-opc.c,v
-retrieving revision 1.70
-retrieving revision 1.71
-diff -u -r1.70 -r1.71
---- src/opcodes/ppc-opc.c 2004/05/05 13:43:36 1.70
-+++ src/opcodes/ppc-opc.c 2004/05/19 05:11:48 1.71
-@@ -1004,8 +1004,13 @@
-
- /* If only one bit of the FXM field is set, we can use the new form
- of the instruction, which is faster. Unlike the Power4 branch hint
-- encoding, this is not backward compatible. */
-- else if ((dialect & PPC_OPCODE_POWER4) != 0 && (value & -value) == value)
-+ encoding, this is not backward compatible. Do not generate the
-+ new form unless -mpower4 has been given, or -many and the two
-+ operand form of mfcr was used. */
-+ else if ((value & -value) == value
-+ && ((dialect & PPC_OPCODE_POWER4) != 0
-+ || ((dialect & PPC_OPCODE_ANY) != 0
-+ && (insn & (0x3ff << 1)) == 19 << 1)))
- insn |= 1 << 20;
-
- /* Any other value on mfcr is an error. */
diff --git a/patches/binutils/2.15/200-arm-undef-imm.patch b/patches/binutils/2.15/200-arm-undef-imm.patch
deleted file mode 100644
index 6bf403c..0000000
--- a/patches/binutils/2.15/200-arm-undef-imm.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gas/config/tc-arm.c.diff?r1=1.168&r2=1.169&cvsroot=src
-See also http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2004-July/023128.html,
-"[CRITICAL PATCH] 2.6: fix silent build error]"
-
-Revision 1.169, Fri Jul 2 11:12:29 2004 UTC (19 hours, 4 minutes ago) by nickc
-Branch: MAIN
-CVS Tags: binutils_latest_snapshot, HEAD
-Changes since 1.168: +14 -1 lines
-
-(md_apply_fix3:BFD_RELOC_ARM_IMMEDIATE): Do not allow values which have come
-from undefined symbols.
-Always consider this fixup to have been processed as a reloc cannot be
-generated for it.
-
-
-===================================================================
-RCS file: /cvs/src/src/gas/config/tc-arm.c,v
-retrieving revision 1.168
-retrieving revision 1.169
-diff -u -r1.168 -r1.169
---- src/gas/config/tc-arm.c 2004/04/30 10:51:12 1.168
-+++ src/gas/config/tc-arm.c 2004/07/02 11:12:29 1.169
-@@ -12186,6 +12186,20 @@
- switch (fixP->fx_r_type)
- {
- case BFD_RELOC_ARM_IMMEDIATE:
-+ /* We claim that this fixup has been processed here,
-+ even if in fact we generate an error because we do
-+ not have a reloc for it, so tc_gen_reloc will reject it. */
-+ fixP->fx_done = 1;
-+
-+ if (fixP->fx_addsy
-+ && ! S_IS_DEFINED (fixP->fx_addsy))
-+ {
-+ as_bad_where (fixP->fx_file, fixP->fx_line,
-+ _("undefined symbol %s used as an immediate value"),
-+ S_GET_NAME (fixP->fx_addsy));
-+ break;
-+ }
-+
- newimm = validate_immediate (value);
- temp = md_chars_to_number (buf, INSN_SIZE);
-
-@@ -12202,7 +12216,6 @@
-
- newimm |= (temp & 0xfffff000);
- md_number_to_chars (buf, (valueT) newimm, INSN_SIZE);
-- fixP->fx_done = 1;
- break;
-
- case BFD_RELOC_ARM_ADRL_IMMEDIATE:
diff --git a/patches/binutils/2.15/210-skip-comments.patch b/patches/binutils/2.15/210-skip-comments.patch
deleted file mode 100644
index 804a17e..0000000
--- a/patches/binutils/2.15/210-skip-comments.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
-Fixes
-localealias.s:544: Error: junk at end of line, first unrecognized character is `,'
-when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
-
-Paths adjusted to match crosstool's patcher.
-
-Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
-From: Andreas Schwab <schwab at suse dot de>
-To: Nathan Sidwell <nathan at codesourcery dot com>
-Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
-Date: Fri, 23 Apr 2004 22:27:19 +0200
-Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
-
-Nathan Sidwell <nathan@codesourcery.com> writes:
-
-> Index: read.c
-> ===================================================================
-> RCS file: /cvs/src/src/gas/read.c,v
-> retrieving revision 1.76
-> diff -c -3 -p -r1.76 read.c
-> *** read.c 12 Mar 2004 17:48:12 -0000 1.76
-> --- read.c 18 Mar 2004 09:56:05 -0000
-> *************** read_a_source_file (char *name)
-> *** 1053,1059 ****
-> #endif
-> input_line_pointer--;
-> /* Report unknown char as ignored. */
-> ! ignore_rest_of_line ();
-> }
->
-> #ifdef md_after_pass_hook
-> --- 1053,1059 ----
-> #endif
-> input_line_pointer--;
-> /* Report unknown char as ignored. */
-> ! demand_empty_rest_of_line ();
-> }
->
-> #ifdef md_after_pass_hook
-
-This means that the unknown character is no longer ignored, despite the
-comment. As a side effect a line starting with a line comment character
-not followed by APP in NO_APP mode now triggers an error instead of just a
-warning, breaking builds of glibc on m68k-linux. Earlier in
-read_a_source_file where #APP is handled there is another comment that
-claims that unknown comments are ignored, when in fact they aren't (only
-the initial line comment character is skipped).
-
-Note that the presence of #APP will mess up the line counters, but
-that appears to be difficult to fix.
-
-Andreas.
-
-2004-04-23 Andreas Schwab <schwab@suse.de>
-
- * read.c (read_a_source_file): Ignore unknown text after line
- comment character. Fix misleading comment.
-
---- binutils/gas/read.c.~1.78.~ 2004-04-23 08:58:23.000000000 +0200
-+++ binutils/gas/read.c 2004-04-23 21:49:01.000000000 +0200
-@@ -1,6 +1,6 @@
- /* read.c - read a source file -
- Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
-- 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-+ 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-
- This file is part of GAS, the GNU Assembler.
-
-@@ -950,10 +950,14 @@ read_a_source_file (char *name)
- unsigned int new_length;
- char *tmp_buf = 0;
-
-- bump_line_counters ();
- s = input_line_pointer;
- if (strncmp (s, "APP\n", 4))
-- continue; /* We ignore it */
-+ {
-+ /* We ignore it */
-+ ignore_rest_of_line ();
-+ continue;
-+ }
-+ bump_line_counters ();
- s += 4;
-
- sb_new (&sbuf);
-@@ -1052,7 +1056,7 @@ read_a_source_file (char *name)
- continue;
- #endif
- input_line_pointer--;
-- /* Report unknown char as ignored. */
-+ /* Report unknown char as error. */
- demand_empty_rest_of_line ();
- }
-
-
---
-Andreas Schwab, SuSE Labs, schwab@suse.de
-SuSE Linux AG, Maxfeldstra&#xC3;e 5, 90409 N&#xC3;rnberg, Germany
-Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
-"And now for something completely different."
diff --git a/patches/binutils/2.15/220-cross-gprof.patch b/patches/binutils/2.15/220-cross-gprof.patch
deleted file mode 100644
index ea6c18f..0000000
--- a/patches/binutils/2.15/220-cross-gprof.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- binutils-2.15/configure.old 2004-07-21 21:36:47.000000000 -0700
-+++ binutils-2.15/configure 2004-07-21 21:37:08.000000000 -0700
-@@ -999,7 +999,7 @@
-
- # Some tools are only suitable for building in a "native" situation.
- # Remove these if host!=target.
--native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
-+native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
-
- # Similarly, some are only suitable for cross toolchains.
- # Remove these if host=target.
---- binutils-2.15/configure.in.old 2004-07-21 21:37:19.000000000 -0700
-+++ binutils-2.15/configure.in 2004-07-21 21:37:34.000000000 -0700
-@@ -236,7 +236,7 @@
-
- # Some tools are only suitable for building in a "native" situation.
- # Remove these if host!=target.
--native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
-+native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
-
- # Similarly, some are only suitable for cross toolchains.
- # Remove these if host=target.
diff --git a/patches/binutils/2.15/230-gccpr15247-fix.patch b/patches/binutils/2.15/230-gccpr15247-fix.patch
deleted file mode 100644
index 967bf7f..0000000
--- a/patches/binutils/2.15/230-gccpr15247-fix.patch
+++ /dev/null
@@ -1,192 +0,0 @@
-See
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15247
-
-Fixes spurious error
-/tmp/ccvNi4ou.s: Assembler messages:
-/tmp/ccvNi4ou.s:2310: Error: Illegal operands: There are only 32 single precision f registers; [0-31]
-make[2]: *** [/home/dank/wk/crosstool-0.28-rc10/build/sparc64-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/math/dosincos.o] Error 1
-
-when compiling glibc's dosincos.c with gcc-3.4.0
-
-===================================================================
-RCS file: /cvs/src/src/opcodes/sparc-opc.c,v
-retrieving revision 1.9
-retrieving revision 1.10
-diff -u -r1.9 -r1.10
---- src/opcodes/sparc-opc.c 2004/01/18 23:46:32 1.9
-+++ src/opcodes/sparc-opc.c 2004/04/20 10:23:51 1.10
-@@ -1273,110 +1273,72 @@
- #define FM_DF 2 /* v9 */
- #define FM_QF 3 /* v9 */
-
--#define fmovicc(opcode, fpsize, cond, flags) /* v9 */ \
--{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0), "z,f,g", flags, v9 }, \
--{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0), "Z,f,g", flags, v9 }
--
--#define fmovfcc(opcode, fpsize, fcond, flags) /* v9 */ \
--{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6,f,g", flags, v9 }, \
--{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7,f,g", flags, v9 }, \
--{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8,f,g", flags, v9 }, \
--{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9,f,g", flags, v9 }
-+#define fmoviccx(opcode, fpsize, args, cond, flags) /* v9 */ \
-+{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0), "z," args, flags, v9 }, \
-+{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0), "Z," args, flags, v9 }
-+
-+#define fmovfccx(opcode, fpsize, args, fcond, flags) /* v9 */ \
-+{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags, v9 }, \
-+{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags, v9 }, \
-+{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags, v9 }, \
-+{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags, v9 }
-
- /* FIXME: use fmovicc/fmovfcc? */ /* v9 */
--#define fmovcc(opcode, fpsize, cond, fcond, flags) /* v9 */ \
--{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0), "z,f,g", flags | F_FLOAT, v9 }, \
--{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6,f,g", flags | F_FLOAT, v9 }, \
--{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0), "Z,f,g", flags | F_FLOAT, v9 }, \
--{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7,f,g", flags | F_FLOAT, v9 }, \
--{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8,f,g", flags | F_FLOAT, v9 }, \
--{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9,f,g", flags | F_FLOAT, v9 }
--
--/* v9 */ fmovcc ("fmovda", FM_DF, CONDA, FCONDA, 0),
--/* v9 */ fmovcc ("fmovqa", FM_QF, CONDA, FCONDA, 0),
--/* v9 */ fmovcc ("fmovsa", FM_SF, CONDA, FCONDA, 0),
--/* v9 */ fmovicc ("fmovdcc", FM_DF, CONDCC, 0),
--/* v9 */ fmovicc ("fmovqcc", FM_QF, CONDCC, 0),
--/* v9 */ fmovicc ("fmovscc", FM_SF, CONDCC, 0),
--/* v9 */ fmovicc ("fmovdcs", FM_DF, CONDCS, 0),
--/* v9 */ fmovicc ("fmovqcs", FM_QF, CONDCS, 0),
--/* v9 */ fmovicc ("fmovscs", FM_SF, CONDCS, 0),
--/* v9 */ fmovcc ("fmovde", FM_DF, CONDE, FCONDE, 0),
--/* v9 */ fmovcc ("fmovqe", FM_QF, CONDE, FCONDE, 0),
--/* v9 */ fmovcc ("fmovse", FM_SF, CONDE, FCONDE, 0),
--/* v9 */ fmovcc ("fmovdg", FM_DF, CONDG, FCONDG, 0),
--/* v9 */ fmovcc ("fmovqg", FM_QF, CONDG, FCONDG, 0),
--/* v9 */ fmovcc ("fmovsg", FM_SF, CONDG, FCONDG, 0),
--/* v9 */ fmovcc ("fmovdge", FM_DF, CONDGE, FCONDGE, 0),
--/* v9 */ fmovcc ("fmovqge", FM_QF, CONDGE, FCONDGE, 0),
--/* v9 */ fmovcc ("fmovsge", FM_SF, CONDGE, FCONDGE, 0),
--/* v9 */ fmovicc ("fmovdgeu", FM_DF, CONDGEU, F_ALIAS),
--/* v9 */ fmovicc ("fmovqgeu", FM_QF, CONDGEU, F_ALIAS),
--/* v9 */ fmovicc ("fmovsgeu", FM_SF, CONDGEU, F_ALIAS),
--/* v9 */ fmovicc ("fmovdgu", FM_DF, CONDGU, 0),
--/* v9 */ fmovicc ("fmovqgu", FM_QF, CONDGU, 0),
--/* v9 */ fmovicc ("fmovsgu", FM_SF, CONDGU, 0),
--/* v9 */ fmovcc ("fmovdl", FM_DF, CONDL, FCONDL, 0),
--/* v9 */ fmovcc ("fmovql", FM_QF, CONDL, FCONDL, 0),
--/* v9 */ fmovcc ("fmovsl", FM_SF, CONDL, FCONDL, 0),
--/* v9 */ fmovcc ("fmovdle", FM_DF, CONDLE, FCONDLE, 0),
--/* v9 */ fmovcc ("fmovqle", FM_QF, CONDLE, FCONDLE, 0),
--/* v9 */ fmovcc ("fmovsle", FM_SF, CONDLE, FCONDLE, 0),
--/* v9 */ fmovicc ("fmovdleu", FM_DF, CONDLEU, 0),
--/* v9 */ fmovicc ("fmovqleu", FM_QF, CONDLEU, 0),
--/* v9 */ fmovicc ("fmovsleu", FM_SF, CONDLEU, 0),
--/* v9 */ fmovfcc ("fmovdlg", FM_DF, FCONDLG, 0),
--/* v9 */ fmovfcc ("fmovqlg", FM_QF, FCONDLG, 0),
--/* v9 */ fmovfcc ("fmovslg", FM_SF, FCONDLG, 0),
--/* v9 */ fmovicc ("fmovdlu", FM_DF, CONDLU, F_ALIAS),
--/* v9 */ fmovicc ("fmovqlu", FM_QF, CONDLU, F_ALIAS),
--/* v9 */ fmovicc ("fmovslu", FM_SF, CONDLU, F_ALIAS),
--/* v9 */ fmovcc ("fmovdn", FM_DF, CONDN, FCONDN, 0),
--/* v9 */ fmovcc ("fmovqn", FM_QF, CONDN, FCONDN, 0),
--/* v9 */ fmovcc ("fmovsn", FM_SF, CONDN, FCONDN, 0),
--/* v9 */ fmovcc ("fmovdne", FM_DF, CONDNE, FCONDNE, 0),
--/* v9 */ fmovcc ("fmovqne", FM_QF, CONDNE, FCONDNE, 0),
--/* v9 */ fmovcc ("fmovsne", FM_SF, CONDNE, FCONDNE, 0),
--/* v9 */ fmovicc ("fmovdneg", FM_DF, CONDNEG, 0),
--/* v9 */ fmovicc ("fmovqneg", FM_QF, CONDNEG, 0),
--/* v9 */ fmovicc ("fmovsneg", FM_SF, CONDNEG, 0),
--/* v9 */ fmovcc ("fmovdnz", FM_DF, CONDNZ, FCONDNZ, F_ALIAS),
--/* v9 */ fmovcc ("fmovqnz", FM_QF, CONDNZ, FCONDNZ, F_ALIAS),
--/* v9 */ fmovcc ("fmovsnz", FM_SF, CONDNZ, FCONDNZ, F_ALIAS),
--/* v9 */ fmovfcc ("fmovdo", FM_DF, FCONDO, 0),
--/* v9 */ fmovfcc ("fmovqo", FM_QF, FCONDO, 0),
--/* v9 */ fmovfcc ("fmovso", FM_SF, FCONDO, 0),
--/* v9 */ fmovicc ("fmovdpos", FM_DF, CONDPOS, 0),
--/* v9 */ fmovicc ("fmovqpos", FM_QF, CONDPOS, 0),
--/* v9 */ fmovicc ("fmovspos", FM_SF, CONDPOS, 0),
--/* v9 */ fmovfcc ("fmovdu", FM_DF, FCONDU, 0),
--/* v9 */ fmovfcc ("fmovqu", FM_QF, FCONDU, 0),
--/* v9 */ fmovfcc ("fmovsu", FM_SF, FCONDU, 0),
--/* v9 */ fmovfcc ("fmovdue", FM_DF, FCONDUE, 0),
--/* v9 */ fmovfcc ("fmovque", FM_QF, FCONDUE, 0),
--/* v9 */ fmovfcc ("fmovsue", FM_SF, FCONDUE, 0),
--/* v9 */ fmovfcc ("fmovdug", FM_DF, FCONDUG, 0),
--/* v9 */ fmovfcc ("fmovqug", FM_QF, FCONDUG, 0),
--/* v9 */ fmovfcc ("fmovsug", FM_SF, FCONDUG, 0),
--/* v9 */ fmovfcc ("fmovduge", FM_DF, FCONDUGE, 0),
--/* v9 */ fmovfcc ("fmovquge", FM_QF, FCONDUGE, 0),
--/* v9 */ fmovfcc ("fmovsuge", FM_SF, FCONDUGE, 0),
--/* v9 */ fmovfcc ("fmovdul", FM_DF, FCONDUL, 0),
--/* v9 */ fmovfcc ("fmovqul", FM_QF, FCONDUL, 0),
--/* v9 */ fmovfcc ("fmovsul", FM_SF, FCONDUL, 0),
--/* v9 */ fmovfcc ("fmovdule", FM_DF, FCONDULE, 0),
--/* v9 */ fmovfcc ("fmovqule", FM_QF, FCONDULE, 0),
--/* v9 */ fmovfcc ("fmovsule", FM_SF, FCONDULE, 0),
--/* v9 */ fmovicc ("fmovdvc", FM_DF, CONDVC, 0),
--/* v9 */ fmovicc ("fmovqvc", FM_QF, CONDVC, 0),
--/* v9 */ fmovicc ("fmovsvc", FM_SF, CONDVC, 0),
--/* v9 */ fmovicc ("fmovdvs", FM_DF, CONDVS, 0),
--/* v9 */ fmovicc ("fmovqvs", FM_QF, CONDVS, 0),
--/* v9 */ fmovicc ("fmovsvs", FM_SF, CONDVS, 0),
--/* v9 */ fmovcc ("fmovdz", FM_DF, CONDZ, FCONDZ, F_ALIAS),
--/* v9 */ fmovcc ("fmovqz", FM_QF, CONDZ, FCONDZ, F_ALIAS),
--/* v9 */ fmovcc ("fmovsz", FM_SF, CONDZ, FCONDZ, F_ALIAS),
--
-+#define fmovccx(opcode, fpsize, args, cond, fcond, flags) /* v9 */ \
-+{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0), "z," args, flags | F_FLOAT, v9 }, \
-+{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags | F_FLOAT, v9 }, \
-+{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0), "Z," args, flags | F_FLOAT, v9 }, \
-+{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags | F_FLOAT, v9 }, \
-+{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags | F_FLOAT, v9 }, \
-+{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags | F_FLOAT, v9 }
-+
-+#define fmovicc(suffix, cond, flags) /* v9 */ \
-+fmoviccx("fmovd" suffix, FM_DF, "B,H", cond, flags), \
-+fmoviccx("fmovq" suffix, FM_QF, "R,J", cond, flags), \
-+fmoviccx("fmovs" suffix, FM_SF, "f,g", cond, flags)
-+
-+#define fmovfcc(suffix, fcond, flags) /* v9 */ \
-+fmovfccx("fmovd" suffix, FM_DF, "B,H", fcond, flags), \
-+fmovfccx("fmovq" suffix, FM_QF, "R,J", fcond, flags), \
-+fmovfccx("fmovs" suffix, FM_SF, "f,g", fcond, flags)
-+
-+#define fmovcc(suffix, cond, fcond, flags) /* v9 */ \
-+fmovccx("fmovd" suffix, FM_DF, "B,H", cond, fcond, flags), \
-+fmovccx("fmovq" suffix, FM_QF, "R,J", cond, fcond, flags), \
-+fmovccx("fmovs" suffix, FM_SF, "f,g", cond, fcond, flags)
-+
-+/* v9 */ fmovcc ("a", CONDA, FCONDA, 0),
-+/* v9 */ fmovicc ("cc", CONDCC, 0),
-+/* v9 */ fmovicc ("cs", CONDCS, 0),
-+/* v9 */ fmovcc ("e", CONDE, FCONDE, 0),
-+/* v9 */ fmovcc ("g", CONDG, FCONDG, 0),
-+/* v9 */ fmovcc ("ge", CONDGE, FCONDGE, 0),
-+/* v9 */ fmovicc ("geu", CONDGEU, F_ALIAS),
-+/* v9 */ fmovicc ("gu", CONDGU, 0),
-+/* v9 */ fmovcc ("l", CONDL, FCONDL, 0),
-+/* v9 */ fmovcc ("le", CONDLE, FCONDLE, 0),
-+/* v9 */ fmovicc ("leu", CONDLEU, 0),
-+/* v9 */ fmovfcc ("lg", FCONDLG, 0),
-+/* v9 */ fmovicc ("lu", CONDLU, F_ALIAS),
-+/* v9 */ fmovcc ("n", CONDN, FCONDN, 0),
-+/* v9 */ fmovcc ("ne", CONDNE, FCONDNE, 0),
-+/* v9 */ fmovicc ("neg", CONDNEG, 0),
-+/* v9 */ fmovcc ("nz", CONDNZ, FCONDNZ, F_ALIAS),
-+/* v9 */ fmovfcc ("o", FCONDO, 0),
-+/* v9 */ fmovicc ("pos", CONDPOS, 0),
-+/* v9 */ fmovfcc ("u", FCONDU, 0),
-+/* v9 */ fmovfcc ("ue", FCONDUE, 0),
-+/* v9 */ fmovfcc ("ug", FCONDUG, 0),
-+/* v9 */ fmovfcc ("uge", FCONDUGE, 0),
-+/* v9 */ fmovfcc ("ul", FCONDUL, 0),
-+/* v9 */ fmovfcc ("ule", FCONDULE, 0),
-+/* v9 */ fmovicc ("vc", CONDVC, 0),
-+/* v9 */ fmovicc ("vs", CONDVS, 0),
-+/* v9 */ fmovcc ("z", CONDZ, FCONDZ, F_ALIAS),
-+
-+#undef fmoviccx /* v9 */
-+#undef fmovfccx /* v9 */
-+#undef fmovccx /* v9 */
- #undef fmovicc /* v9 */
- #undef fmovfcc /* v9 */
- #undef fmovcc /* v9 */
diff --git a/patches/binutils/2.15/240-ld-callahan.patch b/patches/binutils/2.15/240-ld-callahan.patch
deleted file mode 100644
index bb4a69c..0000000
--- a/patches/binutils/2.15/240-ld-callahan.patch
+++ /dev/null
@@ -1,677 +0,0 @@
-Signed-off-by: dank@kegel.com
-Fixes ld speed issue.
-See http://weblogs.mozillazine.org/roc/archives/2005/02/optimizing_gnu.html
-See thread "Re: optimizations for 3x speedup in ld",
-http://sources.redhat.com/ml/binutils/2005-03/msg00847.html
-
-Wildcard section matching enhancement, backported from the binutils CVS tree.
-Here's the CVS log comment from the original change to ldlang.c:
-
-revision 1.177
-date: 2005/04/06 15:33:02; author: jakub; state: Exp; lines: +438 -51
-2005-04-06 Jakub Jelinek <jakub@redhat.com>
-
- * ldlang.c: Formatting.
- (walk_wild_consider_section): Remember return value from wildcardp.
- (is_simple_wild): Use strcspn instead of 2 strpbrk calls and strlen.
- (wild_spec_can_overlap): Use strcspn instead of strpbrk and strlen.
-
-2005-04-06 Robert O'Callahan <rocallahan@novell.com>
-
- * ld.h (lean_section_userdata_type): Remove.
- (fat_section_userdata_type): Remove file field.
- (SECTION_USERDATA_SIZE): Remove.
- * ldlang.c (init_os): Eliminate initialization of unused
- lean_section_userdata_type.
-
- * ldlang.h (callback_t, walk_wild_section_handler_t): New
- typedefs.
- (struct lang_wild_statement_struct): Add walk_wild_section_handler
- and handler_data fields.
- * ldlang.c (callback_t): Removed.
- (walk_wild_consider_section, walk_wild_section_general,
- section_iterator_callback, find_section, is_simple_wild,
- match_simple_wild, walk_wild_section_specs1_wild0,
- walk_wild_section_specs1_wild1, walk_wild_section_specs2_wild1,
- walk_wild_section_specs3_wild2, walk_wild_section_specs4_wild2,
- wild_spec_can_overlap, analyze_walk_wild_section_handler): New
- functions.
- (lang_add_wild): Call analyze_walk_wild_section_handler.
- (walk_wild_section): Renamed to walk_wild_section_general and
- created a wrapper function.
- (section_iterator_callback_data): New typedef.
-
-Note that bfd_get_section_by_name_if didn't exist in 2.15, so it was backported
-as well.
-
---- binutils-2.15/bfd/bfd-in2.h.old 2004-05-17 15:35:56.000000000 -0400
-+++ binutils-2.15/bfd/bfd-in2.h 2006-02-09 11:54:45.989940000 -0500
-@@ -1425,6 +1425,10 @@
-
- asection *bfd_get_section_by_name (bfd *abfd, const char *name);
-
-+asection *bfd_get_section_by_name_if (bfd *abfd, const char *name,
-+ bfd_boolean (*operation) (bfd *, asection *, void *),
-+ void *user_storage);
-+
- char *bfd_get_unique_section_name
- (bfd *abfd, const char *templat, int *count);
-
---- binutils-2.15/bfd/section.c.old 2003-12-01 01:33:01.000000000 -0500
-+++ binutils-2.15/bfd/section.c 2006-01-23 14:16:54.768993000 -0500
-@@ -801,6 +801,57 @@
-
- /*
- FUNCTION
-+ bfd_get_section_by_name_if
-+
-+SYNOPSIS
-+ asection *bfd_get_section_by_name_if
-+ (bfd *abfd,
-+ const char *name,
-+ bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
-+ void *obj);
-+
-+DESCRIPTION
-+ Call the provided function @var{func} for each section
-+ attached to the BFD @var{abfd} whose name matches @var{name},
-+ passing @var{obj} as an argument. The function will be called
-+ as if by
-+
-+| func (abfd, the_section, obj);
-+
-+ It returns the first section for which @var{func} returns true,
-+ otherwise <<NULL>>.
-+
-+*/
-+
-+asection *
-+bfd_get_section_by_name_if (bfd *abfd, const char *name,
-+ bfd_boolean (*operation) (bfd *,
-+ asection *,
-+ void *),
-+ void *user_storage)
-+{
-+ struct section_hash_entry *sh;
-+ unsigned long hash;
-+
-+ sh = section_hash_lookup (&abfd->section_htab, name, FALSE, FALSE);
-+ if (sh == NULL)
-+ return NULL;
-+
-+ hash = sh->root.hash;
-+ do
-+ {
-+ if ((*operation) (abfd, &sh->section, user_storage))
-+ return &sh->section;
-+ sh = (struct section_hash_entry *) sh->root.next;
-+ }
-+ while (sh != NULL && sh->root.hash == hash
-+ && strcmp (sh->root.string, name) == 0);
-+
-+ return NULL;
-+}
-+
-+/*
-+FUNCTION
- bfd_get_unique_section_name
-
- SYNOPSIS
---- binutils-2.15/ld/ldlang.c.old 2004-05-17 15:36:16.000000000 -0400
-+++ binutils-2.15/ld/ldlang.c 2006-01-23 13:40:12.745499000 -0500
-@@ -81,9 +81,6 @@
- static void lang_record_phdrs (void);
- static void lang_do_version_exports_section (void);
-
--typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
-- asection *, lang_input_statement_type *, void *);
--
- /* Exported variables. */
- lang_output_section_statement_type *abs_output_section;
- lang_statement_list_type lang_output_section_statement;
-@@ -138,21 +135,71 @@
-
- /* Generic traversal routines for finding matching sections. */
-
-+/* Try processing a section against a wildcard. This just calls
-+ the callback unless the filename exclusion list is present
-+ and excludes the file. It's hardly ever present so this
-+ function is very fast. */
-+
-+static void
-+walk_wild_consider_section (lang_wild_statement_type *ptr,
-+ lang_input_statement_type *file,
-+ asection *s,
-+ struct wildcard_list *sec,
-+ callback_t callback,
-+ void *data)
-+{
-+ bfd_boolean skip = FALSE;
-+ struct name_list *list_tmp;
-+
-+ /* Don't process sections from files which were
-+ excluded. */
-+ for (list_tmp = sec->spec.exclude_name_list;
-+ list_tmp;
-+ list_tmp = list_tmp->next)
-+ {
-+ bfd_boolean is_wildcard = wildcardp (list_tmp->name);
-+ if (is_wildcard)
-+ skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
-+ else
-+ skip = strcmp (list_tmp->name, file->filename) == 0;
-+
-+ /* If this file is part of an archive, and the archive is
-+ excluded, exclude this file. */
-+ if (! skip && file->the_bfd != NULL
-+ && file->the_bfd->my_archive != NULL
-+ && file->the_bfd->my_archive->filename != NULL)
-+ {
-+ if (is_wildcard)
-+ skip = fnmatch (list_tmp->name,
-+ file->the_bfd->my_archive->filename,
-+ 0) == 0;
-+ else
-+ skip = strcmp (list_tmp->name,
-+ file->the_bfd->my_archive->filename) == 0;
-+ }
-+
-+ if (skip)
-+ break;
-+ }
-+
-+ if (!skip)
-+ (*callback) (ptr, sec, s, file, data);
-+}
-+
-+/* Lowest common denominator routine that can handle everything correctly,
-+ but slowly. */
-+
- static void
--walk_wild_section (lang_wild_statement_type *ptr,
-- lang_input_statement_type *file,
-- callback_t callback,
-- void *data)
-+walk_wild_section_general (lang_wild_statement_type *ptr,
-+ lang_input_statement_type *file,
-+ callback_t callback,
-+ void *data)
- {
- asection *s;
--
-- if (file->just_syms_flag)
-- return;
-+ struct wildcard_list *sec;
-
- for (s = file->the_bfd->sections; s != NULL; s = s->next)
- {
-- struct wildcard_list *sec;
--
- sec = ptr->section_list;
- if (sec == NULL)
- (*callback) (ptr, sec, s, file, data);
-@@ -160,39 +207,8 @@
- while (sec != NULL)
- {
- bfd_boolean skip = FALSE;
-- struct name_list *list_tmp;
--
-- /* Don't process sections from files which were
-- excluded. */
-- for (list_tmp = sec->spec.exclude_name_list;
-- list_tmp;
-- list_tmp = list_tmp->next)
-- {
-- if (wildcardp (list_tmp->name))
-- skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
-- else
-- skip = strcmp (list_tmp->name, file->filename) == 0;
--
-- /* If this file is part of an archive, and the archive is
-- excluded, exclude this file. */
-- if (! skip && file->the_bfd != NULL
-- && file->the_bfd->my_archive != NULL
-- && file->the_bfd->my_archive->filename != NULL)
-- {
-- if (wildcardp (list_tmp->name))
-- skip = fnmatch (list_tmp->name,
-- file->the_bfd->my_archive->filename,
-- 0) == 0;
-- else
-- skip = strcmp (list_tmp->name,
-- file->the_bfd->my_archive->filename) == 0;
-- }
--
-- if (skip)
-- break;
-- }
-
-- if (!skip && sec->spec.name != NULL)
-+ if (sec->spec.name != NULL)
- {
- const char *sname = bfd_get_section_name (file->the_bfd, s);
-
-@@ -203,13 +219,381 @@
- }
-
- if (!skip)
-- (*callback) (ptr, sec, s, file, data);
-+ walk_wild_consider_section (ptr, file, s, sec, callback, data);
-
- sec = sec->next;
- }
- }
- }
-
-+/* Routines to find a single section given its name. If there's more
-+ than one section with that name, we report that. */
-+
-+typedef struct
-+{
-+ asection *found_section;
-+ bfd_boolean multiple_sections_found;
-+} section_iterator_callback_data;
-+
-+static bfd_boolean
-+section_iterator_callback (bfd *bfd ATTRIBUTE_UNUSED, asection *s, void *data)
-+{
-+ section_iterator_callback_data *d = data;
-+
-+ if (d->found_section != NULL)
-+ {
-+ d->multiple_sections_found = TRUE;
-+ return TRUE;
-+ }
-+
-+ d->found_section = s;
-+ return FALSE;
-+}
-+
-+static asection *
-+find_section (lang_input_statement_type *file,
-+ struct wildcard_list *sec,
-+ bfd_boolean *multiple_sections_found)
-+{
-+ section_iterator_callback_data cb_data = { NULL, FALSE };
-+
-+ bfd_get_section_by_name_if (file->the_bfd, sec->spec.name,
-+ section_iterator_callback, &cb_data);
-+ *multiple_sections_found = cb_data.multiple_sections_found;
-+ return cb_data.found_section;
-+}
-+
-+/* Code for handling simple wildcards without going through fnmatch,
-+ which can be expensive because of charset translations etc. */
-+
-+/* A simple wild is a literal string followed by a single '*',
-+ where the literal part is at least 4 characters long. */
-+
-+static bfd_boolean
-+is_simple_wild (const char *name)
-+{
-+ size_t len = strcspn (name, "*?[");
-+ return len >= 4 && name[len] == '*' && name[len + 1] == '\0';
-+}
-+
-+static bfd_boolean
-+match_simple_wild (const char *pattern, const char *name)
-+{
-+ /* The first four characters of the pattern are guaranteed valid
-+ non-wildcard characters. So we can go faster. */
-+ if (pattern[0] != name[0] || pattern[1] != name[1]
-+ || pattern[2] != name[2] || pattern[3] != name[3])
-+ return FALSE;
-+
-+ pattern += 4;
-+ name += 4;
-+ while (*pattern != '*')
-+ if (*name++ != *pattern++)
-+ return FALSE;
-+
-+ return TRUE;
-+}
-+
-+/* Specialized, optimized routines for handling different kinds of
-+ wildcards */
-+
-+static void
-+walk_wild_section_specs1_wild0 (lang_wild_statement_type *ptr,
-+ lang_input_statement_type *file,
-+ callback_t callback,
-+ void *data)
-+{
-+ /* We can just do a hash lookup for the section with the right name.
-+ But if that lookup discovers more than one section with the name
-+ (should be rare), we fall back to the general algorithm because
-+ we would otherwise have to sort the sections to make sure they
-+ get processed in the bfd's order. */
-+ bfd_boolean multiple_sections_found;
-+ struct wildcard_list *sec0 = ptr->handler_data[0];
-+ asection *s0 = find_section (file, sec0, &multiple_sections_found);
-+
-+ if (multiple_sections_found)
-+ walk_wild_section_general (ptr, file, callback, data);
-+ else if (s0)
-+ walk_wild_consider_section (ptr, file, s0, sec0, callback, data);
-+}
-+
-+static void
-+walk_wild_section_specs1_wild1 (lang_wild_statement_type *ptr,
-+ lang_input_statement_type *file,
-+ callback_t callback,
-+ void *data)
-+{
-+ asection *s;
-+ struct wildcard_list *wildsec0 = ptr->handler_data[0];
-+
-+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
-+ {
-+ const char *sname = bfd_get_section_name (file->the_bfd, s);
-+ bfd_boolean skip = !match_simple_wild (wildsec0->spec.name, sname);
-+
-+ if (!skip)
-+ walk_wild_consider_section (ptr, file, s, wildsec0, callback, data);
-+ }
-+}
-+
-+static void
-+walk_wild_section_specs2_wild1 (lang_wild_statement_type *ptr,
-+ lang_input_statement_type *file,
-+ callback_t callback,
-+ void *data)
-+{
-+ asection *s;
-+ struct wildcard_list *sec0 = ptr->handler_data[0];
-+ struct wildcard_list *wildsec1 = ptr->handler_data[1];
-+ bfd_boolean multiple_sections_found;
-+ asection *s0 = find_section (file, sec0, &multiple_sections_found);
-+
-+ if (multiple_sections_found)
-+ {
-+ walk_wild_section_general (ptr, file, callback, data);
-+ return;
-+ }
-+
-+ /* Note that if the section was not found, s0 is NULL and
-+ we'll simply never succeed the s == s0 test below. */
-+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
-+ {
-+ /* Recall that in this code path, a section cannot satisfy more
-+ than one spec, so if s == s0 then it cannot match
-+ wildspec1. */
-+ if (s == s0)
-+ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
-+ else
-+ {
-+ const char *sname = bfd_get_section_name (file->the_bfd, s);
-+ bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
-+
-+ if (!skip)
-+ walk_wild_consider_section (ptr, file, s, wildsec1, callback,
-+ data);
-+ }
-+ }
-+}
-+
-+static void
-+walk_wild_section_specs3_wild2 (lang_wild_statement_type *ptr,
-+ lang_input_statement_type *file,
-+ callback_t callback,
-+ void *data)
-+{
-+ asection *s;
-+ struct wildcard_list *sec0 = ptr->handler_data[0];
-+ struct wildcard_list *wildsec1 = ptr->handler_data[1];
-+ struct wildcard_list *wildsec2 = ptr->handler_data[2];
-+ bfd_boolean multiple_sections_found;
-+ asection *s0 = find_section (file, sec0, &multiple_sections_found);
-+
-+ if (multiple_sections_found)
-+ {
-+ walk_wild_section_general (ptr, file, callback, data);
-+ return;
-+ }
-+
-+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
-+ {
-+ if (s == s0)
-+ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
-+ else
-+ {
-+ const char *sname = bfd_get_section_name (file->the_bfd, s);
-+ bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
-+
-+ if (!skip)
-+ walk_wild_consider_section (ptr, file, s, wildsec1, callback, data);
-+ else
-+ {
-+ skip = !match_simple_wild (wildsec2->spec.name, sname);
-+ if (!skip)
-+ walk_wild_consider_section (ptr, file, s, wildsec2, callback,
-+ data);
-+ }
-+ }
-+ }
-+}
-+
-+static void
-+walk_wild_section_specs4_wild2 (lang_wild_statement_type *ptr,
-+ lang_input_statement_type *file,
-+ callback_t callback,
-+ void *data)
-+{
-+ asection *s;
-+ struct wildcard_list *sec0 = ptr->handler_data[0];
-+ struct wildcard_list *sec1 = ptr->handler_data[1];
-+ struct wildcard_list *wildsec2 = ptr->handler_data[2];
-+ struct wildcard_list *wildsec3 = ptr->handler_data[3];
-+ bfd_boolean multiple_sections_found;
-+ asection *s0 = find_section (file, sec0, &multiple_sections_found), *s1;
-+
-+ if (multiple_sections_found)
-+ {
-+ walk_wild_section_general (ptr, file, callback, data);
-+ return;
-+ }
-+
-+ s1 = find_section (file, sec1, &multiple_sections_found);
-+ if (multiple_sections_found)
-+ {
-+ walk_wild_section_general (ptr, file, callback, data);
-+ return;
-+ }
-+
-+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
-+ {
-+ if (s == s0)
-+ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
-+ else
-+ if (s == s1)
-+ walk_wild_consider_section (ptr, file, s, sec1, callback, data);
-+ else
-+ {
-+ const char *sname = bfd_get_section_name (file->the_bfd, s);
-+ bfd_boolean skip = !match_simple_wild (wildsec2->spec.name,
-+ sname);
-+
-+ if (!skip)
-+ walk_wild_consider_section (ptr, file, s, wildsec2, callback,
-+ data);
-+ else
-+ {
-+ skip = !match_simple_wild (wildsec3->spec.name, sname);
-+ if (!skip)
-+ walk_wild_consider_section (ptr, file, s, wildsec3,
-+ callback, data);
-+ }
-+ }
-+ }
-+}
-+
-+static void
-+walk_wild_section (lang_wild_statement_type *ptr,
-+ lang_input_statement_type *file,
-+ callback_t callback,
-+ void *data)
-+{
-+ if (file->just_syms_flag)
-+ return;
-+
-+ (*ptr->walk_wild_section_handler) (ptr, file, callback, data);
-+}
-+
-+/* Returns TRUE when name1 is a wildcard spec that might match
-+ something name2 can match. We're conservative: we return FALSE
-+ only if the prefixes of name1 and name2 are different up to the
-+ first wildcard character. */
-+
-+static bfd_boolean
-+wild_spec_can_overlap (const char *name1, const char *name2)
-+{
-+ size_t prefix1_len = strcspn (name1, "?*[");
-+ size_t prefix2_len = strcspn (name2, "?*[");
-+ size_t min_prefix_len;
-+
-+ /* Note that if there is no wildcard character, then we treat the
-+ terminating 0 as part of the prefix. Thus ".text" won't match
-+ ".text." or ".text.*", for example. */
-+ if (name1[prefix1_len] == '\0')
-+ prefix1_len++;
-+ if (name2[prefix2_len] == '\0')
-+ prefix2_len++;
-+
-+ min_prefix_len = prefix1_len < prefix2_len ? prefix1_len : prefix2_len;
-+
-+ return memcmp (name1, name2, min_prefix_len) == 0;
-+}
-+
-+/* Select specialized code to handle various kinds of wildcard
-+ statements. */
-+
-+static void
-+analyze_walk_wild_section_handler (lang_wild_statement_type *ptr)
-+{
-+ int sec_count = 0;
-+ int wild_name_count = 0;
-+ struct wildcard_list *sec;
-+ int signature;
-+ int data_counter;
-+
-+ ptr->walk_wild_section_handler = walk_wild_section_general;
-+
-+ /* Count how many wildcard_specs there are, and how many of those
-+ actually use wildcards in the name. Also, bail out if any of the
-+ wildcard names are NULL. (Can this actually happen?
-+ walk_wild_section used to test for it.) And bail out if any
-+ of the wildcards are more complex than a simple string
-+ ending in a single '*'. */
-+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
-+ {
-+ ++sec_count;
-+ if (sec->spec.name == NULL)
-+ return;
-+ if (wildcardp (sec->spec.name))
-+ {
-+ ++wild_name_count;
-+ if (!is_simple_wild (sec->spec.name))
-+ return;
-+ }
-+ }
-+
-+ /* The zero-spec case would be easy to optimize but it doesn't
-+ happen in practice. Likewise, more than 4 specs doesn't
-+ happen in practice. */
-+ if (sec_count == 0 || sec_count > 4)
-+ return;
-+
-+ /* Check that no two specs can match the same section. */
-+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
-+ {
-+ struct wildcard_list *sec2;
-+ for (sec2 = sec->next; sec2 != NULL; sec2 = sec2->next)
-+ {
-+ if (wild_spec_can_overlap (sec->spec.name, sec2->spec.name))
-+ return;
-+ }
-+ }
-+
-+ signature = (sec_count << 8) + wild_name_count;
-+ switch (signature)
-+ {
-+ case 0x0100:
-+ ptr->walk_wild_section_handler = walk_wild_section_specs1_wild0;
-+ break;
-+ case 0x0101:
-+ ptr->walk_wild_section_handler = walk_wild_section_specs1_wild1;
-+ break;
-+ case 0x0201:
-+ ptr->walk_wild_section_handler = walk_wild_section_specs2_wild1;
-+ break;
-+ case 0x0302:
-+ ptr->walk_wild_section_handler = walk_wild_section_specs3_wild2;
-+ break;
-+ case 0x0402:
-+ ptr->walk_wild_section_handler = walk_wild_section_specs4_wild2;
-+ break;
-+ default:
-+ return;
-+ }
-+
-+ /* Now fill the data array with pointers to the specs, first the
-+ specs with non-wildcard names, then the specs with wildcard
-+ names. It's OK to process the specs in different order from the
-+ given order, because we've already determined that no section
-+ will match more than one spec. */
-+ data_counter = 0;
-+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
-+ if (!wildcardp (sec->spec.name))
-+ ptr->handler_data[data_counter++] = sec;
-+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
-+ if (wildcardp (sec->spec.name))
-+ ptr->handler_data[data_counter++] = sec;
-+}
-+
- /* Handle a wild statement for a single file F. */
-
- static void
-@@ -4353,6 +4737,7 @@
- new->section_list = section_list;
- new->keep_sections = keep_sections;
- lang_list_init (&new->children);
-+ analyze_walk_wild_section_handler (new);
- }
-
- void
---- binutils-2.15/ld/ldlang.h.old 2004-05-17 15:36:16.000000000 -0400
-+++ binutils-2.15/ld/ldlang.h 2006-01-23 13:32:33.653292000 -0500
-@@ -295,7 +295,17 @@
- union lang_statement_union *file;
- } lang_afile_asection_pair_statement_type;
-
--typedef struct lang_wild_statement_struct
-+typedef struct lang_wild_statement_struct lang_wild_statement_type;
-+
-+typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
-+ asection *, lang_input_statement_type *, void *);
-+
-+typedef void (*walk_wild_section_handler_t) (lang_wild_statement_type *,
-+ lang_input_statement_type *,
-+ callback_t callback,
-+ void *data);
-+
-+struct lang_wild_statement_struct
- {
- lang_statement_header_type header;
- const char *filename;
-@@ -303,7 +313,10 @@
- struct wildcard_list *section_list;
- bfd_boolean keep_sections;
- lang_statement_list_type children;
--} lang_wild_statement_type;
-+
-+ walk_wild_section_handler_t walk_wild_section_handler;
-+ struct wildcard_list *handler_data[4];
-+};
-
- typedef struct lang_address_statement_struct
- {
diff --git a/patches/binutils/2.15/250-ld-stabs-tweak.patch b/patches/binutils/2.15/250-ld-stabs-tweak.patch
deleted file mode 100644
index bd6ae7a..0000000
--- a/patches/binutils/2.15/250-ld-stabs-tweak.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Signed-off-by: dank@kegel.com
-
-See http://sourceware.org/ml/binutils/2005-12/msg00270.html
-http://sourceware.org/ml/binutils-cvs/2005-12/msg00139.html
-
-STABS hash table size change, backported from the binutils CVS tree. Here's
-the CVS log comment for the original change:
-
-revision 1.25
-date: 2005/12/29 10:29:23; author: nickc; state: Exp; lines: +2 -3
-(_bfd_link_section_stabs): Use bfd_hash_table_init rather than
-bfd_hash_table_init_n(...,251) so that the size of the hash table can be
-controlled by the user.
-
-Note that tunable hash table size changes were added after 2.15. The effect
-of this change is to make bfd use its default hash table size for the stabs
-hash as well.
-
-
---- binutils-2.15/bfd/stabs.c.old 2004-05-17 15:36:04.000000000 -0400
-+++ binutils-2.15/bfd/stabs.c 2006-02-09 15:21:56.567014000 -0500
-@@ -241,9 +241,8 @@
- goto error_return;
- /* Make sure the first byte is zero. */
- (void) _bfd_stringtab_add (sinfo->strings, "", TRUE, TRUE);
-- if (! bfd_hash_table_init_n (&sinfo->includes.root,
-- stab_link_includes_newfunc,
-- 251))
-+ if (! bfd_hash_table_init (&sinfo->includes.root,
-+ stab_link_includes_newfunc))
- goto error_return;
- sinfo->stabstr = bfd_make_section_anyway (abfd, ".stabstr");
- sinfo->stabstr->flags |= SEC_HAS_CONTENTS | SEC_READONLY | SEC_DEBUGGING;
diff --git a/patches/binutils/2.15/260-s390-invalid-insn-format.patch b/patches/binutils/2.15/260-s390-invalid-insn-format.patch
deleted file mode 100644
index 3296201..0000000
--- a/patches/binutils/2.15/260-s390-invalid-insn-format.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Message-ID: <000801c48f60$cec16630$9103a8c0@ULOC5012>
-From: "Michael Geiger" <mcgege@gmx.de>
-To: <dank@kegel.com>
-Subject: Patch for cross compiling s/390 kernel on linux host
-Date: Tue, 31 Aug 2004 15:45:41 +0200
-
-Dear Dan,
-
-I had big problems compiling a kernel for s/390 on my linux host - I tried
-different chains from crosstool-0.28-rc34 and finally succeded with
-gcc-3.3.4-glibc-2.3.2 after applying another patch to binutils-2.15
-(attached).
-All compilations of the different kernel versions I tried stopped with
-"Invalid .insn format" somewhere. I checked the recent cvs version of
-binutils and applied the latest diff to gas/config/tc-s390.c and that solved
-it.
-
-Greetings
-
-Michael Geiger
-
-
-diff -u -r1.39 -r1.40
---- src/gas/config/tc-s390.c 2004/05/06 11:01:48 1.39
-+++ src/gas/config/tc-s390.c 2004/06/15 12:38:08 1.40
-@@ -1596,13 +1596,13 @@
- if (exp.X_op == O_constant)
- {
- if ( ( opformat->oplen == 6
-- && exp.X_add_number >= 0
-+ && (addressT) exp.X_add_number >= 0
- && (addressT) exp.X_add_number < (1ULL << 48))
- || ( opformat->oplen == 4
-- && exp.X_add_number >= 0
-+ && (addressT) exp.X_add_number >= 0
- && (addressT) exp.X_add_number < (1ULL << 32))
- || ( opformat->oplen == 2
-- && exp.X_add_number >= 0
-+ && (addressT) exp.X_add_number >= 0
- && (addressT) exp.X_add_number < (1ULL << 16)))
- md_number_to_chars (insn, exp.X_add_number, opformat->oplen);
- else
diff --git a/patches/binutils/2.18.50.0.4/100-arm-uclibcgnueabi.patch b/patches/binutils/2.18.50.0.4/100-arm-uclibcgnueabi.patch
deleted file mode 100644
index bf37211..0000000
--- a/patches/binutils/2.18.50.0.4/100-arm-uclibcgnueabi.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Original patch from: ../crosstool-NG/ct-ng.trunk/patches/binutils/2.18.50.0.4/100-arm-uclibcgnueabi.patch
-
--= BEGIN original header =-
-Patch from buildroot, updated to binutils-2.18.50.0.6.
-
- binutils-2.18.50.0.6/configure | 2 1 1 0 +-
- binutils-2.18.50.0.6/configure.ac | 2 1 1 0 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
--= END original header =-
-
-diff -durN binutils-2.18.50.0.4.orig/configure binutils-2.18.50.0.4/configure
---- binutils-2.18.50.0.4.orig/configure 2008-02-08 17:44:09.000000000 +0100
-+++ binutils-2.18.50.0.4/configure 2009-03-07 12:17:29.000000000 +0100
-@@ -2249,7 +2249,7 @@
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
- libgloss_dir=arm
- ;;
-- arm*-*-linux-gnueabi)
-+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
- noconfigdirs="$noconfigdirs target-qthreads"
- noconfigdirs="$noconfigdirs target-libobjc"
- case ${with_newlib} in
-diff -durN binutils-2.18.50.0.4.orig/configure.ac binutils-2.18.50.0.4/configure.ac
---- binutils-2.18.50.0.4.orig/configure.ac 2008-02-08 17:44:09.000000000 +0100
-+++ binutils-2.18.50.0.4/configure.ac 2009-03-07 12:17:30.000000000 +0100
-@@ -526,7 +526,7 @@
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
- libgloss_dir=arm
- ;;
-- arm*-*-linux-gnueabi)
-+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
- noconfigdirs="$noconfigdirs target-qthreads"
- noconfigdirs="$noconfigdirs target-libobjc"
- case ${with_newlib} in
diff --git a/patches/binutils/2.18.50.0.4/110-ld-makefile-path.patch b/patches/binutils/2.18.50.0.4/110-ld-makefile-path.patch
deleted file mode 100644
index 99b02f7..0000000
--- a/patches/binutils/2.18.50.0.4/110-ld-makefile-path.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Original patch from: ../crosstool-NG/ct-ng.trunk/patches/binutils/2.18.50.0.4/110-ld-makefile-path.patch
-
--= BEGIN original header =-
-Fix ld scripts path, copied from buildroot.
-
- binutils-2.18.50.0.6/ld/Makefile.am | 2 1 1 0 +-
- binutils-2.18.50.0.6/ld/Makefile.in | 2 1 1 0 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
--= END original header =-
-
-diff -durN binutils-2.18.50.0.4.orig/ld/Makefile.am binutils-2.18.50.0.4/ld/Makefile.am
---- binutils-2.18.50.0.4.orig/ld/Makefile.am 2007-11-03 21:40:37.000000000 +0100
-+++ binutils-2.18.50.0.4/ld/Makefile.am 2009-03-07 12:17:30.000000000 +0100
-@@ -18,7 +18,7 @@
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
-
- EMUL = @EMUL@
- EMULATION_OFILES = @EMULATION_OFILES@
-diff -durN binutils-2.18.50.0.4.orig/ld/Makefile.in binutils-2.18.50.0.4/ld/Makefile.in
---- binutils-2.18.50.0.4.orig/ld/Makefile.in 2007-11-03 21:40:37.000000000 +0100
-+++ binutils-2.18.50.0.4/ld/Makefile.in 2009-03-07 12:17:30.000000000 +0100
-@@ -287,7 +287,7 @@
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
- BASEDIR = $(srcdir)/..
- BFDDIR = $(BASEDIR)/bfd
- INCDIR = $(BASEDIR)/include
diff --git a/patches/binutils/2.18.50.0.4/120-check-ldrunpath-length.patch b/patches/binutils/2.18.50.0.4/120-check-ldrunpath-length.patch
deleted file mode 100644
index edde04a..0000000
--- a/patches/binutils/2.18.50.0.4/120-check-ldrunpath-length.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Original patch from: ../crosstool-NG/ct-ng.trunk/patches/binutils/2.18.50.0.4/120-check-ldrunpath-length.patch
-
--= BEGIN original header =-
-Check LD_RUN_PATH length, copied from buildroot.
-
- binutils-2.18.50.0.6/ld/emultempl/elf32.em | 4 4 0 0 ++++
- 1 file changed, 4 insertions(+)
-
--= END original header =-
-
-diff -durN binutils-2.18.50.0.4.orig/ld/emultempl/elf32.em binutils-2.18.50.0.4/ld/emultempl/elf32.em
---- binutils-2.18.50.0.4.orig/ld/emultempl/elf32.em 2008-02-08 17:44:55.000000000 +0100
-+++ binutils-2.18.50.0.4/ld/emultempl/elf32.em 2009-03-07 12:17:31.000000000 +0100
-@@ -1220,6 +1220,8 @@
- && command_line.rpath == NULL)
- {
- lib_path = (const char *) getenv ("LD_RUN_PATH");
-+ if ((lib_path) && (strlen (lib_path) == 0))
-+ lib_path = NULL;
- if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
- force))
- break;
-@@ -1404,6 +1406,8 @@
- rpath = command_line.rpath;
- if (rpath == NULL)
- rpath = (const char *) getenv ("LD_RUN_PATH");
-+ if ((rpath) && (strlen (rpath) == 0))
-+ rpath = NULL;
- if (! (bfd_elf_size_dynamic_sections
- (output_bfd, command_line.soname, rpath,
- command_line.filter_shlib,
diff --git a/patches/binutils/2.18.50.0.4/130-i386-no-divide-comment.patch b/patches/binutils/2.18.50.0.4/130-i386-no-divide-comment.patch
deleted file mode 100644
index cb34192..0000000
--- a/patches/binutils/2.18.50.0.4/130-i386-no-divide-comment.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-Original patch from: ../crosstool-NG/ct-ng.trunk/patches/binutils/2.18.50.0.4/130-i386-no-divide-comment.patch
-
--= BEGIN original header =-
--= END original header =-
-
-diff -durN binutils-2.18.50.0.4.orig/gas/config/tc-i386.c binutils-2.18.50.0.4/gas/config/tc-i386.c
---- binutils-2.18.50.0.4.orig/gas/config/tc-i386.c 2008-02-08 17:44:10.000000000 +0100
-+++ binutils-2.18.50.0.4/gas/config/tc-i386.c 2009-03-07 12:17:31.000000000 +0100
-@@ -300,24 +300,10 @@
- #endif
- ;
-
--#if (defined (TE_I386AIX) \
-- || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \
-- && !defined (TE_GNU) \
-- && !defined (TE_LINUX) \
-- && !defined (TE_NETWARE) \
-- && !defined (TE_FreeBSD) \
-- && !defined (TE_NetBSD)))
- /* This array holds the chars that always start a comment. If the
-- pre-processor is disabled, these aren't very useful. The option
-- --divide will remove '/' from this list. */
--const char *i386_comment_chars = "#/";
--#define SVR4_COMMENT_CHARS 1
--#define PREFIX_SEPARATOR '\\'
--
--#else
-+ pre-processor is disabled, these aren't very useful. */
- const char *i386_comment_chars = "#";
- #define PREFIX_SEPARATOR '/'
--#endif
-
- /* This array holds the chars that only start a comment at the beginning of
- a line. If the line seems to have the form '# 123 filename'
-@@ -7243,20 +7229,6 @@
- break;
-
- case OPTION_DIVIDE:
--#ifdef SVR4_COMMENT_CHARS
-- {
-- char *n, *t;
-- const char *s;
--
-- n = (char *) xmalloc (strlen (i386_comment_chars) + 1);
-- t = n;
-- for (s = i386_comment_chars; *s != '\0'; s++)
-- if (*s != '/')
-- *t++ = *s;
-- *t = '\0';
-- i386_comment_chars = n;
-- }
--#endif
- break;
-
- case OPTION_MARCH:
-@@ -7392,13 +7364,8 @@
- fprintf (stream, _("\
- --32/--64 generate 32bit/64bit code\n"));
- #endif
--#ifdef SVR4_COMMENT_CHARS
-- fprintf (stream, _("\
-- --divide do not treat `/' as a comment character\n"));
--#else
- fprintf (stream, _("\
- --divide ignored\n"));
--#endif
- fprintf (stream, _("\
- -march=CPU[,+EXTENSION...]\n\
- generate code for CPU and EXTENSION, CPU is one of:\n\
diff --git a/patches/binutils/2.18.50.0.6/100-arm-uclibcgnueabi.patch b/patches/binutils/2.18.50.0.6/100-arm-uclibcgnueabi.patch
deleted file mode 100644
index c3f9e77..0000000
--- a/patches/binutils/2.18.50.0.6/100-arm-uclibcgnueabi.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Patch from buildroot, updated to binutils-2.18.50.0.6.
-
- binutils-2.18.50.0.6/configure | 2 1 1 0 +-
- binutils-2.18.50.0.6/configure.ac | 2 1 1 0 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff -durN binutils-2.18.50.0.6.orig/configure binutils-2.18.50.0.6/configure
---- binutils-2.18.50.0.6.orig/configure 2008-04-03 18:54:04.000000000 +0200
-+++ binutils-2.18.50.0.6/configure 2008-05-02 23:18:42.000000000 +0200
-@@ -2298,7 +2298,7 @@
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
- libgloss_dir=arm
- ;;
-- arm*-*-linux-gnueabi)
-+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
- noconfigdirs="$noconfigdirs target-qthreads"
- noconfigdirs="$noconfigdirs target-libobjc"
- case ${with_newlib} in
-diff -durN binutils-2.18.50.0.6.orig/configure.ac binutils-2.18.50.0.6/configure.ac
---- binutils-2.18.50.0.6.orig/configure.ac 2008-04-03 18:54:04.000000000 +0200
-+++ binutils-2.18.50.0.6/configure.ac 2008-05-02 23:18:01.000000000 +0200
-@@ -560,7 +560,7 @@
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
- libgloss_dir=arm
- ;;
-- arm*-*-linux-gnueabi)
-+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
- noconfigdirs="$noconfigdirs target-qthreads"
- noconfigdirs="$noconfigdirs target-libobjc"
- case ${with_newlib} in
diff --git a/patches/binutils/2.18.50.0.6/110-ld-makefile-path.patch b/patches/binutils/2.18.50.0.6/110-ld-makefile-path.patch
deleted file mode 100644
index 9eea2a1..0000000
--- a/patches/binutils/2.18.50.0.6/110-ld-makefile-path.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Fix ld scripts path, copied from buildroot.
-
- binutils-2.18.50.0.6/ld/Makefile.am | 2 1 1 0 +-
- binutils-2.18.50.0.6/ld/Makefile.in | 2 1 1 0 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff -durN binutils-2.18.50.0.6.orig/ld/Makefile.am binutils-2.18.50.0.6/ld/Makefile.am
---- binutils-2.18.50.0.6.orig/ld/Makefile.am 2008-04-03 18:54:05.000000000 +0200
-+++ binutils-2.18.50.0.6/ld/Makefile.am 2008-05-02 23:25:14.000000000 +0200
-@@ -18,7 +18,7 @@
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
-
- EMUL = @EMUL@
- EMULATION_OFILES = @EMULATION_OFILES@
-diff -durN binutils-2.18.50.0.6.orig/ld/Makefile.in binutils-2.18.50.0.6/ld/Makefile.in
---- binutils-2.18.50.0.6.orig/ld/Makefile.in 2008-04-03 18:54:05.000000000 +0200
-+++ binutils-2.18.50.0.6/ld/Makefile.in 2008-05-02 23:25:14.000000000 +0200
-@@ -288,7 +288,7 @@
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
- BASEDIR = $(srcdir)/..
- BFDDIR = $(BASEDIR)/bfd
- INCDIR = $(BASEDIR)/include
diff --git a/patches/binutils/2.18.50.0.6/120-check-ldrunpath-length.patch b/patches/binutils/2.18.50.0.6/120-check-ldrunpath-length.patch
deleted file mode 100644
index 7b3e7e1..0000000
--- a/patches/binutils/2.18.50.0.6/120-check-ldrunpath-length.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Check LD_RUN_PATH length, copied from buildroot.
-
- binutils-2.18.50.0.6/ld/emultempl/elf32.em | 4 4 0 0 ++++
- 1 file changed, 4 insertions(+)
-
-diff -durN binutils-2.18.50.0.6.orig/ld/emultempl/elf32.em binutils-2.18.50.0.6/ld/emultempl/elf32.em
---- binutils-2.18.50.0.6.orig/ld/emultempl/elf32.em 2008-04-03 18:54:25.000000000 +0200
-+++ binutils-2.18.50.0.6/ld/emultempl/elf32.em 2008-05-02 23:30:08.000000000 +0200
-@@ -1220,6 +1220,8 @@
- && command_line.rpath == NULL)
- {
- lib_path = (const char *) getenv ("LD_RUN_PATH");
-+ if ((lib_path) && (strlen (lib_path) == 0))
-+ lib_path = NULL;
- if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
- force))
- break;
-@@ -1405,6 +1407,8 @@
- rpath = command_line.rpath;
- if (rpath == NULL)
- rpath = (const char *) getenv ("LD_RUN_PATH");
-+ if ((rpath) && (strlen (rpath) == 0))
-+ rpath = NULL;
- if (! (bfd_elf_size_dynamic_sections
- (link_info.output_bfd, command_line.soname, rpath,
- command_line.filter_shlib,
diff --git a/patches/binutils/2.18.50.0.6/130-i386-no-divide-comment.patch b/patches/binutils/2.18.50.0.6/130-i386-no-divide-comment.patch
deleted file mode 100644
index e435805..0000000
--- a/patches/binutils/2.18.50.0.6/130-i386-no-divide-comment.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-diff -durN binutils-2.18.50.0.6.orig/gas/config/tc-i386.c binutils-2.18.50.0.6/gas/config/tc-i386.c
---- binutils-2.18.50.0.6.orig/gas/config/tc-i386.c 2008-04-03 18:54:04.000000000 +0200
-+++ binutils-2.18.50.0.6/gas/config/tc-i386.c 2008-09-22 09:09:23.000000000 +0200
-@@ -312,24 +312,10 @@
- #endif
- ;
-
--#if (defined (TE_I386AIX) \
-- || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \
-- && !defined (TE_GNU) \
-- && !defined (TE_LINUX) \
-- && !defined (TE_NETWARE) \
-- && !defined (TE_FreeBSD) \
-- && !defined (TE_NetBSD)))
- /* This array holds the chars that always start a comment. If the
-- pre-processor is disabled, these aren't very useful. The option
-- --divide will remove '/' from this list. */
--const char *i386_comment_chars = "#/";
--#define SVR4_COMMENT_CHARS 1
--#define PREFIX_SEPARATOR '\\'
--
--#else
-+ pre-processor is disabled, these aren't very useful. */
- const char *i386_comment_chars = "#";
- #define PREFIX_SEPARATOR '/'
--#endif
-
- /* This array holds the chars that only start a comment at the beginning of
- a line. If the line seems to have the form '# 123 filename'
-@@ -7876,20 +7862,6 @@
- break;
-
- case OPTION_DIVIDE:
--#ifdef SVR4_COMMENT_CHARS
-- {
-- char *n, *t;
-- const char *s;
--
-- n = (char *) xmalloc (strlen (i386_comment_chars) + 1);
-- t = n;
-- for (s = i386_comment_chars; *s != '\0'; s++)
-- if (*s != '/')
-- *t++ = *s;
-- *t = '\0';
-- i386_comment_chars = n;
-- }
--#endif
- break;
-
- case OPTION_MARCH:
-@@ -8029,13 +8001,8 @@
- fprintf (stream, _("\
- --32/--64 generate 32bit/64bit code\n"));
- #endif
--#ifdef SVR4_COMMENT_CHARS
-- fprintf (stream, _("\
-- --divide do not treat `/' as a comment character\n"));
--#else
- fprintf (stream, _("\
- --divide ignored\n"));
--#endif
- fprintf (stream, _("\
- -march=CPU[,+EXTENSION...]\n\
- generate code for CPU and EXTENSION, CPU is one of:\n\
diff --git a/patches/binutils/2.18.50.0.7/100-arm-uclibcgnueabi.patch b/patches/binutils/2.18.50.0.7/100-arm-uclibcgnueabi.patch
deleted file mode 100644
index c3f9e77..0000000
--- a/patches/binutils/2.18.50.0.7/100-arm-uclibcgnueabi.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Patch from buildroot, updated to binutils-2.18.50.0.6.
-
- binutils-2.18.50.0.6/configure | 2 1 1 0 +-
- binutils-2.18.50.0.6/configure.ac | 2 1 1 0 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff -durN binutils-2.18.50.0.6.orig/configure binutils-2.18.50.0.6/configure
---- binutils-2.18.50.0.6.orig/configure 2008-04-03 18:54:04.000000000 +0200
-+++ binutils-2.18.50.0.6/configure 2008-05-02 23:18:42.000000000 +0200
-@@ -2298,7 +2298,7 @@
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
- libgloss_dir=arm
- ;;
-- arm*-*-linux-gnueabi)
-+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
- noconfigdirs="$noconfigdirs target-qthreads"
- noconfigdirs="$noconfigdirs target-libobjc"
- case ${with_newlib} in
-diff -durN binutils-2.18.50.0.6.orig/configure.ac binutils-2.18.50.0.6/configure.ac
---- binutils-2.18.50.0.6.orig/configure.ac 2008-04-03 18:54:04.000000000 +0200
-+++ binutils-2.18.50.0.6/configure.ac 2008-05-02 23:18:01.000000000 +0200
-@@ -560,7 +560,7 @@
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
- libgloss_dir=arm
- ;;
-- arm*-*-linux-gnueabi)
-+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
- noconfigdirs="$noconfigdirs target-qthreads"
- noconfigdirs="$noconfigdirs target-libobjc"
- case ${with_newlib} in
diff --git a/patches/binutils/2.18.50.0.7/110-ld-makefile-path.patch b/patches/binutils/2.18.50.0.7/110-ld-makefile-path.patch
deleted file mode 100644
index 9eea2a1..0000000
--- a/patches/binutils/2.18.50.0.7/110-ld-makefile-path.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Fix ld scripts path, copied from buildroot.
-
- binutils-2.18.50.0.6/ld/Makefile.am | 2 1 1 0 +-
- binutils-2.18.50.0.6/ld/Makefile.in | 2 1 1 0 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff -durN binutils-2.18.50.0.6.orig/ld/Makefile.am binutils-2.18.50.0.6/ld/Makefile.am
---- binutils-2.18.50.0.6.orig/ld/Makefile.am 2008-04-03 18:54:05.000000000 +0200
-+++ binutils-2.18.50.0.6/ld/Makefile.am 2008-05-02 23:25:14.000000000 +0200
-@@ -18,7 +18,7 @@
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
-
- EMUL = @EMUL@
- EMULATION_OFILES = @EMULATION_OFILES@
-diff -durN binutils-2.18.50.0.6.orig/ld/Makefile.in binutils-2.18.50.0.6/ld/Makefile.in
---- binutils-2.18.50.0.6.orig/ld/Makefile.in 2008-04-03 18:54:05.000000000 +0200
-+++ binutils-2.18.50.0.6/ld/Makefile.in 2008-05-02 23:25:14.000000000 +0200
-@@ -288,7 +288,7 @@
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
- BASEDIR = $(srcdir)/..
- BFDDIR = $(BASEDIR)/bfd
- INCDIR = $(BASEDIR)/include
diff --git a/patches/binutils/2.18.50.0.7/120-check-ldrunpath-length.patch b/patches/binutils/2.18.50.0.7/120-check-ldrunpath-length.patch
deleted file mode 100644
index 7b3e7e1..0000000
--- a/patches/binutils/2.18.50.0.7/120-check-ldrunpath-length.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Check LD_RUN_PATH length, copied from buildroot.
-
- binutils-2.18.50.0.6/ld/emultempl/elf32.em | 4 4 0 0 ++++
- 1 file changed, 4 insertions(+)
-
-diff -durN binutils-2.18.50.0.6.orig/ld/emultempl/elf32.em binutils-2.18.50.0.6/ld/emultempl/elf32.em
---- binutils-2.18.50.0.6.orig/ld/emultempl/elf32.em 2008-04-03 18:54:25.000000000 +0200
-+++ binutils-2.18.50.0.6/ld/emultempl/elf32.em 2008-05-02 23:30:08.000000000 +0200
-@@ -1220,6 +1220,8 @@
- && command_line.rpath == NULL)
- {
- lib_path = (const char *) getenv ("LD_RUN_PATH");
-+ if ((lib_path) && (strlen (lib_path) == 0))
-+ lib_path = NULL;
- if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
- force))
- break;
-@@ -1405,6 +1407,8 @@
- rpath = command_line.rpath;
- if (rpath == NULL)
- rpath = (const char *) getenv ("LD_RUN_PATH");
-+ if ((rpath) && (strlen (rpath) == 0))
-+ rpath = NULL;
- if (! (bfd_elf_size_dynamic_sections
- (link_info.output_bfd, command_line.soname, rpath,
- command_line.filter_shlib,
diff --git a/patches/binutils/2.18.50.0.7/130-i386-no-divide-comment.patch b/patches/binutils/2.18.50.0.7/130-i386-no-divide-comment.patch
deleted file mode 100644
index af62265..0000000
--- a/patches/binutils/2.18.50.0.7/130-i386-no-divide-comment.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-diff -durN binutils-2.18.50.0.7.orig/gas/config/tc-i386.c binutils-2.18.50.0.7/gas/config/tc-i386.c
---- binutils-2.18.50.0.7.orig/gas/config/tc-i386.c 2008-05-04 16:28:10.000000000 +0200
-+++ binutils-2.18.50.0.7/gas/config/tc-i386.c 2008-09-22 09:11:19.000000000 +0200
-@@ -312,24 +312,10 @@
- #endif
- ;
-
--#if (defined (TE_I386AIX) \
-- || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \
-- && !defined (TE_GNU) \
-- && !defined (TE_LINUX) \
-- && !defined (TE_NETWARE) \
-- && !defined (TE_FreeBSD) \
-- && !defined (TE_NetBSD)))
- /* This array holds the chars that always start a comment. If the
-- pre-processor is disabled, these aren't very useful. The option
-- --divide will remove '/' from this list. */
--const char *i386_comment_chars = "#/";
--#define SVR4_COMMENT_CHARS 1
--#define PREFIX_SEPARATOR '\\'
--
--#else
-+ pre-processor is disabled, these aren't very useful. */
- const char *i386_comment_chars = "#";
- #define PREFIX_SEPARATOR '/'
--#endif
-
- /* This array holds the chars that only start a comment at the beginning of
- a line. If the line seems to have the form '# 123 filename'
-@@ -7920,20 +7906,6 @@
- break;
-
- case OPTION_DIVIDE:
--#ifdef SVR4_COMMENT_CHARS
-- {
-- char *n, *t;
-- const char *s;
--
-- n = (char *) xmalloc (strlen (i386_comment_chars) + 1);
-- t = n;
-- for (s = i386_comment_chars; *s != '\0'; s++)
-- if (*s != '/')
-- *t++ = *s;
-- *t = '\0';
-- i386_comment_chars = n;
-- }
--#endif
- break;
-
- case OPTION_MARCH:
-@@ -8084,13 +8056,8 @@
- fprintf (stream, _("\
- --32/--64 generate 32bit/64bit code\n"));
- #endif
--#ifdef SVR4_COMMENT_CHARS
-- fprintf (stream, _("\
-- --divide do not treat `/' as a comment character\n"));
--#else
- fprintf (stream, _("\
- --divide ignored\n"));
--#endif
- fprintf (stream, _("\
- -march=CPU[,+EXTENSION...]\n\
- generate code for CPU and EXTENSION, CPU is one of:\n\
diff --git a/patches/binutils/2.18.50.0.8/100-arm-uclibcgnueabi.patch b/patches/binutils/2.18.50.0.8/100-arm-uclibcgnueabi.patch
deleted file mode 100644
index b4504d4..0000000
--- a/patches/binutils/2.18.50.0.8/100-arm-uclibcgnueabi.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -durN binutils-2.18.50.0.8.orig/configure binutils-2.18.50.0.8/configure
---- binutils-2.18.50.0.8.orig/configure 2008-07-10 17:32:56.000000000 +0200
-+++ binutils-2.18.50.0.8/configure 2008-07-13 23:08:13.000000000 +0200
-@@ -2313,7 +2313,7 @@
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
- libgloss_dir=arm
- ;;
-- arm*-*-linux-gnueabi)
-+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
- noconfigdirs="$noconfigdirs target-qthreads"
- case ${with_newlib} in
- no) noconfigdirs="$noconfigdirs target-newlib target-libgloss"
-diff -durN binutils-2.18.50.0.8.orig/configure.ac binutils-2.18.50.0.8/configure.ac
---- binutils-2.18.50.0.8.orig/configure.ac 2008-07-10 17:32:56.000000000 +0200
-+++ binutils-2.18.50.0.8/configure.ac 2008-07-13 23:08:13.000000000 +0200
-@@ -562,7 +562,7 @@
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
- libgloss_dir=arm
- ;;
-- arm*-*-linux-gnueabi)
-+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
- noconfigdirs="$noconfigdirs target-qthreads"
- case ${with_newlib} in
- no) noconfigdirs="$noconfigdirs target-newlib target-libgloss"
diff --git a/patches/binutils/2.18.50.0.8/110-ld-makefile-path.patch b/patches/binutils/2.18.50.0.8/110-ld-makefile-path.patch
deleted file mode 100644
index 41a2249..0000000
--- a/patches/binutils/2.18.50.0.8/110-ld-makefile-path.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -durN binutils-2.18.50.0.8.orig/ld/Makefile.am binutils-2.18.50.0.8/ld/Makefile.am
---- binutils-2.18.50.0.8.orig/ld/Makefile.am 2008-04-03 18:54:05.000000000 +0200
-+++ binutils-2.18.50.0.8/ld/Makefile.am 2008-07-13 23:15:40.000000000 +0200
-@@ -18,7 +18,7 @@
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
-
- EMUL = @EMUL@
- EMULATION_OFILES = @EMULATION_OFILES@
-diff -durN binutils-2.18.50.0.8.orig/ld/Makefile.in binutils-2.18.50.0.8/ld/Makefile.in
---- binutils-2.18.50.0.8.orig/ld/Makefile.in 2008-07-10 17:32:58.000000000 +0200
-+++ binutils-2.18.50.0.8/ld/Makefile.in 2008-07-13 23:15:40.000000000 +0200
-@@ -290,7 +290,7 @@
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
- BASEDIR = $(srcdir)/..
- BFDDIR = $(BASEDIR)/bfd
- INCDIR = $(BASEDIR)/include
diff --git a/patches/binutils/2.18.50.0.8/120-check-ldrunpath-length.patch b/patches/binutils/2.18.50.0.8/120-check-ldrunpath-length.patch
deleted file mode 100644
index f2f096d..0000000
--- a/patches/binutils/2.18.50.0.8/120-check-ldrunpath-length.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -durN binutils-2.18.50.0.8.orig/ld/emultempl/elf32.em binutils-2.18.50.0.8/ld/emultempl/elf32.em
---- binutils-2.18.50.0.8.orig/ld/emultempl/elf32.em 2008-07-10 17:33:23.000000000 +0200
-+++ binutils-2.18.50.0.8/ld/emultempl/elf32.em 2008-07-13 23:19:29.000000000 +0200
-@@ -1220,6 +1220,8 @@
- && command_line.rpath == NULL)
- {
- lib_path = (const char *) getenv ("LD_RUN_PATH");
-+ if ((lib_path) && (strlen (lib_path) == 0))
-+ lib_path = NULL;
- if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
- force))
- break;
-@@ -1405,6 +1407,8 @@
- rpath = command_line.rpath;
- if (rpath == NULL)
- rpath = (const char *) getenv ("LD_RUN_PATH");
-+ if ((rpath) && (strlen (rpath) == 0))
-+ rpath = NULL;
- if (! (bfd_elf_size_dynamic_sections
- (link_info.output_bfd, command_line.soname, rpath,
- command_line.filter_shlib,
diff --git a/patches/binutils/2.18.50.0.8/130-i386-no-divide-comment.patch b/patches/binutils/2.18.50.0.8/130-i386-no-divide-comment.patch
deleted file mode 100644
index 196671d..0000000
--- a/patches/binutils/2.18.50.0.8/130-i386-no-divide-comment.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-diff -durN binutils-2.18.50.0.8.orig/gas/config/tc-i386.c binutils-2.18.50.0.8/gas/config/tc-i386.c
---- binutils-2.18.50.0.8.orig/gas/config/tc-i386.c 2008-07-10 17:32:58.000000000 +0200
-+++ binutils-2.18.50.0.8/gas/config/tc-i386.c 2008-09-22 09:12:39.000000000 +0200
-@@ -313,24 +313,10 @@
- #endif
- ;
-
--#if (defined (TE_I386AIX) \
-- || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \
-- && !defined (TE_GNU) \
-- && !defined (TE_LINUX) \
-- && !defined (TE_NETWARE) \
-- && !defined (TE_FreeBSD) \
-- && !defined (TE_NetBSD)))
- /* This array holds the chars that always start a comment. If the
-- pre-processor is disabled, these aren't very useful. The option
-- --divide will remove '/' from this list. */
--const char *i386_comment_chars = "#/";
--#define SVR4_COMMENT_CHARS 1
--#define PREFIX_SEPARATOR '\\'
--
--#else
-+ pre-processor is disabled, these aren't very useful. */
- const char *i386_comment_chars = "#";
- #define PREFIX_SEPARATOR '/'
--#endif
-
- /* This array holds the chars that only start a comment at the beginning of
- a line. If the line seems to have the form '# 123 filename'
-@@ -7952,20 +7938,6 @@
- break;
-
- case OPTION_DIVIDE:
--#ifdef SVR4_COMMENT_CHARS
-- {
-- char *n, *t;
-- const char *s;
--
-- n = (char *) xmalloc (strlen (i386_comment_chars) + 1);
-- t = n;
-- for (s = i386_comment_chars; *s != '\0'; s++)
-- if (*s != '/')
-- *t++ = *s;
-- *t = '\0';
-- i386_comment_chars = n;
-- }
--#endif
- break;
-
- case OPTION_MARCH:
-@@ -8116,13 +8088,8 @@
- fprintf (stream, _("\
- --32/--64 generate 32bit/64bit code\n"));
- #endif
--#ifdef SVR4_COMMENT_CHARS
-- fprintf (stream, _("\
-- --divide do not treat `/' as a comment character\n"));
--#else
- fprintf (stream, _("\
- --divide ignored\n"));
--#endif
- fprintf (stream, _("\
- -march=CPU[,+EXTENSION...]\n\
- generate code for CPU and EXTENSION, CPU is one of:\n\
diff --git a/patches/binutils/2.18.50.0.9/100-arm-uclibcgnueabi.patch b/patches/binutils/2.18.50.0.9/100-arm-uclibcgnueabi.patch
deleted file mode 100644
index b4504d4..0000000
--- a/patches/binutils/2.18.50.0.9/100-arm-uclibcgnueabi.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -durN binutils-2.18.50.0.8.orig/configure binutils-2.18.50.0.8/configure
---- binutils-2.18.50.0.8.orig/configure 2008-07-10 17:32:56.000000000 +0200
-+++ binutils-2.18.50.0.8/configure 2008-07-13 23:08:13.000000000 +0200
-@@ -2313,7 +2313,7 @@
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
- libgloss_dir=arm
- ;;
-- arm*-*-linux-gnueabi)
-+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
- noconfigdirs="$noconfigdirs target-qthreads"
- case ${with_newlib} in
- no) noconfigdirs="$noconfigdirs target-newlib target-libgloss"
-diff -durN binutils-2.18.50.0.8.orig/configure.ac binutils-2.18.50.0.8/configure.ac
---- binutils-2.18.50.0.8.orig/configure.ac 2008-07-10 17:32:56.000000000 +0200
-+++ binutils-2.18.50.0.8/configure.ac 2008-07-13 23:08:13.000000000 +0200
-@@ -562,7 +562,7 @@
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
- libgloss_dir=arm
- ;;
-- arm*-*-linux-gnueabi)
-+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
- noconfigdirs="$noconfigdirs target-qthreads"
- case ${with_newlib} in
- no) noconfigdirs="$noconfigdirs target-newlib target-libgloss"
diff --git a/patches/binutils/2.18.50.0.9/110-ld-makefile-path.patch b/patches/binutils/2.18.50.0.9/110-ld-makefile-path.patch
deleted file mode 100644
index 41a2249..0000000
--- a/patches/binutils/2.18.50.0.9/110-ld-makefile-path.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -durN binutils-2.18.50.0.8.orig/ld/Makefile.am binutils-2.18.50.0.8/ld/Makefile.am
---- binutils-2.18.50.0.8.orig/ld/Makefile.am 2008-04-03 18:54:05.000000000 +0200
-+++ binutils-2.18.50.0.8/ld/Makefile.am 2008-07-13 23:15:40.000000000 +0200
-@@ -18,7 +18,7 @@
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
-
- EMUL = @EMUL@
- EMULATION_OFILES = @EMULATION_OFILES@
-diff -durN binutils-2.18.50.0.8.orig/ld/Makefile.in binutils-2.18.50.0.8/ld/Makefile.in
---- binutils-2.18.50.0.8.orig/ld/Makefile.in 2008-07-10 17:32:58.000000000 +0200
-+++ binutils-2.18.50.0.8/ld/Makefile.in 2008-07-13 23:15:40.000000000 +0200
-@@ -290,7 +290,7 @@
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
- BASEDIR = $(srcdir)/..
- BFDDIR = $(BASEDIR)/bfd
- INCDIR = $(BASEDIR)/include
diff --git a/patches/binutils/2.18.50.0.9/120-check-ldrunpath-length.patch b/patches/binutils/2.18.50.0.9/120-check-ldrunpath-length.patch
deleted file mode 100644
index f2f096d..0000000
--- a/patches/binutils/2.18.50.0.9/120-check-ldrunpath-length.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -durN binutils-2.18.50.0.8.orig/ld/emultempl/elf32.em binutils-2.18.50.0.8/ld/emultempl/elf32.em
---- binutils-2.18.50.0.8.orig/ld/emultempl/elf32.em 2008-07-10 17:33:23.000000000 +0200
-+++ binutils-2.18.50.0.8/ld/emultempl/elf32.em 2008-07-13 23:19:29.000000000 +0200
-@@ -1220,6 +1220,8 @@
- && command_line.rpath == NULL)
- {
- lib_path = (const char *) getenv ("LD_RUN_PATH");
-+ if ((lib_path) && (strlen (lib_path) == 0))
-+ lib_path = NULL;
- if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
- force))
- break;
-@@ -1405,6 +1407,8 @@
- rpath = command_line.rpath;
- if (rpath == NULL)
- rpath = (const char *) getenv ("LD_RUN_PATH");
-+ if ((rpath) && (strlen (rpath) == 0))
-+ rpath = NULL;
- if (! (bfd_elf_size_dynamic_sections
- (link_info.output_bfd, command_line.soname, rpath,
- command_line.filter_shlib,
diff --git a/patches/binutils/2.18.50.0.9/130-i386-no-divide-comment.patch b/patches/binutils/2.18.50.0.9/130-i386-no-divide-comment.patch
deleted file mode 100644
index 196671d..0000000
--- a/patches/binutils/2.18.50.0.9/130-i386-no-divide-comment.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-diff -durN binutils-2.18.50.0.8.orig/gas/config/tc-i386.c binutils-2.18.50.0.8/gas/config/tc-i386.c
---- binutils-2.18.50.0.8.orig/gas/config/tc-i386.c 2008-07-10 17:32:58.000000000 +0200
-+++ binutils-2.18.50.0.8/gas/config/tc-i386.c 2008-09-22 09:12:39.000000000 +0200
-@@ -313,24 +313,10 @@
- #endif
- ;
-
--#if (defined (TE_I386AIX) \
-- || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \
-- && !defined (TE_GNU) \
-- && !defined (TE_LINUX) \
-- && !defined (TE_NETWARE) \
-- && !defined (TE_FreeBSD) \
-- && !defined (TE_NetBSD)))
- /* This array holds the chars that always start a comment. If the
-- pre-processor is disabled, these aren't very useful. The option
-- --divide will remove '/' from this list. */
--const char *i386_comment_chars = "#/";
--#define SVR4_COMMENT_CHARS 1
--#define PREFIX_SEPARATOR '\\'
--
--#else
-+ pre-processor is disabled, these aren't very useful. */
- const char *i386_comment_chars = "#";
- #define PREFIX_SEPARATOR '/'
--#endif
-
- /* This array holds the chars that only start a comment at the beginning of
- a line. If the line seems to have the form '# 123 filename'
-@@ -7952,20 +7938,6 @@
- break;
-
- case OPTION_DIVIDE:
--#ifdef SVR4_COMMENT_CHARS
-- {
-- char *n, *t;
-- const char *s;
--
-- n = (char *) xmalloc (strlen (i386_comment_chars) + 1);
-- t = n;
-- for (s = i386_comment_chars; *s != '\0'; s++)
-- if (*s != '/')
-- *t++ = *s;
-- *t = '\0';
-- i386_comment_chars = n;
-- }
--#endif
- break;
-
- case OPTION_MARCH:
-@@ -8116,13 +8088,8 @@
- fprintf (stream, _("\
- --32/--64 generate 32bit/64bit code\n"));
- #endif
--#ifdef SVR4_COMMENT_CHARS
-- fprintf (stream, _("\
-- --divide do not treat `/' as a comment character\n"));
--#else
- fprintf (stream, _("\
- --divide ignored\n"));
--#endif
- fprintf (stream, _("\
- -march=CPU[,+EXTENSION...]\n\
- generate code for CPU and EXTENSION, CPU is one of:\n\
diff --git a/patches/binutils/2.20/100-ppc64-pie.patch b/patches/binutils/2.20/100-ppc64-pie.patch
new file mode 100644
index 0000000..879ea91
--- /dev/null
+++ b/patches/binutils/2.20/100-ppc64-pie.patch
@@ -0,0 +1,16 @@
+--- bfd/elf64-ppc.c.jj 2004-09-27 16:46:06.000000000 -0400
++++ bfd/elf64-ppc.c 2004-10-04 09:09:50.000000000 -0400
+@@ -9681,7 +9681,12 @@ ppc64_elf_relocate_section (bfd *output_
+ else if (!SYMBOL_REFERENCES_LOCAL (info, &h->elf)
+ && !is_opd
+ && r_type != R_PPC64_TOC)
+- outrel.r_info = ELF64_R_INFO (h->elf.dynindx, r_type);
++ {
++ outrel.r_info = ELF64_R_INFO (h->elf.dynindx, r_type);
++ if (h->elf.dynindx == -1
++ && h->elf.root.type == bfd_link_hash_undefweak)
++ memset (&outrel, 0, sizeof outrel);
++ }
+ else
+ {
+ /* This symbol is local, or marked to become local,
diff --git a/patches/binutils/2.20/110-RPATH_ENVVAR-smack.patch b/patches/binutils/2.20/110-RPATH_ENVVAR-smack.patch
new file mode 100644
index 0000000..efa0ec9
--- /dev/null
+++ b/patches/binutils/2.20/110-RPATH_ENVVAR-smack.patch
@@ -0,0 +1,13 @@
+http://sourceware.org/ml/binutils/2007-07/msg00401.html
+http://sourceware.org/bugzilla/show_bug.cgi?id=4970
+
+--- configure
++++ configure
+@@ -5601,6 +5601,7 @@ case "${host}" in
+ *-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;;
+ *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
+ esac
++RPATH_ENVVAR="cant_touch_this_nah_nah_nah"
+
+ # On systems where the dynamic library environment variable is PATH,
+ if test "$RPATH_ENVVAR" = PATH; then
diff --git a/patches/binutils/2.20/120-sh-targets.patch b/patches/binutils/2.20/120-sh-targets.patch
new file mode 100644
index 0000000..4379ede
--- /dev/null
+++ b/patches/binutils/2.20/120-sh-targets.patch
@@ -0,0 +1,47 @@
+r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines
+
+Likewise, binutils has no idea about any of these new targets either, so we
+fix that up too.. now we're able to actually build a real toolchain for
+sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more
+inept targets than that one, really. Go look, I promise).
+
+--- binutils-2.16.90.0.2-dist/configure
++++ binutils-2.16.90.0.2/configure
+@@ -1207,7 +1207,7 @@
+ am33_2.0-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+- sh-*-linux*)
++ sh*-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+ sh*-*-pe|mips*-*-pe|*arm-wince-pe)
+@@ -1495,7 +1495,7 @@
+ romp-*-*)
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
+ ;;
+- sh-*-* | sh64-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${host}" in
+ i[3456789]86-*-vsta) ;; # don't add gprof back in
+ i[3456789]86-*-go32*) ;; # don't add gprof back in
+--- binutils-2.16.90.0.2-dist/configure.ac
++++ binutils-2.16.90.0.2/configure.ac
+@@ -424,7 +424,7 @@
+ am33_2.0-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+- sh-*-linux*)
++ sh*-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+ sh*-*-pe|mips*-*-pe|*arm-wince-pe)
+@@ -712,7 +712,7 @@
+ romp-*-*)
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
+ ;;
+- sh-*-* | sh64-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${host}" in
+ i[[3456789]]86-*-vsta) ;; # don't add gprof back in
+ i[[3456789]]86-*-go32*) ;; # don't add gprof back in
diff --git a/patches/binutils/2.20/130-ld-sysroot.patch b/patches/binutils/2.20/130-ld-sysroot.patch
new file mode 100644
index 0000000..ddf95b1
--- /dev/null
+++ b/patches/binutils/2.20/130-ld-sysroot.patch
@@ -0,0 +1,36 @@
+Signed-off-by: Sven Rebhan <odinshorse@googlemail.com>
+
+Always try to prepend the sysroot prefix to absolute filenames first.
+
+http://bugs.gentoo.org/275666
+http://sourceware.org/bugzilla/show_bug.cgi?id=10340
+
+--- ld/ldfile.c
++++ ld/ldfile.c
+@@ -308,18 +308,24 @@
+ directory first. */
+ if (! entry->is_archive)
+ {
+- if (entry->sysrooted && IS_ABSOLUTE_PATH (entry->filename))
++ /* For absolute pathnames, try to always open the file in the
++ sysroot first. If this fails, try to open the file at the
++ given location. */
++ entry->sysrooted = is_sysrooted_pathname(entry->filename, FALSE);
++ if (IS_ABSOLUTE_PATH (entry->filename) && ld_sysroot && ! entry->sysrooted)
+ {
+ char *name = concat (ld_sysroot, entry->filename,
+ (const char *) NULL);
+ if (ldfile_try_open_bfd (name, entry))
+ {
+ entry->filename = name;
++ entry->sysrooted = TRUE;
+ return TRUE;
+ }
+ free (name);
+ }
+- else if (ldfile_try_open_bfd (entry->filename, entry))
++
++ if (ldfile_try_open_bfd (entry->filename, entry))
+ {
+ entry->sysrooted = IS_ABSOLUTE_PATH (entry->filename)
+ && is_sysrooted_pathname (entry->filename, TRUE);
diff --git a/patches/binutils/2.20/140-check_ldrunpath_length.patch b/patches/binutils/2.20/140-check_ldrunpath_length.patch
new file mode 100644
index 0000000..498651a
--- /dev/null
+++ b/patches/binutils/2.20/140-check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/patches/binutils/2.20/150-pt-pax-flags-20090909.patch b/patches/binutils/2.20/150-pt-pax-flags-20090909.patch
new file mode 100644
index 0000000..f0a9905
--- /dev/null
+++ b/patches/binutils/2.20/150-pt-pax-flags-20090909.patch
@@ -0,0 +1,238 @@
+--- binutils-2.20/bfd/elf-bfd.h
++++ binutils-2.20/bfd/elf-bfd.h
+@@ -1527,6 +1527,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;
+
+--- binutils-2.20/bfd/elf.c
++++ binutils-2.20/bfd/elf.c
+@@ -1081,6 +1081,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;
+@@ -2379,6 +2380,9 @@ bfd_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int index)
+ 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);
+@@ -3393,6 +3397,11 @@ get_program_header_size (bfd *abfd, struct bfd_link_info *info)
+ ++segs;
+ }
+
++ {
++ /* We need a PT_PAX_FLAGS segment. */
++ ++segs;
++ }
++
+ for (s = abfd->sections; s != NULL; s = s->next)
+ {
+ if ((s->flags & SEC_LOAD) != 0
+@@ -3972,6 +3981,20 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
+ }
+ }
+
++ {
++ 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;
+ }
+@@ -5176,7 +5199,8 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
+ 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 do 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) \
+@@ -5184,6 +5208,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
+ && (section->flags & SEC_ALLOC) != 0) \
+ || IS_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 \
+--- binutils-2.20/bfd/elflink.c
++++ binutils-2.20/bfd/elflink.c
+@@ -5465,16 +5465,30 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
+ 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)
+@@ -5487,7 +5501,11 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
+ 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)
+--- binutils-2.20/binutils/readelf.c
++++ binutils-2.20/binutils/readelf.c
+@@ -2556,6 +2556,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))
+--- binutils-2.20/include/bfdlink.h
++++ binutils-2.20/include/bfdlink.h
+@@ -319,6 +319,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;
+
+--- binutils-2.20/include/elf/common.h
++++ binutils-2.20/include/elf/common.h
+@@ -422,6 +422,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. */
+
+@@ -432,6 +433,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 */
+--- binutils-2.20/ld/emultempl/elf32.em
++++ binutils-2.20/ld/emultempl/elf32.em
+@@ -2159,6 +2159,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
+@@ -2237,6 +2247,8 @@ fragment <<EOF
+ fprintf (file, _("\
+ -z execstack Mark executable as requiring executable stack\n"));
+ fprintf (file, _("\
++ -z execheap Mark executable as requiring executable heap\n"));
++ fprintf (file, _("\
+ -z initfirst Mark DSO to be initialized first at runtime\n"));
+ fprintf (file, _("\
+ -z interpose Mark object to interpose all DSOs but executable\n"));
+@@ -2260,6 +2272,8 @@ fragment <<EOF
+ -z nodump Mark DSO not available to dldump\n"));
+ fprintf (file, _("\
+ -z noexecstack Mark executable as not requiring executable stack\n"));
++ fprintf (file, _("\
++ -z noexecheap Mark executable as not requiring executable heap\n"));
+ EOF
+
+ if test -n "$COMMONPAGESIZE"; then
+--- binutils-2.20/ld/ldgram.y
++++ binutils-2.20/ld/ldgram.y
+@@ -1116,6 +1116,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.20/160-amd64-32bit-path.patch b/patches/binutils/2.20/160-amd64-32bit-path.patch
new file mode 100644
index 0000000..673338e
--- /dev/null
+++ b/patches/binutils/2.20/160-amd64-32bit-path.patch
@@ -0,0 +1,16 @@
+--- binutils/ld/emulparams/elf_i386.sh
++++ binutils/ld/emulparams/elf_i386.sh
+@@ -13,3 +13,13 @@
+ NO_SMALL_DATA=yes
+ SEPARATE_GOTPLT=12
+ IREL_IN_PLT=
++
++# In Gentoo, we install 32bit libs into /lib32 in an
++# ABI setup with amd64/x86
++case "$target" in
++ x86_64*-linux*)
++ case "$EMULATION_NAME" in
++ *i386*) LIBPATH_SUFFIX=32 ;;
++ esac
++ ;;
++esac
diff --git a/patches/binutils/2.20/170-warn-textrel.patch b/patches/binutils/2.20/170-warn-textrel.patch
new file mode 100644
index 0000000..d8560fe
--- /dev/null
+++ b/patches/binutils/2.20/170-warn-textrel.patch
@@ -0,0 +1,59 @@
+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
++++ bfd/elflink.c
+@@ -8652,14 +8652,12 @@
+ 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)
+@@ -8702,7 +8702,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;
+ }
+ }
+--- ld/ldmain.c
++++ ld/ldmain.c
+@@ -282,2 +282,3 @@ main (int argc, char **argv)
+ link_info.spare_dynamic_tags = 5;
++ link_info.warn_shared_textrel = TRUE;
+ link_info.sharable_sections = FALSE;
+--- ld/testsuite/lib/ld-lib.exp
++++ ld/testsuite/lib/ld-lib.exp
+@@ -181,6 +181,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.20/180-only-use-new-ld-dtags.patch.disabled b/patches/binutils/2.20/180-only-use-new-ld-dtags.patch.disabled
new file mode 100644
index 0000000..8989579
--- /dev/null
+++ b/patches/binutils/2.20/180-only-use-new-ld-dtags.patch.disabled
@@ -0,0 +1,25 @@
+Don't generate RPATH if we're going to be generating RUNPATH.
+
+need to ponder what ramifications this has before enabling it
+
+--- binutils/bfd/elflink.c
++++ binutils/bfd/elflink.c
+@@ -5382,11 +5382,15 @@
+
+ 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.20/190-use-new-ld-dtags.patch b/patches/binutils/2.20/190-use-new-ld-dtags.patch
new file mode 100644
index 0000000..84e20f7
--- /dev/null
+++ b/patches/binutils/2.20/190-use-new-ld-dtags.patch
@@ -0,0 +1,10 @@
+--- 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.20/200-document-new-dtags-behaviour.patch b/patches/binutils/2.20/200-document-new-dtags-behaviour.patch
new file mode 100644
index 0000000..0013a2d
--- /dev/null
+++ b/patches/binutils/2.20/200-document-new-dtags-behaviour.patch
@@ -0,0 +1,16 @@
+Index: binutils-2.19.51.0.5/ld/ld.texinfo
+===================================================================
+--- binutils-2.19.51.0.5.orig/ld/ld.texinfo
++++ binutils-2.19.51.0.5/ld/ld.texinfo
+@@ -2036,8 +2036,9 @@ This linker can create the new dynamic t
+ systems may not understand them. If you specify
+ @option{--enable-new-dtags}, the dynamic tags will be created as needed.
+ If you specify @option{--disable-new-dtags}, no new dynamic tags will be
+-created. By default, the new dynamic tags are not created. Note that
+-those options are only available for ELF systems.
++created. On Gentoo, by default, the new dynamic tags are created (this
++differs from upstream behaviour). Note that those options are only
++available for ELF systems.
+
+ @kindex --hash-size=@var{number}
+ @item --hash-size=@var{number}
diff --git a/patches/binutils/2.20/210-generate-gnu-hash.patch b/patches/binutils/2.20/210-generate-gnu-hash.patch
new file mode 100644
index 0000000..b427c89
--- /dev/null
+++ b/patches/binutils/2.20/210-generate-gnu-hash.patch
@@ -0,0 +1,8 @@
+--- binutils/ld/ldmain.c
++++ binutils/ld/ldmain.c
+@@ -273,2 +273,5 @@ main (int argc, char **argv)
+ link_info.emit_hash = TRUE;
++#ifndef __mips__
++ link_info.emit_gnu_hash = TRUE;
++#endif
+ link_info.callbacks = &link_callbacks;
diff --git a/patches/binutils/2.20/220-use-relro.patch b/patches/binutils/2.20/220-use-relro.patch
new file mode 100644
index 0000000..abd5187
--- /dev/null
+++ b/patches/binutils/2.20/220-use-relro.patch
@@ -0,0 +1,6 @@
+--- 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.20/230-libiberty-pic.patch b/patches/binutils/2.20/230-libiberty-pic.patch
new file mode 100644
index 0000000..214c44b
--- /dev/null
+++ b/patches/binutils/2.20/230-libiberty-pic.patch
@@ -0,0 +1,10 @@
+--- libiberty/Makefile.in.mps 2004-05-13 15:53:17.000000000 +0200
++++ libiberty/Makefile.in 2004-05-13 15:52:53.000000000 +0200
+@@ -224,6 +224,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA
+ $(AR) $(AR_FLAGS) $(TARGETLIB) \
+ $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
+ $(RANLIB) $(TARGETLIB); \
++ cp $(TARGETLIB) ../ ; \
+ cd ..; \
+ else true; fi
+