summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils/elfutils-0.148
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-04-06 11:51:25 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-04-06 08:01:15 -0700
commite5e5ff3e7153f313106302206a75849398380cbd (patch)
treeeaa80da0d08610b82e5d19920df6996e3a71e757 /meta/recipes-devtools/elfutils/elfutils-0.148
parent537e48599b3682a6276075ca69a2162f847d4a8b (diff)
downloadpoky-e5e5ff3e7153f313106302206a75849398380cbd.tar.gz
elfutils: remove unused variables to fix compilation with GCC 4.6
Unused variables trigger a warning in GCC 4.6 which are caught by -Werror as used in the elfutils makefiles and therefore the build fails. This patch adds some consolidated fixes from upstream to remove the unused variables, they will no longer be required as of elfutils 0.152 (From OE-Core rev: 9207c918a1b2f9ddf69dd9508d6c011eba435486) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/elfutils/elfutils-0.148')
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/remove-unused.patch152
1 files changed, 152 insertions, 0 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/remove-unused.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/remove-unused.patch
new file mode 100644
index 0000000000..064331a273
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/remove-unused.patch
@@ -0,0 +1,152 @@
1Remove unused variables from the code to prevent -Werror causing a build
2failure on hosts with GCC 4.6.
3
4These changes are all upstream so should not be required once we've updated
5to elfutils 0.152 or later. Therefore this patch consolidates several
6changes from elfutils upstream by Roland McGrath into a single file so that
7it's easier to remove later once we upgrade.
8Links to upstream gitweb of the consolidated commits follow:
9- http://git.fedorahosted.org/git?p=elfutils.git;a=commit;h=7094d00a169afb27e0323f8580e817798ae7c240
10- http://git.fedorahosted.org/git?p=elfutils.git;a=commit;h=fd992543185126eb0280c1ee0883e073020499b4
11- http://git.fedorahosted.org/git?p=elfutils.git;a=commit;h=4db89f04bb59327abd7a3b60e88f2e7e73c65c79
12- http://git.fedorahosted.org/git?p=elfutils.git;a=commit;h=8f6c1795ab9d41f03805eebd55767070ade55aac
13- http://git.fedorahosted.org/git?p=elfutils.git;a=commit;h=240784b48aa276822c5a61c9ad6a4355051ce259
14
15Joshua Lock <josh@linux.intel.com> - 06/04/11
16
17Index: elfutils-0.148/libasm/asm_newscn.c
18===================================================================
19--- elfutils-0.148.orig/libasm/asm_newscn.c
20+++ elfutils-0.148/libasm/asm_newscn.c
21@@ -162,7 +162,6 @@ asm_newscn (ctx, scnname, type, flags)
22 GElf_Xword flags;
23 {
24 size_t scnname_len = strlen (scnname) + 1;
25- unsigned long int hval;
26 AsmScn_t *result;
27
28 /* If no context is given there might be an earlier error. */
29@@ -180,8 +179,6 @@ asm_newscn (ctx, scnname, type, flags)
30 return NULL;
31 }
32
33- hval = elf_hash (scnname);
34-
35 rwlock_wrlock (ctx->lock);
36
37 /* This is a new section. */
38Index: elfutils-0.148/src/elflint.c
39===================================================================
40--- elfutils-0.148.orig/src/elflint.c
41+++ elfutils-0.148/src/elflint.c
42@@ -707,9 +707,10 @@ section [%2d] '%s': symbol %zu: invalid
43 {
44 if (xndxdata == NULL)
45 {
46- ERROR (gettext ("\
47+ if (!no_xndx_warned)
48+ ERROR (gettext ("\
49 section [%2d] '%s': symbol %zu: too large section index but no extended section index section\n"),
50- idx, section_name (ebl, idx), cnt);
51+ idx, section_name (ebl, idx), cnt);
52 no_xndx_warned = true;
53 }
54 else if (xndx < SHN_LORESERVE)
55@@ -1592,10 +1593,6 @@ check_dynamic (Ebl *ebl, GElf_Ehdr *ehdr
56 [DT_STRSZ] = true,
57 [DT_SYMENT] = true
58 };
59- GElf_Addr reladdr = 0;
60- GElf_Word relsz = 0;
61- GElf_Addr pltreladdr = 0;
62- GElf_Word pltrelsz = 0;
63
64 memset (has_dt, '\0', sizeof (has_dt));
65 memset (has_val_dt, '\0', sizeof (has_val_dt));
66@@ -1694,15 +1691,6 @@ section [%2d] '%s': entry %zu: level 2 t
67 section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n"),
68 idx, section_name (ebl, idx), cnt);
69
70- if (dyn->d_tag == DT_REL)
71- reladdr = dyn->d_un.d_ptr;
72- if (dyn->d_tag == DT_RELSZ)
73- relsz = dyn->d_un.d_val;
74- if (dyn->d_tag == DT_JMPREL)
75- pltreladdr = dyn->d_un.d_ptr;
76- if (dyn->d_tag == DT_PLTRELSZ)
77- pltrelsz = dyn->d_un.d_val;
78-
79 /* Check that addresses for entries are in loaded segments. */
80 switch (dyn->d_tag)
81 {
82Index: elfutils-0.148/src/ldgeneric.c
83===================================================================
84--- elfutils-0.148.orig/src/ldgeneric.c
85+++ elfutils-0.148/src/ldgeneric.c
86@@ -285,12 +285,10 @@ static int
87 check_for_duplicate2 (struct usedfiles *newp, struct usedfiles *list)
88 {
89 struct usedfiles *first;
90- struct usedfiles *prevp;
91
92 if (list == NULL)
93 return 0;
94
95- prevp = list;
96 list = first = list->next;
97 do
98 {
99Index: elfutils-0.148/src/ldscript.y
100===================================================================
101--- elfutils-0.148.orig/src/ldscript.y
102+++ elfutils-0.148/src/ldscript.y
103@@ -802,12 +802,9 @@ add_versions (struct version *versions)
104
105 do
106 {
107- struct version *oldp;
108-
109 add_id_list (versions->versionname, versions->local_names, true);
110 add_id_list (versions->versionname, versions->global_names, false);
111
112- oldp = versions;
113 versions = versions->next;
114 }
115 while (versions != NULL);
116Index: elfutils-0.148/src/unstrip.c
117===================================================================
118--- elfutils-0.148.orig/src/unstrip.c
119+++ elfutils-0.148/src/unstrip.c
120@@ -1301,7 +1301,6 @@ more sections in stripped file than debu
121 /* Match each debuginfo section with its corresponding stripped section. */
122 bool check_prelink = false;
123 Elf_Scn *unstripped_symtab = NULL;
124- size_t unstripped_strtab_ndx = SHN_UNDEF;
125 size_t alloc_avail = 0;
126 scn = NULL;
127 while ((scn = elf_nextscn (unstripped, scn)) != NULL)
128@@ -1313,7 +1312,6 @@ more sections in stripped file than debu
129 if (shdr->sh_type == SHT_SYMTAB)
130 {
131 unstripped_symtab = scn;
132- unstripped_strtab_ndx = shdr->sh_link;
133 continue;
134 }
135
136Index: elfutils-0.148/src/ldscript.c
137===================================================================
138--- elfutils-0.148.orig/src/ldscript.c
139+++ elfutils-0.148/src/ldscript.c
140@@ -2728,12 +2728,9 @@ add_versions (struct version *versions)
141
142 do
143 {
144- struct version *oldp;
145-
146 add_id_list (versions->versionname, versions->local_names, true);
147 add_id_list (versions->versionname, versions->global_names, false);
148
149- oldp = versions;
150 versions = versions->next;
151 }
152 while (versions != NULL);