patches/binutils: Update patches from 2.22 to 2.24
authorBryan Hundven <bryanhundven@gmail.com>
Fri Feb 21 23:53:40 2014 -0800 (2014-02-21)
changeset 330366028c54b89d
parent 3302 ea7e988e6244
child 3304 cdfeee4fbcfe
patches/binutils: Update patches from 2.22 to 2.24

This updates the patches in 2.22 to 2.24.
Some removed as they were applied upstream.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
Message-Id: <9fb77800ae1d5f14cbf5.1393055637@Bryans-MacBook-Pro.local>
Patchwork-Id: 323130
patches/binutils/2.24/120-sh-conf.patch
patches/binutils/2.24/300-001_ld_makefile_patch.patch
patches/binutils/2.24/300-012_check_ldrunpath_length.patch
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/binutils/2.24/120-sh-conf.patch	Fri Feb 21 23:53:40 2014 -0800
     1.3 @@ -0,0 +1,31 @@
     1.4 +r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines
     1.5 +
     1.6 +Likewise, binutils has no idea about any of these new targets either, so we 
     1.7 +fix that up too.. now we're able to actually build a real toolchain for 
     1.8 +sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more 
     1.9 +inept targets than that one, really. Go look, I promise).
    1.10 +
    1.11 +diff -durN binutils-2.22.orig/configure binutils-2.22/configure
    1.12 +--- binutils-2.22.orig/configure	2011-08-14 14:28:15.000000000 +0200
    1.13 ++++ binutils-2.22/configure	2011-12-14 19:49:40.284777434 +0100
    1.14 +@@ -3570,7 +3570,7 @@
    1.15 +   mips*-*-*)
    1.16 +     noconfigdirs="$noconfigdirs gprof"
    1.17 +     ;;
    1.18 +-  sh-*-* | sh64-*-*)
    1.19 ++  sh*-*-* | sh64-*-*)
    1.20 +     case "${target}" in
    1.21 +       sh*-*-elf)
    1.22 +          ;;
    1.23 +diff -durN binutils-2.22.orig/configure.ac binutils-2.22/configure.ac
    1.24 +--- binutils-2.22.orig/configure.ac	2011-11-21 12:58:27.000000000 +0100
    1.25 ++++ binutils-2.22/configure.ac	2011-12-14 19:49:40.316777436 +0100
    1.26 +@@ -1006,7 +1006,7 @@
    1.27 +   mips*-*-*)
    1.28 +     noconfigdirs="$noconfigdirs gprof"
    1.29 +     ;;
    1.30 +-  sh-*-* | sh64-*-*)
    1.31 ++  sh*-*-* | sh64-*-*)
    1.32 +     case "${target}" in
    1.33 +       sh*-*-elf)
    1.34 +          ;;
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/patches/binutils/2.24/300-001_ld_makefile_patch.patch	Fri Feb 21 23:53:40 2014 -0800
     2.3 @@ -0,0 +1,24 @@
     2.4 +diff -durN binutils-2.22.orig/ld/Makefile.am binutils-2.22/ld/Makefile.am
     2.5 +--- binutils-2.22.orig/ld/Makefile.am	2011-07-22 22:22:37.000000000 +0200
     2.6 ++++ binutils-2.22/ld/Makefile.am	2011-12-14 19:50:25.760779164 +0100
     2.7 +@@ -37,7 +37,7 @@
     2.8 + # We put the scripts in the directory $(scriptdir)/ldscripts.
     2.9 + # We can't put the scripts in $(datadir) because the SEARCH_DIR
    2.10 + # directives need to be different for native and cross linkers.
    2.11 +-scriptdir = $(tooldir)/lib
    2.12 ++scriptdir = $(libdir)
    2.13 + 
    2.14 + EMUL = @EMUL@
    2.15 + EMULATION_OFILES = @EMULATION_OFILES@
    2.16 +diff -durN binutils-2.22.orig/ld/Makefile.in binutils-2.22/ld/Makefile.in
    2.17 +--- binutils-2.22.orig/ld/Makefile.in	2011-07-22 22:22:37.000000000 +0200
    2.18 ++++ binutils-2.22/ld/Makefile.in	2011-12-14 19:50:25.784779163 +0100
    2.19 +@@ -366,7 +366,7 @@
    2.20 + # We put the scripts in the directory $(scriptdir)/ldscripts.
    2.21 + # We can't put the scripts in $(datadir) because the SEARCH_DIR
    2.22 + # directives need to be different for native and cross linkers.
    2.23 +-scriptdir = $(tooldir)/lib
    2.24 ++scriptdir = $(libdir)
    2.25 + BASEDIR = $(srcdir)/..
    2.26 + BFDDIR = $(BASEDIR)/bfd
    2.27 + INCDIR = $(BASEDIR)/include
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/patches/binutils/2.24/300-012_check_ldrunpath_length.patch	Fri Feb 21 23:53:40 2014 -0800
     3.3 @@ -0,0 +1,21 @@
     3.4 +diff -durN binutils-2.22.orig/ld/emultempl/elf32.em binutils-2.22/ld/emultempl/elf32.em
     3.5 +--- binutils-2.22.orig/ld/emultempl/elf32.em	2011-11-21 10:29:39.000000000 +0100
     3.6 ++++ binutils-2.22/ld/emultempl/elf32.em	2011-12-14 19:52:12.880783238 +0100
     3.7 +@@ -1273,6 +1273,8 @@
     3.8 + 	      && command_line.rpath == NULL)
     3.9 + 	    {
    3.10 + 	      lib_path = (const char *) getenv ("LD_RUN_PATH");
    3.11 ++	      if ((lib_path) && (strlen (lib_path) == 0))
    3.12 ++	      	lib_path = NULL;
    3.13 + 	      if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
    3.14 + 						      force))
    3.15 + 		break;
    3.16 +@@ -1500,6 +1502,8 @@
    3.17 +   rpath = command_line.rpath;
    3.18 +   if (rpath == NULL)
    3.19 +     rpath = (const char *) getenv ("LD_RUN_PATH");
    3.20 ++  if ((rpath) && (strlen (rpath) == 0))
    3.21 ++  	rpath = NULL;
    3.22 + 
    3.23 +   for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
    3.24 +     if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)