Skip to contentSkip to conversation

package/binutils: switch to use 2.31.x as the default version

PATCH New Romain Naour 2 participants 6 messages Mar 12, 2019 – Mar 14, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 package/binutils: switch to use 2.31.x as the default version

Now that binutils 2.32 has been released, it is time to move to binutils 2.31.x as the default binutils version, instead of 2.29.1.

Cc Thomas Petazzoni <[email protected]>
---
 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 9a2b27c55e..8485568170 100644
@@ -10,7 +10,7 @@ choice
 	prompt "Binutils Version"
 	default BR2_BINUTILS_VERSION_2_28_X if BR2_ARM_INSTRUCTIONS_THUMB
 	default BR2_BINUTILS_VERSION_2_28_X if BR2_ARM_INSTRUCTIONS_THUMB2
-	default BR2_BINUTILS_VERSION_2_29_X if !BR2_arc
+	default BR2_BINUTILS_VERSION_2_31_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 4531b8d9c8..6798356ff2 100644
@@ -11,7 +11,7 @@ ifeq ($(BINUTILS_VERSION),)
 ifeq ($(BR2_arc),y)
 BINUTILS_VERSION = arc-2018.09-release
 else
-BINUTILS_VERSION = 2.29.1
+BINUTILS_VERSION = 2.31.1
 endif
 endif # BINUTILS_VERSION
 
Signature · 1 line
2.14.5
#1 lore raw

PATCH 2/5 linux: update the comment about thumb issue with Binutils 2.29 and 2.30

---
 linux/Config.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
linux/Config.in +3 -2
index f17334ae7c..856b53eec0 100644
@@ -8,9 +8,10 @@ config BR2_LINUX_KERNEL
 
 if BR2_LINUX_KERNEL
 
-comment "Linux kernel in thumb mode may be broken with binutils >= 2.29"
+# https://sourceware.org/bugzilla/show_bug.cgi?id=21458
+comment "Linux kernel in thumb mode may be broken with binutils 2.29 and 2.30"
 	depends on BR2_arm || BR2_armeb
-	depends on !BR2_BINUTILS_VERSION_2_28_X
+	depends on BR2_BINUTILS_VERSION_2_29_X || BR2_BINUTILS_VERSION_2_30_X
 
 # Packages that need to have a kernel with support for loadable modules,
 # but do not use the kernel-modules infrastructure, should select that
Signature · 1 line
2.14.5
#2 lore raw

PATCH 3/5 package/binutils: use the default binutils version (2.31) for ARM with thumb mode enabled.

In reply to Romain Naour

Binutils 2.29 and 2.30 are affected by a bug in ADR and ADRL pseudo-instruction [1] that was fixed in Binutils 2.31 [2].

* The ADR and ADRL pseudo-instructions supported by the ARM assembler now only set the bottom bit of the address of thumb function symbols if the -mthumb-interwork command line option is active.

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=21458
[2] https://sourceware.org/ml/binutils/2018-07/msg00213.html

---
 package/binutils/Config.in.host | 2 --
 1 file changed, 2 deletions(-)
package/binutils/Config.in.host +0 -2
index 8485568170..ec1e0d8dd7 100644
@@ -8,8 +8,6 @@ config BR2_PACKAGE_HOST_BINUTILS_SUPPORTS_CFI
 
 choice
 	prompt "Binutils Version"
-	default BR2_BINUTILS_VERSION_2_28_X if BR2_ARM_INSTRUCTIONS_THUMB
-	default BR2_BINUTILS_VERSION_2_28_X if BR2_ARM_INSTRUCTIONS_THUMB2
 	default BR2_BINUTILS_VERSION_2_31_X if !BR2_arc
 	default BR2_BINUTILS_VERSION_ARC if BR2_arc
 	help
Signature · 1 line
2.14.5
#3 lore raw

PATCH 4/5 package/binutils: remove version 2.28

