1 |
vapier 08/04/20 08:20:06 |
2 |
|
3 |
Added: elfutils-0.131-gnu-inline.patch |
4 |
Log: |
5 |
Use Debian patched tarball to fix #158438 and add fix by Ryan Hill for building with gcc-4.3 #204610. |
6 |
(Portage version: 2.2_pre5) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 dev-libs/elfutils/files/elfutils-0.131-gnu-inline.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/elfutils/files/elfutils-0.131-gnu-inline.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/elfutils/files/elfutils-0.131-gnu-inline.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: elfutils-0.131-gnu-inline.patch |
15 |
=================================================================== |
16 |
fix 'extern inline' handling to use gnu inlines |
17 |
|
18 |
http://bugs.gentoo.org/204610 |
19 |
|
20 |
--- elfutils-0.131/backends/ia64_retval.c |
21 |
+++ elfutils-0.131/backends/ia64_retval.c |
22 |
@@ -96,7 +96,7 @@ |
23 |
If we find a datum that's not the same FP type as the first datum, punt. |
24 |
If we count more than eight total homogeneous FP data, punt. */ |
25 |
|
26 |
- inline int hfa (const Dwarf_Op *loc, int nregs) |
27 |
+ __gnu_inline int hfa (const Dwarf_Op *loc, int nregs) |
28 |
{ |
29 |
if (fpregs_used == 0) |
30 |
*locp = loc; |
31 |
--- elfutils-0.131/libdw/dwarf_entry_breakpoints.c |
32 |
+++ elfutils-0.131/libdw/dwarf_entry_breakpoints.c |
33 |
@@ -64,7 +64,7 @@ |
34 |
*bkpts = NULL; |
35 |
|
36 |
/* Add one breakpoint location to the result vector. */ |
37 |
- inline int add_bkpt (Dwarf_Addr pc) |
38 |
+ __gnu_inline int add_bkpt (Dwarf_Addr pc) |
39 |
{ |
40 |
Dwarf_Addr *newlist = realloc (*bkpts, ++nbkpts * sizeof newlist[0]); |
41 |
if (newlist == NULL) |
42 |
@@ -80,7 +80,7 @@ |
43 |
} |
44 |
|
45 |
/* Fallback result, break at the entrypc/lowpc value. */ |
46 |
- inline int entrypc_bkpt (void) |
47 |
+ __gnu_inline int entrypc_bkpt (void) |
48 |
{ |
49 |
Dwarf_Addr pc; |
50 |
return INTUSE(dwarf_entrypc) (die, &pc) < 0 ? -1 : add_bkpt (pc); |
51 |
@@ -107,7 +107,7 @@ |
52 |
/* Search a contiguous PC range for prologue-end markers. |
53 |
If DWARF, look for proper markers. |
54 |
Failing that, if ADHOC, look for the ad hoc convention. */ |
55 |
- inline int search_range (Dwarf_Addr low, Dwarf_Addr high, |
56 |
+ __gnu_inline int search_range (Dwarf_Addr low, Dwarf_Addr high, |
57 |
bool dwarf, bool adhoc) |
58 |
{ |
59 |
size_t l = 0, u = nlines; |
60 |
--- elfutils-0.131/libdw/dwarf_getscopevar.c |
61 |
+++ elfutils-0.131/libdw/dwarf_getscopevar.c |
62 |
@@ -93,7 +93,7 @@ |
63 |
size_t match_file_len = match_file == NULL ? 0 : strlen (match_file); |
64 |
bool lastfile_matches = false; |
65 |
const char *lastfile = NULL; |
66 |
- inline bool file_matches (Dwarf_Files *files, size_t idx) |
67 |
+ __gnu_inline bool file_matches (Dwarf_Files *files, size_t idx) |
68 |
{ |
69 |
if (idx >= files->nfiles) |
70 |
return false; |
71 |
--- elfutils-0.131/libdw/libdw.h |
72 |
+++ elfutils-0.131/libdw/libdw.h |
73 |
@@ -633,6 +633,12 @@ |
74 |
|
75 |
/* Inline optimizations. */ |
76 |
#ifdef __OPTIMIZE__ |
77 |
+# if defined(__GNUC_STDC_INLINE__) || defined(__GNUC_GNU_INLINE__) |
78 |
+# define __gnu_inline inline __attribute__ ((__gnu_inline__)) |
79 |
+# else |
80 |
+# define __gnu_inline inline |
81 |
+# endif |
82 |
+ |
83 |
/* Return attribute code of given attribute. */ |
84 |
__libdw_extern_inline unsigned int |
85 |
dwarf_whatattr (Dwarf_Attribute *attr) |
86 |
--- elfutils-0.131/libdw/libdw_visit_scopes.c |
87 |
+++ elfutils-0.131/libdw/libdw_visit_scopes.c |
88 |
@@ -109,7 +109,7 @@ |
89 |
if (INTUSE(dwarf_child) (&root->die, &child.die) != 0) |
90 |
return -1; |
91 |
|
92 |
- inline int recurse (void) |
93 |
+ __gnu_inline int recurse (void) |
94 |
{ |
95 |
return __libdw_visit_scopes (depth + 1, &child, |
96 |
previsit, postvisit, arg); |
97 |
--- elfutils-0.131/libdwfl/argp-std.c |
98 |
+++ elfutils-0.131/libdwfl/argp-std.c |
99 |
@@ -106,7 +106,7 @@ |
100 |
static error_t |
101 |
parse_opt (int key, char *arg, struct argp_state *state) |
102 |
{ |
103 |
- inline void failure (Dwfl *dwfl, int errnum, const char *msg) |
104 |
+ __gnu_inline void failure (Dwfl *dwfl, int errnum, const char *msg) |
105 |
{ |
106 |
if (errnum == -1) |
107 |
argp_failure (state, EXIT_FAILURE, 0, "%s: %s", |
108 |
@@ -116,7 +116,7 @@ |
109 |
if (dwfl != NULL) |
110 |
dwfl_end (dwfl); |
111 |
} |
112 |
- inline error_t fail (Dwfl *dwfl, int errnum, const char *msg) |
113 |
+ __gnu_inline error_t fail (Dwfl *dwfl, int errnum, const char *msg) |
114 |
{ |
115 |
failure (dwfl, errnum, msg); |
116 |
return errnum == -1 ? EIO : errnum; |
117 |
--- elfutils-0.131/libdwfl/dwfl_module_addrsym.c |
118 |
+++ elfutils-0.131/libdwfl/dwfl_module_addrsym.c |
119 |
@@ -59,7 +59,7 @@ |
120 |
|
121 |
/* Return true iff we consider ADDR to lie in the same section as SYM. */ |
122 |
GElf_Word addr_shndx = SHN_UNDEF; |
123 |
- inline bool same_section (const GElf_Sym *sym, GElf_Word shndx) |
124 |
+ __gnu_inline bool same_section (const GElf_Sym *sym, GElf_Word shndx) |
125 |
{ |
126 |
/* For absolute symbols and the like, only match exactly. */ |
127 |
if (shndx >= SHN_LORESERVE) |
128 |
--- elfutils-0.131/libdwfl/dwfl_module_getsrc_file.c |
129 |
+++ elfutils-0.131/libdwfl/dwfl_module_getsrc_file.c |
130 |
@@ -79,15 +79,15 @@ |
131 |
&& cu != NULL |
132 |
&& (error = __libdwfl_cu_getsrclines (cu)) == DWFL_E_NOERROR) |
133 |
{ |
134 |
- inline const char *INTUSE(dwarf_line_file) (const Dwarf_Line *line) |
135 |
+ __gnu_inline const char *INTUSE(dwarf_line_file) (const Dwarf_Line *line) |
136 |
{ |
137 |
return line->files->info[line->file].name; |
138 |
} |
139 |
- inline Dwarf_Line *dwfl_line (const Dwfl_Line *line) |
140 |
+ __gnu_inline Dwarf_Line *dwfl_line (const Dwfl_Line *line) |
141 |
{ |
142 |
return &dwfl_linecu (line)->die.cu->lines->info[line->idx]; |
143 |
} |
144 |
- inline const char *dwfl_line_file (const Dwfl_Line *line) |
145 |
+ __gnu_inline const char *dwfl_line_file (const Dwfl_Line *line) |
146 |
{ |
147 |
return INTUSE(dwarf_line_file) (dwfl_line (line)); |
148 |
} |
149 |
--- elfutils-0.131/libdwfl/elf-from-memory.c |
150 |
+++ elfutils-0.131/libdwfl/elf-from-memory.c |
151 |
@@ -216,7 +216,7 @@ |
152 |
bool found_base = false; |
153 |
switch (ehdr.e32.e_ident[EI_CLASS]) |
154 |
{ |
155 |
- inline void handle_segment (GElf_Addr vaddr, GElf_Off offset, |
156 |
+ __gnu_inline void handle_segment (GElf_Addr vaddr, GElf_Off offset, |
157 |
GElf_Xword filesz, GElf_Xword align) |
158 |
{ |
159 |
GElf_Off segment_end = ((offset + filesz + align - 1) & -align); |
160 |
@@ -280,7 +280,7 @@ |
161 |
|
162 |
switch (ehdr.e32.e_ident[EI_CLASS]) |
163 |
{ |
164 |
- inline bool handle_segment (GElf_Addr vaddr, GElf_Off offset, |
165 |
+ __gnu_inline bool handle_segment (GElf_Addr vaddr, GElf_Off offset, |
166 |
GElf_Xword filesz, GElf_Xword align) |
167 |
{ |
168 |
GElf_Off start = offset & -align; |
169 |
--- elfutils-0.131/libdwfl/linux-kernel-modules.c |
170 |
+++ elfutils-0.131/libdwfl/linux-kernel-modules.c |
171 |
@@ -541,7 +541,7 @@ |
172 |
{ |
173 |
Dwarf_Addr start; |
174 |
Dwarf_Addr end; |
175 |
- inline Dwfl_Module *report (void) |
176 |
+ __gnu_inline Dwfl_Module *report (void) |
177 |
{ |
178 |
return INTUSE(dwfl_report_module) (dwfl, KERNEL_MODNAME, start, end); |
179 |
} |
180 |
@@ -628,7 +628,7 @@ |
181 |
only '_' and one only using '-'. */ |
182 |
|
183 |
char alternate_name[namelen + 1]; |
184 |
- inline bool subst_name (char from, char to) |
185 |
+ __gnu_inline bool subst_name (char from, char to) |
186 |
{ |
187 |
const char *n = memchr (module_name, from, namelen); |
188 |
if (n == NULL) |
189 |
--- elfutils-0.131/libdwfl/linux-proc-maps.c |
190 |
+++ elfutils-0.131/libdwfl/linux-proc-maps.c |
191 |
@@ -134,7 +134,7 @@ |
192 |
char *last_file = NULL; |
193 |
Dwarf_Addr low = 0, high = 0; |
194 |
|
195 |
- inline bool report (void) |
196 |
+ __gnu_inline bool report (void) |
197 |
{ |
198 |
if (last_file != NULL) |
199 |
{ |
200 |
--- elfutils-0.131/src/ld.h |
201 |
+++ elfutils-0.131/src/ld.h |
202 |
@@ -1087,7 +1087,7 @@ |
203 |
|
204 |
/* Checked whether the symbol is undefined and referenced from a DSO. */ |
205 |
extern bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx); |
206 |
-extern inline bool |
207 |
+extern __gnu_inline bool |
208 |
linked_from_dso_p (struct scninfo *scninfo, size_t symidx) |
209 |
{ |
210 |
struct usedfiles *file = scninfo->fileinfo; |
211 |
--- elfutils-0.131/src/readelf.c |
212 |
+++ elfutils-0.131/src/readelf.c |
213 |
@@ -5722,7 +5722,7 @@ |
214 |
qsort (regs, maxreg + 1, sizeof regs[0], &compare_registers); |
215 |
|
216 |
/* Collect the unique sets and sort them. */ |
217 |
- inline bool same_set (const struct register_info *a, |
218 |
+ __gnu_inline bool same_set (const struct register_info *a, |
219 |
const struct register_info *b) |
220 |
{ |
221 |
return (a < ®s[maxnreg] && a->regloc != NULL |
222 |
--- elfutils-0.131/src/strip.c |
223 |
+++ elfutils-0.131/src/strip.c |
224 |
@@ -1336,7 +1336,7 @@ |
225 |
/* Update section headers when the data size has changed. |
226 |
We also update the SHT_NOBITS section in the debug |
227 |
file so that the section headers match in sh_size. */ |
228 |
- inline void update_section_size (const Elf_Data *newdata) |
229 |
+ __gnu_inline void update_section_size (const Elf_Data *newdata) |
230 |
{ |
231 |
GElf_Shdr shdr_mem; |
232 |
GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); |
233 |
--- elfutils-0.131/src/unstrip.c |
234 |
+++ elfutils-0.131/src/unstrip.c |
235 |
@@ -389,7 +389,7 @@ |
236 |
{ |
237 |
Elf_Data *data = elf_getdata (outscn, NULL); |
238 |
|
239 |
- inline void adjust_reloc (GElf_Xword *info) |
240 |
+ __gnu_inline void adjust_reloc (GElf_Xword *info) |
241 |
{ |
242 |
size_t ndx = GELF_R_SYM (*info); |
243 |
if (ndx != STN_UNDEF) |
244 |
@@ -1039,7 +1039,7 @@ |
245 |
} |
246 |
|
247 |
bool fail = false; |
248 |
- inline void check_match (bool match, Elf_Scn *scn, const char *name) |
249 |
+ __gnu_inline void check_match (bool match, Elf_Scn *scn, const char *name) |
250 |
{ |
251 |
if (!match) |
252 |
{ |
253 |
@@ -1267,7 +1267,7 @@ |
254 |
} |
255 |
|
256 |
/* Locate a matching unallocated section in SECTIONS. */ |
257 |
- inline struct section *find_unalloc_section (const GElf_Shdr *shdr, |
258 |
+ __gnu_inline struct section *find_unalloc_section (const GElf_Shdr *shdr, |
259 |
const char *name) |
260 |
{ |
261 |
size_t l = nalloc, u = stripped_shnum - 1; |
262 |
@@ -2182,7 +2182,7 @@ |
263 |
handle_implicit_modules (const struct arg_info *info) |
264 |
{ |
265 |
struct match_module_info mmi = { info->args, NULL, info->match_files }; |
266 |
- inline ptrdiff_t next (ptrdiff_t offset) |
267 |
+ __gnu_inline ptrdiff_t next (ptrdiff_t offset) |
268 |
{ |
269 |
return dwfl_getmodules (info->dwfl, &match_module, &mmi, offset); |
270 |
} |
271 |
|
272 |
|
273 |
|
274 |
-- |
275 |
gentoo-commits@l.g.o mailing list |