Skip to content

Commit

Permalink
binutils: Add binutils-2.25
Browse files Browse the repository at this point in the history
This also updates the patches from 2.24.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
  • Loading branch information
bhundven committed Jan 2, 2015
1 parent 11ae339 commit b49e233
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/binutils/binutils.in
Expand Up @@ -8,6 +8,11 @@ choice
# Don't remove next line
# CT_INSERT_VERSION_BELOW

config BINUTILS_V_2_25
bool
prompt "2.25"
select BINUTILS_2_25_or_later

config BINUTILS_V_2_24
bool
prompt "2.24"
Expand Down Expand Up @@ -77,6 +82,7 @@ config BINUTILS_VERSION
string
# Don't remove next line
# CT_INSERT_VERSION_STRING_BELOW
default "2.25" if BINUTILS_V_2_25
default "2.24" if BINUTILS_V_2_24
default "2.23.2" if BINUTILS_V_2_23_2
default "2.23.1" if BINUTILS_V_2_23_1
Expand All @@ -88,6 +94,10 @@ config BINUTILS_VERSION
default "2.18a" if BINUTILS_V_2_18a
default "custom" if BINUTILS_CUSTOM

config BINUTILS_2_25_or_later
bool
select BINUTILS_2_24_or_later

config BINUTILS_2_24_or_later
bool
select BINUTILS_2_23_or_later
Expand Down
33 changes: 33 additions & 0 deletions patches/binutils/2.25/120-sh-conf.patch
@@ -0,0 +1,33 @@
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).

diff --git a/configure b/configure
index 87677bc..2d916f1 100755
--- a/configure
+++ b/configure
@@ -3812,7 +3812,7 @@ case "${target}" in
or1k*-*-*)
noconfigdirs="$noconfigdirs gdb"
;;
- sh-*-* | sh64-*-*)
+ sh*-*-* | sh64-*-*)
case "${target}" in
sh*-*-elf)
;;
diff --git a/configure.ac b/configure.ac
index 8fe0eca..b10a99f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1140,7 +1140,7 @@ case "${target}" in
or1k*-*-*)
noconfigdirs="$noconfigdirs gdb"
;;
- sh-*-* | sh64-*-*)
+ sh*-*-* | sh64-*-*)
case "${target}" in
sh*-*-elf)
;;
26 changes: 26 additions & 0 deletions patches/binutils/2.25/300-001_ld_makefile_patch.patch
@@ -0,0 +1,26 @@
diff --git a/ld/Makefile.am b/ld/Makefile.am
index 9575f1f..84df0bf 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -54,7 +54,7 @@ endif
# 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 --git a/ld/Makefile.in b/ld/Makefile.in
index 9f56ca1..272860f 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -388,7 +388,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
# 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
22 changes: 22 additions & 0 deletions patches/binutils/2.25/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,22 @@
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 137446f..bb8391a 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1195,6 +1195,8 @@ fragment <<EOF
&& command_line.rpath == NULL)
{
lib_path = (const char *) getenv ("LD_RUN_PATH");
+ if ((lib_path) && (strlen (lib_path) == 0))
+ lib_path = NULL;
if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
force))
break;
@@ -1458,6 +1460,8 @@ gld${EMULATION_NAME}_before_allocation (void)
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
+ if ((rpath) && (strlen (rpath) == 0))
+ rpath = NULL;

for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)

0 comments on commit b49e233

Please sign in to comment.