In reply to Romain Naour
---
 Config.in.legacy                                   |   8 +
 package/binutils/2.28.1/0120-sh-conf.patch         |  46 ----
 ...a-fix-memory-corruption-by-broken-sysregs.patch |  42 ---
 package/binutils/2.28.1/0300-ld-makefile.patch     |  41 ---
 .../2.28.1/0301-check-ldrunpath-length.patch       |  36 ---
 .../0500-add-sysroot-fix-from-bug-3049.patch       |  48 ----
 .../2.28.1/0600-poison-system-directories.patch    | 306 ---------------------
 .../binutils/2.28.1/0906-microblaze-pr21180.patch  |  33 ---
 package/binutils/Config.in.host                    |   6 -
 package/binutils/binutils.hash                     |   1 -
 10 files changed, 8 insertions(+), 559 deletions(-)
 delete mode 100644 package/binutils/2.28.1/0120-sh-conf.patch
 delete mode 100644 package/binutils/2.28.1/0131-xtensa-fix-memory-corruption-by-broken-sysregs.patch
 delete mode 100644 package/binutils/2.28.1/0300-ld-makefile.patch
 delete mode 100644 package/binutils/2.28.1/0301-check-ldrunpath-length.patch
 delete mode 100644 package/binutils/2.28.1/0500-add-sysroot-fix-from-bug-3049.patch
 delete mode 100644 package/binutils/2.28.1/0600-poison-system-directories.patch
 delete mode 100644 package/binutils/2.28.1/0906-microblaze-pr21180.patch
Config.in.legacy +8 -0
index 93e50f3f60..089fc9539a 100644
@@ -146,6 +146,14 @@ endif
 
 comment "Legacy options removed in 2019.05"
 
+config BR2_BINUTILS_VERSION_2_28_X
+	bool "binutils version 2.28 support removed"
+	select BR2_LEGACY
+	help
+	  Support for binutils version 2.28 has been removed. The
+	  current default version (2.31 or later) has been selected
+	  instead.
+
 config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_APEXSINK
 	bool "gst-plugins-bad apexsink option removed"
 	select BR2_LEGACY
package/binutils/2.28.1/0120-sh-conf.patch deleted +0 -46

46 lines not on this page · raw message

package/binutils/2.28.1/0131-xtensa-fix-memory-corruption-by-broken-sysregs.patch deleted +0 -42

42 lines not on this page · raw message

package/binutils/2.28.1/0300-ld-makefile.patch deleted +0 -41

41 lines not on this page · raw message

package/binutils/2.28.1/0301-check-ldrunpath-length.patch deleted +0 -36
deleted file mode 100644
index 8d673dcfc5..0000000000
@@ -1,36 +0,0 @@
-From ebe1cba46df52d7bf86def3d681271fd05fb453b 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 0405d4f..efd3300 100644
---- a/ld/emultempl/elf32.em
-+++ b/ld/emultempl/elf32.em
-@@ -1411,6 +1411,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;
-@@ -1692,6 +1694,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.4.3
-
package/binutils/2.28.1/0500-add-sysroot-fix-from-bug-3049.patch deleted +0 -48

48 lines not on this page · raw message

package/binutils/2.28.1/0600-poison-system-directories.patch deleted +0 -306

306 lines not on this page · raw message

