Skip to contentSkip to conversation

package/binutils: add support for binutils 2.30

PATCH Superseded Romain Naour 2 participants 4 messages Jan 29, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 package/binutils: add support for binutils 2.30

All patches from binutils 2.29 are kept and slightly adapted to differences that appeared in binutils 2.30.

---
 package/binutils/2.30/0001-sh-conf.patch           |  48 ++++
 package/binutils/2.30/0002-ld-makefile.patch       |  41 +++
 .../2.30/0003-check-ldrunpath-length.patch         |  36 +++
 .../2.30/0004-add-sysroot-fix-from-bug-3049.patch  |  51 ++++
 .../2.30/0005-poison-system-directories.patch      | 306 +++++++++++++++++++++
 ...LINKER-BUG-.rofixup-section-size-mismatch.patch |  31 +++
 package/binutils/Config.in.host                    |   4 +
 package/binutils/binutils.hash                     |   1 +
 package/binutils/binutils.mk                       |   2 +
 9 files changed, 520 insertions(+)
 create mode 100644 package/binutils/2.30/0001-sh-conf.patch
 create mode 100644 package/binutils/2.30/0002-ld-makefile.patch
 create mode 100644 package/binutils/2.30/0003-check-ldrunpath-length.patch
 create mode 100644 package/binutils/2.30/0004-add-sysroot-fix-from-bug-3049.patch
 create mode 100644 package/binutils/2.30/0005-poison-system-directories.patch
 create mode 100644 package/binutils/2.30/0006-Fixes-LINKER-BUG-.rofixup-section-size-mismatch.patch
package/binutils/2.30/0001-sh-conf.patch new file +48 -0
new file mode 100644
index 0000000000..80cf35b118
@@ -0,0 +1,48 @@
+From b30ec72417164a2e990bc986eb0da05b7ef054fa Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+Date: Fri, 25 Dec 2015 11:38:13 +0100
+Subject: [PATCH] sh-conf
+
+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).
+
+[Romain: rebase on top of 2.26]
+Signed-off-by: Romain Naour <[email protected]>
+[Thomas: rebase on top of 2.29, in which sh64 support was removed.]
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ configure    | 2 +-
+ configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index 2d615a9996..18d74ab96e 100755
+--- a/configure
++++ b/configure
+@@ -3835,7 +3835,7 @@ case "${target}" in
+   nvptx*-*-*)
+     noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
+     ;;
+-  sh-*-*)
++  sh*-*-*)
+     case "${target}" in
+       sh*-*-elf)
+          ;;
+diff --git a/configure.ac b/configure.ac
+index aae94501e4..b530e54926 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1166,7 +1166,7 @@ case "${target}" in
+   nvptx*-*-*)
+     noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
+     ;;
+-  sh-*-*)
++  sh*-*-*)
+     case "${target}" in
+       sh*-*-elf)
+          ;;
+-- 
+2.14.3
+
package/binutils/2.30/0002-ld-makefile.patch new file +41 -0

41 lines not on this page · raw message

package/binutils/2.30/0003-check-ldrunpath-length.patch new file +36 -0
new file mode 100644
index 0000000000..7af98749da
@@ -0,0 +1,36 @@
+From c18554e56d2534cbb37d2d065d3782ce4ef2533c Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+Date: Fri, 25 Dec 2015 11:41:47 +0100
+Subject: [PATCH] check-ldrunpath-length
+
+[Romain: rebase on top of 2.26]
+Signed-off-by: Romain Naour <[email protected]>
+---
+ ld/emultempl/elf32.em | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
+index c0925fc9b9..0ce16d73a5 100644
+--- a/ld/emultempl/elf32.em
++++ b/ld/emultempl/elf32.em
+@@ -1470,6 +1470,8 @@ fragment <<EOF
+ 	      && command_line.rpath == NULL)
+ 	    {
+ 	      path = (const char *) getenv ("LD_RUN_PATH");
++	      if ((path) && (strlen (path) == 0))
++	        path = NULL;
+ 	      if (path
+ 		  && gld${EMULATION_NAME}_search_needed (path, &n, force))
+ 		break;
+@@ -1750,6 +1752,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)
+-- 
+2.14.3
+
package/binutils/2.30/0004-add-sysroot-fix-from-bug-3049.patch new file +51 -0

51 lines not on this page · raw message

package/binutils/2.30/0005-poison-system-directories.patch new file +306 -0

306 lines not on this page · raw message

