Skip to contentSkip to conversation

binutils: Add fix for recent patch on older gcc

PATCH In review Darcy Watkins 3 participants 3 messages Jul 29, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 binutils: Add fix for recent patch on older gcc

From: Darcy Watkins <dwatkins>

The recent bintuils patch update breaks on older gccs such as CentOS 6. Backport a patch to address this.

(From master: 540b7a196a00c4dc1bf8f7c87e68e80ab310756e) (From OE-Core rev: 76f65e73081f52cea718ef164f9d1d7a5c65d537)

---
 meta/recipes-devtools/binutils/binutils-2.24.inc   |  1 +
 .../binutils/binutils-uninitialised-warning.patch  | 50 ++++++++++++++++++++++
 2 files changed, 51 insertions(+)
 create mode 100644 meta/recipes-devtools/binutils/binutils/binutils-uninitialised-warning.patch
meta/recipes-devtools/binutils/binutils-2.24.inc +1 -0
index ef6a4eb..8f3216f 100644
@@ -31,6 +31,7 @@ SRC_URI = "\
      file://fix-pr16428.patch \
      file://replace_macros_with_static_inline.patch \
      file://0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch \
+     file://binutils-uninitialised-warning.patch \
      "
 
 SRC_URI[md5sum] = "e0f71a7b2ddab0f8612336ac81d9636b"
meta/recipes-devtools/binutils/binutils/binutils-uninitialised-warning.patch new file +50 -0

50 lines not on this page · raw message

Signature · 1 line
1.7.12.4
#1 lore raw
Quoted 9 lines · Darcy Watkins

From: Darcy Watkins <dwatkins>

The recent bintuils patch update breaks on older gccs such as CentOS 6. Backport a patch to address this.

(From master: 540b7a196a00c4dc1bf8f7c87e68e80ab310756e) (From OE-Core rev: 76f65e73081f52cea718ef164f9d1d7a5c65d537)

This patch is for the daisy branch since Richard Purdie has already submitted it to the master branch (commit 540b7a196a00c4dc1bf8f7c87e68e80ab310756e).

Signature · 13 lines
Regards,

Darcy

---

Darcy Watkins
Staff Engineer, Firmware
In Motion Technology, a
Sierra Wireless company
350-625 Agnes St. New Westminster, BC
Canada, V3M 5Y4
[P1]
#2 lore raw
In reply to Darcy Watkins
Quoted 9 lines · Darcy Watkins

From: Darcy Watkins <dwatkins>

The recent bintuils patch update breaks on older gccs such as CentOS 6. Backport a patch to address this.

(From master: 540b7a196a00c4dc1bf8f7c87e68e80ab310756e) (From OE-Core rev: 76f65e73081f52cea718ef164f9d1d7a5c65d537)

send it to openembedded core mailing list and have daisy in the subject.

Quoted 4 lines
---
 meta/recipes-devtools/binutils/binutils-2.24.inc   |  1 +
 .../binutils/binutils-uninitialised-warning.patch  | 50

++++++++++++++++++++++

Quoted 2 lines
 2 files changed, 51 insertions(+)
 create mode 100644

meta/recipes-devtools/binutils/binutils/binutils-uninitialised-warning.patch

Review

Quoted 2 lines
(quoted diff) +0 -0

b/meta/recipes-devtools/binutils/binutils-2.24.inc

meta/recipes-devtools/binutils/binutils-2.24.inc SRC_URI = "\ · line 33

Quoted 7 lines

index ef6a4eb..8f3216f 100644

meta/recipes-devtools/binutils/binutils-2.24.inc +0 -0
@@ -31,6 +31,7 @@ SRC_URI = "\
      file://fix-pr16428.patch \
      file://replace_macros_with_static_inline.patch \
 

file://0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch \

Quoted 5 lines
meta/recipes-devtools/binutils/binutils-2.24.inc +1 -0
+     file://binutils-uninitialised-warning.patch \
      "
 
 SRC_URI[md5sum] = "e0f71a7b2ddab0f8612336ac81d9636b"

diff --git

a/meta/recipes-devtools/binutils/binutils/binutils-uninitialised-warning.patch b/meta/recipes-devtools/binutils/binutils/binutils-uninitialised-warning.patch

Quoted 4 lines

new file mode 100644
index 0000000..2feb80c
--- /dev/null
+++

b/meta/recipes-devtools/binutils/binutils/binutils-uninitialised-warning.patch

Quoted 25 lines
meta/recipes-devtools/binutils/binutils-2.24.inc +24 -0
@@ -0,0 +1,50 @@
+From f9c316c4d75be236bbaa8464ef803ed2d3859d6d Mon Sep 17 00:00:00 2001
+From: H.J. Lu <[email protected]>
+Date: Wed, 15 Jan 2014 07:43:19 -0800
+Subject: [PATCH 1/1] Silence uninitialized warning on ehdr_start_save
+
+Older GCC, like 4.1/4.2, will issue an uninitialized warning on
+ehdr_start_save.  This patch silences by using
+
+struct bfd_link_hash_entry ehdr_start_save = ehdr_start_save;
+
+       * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
+       Silence uninitialized warning on ehdr_start_save with older
+       GCC.
+
+Upstream-Status: Backport
+---
+ ld/ChangeLog          |    6 ++++++
+ ld/emultempl/elf32.em |    2 +-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+#diff --git a/ld/ChangeLog b/ld/ChangeLog
+#index eaa6b93..91055de 100644
+#--- a/ld/ChangeLog
+#+++ b/ld/ChangeLog

meta/recipes-devtools/binutils/binutils-2.24.inc line 34

Quoted 10 lines
meta/recipes-devtools/binutils/binutils-2.24.inc +10 -0
+#@@ -1,3 +1,9 @@
+#+2014-01-15  H.J. Lu  <[email protected]>
+#+
+#+     * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
+#+     Silence uninitialized warning on ehdr_start_save with older
+#+     GCC.
+#+
+# 2014-01-15  Alan Modra  <[email protected]>
+#
+#      * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):

Define

Quoted 24 lines
meta/recipes-devtools/binutils/binutils-2.24.inc +16 -1
+diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
+index 13f86f0..569c7f7 100644
+--- a/ld/emultempl/elf32.em
++++ b/ld/emultempl/elf32.em
+@@ -1481,7 +1481,7 @@ gld${EMULATION_NAME}_before_allocation (void)
+   asection *sinterp;
+   bfd *abfd;
+   struct elf_link_hash_entry *ehdr_start = NULL;
+-  struct bfd_link_hash_entry ehdr_start_save;
++  struct bfd_link_hash_entry ehdr_start_save = ehdr_start_save;
+
+   if (is_elf_hash_table (link_info.hash))
+     {
+--
+1.7.1
+
--

1.7.12.4

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto