summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/clone-shadow.patch
blob: 73d9db29a509deca61dd189dceac905b84bc0200 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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.22/gas/config/obj-elf.c
===================================================================
--- binutils-2.22.orig/gas/config/obj-elf.c
+++ binutils-2.22/gas/config/obj-elf.c
@@ -741,10 +741,10 @@ obj_elf_change_section (const char *name
 }
 
 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 @@ obj_elf_parse_section_letters (char *str
 	  attr |= SHF_TLS;
 	  break;
 	case '?':
-	  *clone = TRUE;
+	  *cloneit = TRUE;
 	  break;
 	/* Compatibility.  */
 	case 'm':
@@ -978,7 +978,7 @@ obj_elf_section (int push)
 
       if (*input_line_pointer == '"')
 	{
-	  bfd_boolean clone;
+	  bfd_boolean cloneit;
 
 	  beg = demand_copy_C_string (&dummy);
 	  if (beg == NULL)
@@ -986,7 +986,7 @@ obj_elf_section (int push)
 	      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 @@ obj_elf_section (int push)
 	      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 @@ obj_elf_section (int push)
 	      attr &= ~SHF_GROUP;
 	    }
 
-	  if (clone)
+	  if (cloneit)
 	    {
 	      const char *now_group = elf_group_name (now_seg);
 	      if (now_group != NULL)
OpenPOWER on IntegriCloud