package/binutils/2.30/0006-Fixes-LINKER-BUG-.rofixup-section-size-mismatch.patch new file +31 -0
new file mode 100644
index 0000000000..0ce2cf2288
@@ -0,0 +1,31 @@
+From c3bd478ac1b7e83765230505eb08a0acf2fe3867 Mon Sep 17 00:00:00 2001
+From: Waldemar Brodkorb <[email protected]>
+Date: Sat, 29 Jul 2017 14:08:20 +0200
+Subject: [PATCH] Fixes: LINKER BUG: .rofixup section size mismatch
+
+Workaround from adi-toolchain commit:
+af414ec1fb628ddb1562f062f3db49823ca14ca2
+[#6798] binutils-2.21/bfd: temp workaround for rofixup mismatch errors.
+
+Signed-off-by: Waldemar Brodkorb <[email protected]>
+---
+ bfd/elf32-bfin.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
+index 478b8d4731..a38519b585 100644
+--- a/bfd/elf32-bfin.c
++++ b/bfd/elf32-bfin.c
+@@ -4655,7 +4655,8 @@ bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info,
+ 
+ 	case R_BFIN_FUNCDESC:
+ 	  picrel->fd++;
+-	  picrel->relocsfd++;
++	  if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
++	    picrel->relocsfd++;
+ 	  break;
+ 
+ 	/* This relocation describes the C++ object vtable hierarchy.
+-- 
+2.14.3
+
package/binutils/Config.in.host +4 -0
index 4a2992a79b..1ab3257f46 100644
@@ -20,6 +20,9 @@ config BR2_BINUTILS_VERSION_2_28_X
 config BR2_BINUTILS_VERSION_2_29_X
 	bool "binutils 2.29.1"
 
+config BR2_BINUTILS_VERSION_2_30_X
+	bool "binutils 2.30"
+
 config BR2_BINUTILS_VERSION_ARC
 	bool "binutils arc (2.29)"
 	depends on BR2_arc
@@ -31,6 +34,7 @@ config BR2_BINUTILS_VERSION
 	default "2.27"		if BR2_BINUTILS_VERSION_2_27_X
 	default "2.28.1"	if BR2_BINUTILS_VERSION_2_28_X
 	default "2.29.1"	if BR2_BINUTILS_VERSION_2_29_X
+	default "2.30"		if BR2_BINUTILS_VERSION_2_30_X
 
 config BR2_BINUTILS_ENABLE_LTO
 	bool
package/binutils/binutils.hash +1 -0
index a7d4cdd453..d2ffffe9de 100644
@@ -2,6 +2,7 @@
 sha512	cf276f84935312361a2ca077e04d0b469d23a3aed979d8ba5d92ea590904ffb2c2e7ed12cc842822bfc402836be86f479660cef3791aa62f3753d8a1a6f564cb  binutils-2.27.tar.bz2
 sha512	dc5b6872ae01c07c12d38f3bb7ead06effc6da3265ac872e2d9c6104304f89f85f2645b029a43f308a7938a7299b1928d385205d0a2245674a621649032a138d  binutils-2.28.1.tar.xz
 sha512  d748d22306477d60d921078804d21943248c23fca0707aac9b016a352c01c75ca69e82624ae37fb0bbd03af3b17088a94f60dfe1a86a7ff82e18ece3c24f0fd0  binutils-2.29.1.tar.xz
+sha512  e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839  binutils-2.30.tar.xz
 
 # Locally calculated (fetched from Github)
 sha512  cefff7521dc4ebd8b9773af4f173821ad82dcb3f1fbd0bfdf03e148ba8cec1262b876b221da628ff5db16c30b18c6cbf5ffbec0fddb4677182524684c4c232c1  binutils-arc-2017.09-release.tar.gz
package/binutils/binutils.mk +2 -0
index 473fcac181..e12fb86c93 100644
@@ -25,6 +25,8 @@ ifeq ($(BINUTILS_VERSION),2.28.1)
 BINUTILS_SOURCE ?= binutils-$(BINUTILS_VERSION).tar.xz
 else ifeq ($(BINUTILS_VERSION),2.29.1)
 BINUTILS_SOURCE ?= binutils-$(BINUTILS_VERSION).tar.xz
+else ifeq ($(BINUTILS_VERSION),2.30)
+BINUTILS_SOURCE ?= binutils-$(BINUTILS_VERSION).tar.xz
 else
 BINUTILS_SOURCE ?= binutils-$(BINUTILS_VERSION).tar.bz2
 endif
Signature · 1 line
2.14.3
#1 lore raw

PATCH 2/3 package/binutils: switch to use 2.29.x as the default version

Now that binutils 2.30 has been released, it is time to move to binutils 2.29.x as the default binutils version, instead of 2.28.1.

---
 package/binutils/Config.in.host | 2 +-
 package/binutils/binutils.mk    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/binutils/Config.in.host +1 -1
index 1ab3257f46..fd8a7fa981 100644
@@ -2,7 +2,7 @@ comment "Binutils Options"
 
 choice
 	prompt "Binutils Version"
-	default BR2_BINUTILS_VERSION_2_28_X if !BR2_arc
+	default BR2_BINUTILS_VERSION_2_29_X if !BR2_arc
 	default BR2_BINUTILS_VERSION_ARC if BR2_arc
 	help
 	  Select the version of binutils you wish to use.
package/binutils/binutils.mk +1 -1
index e12fb86c93..0f7ff0048a 100644
@@ -11,7 +11,7 @@ ifeq ($(BINUTILS_VERSION),)
 ifeq ($(BR2_arc),y)
 BINUTILS_VERSION = arc-2017.09-release
 else
-BINUTILS_VERSION = 2.28.1
+BINUTILS_VERSION = 2.29.1
 endif
 endif # BINUTILS_VERSION
 
Signature · 1 line
2.14.3
#2 lore raw

PATCH 3/3 package/binutils: remove support for 2.27

In reply to Romain Naour

Now that binutils 2.30 has been introduced, and we have moved to 2.29.1 as the default version, it is time to drop support for binutils 2.27.

Also use xz-compressed tarball for all official supported version.

---
 package/binutils/Config.in.host | 7 -------
 package/binutils/binutils.hash  | 1 -
 package/binutils/binutils.mk    | 8 --------
 3 files changed, 16 deletions(-)
package/binutils/Config.in.host +0 -7
index fd8a7fa981..d4ed1e3183 100644
@@ -7,12 +7,6 @@ choice
 	help
 	  Select the version of binutils you wish to use.
 
-config BR2_BINUTILS_VERSION_2_27_X
-	bool "binutils 2.27"
-	# binutils 2.27 triggers a bug in elf2flt on ARM/noMMU
-	depends on !(BR2_arm && !BR2_USE_MMU)
-	depends on !BR2_arc
-
 config BR2_BINUTILS_VERSION_2_28_X
 	bool "binutils 2.28.1"
 	depends on !BR2_arc
@@ -31,7 +25,6 @@ endchoice
 config BR2_BINUTILS_VERSION
 	string
 	default "arc-2017.09-release"	if BR2_BINUTILS_VERSION_ARC
-	default "2.27"		if BR2_BINUTILS_VERSION_2_27_X
 	default "2.28.1"	if BR2_BINUTILS_VERSION_2_28_X
 	default "2.29.1"	if BR2_BINUTILS_VERSION_2_29_X
 	default "2.30"		if BR2_BINUTILS_VERSION_2_30_X
package/binutils/binutils.hash +0 -1
index d2ffffe9de..4578a7f56a 100644
@@ -1,5 +1,4 @@
 # From ftp://gcc.gnu.org/pub/binutils/releases/sha512.sum
-sha512	cf276f84935312361a2ca077e04d0b469d23a3aed979d8ba5d92ea590904ffb2c2e7ed12cc842822bfc402836be86f479660cef3791aa62f3753d8a1a6f564cb  binutils-2.27.tar.bz2
 sha512	dc5b6872ae01c07c12d38f3bb7ead06effc6da3265ac872e2d9c6104304f89f85f2645b029a43f308a7938a7299b1928d385205d0a2245674a621649032a138d  binutils-2.28.1.tar.xz
 sha512  d748d22306477d60d921078804d21943248c23fca0707aac9b016a352c01c75ca69e82624ae37fb0bbd03af3b17088a94f60dfe1a86a7ff82e18ece3c24f0fd0  binutils-2.29.1.tar.xz
 sha512  e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839  binutils-2.30.tar.xz
package/binutils/binutils.mk +0 -8
index 0f7ff0048a..1bd01ecefc 100644
@@ -21,15 +21,7 @@ BINUTILS_SOURCE = binutils-$(BINUTILS_VERSION).tar.gz
 BINUTILS_FROM_GIT = y
 endif
 BINUTILS_SITE ?= $(BR2_GNU_MIRROR)/binutils
-ifeq ($(BINUTILS_VERSION),2.28.1)
 BINUTILS_SOURCE ?= binutils-$(BINUTILS_VERSION).tar.xz
-else ifeq ($(BINUTILS_VERSION),2.29.1)
-BINUTILS_SOURCE ?= binutils-$(BINUTILS_VERSION).tar.xz
-else ifeq ($(BINUTILS_VERSION),2.30)
-BINUTILS_SOURCE ?= binutils-$(BINUTILS_VERSION).tar.xz
-else
-BINUTILS_SOURCE ?= binutils-$(BINUTILS_VERSION).tar.bz2
-endif
 BINUTILS_EXTRA_CONFIG_OPTIONS = $(call qstrip,$(BR2_BINUTILS_EXTRA_CONFIG_OPTIONS))
 BINUTILS_INSTALL_STAGING = YES
 BINUTILS_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
Signature · 1 line
2.14.3
#3 lore raw

PATCH 3/3 package/binutils: remove support for 2.27

Hello,

Quoted 4 lines · Romain Naour

Now that binutils 2.30 has been introduced, and we have moved to 2.29.1 as the default version, it is time to drop support for binutils 2.27.

Quoted 8 lines

Also use xz-compressed tarball for all official supported version.

---
 package/binutils/Config.in.host | 7 -------
 package/binutils/binutils.hash  | 1 -
 package/binutils/binutils.mk    | 8 --------
 3 files changed, 16 deletions(-)

Config.in.legacy handling is missing here.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com