package/binutils/2.28.1/0906-microblaze-pr21180.patch deleted +0 -33
deleted file mode 100644
index 52ac4fdd13..0000000000
@@ -1,33 +0,0 @@
-Fix ld segfault for microblaze when --gc-sections is used
-Upstream: pending
-https://sourceware.org/bugzilla/show_bug.cgi?id=21180
-
-Signed-off-by: Waldemar Brodkorb <[email protected]>
-
-diff -Nur a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
---- a/bfd/elf32-microblaze.c	2016-08-03 09:36:50.000000000 +0200
-+++ b/bfd/elf32-microblaze.c	2017-02-23 19:43:12.612313590 +0100
-@@ -3233,13 +3233,20 @@
- 	      || h->dynindx == -1))
-         {
-           asection *sec = h->root.u.def.section;
-+	  bfd_vma value;
-+
-+	  value = h->root.u.def.value;
-+	  if (sec->output_section != NULL)
-+	    /* PR 21180: If the output section is NULL, then the symbol is no
-+	       longer needed, and in theory the GOT entry is redundant.  But
-+	       it is too late to change our minds now...  */
-+	    value += sec->output_section->vma + sec->output_offset;
-+
-           microblaze_elf_output_dynamic_relocation (output_bfd,
-                                                     srela, srela->reloc_count++,
-                                                     /* symindex= */ 0,
-                                                     R_MICROBLAZE_REL, offset,
--                                                    h->root.u.def.value
--                                                    + sec->output_section->vma
--                                                    + sec->output_offset);
-+                                                    value);
-         }
-       else
-         {
package/binutils/Config.in.host +0 -6
index ec1e0d8dd7..9fb8857c3c 100644
@@ -13,11 +13,6 @@ choice
 	help
 	  Select the version of binutils you wish to use.
 
-config BR2_BINUTILS_VERSION_2_28_X
-	bool "binutils 2.28.1"
-	depends on !BR2_arc
-	depends on !BR2_riscv
-
 config BR2_BINUTILS_VERSION_2_29_X
 	bool "binutils 2.29.1"
 	depends on !BR2_riscv
@@ -39,7 +34,6 @@ endchoice
 config BR2_BINUTILS_VERSION
 	string
 	default "arc-2018.09-release"	if BR2_BINUTILS_VERSION_ARC
-	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
 	default "2.31.1"	if BR2_BINUTILS_VERSION_2_31_X
package/binutils/binutils.hash +0 -1
index 873e0dada4..756fa9bd89 100644
@@ -1,5 +1,4 @@
 # From ftp://gcc.gnu.org/pub/binutils/releases/sha512.sum
-sha512	dc5b6872ae01c07c12d38f3bb7ead06effc6da3265ac872e2d9c6104304f89f85f2645b029a43f308a7938a7299b1928d385205d0a2245674a621649032a138d  binutils-2.28.1.tar.xz
 sha512  d748d22306477d60d921078804d21943248c23fca0707aac9b016a352c01c75ca69e82624ae37fb0bbd03af3b17088a94f60dfe1a86a7ff82e18ece3c24f0fd0  binutils-2.29.1.tar.xz
 sha512  e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839  binutils-2.30.tar.xz
 sha512  0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30  binutils-2.31.1.tar.xz
Signature · 1 line
2.14.5
#4 lore raw

PATCH 5/5 package/binutils: remove version 2.29

In reply to Romain Naour

We are back with 3 binutils version in Buildroot.
Now CFI support is always present for NIOSII.

---
 Config.in.legacy                                   |   8 +
 linux/Config.in                                    |   4 +-
 package/binutils/2.29.1/0001-sh-conf.patch         |  48 ----
 package/binutils/2.29.1/0002-ld-makefile.patch     |  41 ---
 .../2.29.1/0003-check-ldrunpath-length.patch       |  36 ---
 .../0004-add-sysroot-fix-from-bug-3049.patch       |  51 ----
 .../2.29.1/0005-poison-system-directories.patch    | 306 ---------------------
 package/binutils/Config.in.host                    |   6 -
 package/binutils/binutils.hash                     |   1 -
 9 files changed, 10 insertions(+), 491 deletions(-)
 delete mode 100644 package/binutils/2.29.1/0001-sh-conf.patch
 delete mode 100644 package/binutils/2.29.1/0002-ld-makefile.patch
 delete mode 100644 package/binutils/2.29.1/0003-check-ldrunpath-length.patch
 delete mode 100644 package/binutils/2.29.1/0004-add-sysroot-fix-from-bug-3049.patch
 delete mode 100644 package/binutils/2.29.1/0005-poison-system-directories.patch
Config.in.legacy +8 -0
index 089fc9539a..2f99dc8ad2 100644
@@ -146,6 +146,14 @@ endif
 
 comment "Legacy options removed in 2019.05"
 
+config BR2_BINUTILS_VERSION_2_29_X
+	bool "binutils version 2.29 support removed"
+	select BR2_LEGACY
+	help
+	  Support for binutils version 2.29 has been removed. The
+	  current default version (2.31 or later) has been selected
+	  instead.
+
 config BR2_BINUTILS_VERSION_2_28_X
 	bool "binutils version 2.28 support removed"
 	select BR2_LEGACY
linux/Config.in +2 -2
index 856b53eec0..818b94e1c0 100644
@@ -9,9 +9,9 @@ config BR2_LINUX_KERNEL
 if BR2_LINUX_KERNEL
 
 # https://sourceware.org/bugzilla/show_bug.cgi?id=21458
-comment "Linux kernel in thumb mode may be broken with binutils 2.29 and 2.30"
+comment "Linux kernel in thumb mode may be broken with binutils 2.30"
 	depends on BR2_arm || BR2_armeb
-	depends on BR2_BINUTILS_VERSION_2_29_X || BR2_BINUTILS_VERSION_2_30_X
+	depends on BR2_BINUTILS_VERSION_2_30_X
 
 # Packages that need to have a kernel with support for loadable modules,
 # but do not use the kernel-modules infrastructure, should select that
package/binutils/2.29.1/0001-sh-conf.patch deleted +0 -48

48 lines not on this page · raw message

package/binutils/2.29.1/0002-ld-makefile.patch deleted +0 -41

41 lines not on this page · raw message

package/binutils/2.29.1/0003-check-ldrunpath-length.patch deleted +0 -36
deleted file mode 100644
index 3fbc5031d1..0000000000
@@ -1,36 +0,0 @@
-From 3bd211025c890ef2971958915d500a9bb2913a2a 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 d2551b6..70fcb56 100644
---- a/ld/emultempl/elf32.em
-+++ b/ld/emultempl/elf32.em
-@@ -1463,6 +1463,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;
-@@ -1740,6 +1742,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.9.4
-
package/binutils/2.29.1/0004-add-sysroot-fix-from-bug-3049.patch deleted +0 -51

51 lines not on this page · raw message

package/binutils/2.29.1/0005-poison-system-directories.patch deleted +0 -306

306 lines not on this page · raw message

package/binutils/Config.in.host +0 -6
index 9fb8857c3c..c3c3beb420 100644
@@ -4,7 +4,6 @@ config BR2_PACKAGE_HOST_BINUTILS_SUPPORTS_CFI
 	bool
 	default y
 	depends on !BR2_microblaze
-	depends on !(BR2_nios2 && (BR2_BINUTILS_VERSION_2_28_X || BR2_BINUTILS_VERSION_2_29_X))
 
 choice
 	prompt "Binutils Version"
@@ -13,10 +12,6 @@ choice
 	help
 	  Select the version of binutils you wish to use.
 
-config BR2_BINUTILS_VERSION_2_29_X
-	bool "binutils 2.29.1"
-	depends on !BR2_riscv
-
 config BR2_BINUTILS_VERSION_2_30_X
 	bool "binutils 2.30"
 
@@ -34,7 +29,6 @@ endchoice
 config BR2_BINUTILS_VERSION
 	string
 	default "arc-2018.09-release"	if BR2_BINUTILS_VERSION_ARC
-	default "2.29.1"	if BR2_BINUTILS_VERSION_2_29_X
 	default "2.30"		if BR2_BINUTILS_VERSION_2_30_X
 	default "2.31.1"	if BR2_BINUTILS_VERSION_2_31_X
 	default "2.32"		if BR2_BINUTILS_VERSION_2_32_X
package/binutils/binutils.hash +0 -1
index 756fa9bd89..039e3682f6 100644
@@ -1,5 +1,4 @@
 # From ftp://gcc.gnu.org/pub/binutils/releases/sha512.sum
-sha512  d748d22306477d60d921078804d21943248c23fca0707aac9b016a352c01c75ca69e82624ae37fb0bbd03af3b17088a94f60dfe1a86a7ff82e18ece3c24f0fd0  binutils-2.29.1.tar.xz
 sha512  e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839  binutils-2.30.tar.xz
 sha512  0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30  binutils-2.31.1.tar.xz
 sha512  d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a  binutils-2.32.tar.xz
Signature · 1 line
2.14.5
#5 lore raw

PATCH 1/5 package/binutils: switch to use 2.31.x as the default version

In reply to Romain Naour
Quoted 9 lines · On Wed, 13 Mar 2019 00:08:35 +0100 Romain Naour <[email protected]> wrote:

Now that binutils 2.32 has been released, it is time to move to binutils 2.31.x as the default binutils version, instead of 2.29.1.

Cc Thomas Petazzoni <[email protected]>
---
 package/binutils/Config.in.host | 2 +-
 package/binutils/binutils.mk    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Series applied. Once again, many thanks for all this work to keep our toolchain components up-to-date.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com