summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/binutils
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-07-18 15:57:23 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-20 15:25:01 +0100
commit43c72d44337a736fc4b83ce16f7f1ed0d74243dc (patch)
tree9354f9fe2e6b72b0b8d13d136825fe730d7077a9 /meta/recipes-devtools/binutils
parent0387faee9cf869fd8b9f9e1f5b7a5e23bd37e97e (diff)
downloadopenembedded-core-43c72d44337a736fc4b83ce16f7f1ed0d74243dc.tar.gz
openembedded-core-43c72d44337a736fc4b83ce16f7f1ed0d74243dc.tar.bz2
openembedded-core-43c72d44337a736fc4b83ce16f7f1ed0d74243dc.zip
binutils: Fix build when compiling target binutils recipe with gcc 4.6
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta/recipes-devtools/binutils')
-rw-r--r--meta/recipes-devtools/binutils/binutils/clone-shadow.patch79
-rw-r--r--meta/recipes-devtools/binutils/binutils_2.21.1.bb3
2 files changed, 81 insertions, 1 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/clone-shadow.patch b/meta/recipes-devtools/binutils/binutils/clone-shadow.patch
new file mode 100644
index 0000000000..2939011c11
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/clone-shadow.patch
@@ -0,0 +1,79 @@
+This fixes a global shadow warning. The warning is treated as error hence breaks the build of target
+binutils.
+
+ /b/openembedded-core/build/tmp-uclibc/work/armv5te-oe-linux-uclibceabi/binutils-2.21.1-r1/binutils-2.21.1/gas/config/obj-elf.c: In function 'obj_elf_parse_section_letters':
+| /b/openembedded-core/build/tmp-uclibc/work/armv5te-oe-linux-uclibceabi/binutils-2.21.1-r1/binutils-2.21.1/gas/config/obj-elf.c:744:68: error: declaration of 'clone' shadows a global declaration [-Werror=shadow]
+| /b/openembedded-core/build/tmp-uclibc/work/armv5te-oe-linux-uclibceabi/binutils-2.21.1-r1/binutils-2.21.1/gas/config/obj-elf.c: In function 'obj_elf_section':
+| /b/openembedded-core/build/tmp-uclibc/work/armv5te-oe-linux-uclibceabi/binutils-2.21.1-r1/binutils-2.21.1/gas/config/obj-elf.c:981:16: error: declaration of 'clone' shadows a global declaration [-Werror=shadow]
+| cc1: all warnings being treated as errors
+|
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: binutils-2.21.1/gas/config/obj-elf.c
+===================================================================
+--- binutils-2.21.1.orig/gas/config/obj-elf.c 2011-03-23 07:14:03.000000000 -0700
++++ binutils-2.21.1/gas/config/obj-elf.c 2011-07-16 19:05:57.003831035 -0700
+@@ -741,10 +741,10 @@
+ }
+
+ static bfd_vma
+-obj_elf_parse_section_letters (char *str, size_t len, bfd_boolean *clone)
++obj_elf_parse_section_letters (char *str, size_t len, bfd_boolean *cloneit)
+ {
+ bfd_vma attr = 0;
+- *clone = FALSE;
++ *cloneit = FALSE;
+
+ while (len > 0)
+ {
+@@ -775,7 +775,7 @@
+ attr |= SHF_TLS;
+ break;
+ case '?':
+- *clone = TRUE;
++ *cloneit = TRUE;
+ break;
+ /* Compatibility. */
+ case 'm':
+@@ -978,7 +978,7 @@
+
+ if (*input_line_pointer == '"')
+ {
+- bfd_boolean clone;
++ bfd_boolean cloneit;
+
+ beg = demand_copy_C_string (&dummy);
+ if (beg == NULL)
+@@ -986,7 +986,7 @@
+ ignore_rest_of_line ();
+ return;
+ }
+- attr |= obj_elf_parse_section_letters (beg, strlen (beg), &clone);
++ attr |= obj_elf_parse_section_letters (beg, strlen (beg), &cloneit);
+
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer == ',')
+@@ -1038,10 +1038,10 @@
+ attr &= ~SHF_MERGE;
+ }
+
+- if ((attr & SHF_GROUP) != 0 && clone)
++ if ((attr & SHF_GROUP) != 0 && cloneit)
+ {
+ as_warn (_("? section flag ignored with G present"));
+- clone = FALSE;
++ cloneit = FALSE;
+ }
+ if ((attr & SHF_GROUP) != 0 && *input_line_pointer == ',')
+ {
+@@ -1063,7 +1063,7 @@
+ attr &= ~SHF_GROUP;
+ }
+
+- if (clone)
++ if (cloneit)
+ {
+ const char *now_group = elf_group_name (now_seg);
+ if (now_group != NULL)
diff --git a/meta/recipes-devtools/binutils/binutils_2.21.1.bb b/meta/recipes-devtools/binutils/binutils_2.21.1.bb
index 4eb6566437..e1a16a65e2 100644
--- a/meta/recipes-devtools/binutils/binutils_2.21.1.bb
+++ b/meta/recipes-devtools/binutils/binutils_2.21.1.bb
@@ -1,6 +1,6 @@
require binutils.inc
-PR = "r1"
+PR = "r2"
LIC_FILES_CHKSUM="\
file://src-release;endline=17;md5=4830a9ef968f3b18dd5e9f2c00db2d35\
@@ -29,6 +29,7 @@ SRC_URI = "\
file://libiberty_path_fix.patch \
file://binutils-poison.patch \
file://libtool-rpath-fix.patch \
+ file://clone-shadow.patch \
"
SRC_URI[md5sum] = "a22801a9cad45c85e9ff6afc10537d72"