diff options
Diffstat (limited to 'meta/recipes-devtools/elfutils/elfutils-0.155/redhat-portability.diff')
-rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.155/redhat-portability.diff | 1775 |
1 files changed, 1775 insertions, 0 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.155/redhat-portability.diff b/meta/recipes-devtools/elfutils/elfutils-0.155/redhat-portability.diff new file mode 100644 index 0000000000..bf47ade8db --- /dev/null +++ b/meta/recipes-devtools/elfutils/elfutils-0.155/redhat-portability.diff | |||
@@ -0,0 +1,1775 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | Index: elfutils-0.155/backends/ChangeLog | ||
4 | =================================================================== | ||
5 | --- elfutils-0.155.orig/backends/ChangeLog | ||
6 | +++ elfutils-0.155/backends/ChangeLog | ||
7 | @@ -135,6 +135,10 @@ | ||
8 | * ppc_attrs.c (ppc_check_object_attribute): Handle tag | ||
9 | GNU_Power_ABI_Struct_Return. | ||
10 | |||
11 | +2009-01-23 Roland McGrath <roland@redhat.com> | ||
12 | + | ||
13 | + * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED). | ||
14 | + | ||
15 | 2008-10-04 Ulrich Drepper <drepper@redhat.com> | ||
16 | |||
17 | * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and | ||
18 | @@ -462,6 +466,11 @@ | ||
19 | * sparc_init.c: Likewise. | ||
20 | * x86_64_init.c: Likewise. | ||
21 | |||
22 | +2005-11-22 Roland McGrath <roland@redhat.com> | ||
23 | + | ||
24 | + * Makefile.am (LD_AS_NEEDED): New variable, substituted by configure. | ||
25 | + (libebl_%.so rule): Use it in place of -Wl,--as-needed. | ||
26 | + | ||
27 | 2005-11-19 Roland McGrath <roland@redhat.com> | ||
28 | |||
29 | * ppc64_reloc.def: REL30 -> ADDR30. | ||
30 | @@ -484,6 +493,9 @@ | ||
31 | * Makefile.am (uninstall): Don't try to remove $(pkgincludedir). | ||
32 | (CLEANFILES): Add libebl_$(m).so. | ||
33 | |||
34 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
35 | + (AM_CFLAGS): Use it in place of -Wextra. | ||
36 | + | ||
37 | * ppc_reloc.def: Update bits per Alan Modra <amodra@bigpond.net.au>. | ||
38 | * ppc64_reloc.def: Likewise. | ||
39 | |||
40 | Index: elfutils-0.155/backends/Makefile.am | ||
41 | =================================================================== | ||
42 | --- elfutils-0.155.orig/backends/Makefile.am | ||
43 | +++ elfutils-0.155/backends/Makefile.am | ||
44 | @@ -111,7 +111,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a | ||
45 | $(LINK) -shared -o $(@:.map=.so) \ | ||
46 | -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ | ||
47 | -Wl,--version-script,$(@:.so=.map) \ | ||
48 | - -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap) | ||
49 | + -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap) | ||
50 | $(textrel_check) | ||
51 | |||
52 | libebl_i386.so: $(cpu_i386) | ||
53 | Index: elfutils-0.155/backends/Makefile.in | ||
54 | =================================================================== | ||
55 | --- elfutils-0.155.orig/backends/Makefile.in | ||
56 | +++ elfutils-0.155/backends/Makefile.in | ||
57 | @@ -38,7 +38,8 @@ build_triplet = @build@ | ||
58 | host_triplet = @host@ | ||
59 | DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ | ||
60 | $(srcdir)/Makefile.in $(top_srcdir)/config/eu.am ChangeLog | ||
61 | -@MUDFLAP_TRUE@am__append_1 = -fmudflap | ||
62 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | ||
63 | +@MUDFLAP_TRUE@am__append_2 = -fmudflap | ||
64 | subdir = backends | ||
65 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
66 | am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ | ||
67 | @@ -172,6 +173,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
68 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
69 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
70 | LDFLAGS = @LDFLAGS@ | ||
71 | +LD_AS_NEEDED = @LD_AS_NEEDED@ | ||
72 | LEX = @LEX@ | ||
73 | LEXLIB = @LEXLIB@ | ||
74 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ | ||
75 | @@ -201,6 +203,7 @@ SHELL = @SHELL@ | ||
76 | STRIP = @STRIP@ | ||
77 | USE_NLS = @USE_NLS@ | ||
78 | VERSION = @VERSION@ | ||
79 | +WEXTRA = @WEXTRA@ | ||
80 | XGETTEXT = @XGETTEXT@ | ||
81 | XGETTEXT_015 = @XGETTEXT_015@ | ||
82 | XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ | ||
83 | @@ -263,10 +266,9 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi | ||
84 | -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ | ||
85 | -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw | ||
86 | AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ | ||
87 | - $($(*F)_no_Werror),,-Werror) $(if \ | ||
88 | - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ | ||
89 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | ||
90 | $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ | ||
91 | - $(am__append_1) | ||
92 | + $(am__append_1) $(am__append_2) | ||
93 | @MUDFLAP_FALSE@libmudflap = | ||
94 | @MUDFLAP_TRUE@libmudflap = -lmudflap | ||
95 | COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ | ||
96 | @@ -725,7 +727,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a | ||
97 | $(LINK) -shared -o $(@:.map=.so) \ | ||
98 | -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ | ||
99 | -Wl,--version-script,$(@:.so=.map) \ | ||
100 | - -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap) | ||
101 | + -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap) | ||
102 | $(textrel_check) | ||
103 | |||
104 | libebl_i386.so: $(cpu_i386) | ||
105 | Index: elfutils-0.155/ChangeLog | ||
106 | =================================================================== | ||
107 | --- elfutils-0.155.orig/ChangeLog | ||
108 | +++ elfutils-0.155/ChangeLog | ||
109 | @@ -16,6 +16,8 @@ | ||
110 | |||
111 | 2012-01-24 Mark Wielaard <mjw@redhat.com> | ||
112 | |||
113 | + * configure.ac: Wrap AC_COMPILE_IFELSE sources in AC_LANG_SOURCE. | ||
114 | + | ||
115 | * COPYING: Fix address. Updated version from gnulib. | ||
116 | |||
117 | 2012-01-23 Mark Wielaard <mjw@redhat.com> | ||
118 | @@ -34,6 +36,9 @@ | ||
119 | |||
120 | 2011-10-08 Mike Frysinger <vapier@gentoo.org> | ||
121 | |||
122 | + * configure.ac (--disable-werror): Handle it, controlling BUILD_WERROR | ||
123 | + automake option. | ||
124 | + | ||
125 | * configure.ac: Fix use of AC_ARG_ENABLE to handle $enableval correctly. | ||
126 | |||
127 | 2011-10-02 Ulrich Drepper <drepper@gmail.com> | ||
128 | @@ -55,6 +60,10 @@ | ||
129 | |||
130 | * configure.ac (LOCALEDIR, DATADIRNAME): Removed. | ||
131 | |||
132 | +2009-11-22 Roland McGrath <roland@redhat.com> | ||
133 | + | ||
134 | + * configure.ac: Use sed and expr instead of modern bash extensions. | ||
135 | + | ||
136 | 2009-09-21 Ulrich Drepper <drepper@redhat.com> | ||
137 | |||
138 | * configure.ac: Update for more modern autoconf. | ||
139 | @@ -63,6 +72,10 @@ | ||
140 | |||
141 | * configure.ac (zip_LIBS): Check for liblzma too. | ||
142 | |||
143 | +2009-08-17 Roland McGrath <roland@redhat.com> | ||
144 | + | ||
145 | + * configure.ac: Check for -fgnu89-inline; add it to WEXTRA if it works. | ||
146 | + | ||
147 | 2009-04-19 Roland McGrath <roland@redhat.com> | ||
148 | |||
149 | * configure.ac (eu_version): Round down here, not in version.h macros. | ||
150 | @@ -74,6 +87,8 @@ | ||
151 | |||
152 | 2009-01-23 Roland McGrath <roland@redhat.com> | ||
153 | |||
154 | + * configure.ac: Check for __builtin_popcount. | ||
155 | + | ||
156 | * configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3. | ||
157 | |||
158 | * configure.ac (__thread check): Use AC_LINK_IFELSE, in case of | ||
159 | @@ -154,6 +169,10 @@ | ||
160 | * configure.ac: Add dummy automake conditional to get dependencies | ||
161 | for non-generic linker right. See src/Makefile.am. | ||
162 | |||
163 | +2005-11-22 Roland McGrath <roland@redhat.com> | ||
164 | + | ||
165 | + * configure.ac: Check for --as-needed linker option. | ||
166 | + | ||
167 | 2005-11-18 Roland McGrath <roland@redhat.com> | ||
168 | |||
169 | * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable. | ||
170 | @@ -201,6 +220,17 @@ | ||
171 | * Makefile.am (all_SUBDIRS): Add libdwfl. | ||
172 | * configure.ac: Write libdwfl/Makefile. | ||
173 | |||
174 | +2005-05-31 Roland McGrath <roland@redhat.com> | ||
175 | + | ||
176 | + * configure.ac (WEXTRA): Check for -Wextra and set this substitution. | ||
177 | + | ||
178 | + * configure.ac: Check for struct stat st_?tim members. | ||
179 | + * src/strip.c (process_file): Use st_?time if st_?tim are not there. | ||
180 | + | ||
181 | + * configure.ac: Check for futimes function. | ||
182 | + * src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead. | ||
183 | + (handle_ar) [! HAVE_FUTIMES]: Likewise. | ||
184 | + | ||
185 | 2005-05-19 Roland McGrath <roland@redhat.com> | ||
186 | |||
187 | * configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros. | ||
188 | Index: elfutils-0.155/config/ChangeLog | ||
189 | =================================================================== | ||
190 | --- elfutils-0.155.orig/config/ChangeLog | ||
191 | +++ elfutils-0.155/config/ChangeLog | ||
192 | @@ -19,6 +19,10 @@ | ||
193 | |||
194 | * known-dwarf.awk: Use gawk. | ||
195 | |||
196 | +2011-10-08 Mike Frysinger <vapier@gentoo.org> | ||
197 | + | ||
198 | + * eu.am [BUILD_WERROR]: Conditionalize -Werror use on this. | ||
199 | + | ||
200 | 2010-07-02 Ulrich Drepper <drepper@redhat.com> | ||
201 | |||
202 | * elfutils.spec.in: Add more BuildRequires. | ||
203 | Index: elfutils-0.155/config/eu.am | ||
204 | =================================================================== | ||
205 | --- elfutils-0.155.orig/config/eu.am | ||
206 | +++ elfutils-0.155/config/eu.am | ||
207 | @@ -1,6 +1,6 @@ | ||
208 | ## Common automake fragments for elfutils subdirectory makefiles. | ||
209 | ## | ||
210 | -## Copyright (C) 2010 Red Hat, Inc. | ||
211 | +## Copyright (C) 2010-2011 Red Hat, Inc. | ||
212 | ## | ||
213 | ## This file is part of elfutils. | ||
214 | ## | ||
215 | @@ -29,14 +29,20 @@ | ||
216 | ## not, see <http://www.gnu.org/licenses/>. | ||
217 | ## | ||
218 | |||
219 | +WEXTRA = @WEXTRA@ | ||
220 | +LD_AS_NEEDED = @LD_AS_NEEDED@ | ||
221 | + | ||
222 | DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"' | ||
223 | INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. | ||
224 | AM_CFLAGS = -std=gnu99 -Wall -Wshadow \ | ||
225 | - $(if $($(*F)_no_Werror),,-Werror) \ | ||
226 | - $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ | ||
227 | + $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \ | ||
228 | $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \ | ||
229 | $($(*F)_CFLAGS) | ||
230 | |||
231 | +if BUILD_WERROR | ||
232 | +AM_CFLAGS += $(if $($(*F)_no_Werror),,-Werror) | ||
233 | +endif | ||
234 | + | ||
235 | if MUDFLAP | ||
236 | AM_CFLAGS += -fmudflap | ||
237 | libmudflap = -lmudflap | ||
238 | Index: elfutils-0.155/config/Makefile.in | ||
239 | =================================================================== | ||
240 | --- elfutils-0.155.orig/config/Makefile.in | ||
241 | +++ elfutils-0.155/config/Makefile.in | ||
242 | @@ -76,6 +76,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
243 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
244 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
245 | LDFLAGS = @LDFLAGS@ | ||
246 | +LD_AS_NEEDED = @LD_AS_NEEDED@ | ||
247 | LEX = @LEX@ | ||
248 | LEXLIB = @LEXLIB@ | ||
249 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ | ||
250 | @@ -105,6 +106,7 @@ SHELL = @SHELL@ | ||
251 | STRIP = @STRIP@ | ||
252 | USE_NLS = @USE_NLS@ | ||
253 | VERSION = @VERSION@ | ||
254 | +WEXTRA = @WEXTRA@ | ||
255 | XGETTEXT = @XGETTEXT@ | ||
256 | XGETTEXT_015 = @XGETTEXT_015@ | ||
257 | XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ | ||
258 | Index: elfutils-0.155/config.h.in | ||
259 | =================================================================== | ||
260 | --- elfutils-0.155.orig/config.h.in | ||
261 | +++ elfutils-0.155/config.h.in | ||
262 | @@ -6,6 +6,9 @@ | ||
263 | /* Defined if libdw should support GNU ref_alt FORM, dwz multi files. */ | ||
264 | #undef ENABLE_DWZ | ||
265 | |||
266 | +/* Have __builtin_popcount. */ | ||
267 | +#undef HAVE_BUILTIN_POPCOUNT | ||
268 | + | ||
269 | /* $libdir subdirectory containing libebl modules. */ | ||
270 | #undef LIBEBL_SUBDIR | ||
271 | |||
272 | @@ -64,4 +67,7 @@ | ||
273 | /* Define for large files, on AIX-style hosts. */ | ||
274 | #undef _LARGE_FILES | ||
275 | |||
276 | +/* Stubbed out if missing compiler support. */ | ||
277 | +#undef __thread | ||
278 | + | ||
279 | #include <eu-config.h> | ||
280 | Index: elfutils-0.155/configure | ||
281 | =================================================================== | ||
282 | --- elfutils-0.155.orig/configure | ||
283 | +++ elfutils-0.155/configure | ||
284 | @@ -598,6 +598,8 @@ ZLIB_TRUE | ||
285 | LIBEBL_SUBDIR | ||
286 | TESTS_RPATH_FALSE | ||
287 | TESTS_RPATH_TRUE | ||
288 | +BUILD_WERROR_FALSE | ||
289 | +BUILD_WERROR_TRUE | ||
290 | BUILD_STATIC_FALSE | ||
291 | BUILD_STATIC_TRUE | ||
292 | GCOV_FALSE | ||
293 | @@ -612,6 +614,8 @@ NEVER_TRUE | ||
294 | base_cpu | ||
295 | NATIVE_LD_FALSE | ||
296 | NATIVE_LD_TRUE | ||
297 | +LD_AS_NEEDED | ||
298 | +WEXTRA | ||
299 | LEXLIB | ||
300 | LEX_OUTPUT_ROOT | ||
301 | LEX | ||
302 | @@ -725,6 +729,7 @@ enable_mudflap | ||
303 | enable_debugpred | ||
304 | enable_gprof | ||
305 | enable_gcov | ||
306 | +enable_werror | ||
307 | enable_tests_rpath | ||
308 | enable_libebl_subdir | ||
309 | with_zlib | ||
310 | @@ -1378,6 +1383,7 @@ Optional Features: | ||
311 | prediction | ||
312 | --enable-gprof build binaries with gprof support | ||
313 | --enable-gcov build binaries with gcov support | ||
314 | + --disable-werror do not build with -Werror | ||
315 | --enable-tests-rpath build $ORIGIN-using rpath into tests | ||
316 | --enable-libebl-subdir=DIR | ||
317 | install libebl_CPU modules in $(libdir)/DIR | ||
318 | @@ -3917,6 +3923,130 @@ if test "x$ac_cv_c99" != xyes; then : | ||
319 | as_fn_error $? "gcc with C99 support required" "$LINENO" 5 | ||
320 | fi | ||
321 | |||
322 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra option to $CC" >&5 | ||
323 | +$as_echo_n "checking for -Wextra option to $CC... " >&6; } | ||
324 | +if ${ac_cv_cc_wextra+:} false; then : | ||
325 | + $as_echo_n "(cached) " >&6 | ||
326 | +else | ||
327 | + old_CFLAGS="$CFLAGS" | ||
328 | +CFLAGS="$CFLAGS -Wextra" | ||
329 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
330 | +/* end confdefs.h. */ | ||
331 | +void foo (void) { } | ||
332 | +_ACEOF | ||
333 | +if ac_fn_c_try_compile "$LINENO"; then : | ||
334 | + ac_cv_cc_wextra=yes | ||
335 | +else | ||
336 | + ac_cv_cc_wextra=no | ||
337 | +fi | ||
338 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
339 | +CFLAGS="$old_CFLAGS" | ||
340 | +fi | ||
341 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_wextra" >&5 | ||
342 | +$as_echo "$ac_cv_cc_wextra" >&6; } | ||
343 | + | ||
344 | +if test "x$ac_cv_cc_wextra" = xyes; then : | ||
345 | + WEXTRA=-Wextra | ||
346 | +else | ||
347 | + WEXTRA=-W | ||
348 | +fi | ||
349 | + | ||
350 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fgnu89-inline option to $CC" >&5 | ||
351 | +$as_echo_n "checking for -fgnu89-inline option to $CC... " >&6; } | ||
352 | +if ${ac_cv_cc_gnu89_inline+:} false; then : | ||
353 | + $as_echo_n "(cached) " >&6 | ||
354 | +else | ||
355 | + old_CFLAGS="$CFLAGS" | ||
356 | +CFLAGS="$CFLAGS -fgnu89-inline -Werror" | ||
357 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
358 | +/* end confdefs.h. */ | ||
359 | + | ||
360 | +void foo (void) | ||
361 | +{ | ||
362 | + inline void bar (void) {} | ||
363 | + bar (); | ||
364 | +} | ||
365 | +extern inline void baz (void) {} | ||
366 | + | ||
367 | +_ACEOF | ||
368 | +if ac_fn_c_try_compile "$LINENO"; then : | ||
369 | + ac_cv_cc_gnu89_inline=yes | ||
370 | +else | ||
371 | + ac_cv_cc_gnu89_inline=no | ||
372 | +fi | ||
373 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||
374 | +CFLAGS="$old_CFLAGS" | ||
375 | +fi | ||
376 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_gnu89_inline" >&5 | ||
377 | +$as_echo "$ac_cv_cc_gnu89_inline" >&6; } | ||
378 | +if test "x$ac_cv_cc_gnu89_inline" = xyes; then : | ||
379 | + WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline" | ||
380 | +fi | ||
381 | + | ||
382 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --as-needed linker option" >&5 | ||
383 | +$as_echo_n "checking for --as-needed linker option... " >&6; } | ||
384 | +if ${ac_cv_as_needed+:} false; then : | ||
385 | + $as_echo_n "(cached) " >&6 | ||
386 | +else | ||
387 | + cat > conftest.c <<EOF | ||
388 | +int main (void) { return 0; } | ||
389 | +EOF | ||
390 | +if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS | ||
391 | + -fPIC -shared -o conftest.so conftest.c | ||
392 | + -Wl,--as-needed 1>&5' | ||
393 | + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 | ||
394 | + (eval $ac_try) 2>&5 | ||
395 | + ac_status=$? | ||
396 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | ||
397 | + test $ac_status = 0; }; } | ||
398 | +then | ||
399 | + ac_cv_as_needed=yes | ||
400 | +else | ||
401 | + ac_cv_as_needed=no | ||
402 | +fi | ||
403 | +rm -f conftest* | ||
404 | +fi | ||
405 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_as_needed" >&5 | ||
406 | +$as_echo "$ac_cv_as_needed" >&6; } | ||
407 | +if test "x$ac_cv_as_needed" = xyes; then : | ||
408 | + LD_AS_NEEDED=-Wl,--as-needed | ||
409 | +else | ||
410 | + LD_AS_NEEDED= | ||
411 | +fi | ||
412 | + | ||
413 | + | ||
414 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5 | ||
415 | +$as_echo_n "checking for __builtin_popcount... " >&6; } | ||
416 | +if ${ac_cv_popcount+:} false; then : | ||
417 | + $as_echo_n "(cached) " >&6 | ||
418 | +else | ||
419 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
420 | +/* end confdefs.h. */ | ||
421 | + | ||
422 | +int | ||
423 | +main () | ||
424 | +{ | ||
425 | +exit (__builtin_popcount (127)); | ||
426 | + ; | ||
427 | + return 0; | ||
428 | +} | ||
429 | +_ACEOF | ||
430 | +if ac_fn_c_try_link "$LINENO"; then : | ||
431 | + ac_cv_popcount=yes | ||
432 | +else | ||
433 | + ac_cv_popcount=no | ||
434 | +fi | ||
435 | +rm -f core conftest.err conftest.$ac_objext \ | ||
436 | + conftest$ac_exeext conftest.$ac_ext | ||
437 | +fi | ||
438 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_popcount" >&5 | ||
439 | +$as_echo "$ac_cv_popcount" >&6; } | ||
440 | +if test "x$ac_cv_popcount" = xyes; then : | ||
441 | + | ||
442 | +$as_echo "#define HAVE_BUILTIN_POPCOUNT 1" >>confdefs.h | ||
443 | + | ||
444 | +fi | ||
445 | + | ||
446 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support" >&5 | ||
447 | $as_echo_n "checking for __thread support... " >&6; } | ||
448 | if ${ac_cv_tls+:} false; then : | ||
449 | @@ -3953,7 +4083,13 @@ fi | ||
450 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5 | ||
451 | $as_echo "$ac_cv_tls" >&6; } | ||
452 | if test "x$ac_cv_tls" != xyes; then : | ||
453 | - as_fn_error $? "__thread support required" "$LINENO" 5 | ||
454 | + if test "$use_locks" = yes; then : | ||
455 | + as_fn_error $? "--enable-thread-safety requires __thread support" "$LINENO" 5 | ||
456 | +else | ||
457 | + | ||
458 | +$as_echo "#define __thread /* empty: no multi-thread support */" >>confdefs.h | ||
459 | + | ||
460 | +fi | ||
461 | fi | ||
462 | |||
463 | # Check whether --enable-largefile was given. | ||
464 | @@ -4302,6 +4438,22 @@ else | ||
465 | fi | ||
466 | |||
467 | |||
468 | +# Check whether --enable-werror was given. | ||
469 | +if test "${enable_werror+set}" = set; then : | ||
470 | + enableval=$enable_werror; enable_werror=$enableval | ||
471 | +else | ||
472 | + enable_werror=yes | ||
473 | +fi | ||
474 | + | ||
475 | + if test "$enable_werror" = yes; then | ||
476 | + BUILD_WERROR_TRUE= | ||
477 | + BUILD_WERROR_FALSE='#' | ||
478 | +else | ||
479 | + BUILD_WERROR_TRUE='#' | ||
480 | + BUILD_WERROR_FALSE= | ||
481 | +fi | ||
482 | + | ||
483 | + | ||
484 | # Check whether --enable-tests-rpath was given. | ||
485 | if test "${enable_tests_rpath+set}" = set; then : | ||
486 | enableval=$enable_tests_rpath; tests_use_rpath=$enableval | ||
487 | @@ -5022,7 +5174,7 @@ case "$eu_version" in | ||
488 | esac | ||
489 | |||
490 | # Round up to the next release API (x.y) version. | ||
491 | -eu_version=$(( (eu_version + 999) / 1000 )) | ||
492 | +eu_version=`expr \( $eu_version + 999 \) / 1000` | ||
493 | |||
494 | cat >confcache <<\_ACEOF | ||
495 | # This file is a shell script that caches the results of configure | ||
496 | @@ -5185,6 +5337,10 @@ if test -z "${BUILD_STATIC_TRUE}" && tes | ||
497 | as_fn_error $? "conditional \"BUILD_STATIC\" was never defined. | ||
498 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | ||
499 | fi | ||
500 | +if test -z "${BUILD_WERROR_TRUE}" && test -z "${BUILD_WERROR_FALSE}"; then | ||
501 | + as_fn_error $? "conditional \"BUILD_WERROR\" was never defined. | ||
502 | +Usually this means the macro was only invoked conditionally." "$LINENO" 5 | ||
503 | +fi | ||
504 | if test -z "${TESTS_RPATH_TRUE}" && test -z "${TESTS_RPATH_FALSE}"; then | ||
505 | as_fn_error $? "conditional \"TESTS_RPATH\" was never defined. | ||
506 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | ||
507 | |||
508 | Index: elfutils-0.155/configure.ac | ||
509 | =================================================================== | ||
510 | --- elfutils-0.155.orig/configure.ac | ||
511 | +++ elfutils-0.155/configure.ac | ||
512 | @@ -90,6 +90,54 @@ CFLAGS="$old_CFLAGS"]) | ||
513 | AS_IF([test "x$ac_cv_c99" != xyes], | ||
514 | AC_MSG_ERROR([gcc with C99 support required])) | ||
515 | |||
516 | +AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl | ||
517 | +old_CFLAGS="$CFLAGS" | ||
518 | +CFLAGS="$CFLAGS -Wextra" | ||
519 | +AC_COMPILE_IFELSE([AC_LANG_SOURCE([void foo (void) { }])], | ||
520 | + ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no) | ||
521 | +CFLAGS="$old_CFLAGS"]) | ||
522 | +AC_SUBST(WEXTRA) | ||
523 | +AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W]) | ||
524 | + | ||
525 | +AC_CACHE_CHECK([for -fgnu89-inline option to $CC], ac_cv_cc_gnu89_inline, [dnl | ||
526 | +old_CFLAGS="$CFLAGS" | ||
527 | +CFLAGS="$CFLAGS -fgnu89-inline -Werror" | ||
528 | +AC_COMPILE_IFELSE([AC_LANG_SOURCE([ | ||
529 | +void foo (void) | ||
530 | +{ | ||
531 | + inline void bar (void) {} | ||
532 | + bar (); | ||
533 | +} | ||
534 | +extern inline void baz (void) {} | ||
535 | +])], ac_cv_cc_gnu89_inline=yes, ac_cv_cc_gnu89_inline=no) | ||
536 | +CFLAGS="$old_CFLAGS"]) | ||
537 | +AS_IF([test "x$ac_cv_cc_gnu89_inline" = xyes], | ||
538 | + [WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"]) | ||
539 | + | ||
540 | +AC_CACHE_CHECK([for --as-needed linker option], | ||
541 | + ac_cv_as_needed, [dnl | ||
542 | +cat > conftest.c <<EOF | ||
543 | +int main (void) { return 0; } | ||
544 | +EOF | ||
545 | +if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS | ||
546 | + -fPIC -shared -o conftest.so conftest.c | ||
547 | + -Wl,--as-needed 1>&AS_MESSAGE_LOG_FD]) | ||
548 | +then | ||
549 | + ac_cv_as_needed=yes | ||
550 | +else | ||
551 | + ac_cv_as_needed=no | ||
552 | +fi | ||
553 | +rm -f conftest*]) | ||
554 | +AS_IF([test "x$ac_cv_as_needed" = xyes], | ||
555 | + [LD_AS_NEEDED=-Wl,--as-needed], [LD_AS_NEEDED=]) | ||
556 | +AC_SUBST(LD_AS_NEEDED) | ||
557 | + | ||
558 | +AC_CACHE_CHECK([for __builtin_popcount], ac_cv_popcount, [dnl | ||
559 | +AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[exit (__builtin_popcount (127));]])], | ||
560 | + ac_cv_popcount=yes, ac_cv_popcount=no)]) | ||
561 | +AS_IF([test "x$ac_cv_popcount" = xyes], | ||
562 | + [AC_DEFINE([HAVE_BUILTIN_POPCOUNT], [1], [Have __builtin_popcount.])]) | ||
563 | + | ||
564 | AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl | ||
565 | # Use the same flags that we use for our DSOs, so the test is representative. | ||
566 | # Some old compiler/linker/libc combinations fail some ways and not others. | ||
567 | @@ -105,7 +153,10 @@ static __thread int a; int foo (int b) { | ||
568 | CFLAGS="$save_CFLAGS" | ||
569 | LDFLAGS="$save_LDFLAGS"]) | ||
570 | AS_IF([test "x$ac_cv_tls" != xyes], | ||
571 | - AC_MSG_ERROR([__thread support required])) | ||
572 | + [AS_IF([test "$use_locks" = yes], | ||
573 | + [AC_MSG_ERROR([--enable-thread-safety requires __thread support])], | ||
574 | + [AC_DEFINE([__thread], [/* empty: no multi-thread support */], | ||
575 | + [Stubbed out if missing compiler support.])])]) | ||
576 | |||
577 | dnl This test must come as early as possible after the compiler configuration | ||
578 | dnl tests, because the choice of the file model can (in principle) affect | ||
579 | @@ -193,6 +244,11 @@ AM_CONDITIONAL(GCOV, test "$use_gcov" = | ||
580 | AM_CONDITIONAL(BUILD_STATIC, [dnl | ||
581 | test "$use_mudflap" = yes -o "$use_gprof" = yes -o "$use_gcov" = yes]) | ||
582 | |||
583 | +AC_ARG_ENABLE([werror], | ||
584 | +AS_HELP_STRING([--disable-werror],[do not build with -Werror]), | ||
585 | + [enable_werror=$enableval], [enable_werror=yes]) | ||
586 | +AM_CONDITIONAL(BUILD_WERROR, test "$enable_werror" = yes) | ||
587 | + | ||
588 | AC_ARG_ENABLE([tests-rpath], | ||
589 | AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]), | ||
590 | [tests_use_rpath=$enableval], [tests_use_rpath=no]) | ||
591 | @@ -304,6 +360,6 @@ case "$eu_version" in | ||
592 | esac | ||
593 | |||
594 | # Round up to the next release API (x.y) version. | ||
595 | -eu_version=$(( (eu_version + 999) / 1000 )) | ||
596 | +eu_version=`expr \( $eu_version + 999 \) / 1000` | ||
597 | |||
598 | AC_OUTPUT | ||
599 | Index: elfutils-0.155/lib/ChangeLog | ||
600 | =================================================================== | ||
601 | --- elfutils-0.155.orig/lib/ChangeLog | ||
602 | +++ elfutils-0.155/lib/ChangeLog | ||
603 | @@ -35,6 +35,9 @@ | ||
604 | |||
605 | 2009-01-23 Roland McGrath <roland@redhat.com> | ||
606 | |||
607 | + * eu-config.h [! HAVE_BUILTIN_POPCOUNT] | ||
608 | + (__builtin_popcount): New inline function. | ||
609 | + | ||
610 | * eu-config.h: Add multiple inclusion protection. | ||
611 | |||
612 | 2009-01-17 Ulrich Drepper <drepper@redhat.com> | ||
613 | @@ -91,6 +94,11 @@ | ||
614 | * Makefile.am (libeu_a_SOURCES): Add it. | ||
615 | * system.h: Declare crc32_file. | ||
616 | |||
617 | +2005-02-07 Roland McGrath <roland@redhat.com> | ||
618 | + | ||
619 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
620 | + (AM_CFLAGS): Use it in place of -Wextra. | ||
621 | + | ||
622 | 2005-04-30 Ulrich Drepper <drepper@redhat.com> | ||
623 | |||
624 | * Makefile.am: Use -ffunction-sections for xmalloc.c. | ||
625 | Index: elfutils-0.155/lib/eu-config.h | ||
626 | =================================================================== | ||
627 | --- elfutils-0.155.orig/lib/eu-config.h | ||
628 | +++ elfutils-0.155/lib/eu-config.h | ||
629 | @@ -162,6 +162,17 @@ asm (".section predict_data, \"aw\"; .pr | ||
630 | /* This macro is used by the tests conditionalize for standalone building. */ | ||
631 | #define ELFUTILS_HEADER(name) <lib##name.h> | ||
632 | |||
633 | +#ifndef HAVE_BUILTIN_POPCOUNT | ||
634 | +# define __builtin_popcount hakmem_popcount | ||
635 | +static inline unsigned int __attribute__ ((unused)) | ||
636 | +hakmem_popcount (unsigned int x) | ||
637 | +{ | ||
638 | + /* HAKMEM 169 */ | ||
639 | + unsigned int n = x - ((x >> 1) & 033333333333) - ((x >> 2) & 011111111111); | ||
640 | + return ((n + (n >> 3)) & 030707070707) % 63; | ||
641 | +} | ||
642 | +#endif /* HAVE_BUILTIN_POPCOUNT */ | ||
643 | + | ||
644 | |||
645 | #ifdef SHARED | ||
646 | # define OLD_VERSION(name, version) \ | ||
647 | Index: elfutils-0.155/lib/Makefile.in | ||
648 | =================================================================== | ||
649 | --- elfutils-0.155.orig/lib/Makefile.in | ||
650 | +++ elfutils-0.155/lib/Makefile.in | ||
651 | @@ -37,7 +37,8 @@ build_triplet = @build@ | ||
652 | host_triplet = @host@ | ||
653 | DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ | ||
654 | $(srcdir)/Makefile.in $(top_srcdir)/config/eu.am ChangeLog | ||
655 | -@MUDFLAP_TRUE@am__append_1 = -fmudflap | ||
656 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | ||
657 | +@MUDFLAP_TRUE@am__append_2 = -fmudflap | ||
658 | subdir = lib | ||
659 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
660 | am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ | ||
661 | @@ -100,6 +101,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
662 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
663 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
664 | LDFLAGS = @LDFLAGS@ | ||
665 | +LD_AS_NEEDED = @LD_AS_NEEDED@ | ||
666 | LEX = @LEX@ | ||
667 | LEXLIB = @LEXLIB@ | ||
668 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ | ||
669 | @@ -129,6 +131,7 @@ SHELL = @SHELL@ | ||
670 | STRIP = @STRIP@ | ||
671 | USE_NLS = @USE_NLS@ | ||
672 | VERSION = @VERSION@ | ||
673 | +WEXTRA = @WEXTRA@ | ||
674 | XGETTEXT = @XGETTEXT@ | ||
675 | XGETTEXT_015 = @XGETTEXT_015@ | ||
676 | XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ | ||
677 | @@ -190,10 +193,9 @@ zip_LIBS = @zip_LIBS@ | ||
678 | INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ | ||
679 | -I$(srcdir)/../libelf | ||
680 | AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ | ||
681 | - $($(*F)_no_Werror),,-Werror) $(if \ | ||
682 | - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ | ||
683 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | ||
684 | $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ | ||
685 | - $(am__append_1) -fpic | ||
686 | + $(am__append_1) $(am__append_2) -fpic | ||
687 | @MUDFLAP_FALSE@libmudflap = | ||
688 | @MUDFLAP_TRUE@libmudflap = -lmudflap | ||
689 | COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ | ||
690 | Index: elfutils-0.155/libasm/ChangeLog | ||
691 | =================================================================== | ||
692 | --- elfutils-0.155.orig/libasm/ChangeLog | ||
693 | +++ elfutils-0.155/libasm/ChangeLog | ||
694 | @@ -71,6 +71,11 @@ | ||
695 | * asm_error.c: Add new error ASM_E_IOERROR. | ||
696 | * libasmP.h: Add ASM_E_IOERROR definition. | ||
697 | |||
698 | +2005-05-31 Roland McGrath <roland@redhat.com> | ||
699 | + | ||
700 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
701 | + (AM_CFLAGS): Use it in place of -Wextra. | ||
702 | + | ||
703 | 2005-02-15 Ulrich Drepper <drepper@redhat.com> | ||
704 | |||
705 | * Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2. | ||
706 | Index: elfutils-0.155/libasm/Makefile.in | ||
707 | =================================================================== | ||
708 | --- elfutils-0.155.orig/libasm/Makefile.in | ||
709 | +++ elfutils-0.155/libasm/Makefile.in | ||
710 | @@ -39,10 +39,11 @@ host_triplet = @host@ | ||
711 | DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ | ||
712 | $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ | ||
713 | $(top_srcdir)/config/eu.am ChangeLog | ||
714 | -@MUDFLAP_TRUE@am__append_1 = -fmudflap | ||
715 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | ||
716 | +@MUDFLAP_TRUE@am__append_2 = -fmudflap | ||
717 | @MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1) | ||
718 | @MUDFLAP_TRUE@am_libasm_pic_a_OBJECTS = | ||
719 | -@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_2 = -lpthread | ||
720 | +@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_3 = -lpthread | ||
721 | subdir = libasm | ||
722 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
723 | am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ | ||
724 | @@ -153,6 +154,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
725 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
726 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
727 | LDFLAGS = @LDFLAGS@ | ||
728 | +LD_AS_NEEDED = @LD_AS_NEEDED@ | ||
729 | LEX = @LEX@ | ||
730 | LEXLIB = @LEXLIB@ | ||
731 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ | ||
732 | @@ -182,6 +184,7 @@ SHELL = @SHELL@ | ||
733 | STRIP = @STRIP@ | ||
734 | USE_NLS = @USE_NLS@ | ||
735 | VERSION = 1 | ||
736 | +WEXTRA = @WEXTRA@ | ||
737 | XGETTEXT = @XGETTEXT@ | ||
738 | XGETTEXT_015 = @XGETTEXT_015@ | ||
739 | XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ | ||
740 | @@ -244,10 +247,9 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi | ||
741 | -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \ | ||
742 | -I$(top_srcdir)/libdw | ||
743 | AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ | ||
744 | - $($(*F)_no_Werror),,-Werror) $(if \ | ||
745 | - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ | ||
746 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | ||
747 | $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ | ||
748 | - $(am__append_1) | ||
749 | + $(am__append_1) $(am__append_2) | ||
750 | @MUDFLAP_FALSE@libmudflap = | ||
751 | @MUDFLAP_TRUE@libmudflap = -lmudflap | ||
752 | COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ | ||
753 | @@ -276,7 +278,7 @@ libasm_a_SOURCES = asm_begin.c asm_abort | ||
754 | |||
755 | @MUDFLAP_FALSE@libasm_pic_a_SOURCES = | ||
756 | @MUDFLAP_FALSE@am_libasm_pic_a_OBJECTS = $(libasm_a_SOURCES:.c=.os) | ||
757 | -@MUDFLAP_FALSE@libasm_so_LDLIBS = $(am__append_2) | ||
758 | +@MUDFLAP_FALSE@libasm_so_LDLIBS = $(am__append_3) | ||
759 | @MUDFLAP_FALSE@libasm_so_SOURCES = | ||
760 | noinst_HEADERS = libasmP.h symbolhash.h | ||
761 | EXTRA_DIST = libasm.map | ||
762 | Index: elfutils-0.155/libcpu/ChangeLog | ||
763 | =================================================================== | ||
764 | --- elfutils-0.155.orig/libcpu/ChangeLog | ||
765 | +++ elfutils-0.155/libcpu/ChangeLog | ||
766 | @@ -38,6 +38,9 @@ | ||
767 | |||
768 | 2009-01-23 Roland McGrath <roland@redhat.com> | ||
769 | |||
770 | + * i386_disasm.c (i386_disasm): Add abort after assert-constant for old | ||
771 | + compilers that don't realize it's noreturn. | ||
772 | + | ||
773 | * Makefile.am (i386_parse_CFLAGS): Use quotes around command | ||
774 | substitution that can produce leading whitespace. | ||
775 | |||
776 | @@ -367,6 +370,11 @@ | ||
777 | * defs/i386.doc: New file. | ||
778 | * defs/x86_64: New file. | ||
779 | |||
780 | +2005-04-04 Roland McGrath <roland@redhat.com> | ||
781 | + | ||
782 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
783 | + (AM_CFLAGS): Use it instead of -Wextra. | ||
784 | + | ||
785 | 2005-02-15 Ulrich Drepper <drepper@redhat.com> | ||
786 | |||
787 | * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2. | ||
788 | Index: elfutils-0.155/libcpu/i386_disasm.c | ||
789 | =================================================================== | ||
790 | --- elfutils-0.155.orig/libcpu/i386_disasm.c | ||
791 | +++ elfutils-0.155/libcpu/i386_disasm.c | ||
792 | @@ -822,6 +822,7 @@ i386_disasm (const uint8_t **startp, con | ||
793 | |||
794 | default: | ||
795 | assert (! "INVALID not handled"); | ||
796 | + abort (); | ||
797 | } | ||
798 | } | ||
799 | else | ||
800 | Index: elfutils-0.155/libcpu/Makefile.in | ||
801 | =================================================================== | ||
802 | --- elfutils-0.155.orig/libcpu/Makefile.in | ||
803 | +++ elfutils-0.155/libcpu/Makefile.in | ||
804 | @@ -39,7 +39,8 @@ host_triplet = @host@ | ||
805 | DIST_COMMON = $(am__noinst_HEADERS_DIST) $(srcdir)/Makefile.am \ | ||
806 | $(srcdir)/Makefile.in $(top_srcdir)/config/eu.am ChangeLog \ | ||
807 | i386_lex.c i386_parse.c | ||
808 | -@MUDFLAP_TRUE@am__append_1 = -fmudflap | ||
809 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | ||
810 | +@MUDFLAP_TRUE@am__append_2 = -fmudflap | ||
811 | @MAINTAINER_MODE_TRUE@noinst_PROGRAMS = i386_gendis$(EXEEXT) | ||
812 | subdir = libcpu | ||
813 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
814 | @@ -117,6 +118,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
815 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
816 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
817 | LDFLAGS = @LDFLAGS@ | ||
818 | +LD_AS_NEEDED = @LD_AS_NEEDED@ | ||
819 | LEX = @LEX@ | ||
820 | LEXLIB = @LEXLIB@ | ||
821 | LEX_OUTPUT_ROOT = lex.$(<F:lex.l=) | ||
822 | @@ -146,6 +148,7 @@ SHELL = @SHELL@ | ||
823 | STRIP = @STRIP@ | ||
824 | USE_NLS = @USE_NLS@ | ||
825 | VERSION = @VERSION@ | ||
826 | +WEXTRA = @WEXTRA@ | ||
827 | XGETTEXT = @XGETTEXT@ | ||
828 | XGETTEXT_015 = @XGETTEXT_015@ | ||
829 | XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ | ||
830 | @@ -208,10 +211,9 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi | ||
831 | -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ | ||
832 | -I$(srcdir)/../libdw -I$(srcdir)/../libasm | ||
833 | AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ | ||
834 | - $($(*F)_no_Werror),,-Werror) $(if \ | ||
835 | - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ | ||
836 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | ||
837 | $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ | ||
838 | - $(am__append_1) -fpic -fdollars-in-identifiers | ||
839 | + $(am__append_1) $(am__append_2) -fpic -fdollars-in-identifiers | ||
840 | @MUDFLAP_FALSE@libmudflap = | ||
841 | @MUDFLAP_TRUE@libmudflap = -lmudflap | ||
842 | COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ | ||
843 | Index: elfutils-0.155/libdw/ChangeLog | ||
844 | =================================================================== | ||
845 | --- elfutils-0.155.orig/libdw/ChangeLog | ||
846 | +++ elfutils-0.155/libdw/ChangeLog | ||
847 | @@ -82,6 +82,10 @@ | ||
848 | |||
849 | * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk. | ||
850 | |||
851 | +2011-07-20 Mark Wielaard <mjw@redhat.com> | ||
852 | + | ||
853 | + * dwarf_begin_elf.c: Add fallback for be64toh if not defined. | ||
854 | + | ||
855 | 2011-07-14 Mark Wielaard <mjw@redhat.com> | ||
856 | |||
857 | * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info. | ||
858 | @@ -441,6 +445,10 @@ | ||
859 | |||
860 | * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too. | ||
861 | |||
862 | +2009-08-17 Roland McGrath <roland@redhat.com> | ||
863 | + | ||
864 | + * libdw.h: Disable extern inlines for GCC 4.2. | ||
865 | + | ||
866 | 2009-08-10 Roland McGrath <roland@redhat.com> | ||
867 | |||
868 | * dwarf_getscopevar.c: Use dwarf_diename. | ||
869 | @@ -1209,6 +1217,11 @@ | ||
870 | |||
871 | 2005-05-31 Roland McGrath <roland@redhat.com> | ||
872 | |||
873 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
874 | + (AM_CFLAGS): Use it in place of -Wextra. | ||
875 | + | ||
876 | +2005-05-31 Roland McGrath <roland@redhat.com> | ||
877 | + | ||
878 | * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to | ||
879 | formref offset. | ||
880 | |||
881 | Index: elfutils-0.155/libdw/dwarf_begin_elf.c | ||
882 | =================================================================== | ||
883 | --- elfutils-0.155.orig/libdw/dwarf_begin_elf.c | ||
884 | +++ elfutils-0.155/libdw/dwarf_begin_elf.c | ||
885 | @@ -48,6 +48,14 @@ | ||
886 | #if USE_ZLIB | ||
887 | # include <endian.h> | ||
888 | # define crc32 loser_crc32 | ||
889 | +# ifndef be64toh | ||
890 | +# include <byteswap.h> | ||
891 | +# if __BYTE_ORDER == __LITTLE_ENDIAN | ||
892 | +# define be64toh(x) bswap_64 (x) | ||
893 | +# else | ||
894 | +# define be64toh(x) (x) | ||
895 | +# endif | ||
896 | +# endif | ||
897 | # include <zlib.h> | ||
898 | # undef crc32 | ||
899 | #endif | ||
900 | Index: elfutils-0.155/libdw/libdw.h | ||
901 | =================================================================== | ||
902 | --- elfutils-0.155.orig/libdw/libdw.h | ||
903 | +++ elfutils-0.155/libdw/libdw.h | ||
904 | @@ -831,7 +831,7 @@ extern Dwarf_OOM dwarf_new_oom_handler ( | ||
905 | |||
906 | |||
907 | /* Inline optimizations. */ | ||
908 | -#ifdef __OPTIMIZE__ | ||
909 | +#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2) | ||
910 | /* Return attribute code of given attribute. */ | ||
911 | __libdw_extern_inline unsigned int | ||
912 | dwarf_whatattr (Dwarf_Attribute *attr) | ||
913 | Index: elfutils-0.155/libdw/Makefile.in | ||
914 | =================================================================== | ||
915 | --- elfutils-0.155.orig/libdw/Makefile.in | ||
916 | +++ elfutils-0.155/libdw/Makefile.in | ||
917 | @@ -39,8 +39,9 @@ host_triplet = @host@ | ||
918 | DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) \ | ||
919 | $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ | ||
920 | $(srcdir)/Makefile.in $(top_srcdir)/config/eu.am ChangeLog | ||
921 | -@MUDFLAP_TRUE@am__append_1 = -fmudflap | ||
922 | -@BUILD_STATIC_TRUE@am__append_2 = -fpic | ||
923 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | ||
924 | +@MUDFLAP_TRUE@am__append_2 = -fmudflap | ||
925 | +@BUILD_STATIC_TRUE@am__append_3 = -fpic | ||
926 | @MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1) | ||
927 | @MUDFLAP_TRUE@am_libdw_pic_a_OBJECTS = | ||
928 | subdir = libdw | ||
929 | @@ -198,6 +199,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
930 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
931 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
932 | LDFLAGS = @LDFLAGS@ | ||
933 | +LD_AS_NEEDED = @LD_AS_NEEDED@ | ||
934 | LEX = @LEX@ | ||
935 | LEXLIB = @LEXLIB@ | ||
936 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ | ||
937 | @@ -227,6 +229,7 @@ SHELL = @SHELL@ | ||
938 | STRIP = @STRIP@ | ||
939 | USE_NLS = @USE_NLS@ | ||
940 | VERSION = 1 | ||
941 | +WEXTRA = @WEXTRA@ | ||
942 | XGETTEXT = @XGETTEXT@ | ||
943 | XGETTEXT_015 = @XGETTEXT_015@ | ||
944 | XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ | ||
945 | @@ -288,10 +291,9 @@ zip_LIBS = @zip_LIBS@ | ||
946 | INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ | ||
947 | -I$(srcdir)/../libelf | ||
948 | AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ | ||
949 | - $($(*F)_no_Werror),,-Werror) $(if \ | ||
950 | - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ | ||
951 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | ||
952 | $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ | ||
953 | - $(am__append_1) $(am__append_2) | ||
954 | + $(am__append_1) $(am__append_2) $(am__append_3) | ||
955 | @MUDFLAP_FALSE@libmudflap = | ||
956 | @MUDFLAP_TRUE@libmudflap = -lmudflap | ||
957 | COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ | ||
958 | Index: elfutils-0.155/libdwfl/ChangeLog | ||
959 | =================================================================== | ||
960 | --- elfutils-0.155.orig/libdwfl/ChangeLog | ||
961 | +++ elfutils-0.155/libdwfl/ChangeLog | ||
962 | @@ -1420,6 +1420,11 @@ | ||
963 | |||
964 | 2005-07-21 Roland McGrath <roland@redhat.com> | ||
965 | |||
966 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
967 | + (AM_CFLAGS): Use it in place of -Wextra. | ||
968 | + | ||
969 | +2005-07-21 Roland McGrath <roland@redhat.com> | ||
970 | + | ||
971 | * Makefile.am (noinst_HEADERS): Add loc2c.c. | ||
972 | |||
973 | * test2.c (main): Check sscanf result to quiet warning. | ||
974 | Index: elfutils-0.155/libdwfl/Makefile.in | ||
975 | =================================================================== | ||
976 | --- elfutils-0.155.orig/libdwfl/Makefile.in | ||
977 | +++ elfutils-0.155/libdwfl/Makefile.in | ||
978 | @@ -38,11 +38,12 @@ host_triplet = @host@ | ||
979 | DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ | ||
980 | $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ | ||
981 | $(top_srcdir)/config/eu.am ChangeLog | ||
982 | -@MUDFLAP_TRUE@am__append_1 = -fmudflap | ||
983 | -@MUDFLAP_FALSE@am__append_2 = libdwfl_pic.a | ||
984 | -@ZLIB_TRUE@am__append_3 = gzip.c | ||
985 | -@BZLIB_TRUE@am__append_4 = bzip2.c | ||
986 | -@LZMA_TRUE@am__append_5 = lzma.c | ||
987 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | ||
988 | +@MUDFLAP_TRUE@am__append_2 = -fmudflap | ||
989 | +@MUDFLAP_FALSE@am__append_3 = libdwfl_pic.a | ||
990 | +@ZLIB_TRUE@am__append_4 = gzip.c | ||
991 | +@BZLIB_TRUE@am__append_5 = bzip2.c | ||
992 | +@LZMA_TRUE@am__append_6 = lzma.c | ||
993 | @MUDFLAP_TRUE@am_libdwfl_pic_a_OBJECTS = | ||
994 | subdir = libdwfl | ||
995 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
996 | @@ -188,6 +189,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
997 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
998 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
999 | LDFLAGS = @LDFLAGS@ | ||
1000 | +LD_AS_NEEDED = @LD_AS_NEEDED@ | ||
1001 | LEX = @LEX@ | ||
1002 | LEXLIB = @LEXLIB@ | ||
1003 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ | ||
1004 | @@ -217,6 +219,7 @@ SHELL = @SHELL@ | ||
1005 | STRIP = @STRIP@ | ||
1006 | USE_NLS = @USE_NLS@ | ||
1007 | VERSION = 1 | ||
1008 | +WEXTRA = @WEXTRA@ | ||
1009 | XGETTEXT = @XGETTEXT@ | ||
1010 | XGETTEXT_015 = @XGETTEXT_015@ | ||
1011 | XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ | ||
1012 | @@ -279,10 +282,9 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi | ||
1013 | -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ | ||
1014 | -I$(srcdir)/../libdw | ||
1015 | AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ | ||
1016 | - $($(*F)_no_Werror),,-Werror) $(if \ | ||
1017 | - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ | ||
1018 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | ||
1019 | $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ | ||
1020 | - $(am__append_1) | ||
1021 | + $(am__append_1) $(am__append_2) | ||
1022 | @MUDFLAP_FALSE@libmudflap = | ||
1023 | @MUDFLAP_TRUE@libmudflap = -lmudflap | ||
1024 | COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ | ||
1025 | @@ -290,7 +292,7 @@ COMPILE.os = $(filter-out -fprofile-arcs | ||
1026 | |||
1027 | CLEANFILES = *.gcno *.gcda $(am_libdwfl_pic_a_OBJECTS) | ||
1028 | textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi | ||
1029 | -noinst_LIBRARIES = libdwfl.a $(am__append_2) | ||
1030 | +noinst_LIBRARIES = libdwfl.a $(am__append_3) | ||
1031 | pkginclude_HEADERS = libdwfl.h | ||
1032 | libdwfl_a_SOURCES = dwfl_begin.c dwfl_end.c dwfl_error.c \ | ||
1033 | dwfl_version.c dwfl_module.c dwfl_report_elf.c relocate.c \ | ||
1034 | @@ -311,8 +313,8 @@ libdwfl_a_SOURCES = dwfl_begin.c dwfl_en | ||
1035 | dwfl_module_getsym.c dwfl_module_addrname.c \ | ||
1036 | dwfl_module_addrsym.c dwfl_module_return_value_location.c \ | ||
1037 | dwfl_module_register_names.c dwfl_segment_report_module.c \ | ||
1038 | - link_map.c core-file.c open.c image-header.c $(am__append_3) \ | ||
1039 | - $(am__append_4) $(am__append_5) | ||
1040 | + link_map.c core-file.c open.c image-header.c $(am__append_4) \ | ||
1041 | + $(am__append_5) $(am__append_6) | ||
1042 | @MUDFLAP_FALSE@libdwfl = $(libdw) | ||
1043 | @MUDFLAP_TRUE@libdwfl = libdwfl.a $(libdw) $(libebl) $(libelf) $(libeu) | ||
1044 | @MUDFLAP_FALSE@libdw = ../libdw/libdw.so | ||
1045 | Index: elfutils-0.155/libebl/ChangeLog | ||
1046 | =================================================================== | ||
1047 | --- elfutils-0.155.orig/libebl/ChangeLog | ||
1048 | +++ elfutils-0.155/libebl/ChangeLog | ||
1049 | @@ -658,6 +658,11 @@ | ||
1050 | * Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency | ||
1051 | tracking works right. | ||
1052 | |||
1053 | +2005-05-31 Roland McGrath <roland@redhat.com> | ||
1054 | + | ||
1055 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
1056 | + (AM_CFLAGS): Use it in place of -Wextra. | ||
1057 | + | ||
1058 | 2005-05-21 Ulrich Drepper <drepper@redhat.com> | ||
1059 | |||
1060 | * libebl_x86_64.map: Add x86_64_core_note. | ||
1061 | Index: elfutils-0.155/libebl/Makefile.in | ||
1062 | =================================================================== | ||
1063 | --- elfutils-0.155.orig/libebl/Makefile.in | ||
1064 | +++ elfutils-0.155/libebl/Makefile.in | ||
1065 | @@ -38,7 +38,8 @@ host_triplet = @host@ | ||
1066 | DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ | ||
1067 | $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ | ||
1068 | $(top_srcdir)/config/eu.am ChangeLog | ||
1069 | -@MUDFLAP_TRUE@am__append_1 = -fmudflap | ||
1070 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | ||
1071 | +@MUDFLAP_TRUE@am__append_2 = -fmudflap | ||
1072 | subdir = libebl | ||
1073 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
1074 | am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ | ||
1075 | @@ -150,6 +151,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
1076 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
1077 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
1078 | LDFLAGS = @LDFLAGS@ | ||
1079 | +LD_AS_NEEDED = @LD_AS_NEEDED@ | ||
1080 | LEX = @LEX@ | ||
1081 | LEXLIB = @LEXLIB@ | ||
1082 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ | ||
1083 | @@ -179,6 +181,7 @@ SHELL = @SHELL@ | ||
1084 | STRIP = @STRIP@ | ||
1085 | USE_NLS = @USE_NLS@ | ||
1086 | VERSION = 1 | ||
1087 | +WEXTRA = @WEXTRA@ | ||
1088 | XGETTEXT = @XGETTEXT@ | ||
1089 | XGETTEXT_015 = @XGETTEXT_015@ | ||
1090 | XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ | ||
1091 | @@ -241,10 +244,9 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi | ||
1092 | -I$(srcdir)/../libelf -I$(srcdir)/../libdw \ | ||
1093 | -I$(srcdir)/../libasm | ||
1094 | AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ | ||
1095 | - $($(*F)_no_Werror),,-Werror) $(if \ | ||
1096 | - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ | ||
1097 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | ||
1098 | $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ | ||
1099 | - $(am__append_1) -fpic | ||
1100 | + $(am__append_1) $(am__append_2) -fpic | ||
1101 | @MUDFLAP_FALSE@libmudflap = | ||
1102 | @MUDFLAP_TRUE@libmudflap = -lmudflap | ||
1103 | COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ | ||
1104 | Index: elfutils-0.155/libelf/ChangeLog | ||
1105 | =================================================================== | ||
1106 | --- elfutils-0.155.orig/libelf/ChangeLog | ||
1107 | +++ elfutils-0.155/libelf/ChangeLog | ||
1108 | @@ -34,6 +34,11 @@ | ||
1109 | |||
1110 | * elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check. | ||
1111 | |||
1112 | +2011-03-10 Roland McGrath <roland@redhat.com> | ||
1113 | + | ||
1114 | + * gnuhash_xlate.h (elf_cvt_gnuhash): Avoid post-increment in bswap_32 | ||
1115 | + argument, since some implementations are buggy macros. | ||
1116 | + | ||
1117 | 2011-02-26 Mark Wielaard <mjw@redhat.com> | ||
1118 | |||
1119 | * elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini. | ||
1120 | @@ -711,6 +716,11 @@ | ||
1121 | |||
1122 | * elf.h: Update from glibc. | ||
1123 | |||
1124 | +2005-05-31 Roland McGrath <roland@redhat.com> | ||
1125 | + | ||
1126 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
1127 | + (AM_CFLAGS): Use it in place of -Wextra. | ||
1128 | + | ||
1129 | 2005-05-08 Roland McGrath <roland@redhat.com> | ||
1130 | |||
1131 | * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now. | ||
1132 | Index: elfutils-0.155/libelf/common.h | ||
1133 | =================================================================== | ||
1134 | --- elfutils-0.155.orig/libelf/common.h | ||
1135 | +++ elfutils-0.155/libelf/common.h | ||
1136 | @@ -139,7 +139,7 @@ libelf_release_all (Elf *elf) | ||
1137 | (Var) = (sizeof (Var) == 1 \ | ||
1138 | ? (unsigned char) (Var) \ | ||
1139 | : (sizeof (Var) == 2 \ | ||
1140 | - ? bswap_16 (Var) \ | ||
1141 | + ? (unsigned short int) bswap_16 (Var) \ | ||
1142 | : (sizeof (Var) == 4 \ | ||
1143 | ? bswap_32 (Var) \ | ||
1144 | : bswap_64 (Var)))) | ||
1145 | @@ -148,7 +148,7 @@ libelf_release_all (Elf *elf) | ||
1146 | (Dst) = (sizeof (Var) == 1 \ | ||
1147 | ? (unsigned char) (Var) \ | ||
1148 | : (sizeof (Var) == 2 \ | ||
1149 | - ? bswap_16 (Var) \ | ||
1150 | + ? (unsigned short int) bswap_16 (Var) \ | ||
1151 | : (sizeof (Var) == 4 \ | ||
1152 | ? bswap_32 (Var) \ | ||
1153 | : bswap_64 (Var)))) | ||
1154 | Index: elfutils-0.155/libelf/gnuhash_xlate.h | ||
1155 | =================================================================== | ||
1156 | --- elfutils-0.155.orig/libelf/gnuhash_xlate.h | ||
1157 | +++ elfutils-0.155/libelf/gnuhash_xlate.h | ||
1158 | @@ -1,5 +1,5 @@ | ||
1159 | /* Conversion functions for versioning information. | ||
1160 | - Copyright (C) 2006, 2007 Red Hat, Inc. | ||
1161 | + Copyright (C) 2006-2011 Red Hat, Inc. | ||
1162 | This file is part of elfutils. | ||
1163 | Written by Ulrich Drepper <drepper@redhat.com>, 2006. | ||
1164 | |||
1165 | @@ -68,7 +68,9 @@ elf_cvt_gnuhash (void *dest, const void | ||
1166 | dest32 = (Elf32_Word *) &dest64[bitmask_words]; | ||
1167 | while (len >= 4) | ||
1168 | { | ||
1169 | - *dest32++ = bswap_32 (*src32++); | ||
1170 | + *dest32 = bswap_32 (*src32); | ||
1171 | + ++dest32; | ||
1172 | + ++src32; | ||
1173 | len -= 4; | ||
1174 | } | ||
1175 | } | ||
1176 | Index: elfutils-0.155/libelf/Makefile.in | ||
1177 | =================================================================== | ||
1178 | --- elfutils-0.155.orig/libelf/Makefile.in | ||
1179 | +++ elfutils-0.155/libelf/Makefile.in | ||
1180 | @@ -39,11 +39,12 @@ host_triplet = @host@ | ||
1181 | DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) \ | ||
1182 | $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ | ||
1183 | $(srcdir)/Makefile.in $(top_srcdir)/config/eu.am ChangeLog | ||
1184 | -@MUDFLAP_TRUE@am__append_1 = -fmudflap | ||
1185 | -@BUILD_STATIC_TRUE@am__append_2 = -fpic | ||
1186 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | ||
1187 | +@MUDFLAP_TRUE@am__append_2 = -fmudflap | ||
1188 | +@BUILD_STATIC_TRUE@am__append_3 = -fpic | ||
1189 | @MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1) | ||
1190 | @MUDFLAP_TRUE@am_libelf_pic_a_OBJECTS = | ||
1191 | -@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_3 = -lpthread | ||
1192 | +@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_4 = -lpthread | ||
1193 | subdir = libelf | ||
1194 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
1195 | am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ | ||
1196 | @@ -195,6 +196,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
1197 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
1198 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
1199 | LDFLAGS = @LDFLAGS@ | ||
1200 | +LD_AS_NEEDED = @LD_AS_NEEDED@ | ||
1201 | LEX = @LEX@ | ||
1202 | LEXLIB = @LEXLIB@ | ||
1203 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ | ||
1204 | @@ -224,6 +226,7 @@ SHELL = @SHELL@ | ||
1205 | STRIP = @STRIP@ | ||
1206 | USE_NLS = @USE_NLS@ | ||
1207 | VERSION = 1 | ||
1208 | +WEXTRA = @WEXTRA@ | ||
1209 | XGETTEXT = @XGETTEXT@ | ||
1210 | XGETTEXT_015 = @XGETTEXT_015@ | ||
1211 | XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ | ||
1212 | @@ -284,10 +287,9 @@ top_srcdir = @top_srcdir@ | ||
1213 | zip_LIBS = @zip_LIBS@ | ||
1214 | INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. | ||
1215 | AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ | ||
1216 | - $($(*F)_no_Werror),,-Werror) $(if \ | ||
1217 | - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ | ||
1218 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | ||
1219 | $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ | ||
1220 | - $(am__append_1) $(am__append_2) | ||
1221 | + $(am__append_1) $(am__append_2) $(am__append_3) | ||
1222 | @MUDFLAP_FALSE@libmudflap = | ||
1223 | @MUDFLAP_TRUE@libmudflap = -lmudflap | ||
1224 | COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ | ||
1225 | @@ -352,7 +354,7 @@ libelf_a_SOURCES = elf_version.c elf_has | ||
1226 | |||
1227 | @MUDFLAP_FALSE@libelf_pic_a_SOURCES = | ||
1228 | @MUDFLAP_FALSE@am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os) | ||
1229 | -@MUDFLAP_FALSE@libelf_so_LDLIBS = $(am__append_3) | ||
1230 | +@MUDFLAP_FALSE@libelf_so_LDLIBS = $(am__append_4) | ||
1231 | @MUDFLAP_FALSE@libelf_so_SOURCES = | ||
1232 | noinst_HEADERS = elf.h abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \ | ||
1233 | version_xlate.h gnuhash_xlate.h note_xlate.h dl-hash.h | ||
1234 | Index: elfutils-0.155/m4/Makefile.in | ||
1235 | =================================================================== | ||
1236 | --- elfutils-0.155.orig/m4/Makefile.in | ||
1237 | +++ elfutils-0.155/m4/Makefile.in | ||
1238 | @@ -75,6 +75,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
1239 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
1240 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
1241 | LDFLAGS = @LDFLAGS@ | ||
1242 | +LD_AS_NEEDED = @LD_AS_NEEDED@ | ||
1243 | LEX = @LEX@ | ||
1244 | LEXLIB = @LEXLIB@ | ||
1245 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ | ||
1246 | @@ -104,6 +105,7 @@ SHELL = @SHELL@ | ||
1247 | STRIP = @STRIP@ | ||
1248 | USE_NLS = @USE_NLS@ | ||
1249 | VERSION = @VERSION@ | ||
1250 | +WEXTRA = @WEXTRA@ | ||
1251 | XGETTEXT = @XGETTEXT@ | ||
1252 | XGETTEXT_015 = @XGETTEXT_015@ | ||
1253 | XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ | ||
1254 | Index: elfutils-0.155/Makefile.in | ||
1255 | =================================================================== | ||
1256 | --- elfutils-0.155.orig/Makefile.in | ||
1257 | +++ elfutils-0.155/Makefile.in | ||
1258 | @@ -165,6 +165,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
1259 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
1260 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
1261 | LDFLAGS = @LDFLAGS@ | ||
1262 | +LD_AS_NEEDED = @LD_AS_NEEDED@ | ||
1263 | LEX = @LEX@ | ||
1264 | LEXLIB = @LEXLIB@ | ||
1265 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ | ||
1266 | @@ -194,6 +195,7 @@ SHELL = @SHELL@ | ||
1267 | STRIP = @STRIP@ | ||
1268 | USE_NLS = @USE_NLS@ | ||
1269 | VERSION = @VERSION@ | ||
1270 | +WEXTRA = @WEXTRA@ | ||
1271 | XGETTEXT = @XGETTEXT@ | ||
1272 | XGETTEXT_015 = @XGETTEXT_015@ | ||
1273 | XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ | ||
1274 | Index: elfutils-0.155/src/addr2line.c | ||
1275 | =================================================================== | ||
1276 | --- elfutils-0.155.orig/src/addr2line.c | ||
1277 | +++ elfutils-0.155/src/addr2line.c | ||
1278 | @@ -447,10 +447,10 @@ handle_address (const char *string, Dwfl | ||
1279 | bool parsed = false; | ||
1280 | int i, j; | ||
1281 | char *name = NULL; | ||
1282 | - if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2 | ||
1283 | + if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2 | ||
1284 | && string[i] == '\0') | ||
1285 | parsed = adjust_to_section (name, &addr, dwfl); | ||
1286 | - switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j)) | ||
1287 | + switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j)) | ||
1288 | { | ||
1289 | default: | ||
1290 | break; | ||
1291 | Index: elfutils-0.155/src/ChangeLog | ||
1292 | =================================================================== | ||
1293 | --- elfutils-0.155.orig/src/ChangeLog | ||
1294 | +++ elfutils-0.155/src/ChangeLog | ||
1295 | @@ -606,8 +606,16 @@ | ||
1296 | * readelf.c (attr_callback): Use print_block only when we don't use | ||
1297 | print_ops. | ||
1298 | |||
1299 | +2009-08-17 Roland McGrath <roland@redhat.com> | ||
1300 | + | ||
1301 | + * ld.h: Disable extern inlines for GCC 4.2. | ||
1302 | + | ||
1303 | 2009-08-14 Roland McGrath <roland@redhat.com> | ||
1304 | |||
1305 | + * strings.c (read_block): Conditionalize posix_fadvise use | ||
1306 | + on [POSIX_FADV_SEQUENTIAL]. | ||
1307 | + From Petr Salinger <Petr.Salinger@seznam.cz>. | ||
1308 | + | ||
1309 | * ar.c (do_oper_extract): Use pathconf instead of statfs. | ||
1310 | |||
1311 | 2009-08-01 Ulrich Drepper <drepper@redhat.com> | ||
1312 | @@ -771,6 +779,8 @@ | ||
1313 | * readelf.c (print_debug_frame_section): Use t instead of j formats | ||
1314 | for ptrdiff_t OFFSET. | ||
1315 | |||
1316 | + * addr2line.c (handle_address): Use %a instead of %m for compatibility. | ||
1317 | + | ||
1318 | 2009-01-21 Ulrich Drepper <drepper@redhat.com> | ||
1319 | |||
1320 | * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section | ||
1321 | @@ -954,6 +964,11 @@ | ||
1322 | that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really | ||
1323 | is valid in RELRO. | ||
1324 | |||
1325 | +2008-03-01 Roland McGrath <roland@redhat.com> | ||
1326 | + | ||
1327 | + * readelf.c (dump_archive_index): Tweak portability hack | ||
1328 | + to match [__GNUC__ < 4] too. | ||
1329 | + | ||
1330 | 2008-02-29 Roland McGrath <roland@redhat.com> | ||
1331 | |||
1332 | * readelf.c (print_attributes): Add a cast. | ||
1333 | @@ -1205,6 +1220,8 @@ | ||
1334 | |||
1335 | * readelf.c (hex_dump): Fix rounding error in whitespace calculation. | ||
1336 | |||
1337 | + * Makefile.am (readelf_no_Werror): New variable. | ||
1338 | + | ||
1339 | 2007-10-15 Roland McGrath <roland@redhat.com> | ||
1340 | |||
1341 | * make-debug-archive.in: New file. | ||
1342 | @@ -1644,6 +1661,10 @@ | ||
1343 | * elflint.c (valid_e_machine): Add EM_ALPHA. | ||
1344 | Reported by Christian Aichinger <Greek0@gmx.net>. | ||
1345 | |||
1346 | + * strings.c (map_file): Define POSIX_MADV_SEQUENTIAL to | ||
1347 | + MADV_SEQUENTIAL if undefined. Don't call posix_madvise | ||
1348 | + if neither is defined. | ||
1349 | + | ||
1350 | 2006-08-08 Ulrich Drepper <drepper@redhat.com> | ||
1351 | |||
1352 | * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB. | ||
1353 | @@ -1720,6 +1741,10 @@ | ||
1354 | * Makefile.am: Add hacks to create dependency files for non-generic | ||
1355 | linker. | ||
1356 | |||
1357 | +2006-04-05 Roland McGrath <roland@redhat.com> | ||
1358 | + | ||
1359 | + * strings.c (MAP_POPULATE): Define to 0 if undefined. | ||
1360 | + | ||
1361 | 2006-06-12 Ulrich Drepper <drepper@redhat.com> | ||
1362 | |||
1363 | * ldgeneric.c (ld_generic_generate_sections): Don't create .interp | ||
1364 | @@ -2068,6 +2093,11 @@ | ||
1365 | * readelf.c (print_debug_loc_section): Fix indentation for larger | ||
1366 | address size. | ||
1367 | |||
1368 | +2005-05-31 Roland McGrath <roland@redhat.com> | ||
1369 | + | ||
1370 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
1371 | + (AM_CFLAGS): Use it in place of -Wextra. | ||
1372 | + | ||
1373 | 2005-05-30 Roland McGrath <roland@redhat.com> | ||
1374 | |||
1375 | * readelf.c (print_debug_line_section): Print section offset of each | ||
1376 | Index: elfutils-0.155/src/findtextrel.c | ||
1377 | =================================================================== | ||
1378 | --- elfutils-0.155.orig/src/findtextrel.c | ||
1379 | +++ elfutils-0.155/src/findtextrel.c | ||
1380 | @@ -496,7 +496,11 @@ ptrcompare (const void *p1, const void * | ||
1381 | |||
1382 | |||
1383 | static void | ||
1384 | -check_rel (size_t nsegments, struct segments segments[nsegments], | ||
1385 | +check_rel (size_t nsegments, struct segments segments[ | ||
1386 | +#if __GNUC__ >= 4 | ||
1387 | + nsegments | ||
1388 | +#endif | ||
1389 | + ], | ||
1390 | GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw, | ||
1391 | const char *fname, bool more_than_one, void **knownsrcs) | ||
1392 | { | ||
1393 | Index: elfutils-0.155/src/ld.h | ||
1394 | =================================================================== | ||
1395 | --- elfutils-0.155.orig/src/ld.h | ||
1396 | +++ elfutils-0.155/src/ld.h | ||
1397 | @@ -1114,6 +1114,7 @@ extern bool dynamically_linked_p (void); | ||
1398 | |||
1399 | /* Checked whether the symbol is undefined and referenced from a DSO. */ | ||
1400 | extern bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx); | ||
1401 | +#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2) | ||
1402 | #ifdef __GNUC_STDC_INLINE__ | ||
1403 | __attribute__ ((__gnu_inline__)) | ||
1404 | #endif | ||
1405 | @@ -1131,5 +1132,6 @@ linked_from_dso_p (struct scninfo *scnin | ||
1406 | |||
1407 | return sym->defined && sym->in_dso; | ||
1408 | } | ||
1409 | +#endif /* Optimizing and not GCC 4.2. */ | ||
1410 | |||
1411 | #endif /* ld.h */ | ||
1412 | Index: elfutils-0.155/src/Makefile.am | ||
1413 | =================================================================== | ||
1414 | --- elfutils-0.155.orig/src/Makefile.am | ||
1415 | +++ elfutils-0.155/src/Makefile.am | ||
1416 | @@ -95,6 +95,9 @@ addr2line_no_Wformat = yes | ||
1417 | # XXX While the file is not finished, don't warn about this | ||
1418 | ldgeneric_no_Wunused = yes | ||
1419 | |||
1420 | +# Buggy old compilers. | ||
1421 | +readelf_no_Werror = yes | ||
1422 | + | ||
1423 | readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl | ||
1424 | nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \ | ||
1425 | $(demanglelib) | ||
1426 | Index: elfutils-0.155/src/Makefile.in | ||
1427 | =================================================================== | ||
1428 | --- elfutils-0.155.orig/src/Makefile.in | ||
1429 | +++ elfutils-0.155/src/Makefile.in | ||
1430 | @@ -40,7 +40,8 @@ host_triplet = @host@ | ||
1431 | DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ | ||
1432 | $(srcdir)/Makefile.in $(top_srcdir)/config/eu.am ChangeLog \ | ||
1433 | ldlex.c ldscript.c | ||
1434 | -@MUDFLAP_TRUE@am__append_1 = -fmudflap | ||
1435 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | ||
1436 | +@MUDFLAP_TRUE@am__append_2 = -fmudflap | ||
1437 | bin_PROGRAMS = readelf$(EXEEXT) nm$(EXEEXT) size$(EXEEXT) \ | ||
1438 | strip$(EXEEXT) ld$(EXEEXT) elflint$(EXEEXT) \ | ||
1439 | findtextrel$(EXEEXT) addr2line$(EXEEXT) elfcmp$(EXEEXT) \ | ||
1440 | @@ -49,9 +50,9 @@ bin_PROGRAMS = readelf$(EXEEXT) nm$(EXEE | ||
1441 | @NATIVE_LD_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1) | ||
1442 | # We never build this library but we need to get the dependency files | ||
1443 | # of all the linker backends that might be used in a non-generic linker. | ||
1444 | -@NEVER_TRUE@am__append_2 = libdummy.a | ||
1445 | +@NEVER_TRUE@am__append_3 = libdummy.a | ||
1446 | # -ldl is always needed for libebl. | ||
1447 | -@NATIVE_LD_TRUE@am__append_3 = libld_elf.a | ||
1448 | +@NATIVE_LD_TRUE@am__append_4 = libld_elf.a | ||
1449 | @NATIVE_LD_TRUE@am_libld_elf_i386_pic_a_OBJECTS = | ||
1450 | subdir = src | ||
1451 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
1452 | @@ -115,7 +116,7 @@ am_ld_OBJECTS = ld.$(OBJEXT) ldgeneric.$ | ||
1453 | versionhash.$(OBJEXT) | ||
1454 | ld_OBJECTS = $(am_ld_OBJECTS) | ||
1455 | ld_DEPENDENCIES = $(libebl) $(libelf) $(libeu) $(am__DEPENDENCIES_1) \ | ||
1456 | - $(am__append_3) | ||
1457 | + $(am__append_4) | ||
1458 | ld_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(ld_LDFLAGS) $(LDFLAGS) -o \ | ||
1459 | $@ | ||
1460 | am_libld_elf_i386_so_OBJECTS = | ||
1461 | @@ -235,6 +236,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
1462 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
1463 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
1464 | LDFLAGS = @LDFLAGS@ | ||
1465 | +LD_AS_NEEDED = @LD_AS_NEEDED@ | ||
1466 | LEX = @LEX@ | ||
1467 | LEXLIB = @LEXLIB@ | ||
1468 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ | ||
1469 | @@ -264,6 +266,7 @@ SHELL = @SHELL@ | ||
1470 | STRIP = @STRIP@ | ||
1471 | USE_NLS = @USE_NLS@ | ||
1472 | VERSION = @VERSION@ | ||
1473 | +WEXTRA = @WEXTRA@ | ||
1474 | XGETTEXT = @XGETTEXT@ | ||
1475 | XGETTEXT_015 = @XGETTEXT_015@ | ||
1476 | XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ | ||
1477 | @@ -327,10 +330,9 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi | ||
1478 | -I$(srcdir)/../libdw -I$(srcdir)/../libdwfl \ | ||
1479 | -I$(srcdir)/../libasm | ||
1480 | AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ | ||
1481 | - $($(*F)_no_Werror),,-Werror) $(if \ | ||
1482 | - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ | ||
1483 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | ||
1484 | $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ | ||
1485 | - $(am__append_1) | ||
1486 | + $(am__append_1) $(am__append_2) | ||
1487 | @MUDFLAP_FALSE@libmudflap = | ||
1488 | @MUDFLAP_TRUE@libmudflap = -lmudflap | ||
1489 | COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ | ||
1490 | @@ -346,8 +348,8 @@ AM_LFLAGS = -Pld -olex.yy.c | ||
1491 | native_ld = @native_ld@ | ||
1492 | ld_dsos = libld_elf_i386_pic.a | ||
1493 | @NATIVE_LD_FALSE@noinst_LIBRARIES = libld_elf.a libar.a $(ld_dsos) \ | ||
1494 | -@NATIVE_LD_FALSE@ $(am__append_2) | ||
1495 | -@NATIVE_LD_TRUE@noinst_LIBRARIES = libld_elf.a libar.a $(am__append_2) | ||
1496 | +@NATIVE_LD_FALSE@ $(am__append_3) | ||
1497 | +@NATIVE_LD_TRUE@noinst_LIBRARIES = libld_elf.a libar.a $(am__append_3) | ||
1498 | @NATIVE_LD_TRUE@native_ld_cflags = -DBASE_ELF_NAME=elf_$(base_cpu) | ||
1499 | @NEVER_TRUE@libdummy_a_SOURCES = i386_ld.c | ||
1500 | ld_SOURCES = ld.c ldgeneric.c ldlex.l ldscript.y symbolhash.c sectionhash.c \ | ||
1501 | @@ -376,6 +378,9 @@ strings_no_Wformat = yes | ||
1502 | addr2line_no_Wformat = yes | ||
1503 | # XXX While the file is not finished, don't warn about this | ||
1504 | ldgeneric_no_Wunused = yes | ||
1505 | + | ||
1506 | +# Buggy old compilers. | ||
1507 | +readelf_no_Werror = yes | ||
1508 | readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl | ||
1509 | nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \ | ||
1510 | $(demanglelib) | ||
1511 | @@ -383,7 +388,7 @@ nm_LDADD = $(libdw) $(libebl) $(libelf) | ||
1512 | size_LDADD = $(libelf) $(libeu) $(libmudflap) | ||
1513 | strip_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl | ||
1514 | ld_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \ | ||
1515 | - $(am__append_3) | ||
1516 | + $(am__append_4) | ||
1517 | ld_LDFLAGS = -rdynamic | ||
1518 | elflint_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl | ||
1519 | findtextrel_LDADD = $(libdw) $(libelf) $(libmudflap) | ||
1520 | Index: elfutils-0.155/src/readelf.c | ||
1521 | =================================================================== | ||
1522 | --- elfutils-0.155.orig/src/readelf.c | ||
1523 | +++ elfutils-0.155/src/readelf.c | ||
1524 | @@ -3949,10 +3949,11 @@ struct listptr | ||
1525 | #define listptr_offset_size(p) ((p)->dwarf64 ? 8 : 4) | ||
1526 | #define listptr_address_size(p) ((p)->addr64 ? 8 : 4) | ||
1527 | |||
1528 | +static const char *listptr_name; | ||
1529 | static int | ||
1530 | -compare_listptr (const void *a, const void *b, void *arg) | ||
1531 | +compare_listptr (const void *a, const void *b) | ||
1532 | { | ||
1533 | - const char *name = arg; | ||
1534 | + const char *const name = listptr_name; | ||
1535 | struct listptr *p1 = (void *) a; | ||
1536 | struct listptr *p2 = (void *) b; | ||
1537 | |||
1538 | @@ -4033,8 +4034,11 @@ static void | ||
1539 | sort_listptr (struct listptr_table *table, const char *name) | ||
1540 | { | ||
1541 | if (table->n > 0) | ||
1542 | - qsort_r (table->table, table->n, sizeof table->table[0], | ||
1543 | - &compare_listptr, (void *) name); | ||
1544 | + { | ||
1545 | + listptr_name = name; | ||
1546 | + qsort (table->table, table->n, sizeof table->table[0], | ||
1547 | + &compare_listptr); | ||
1548 | + } | ||
1549 | } | ||
1550 | |||
1551 | static bool | ||
1552 | @@ -8442,7 +8446,7 @@ dump_archive_index (Elf *elf, const char | ||
1553 | if (unlikely (elf_rand (elf, as_off) == 0) | ||
1554 | || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf)) | ||
1555 | == NULL)) | ||
1556 | -#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) | ||
1557 | +#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) || __GNUC__ < 4 | ||
1558 | while (1) | ||
1559 | #endif | ||
1560 | error (EXIT_FAILURE, 0, | ||
1561 | Index: elfutils-0.155/src/strings.c | ||
1562 | =================================================================== | ||
1563 | --- elfutils-0.155.orig/src/strings.c | ||
1564 | +++ elfutils-0.155/src/strings.c | ||
1565 | @@ -43,6 +43,10 @@ | ||
1566 | |||
1567 | #include <system.h> | ||
1568 | |||
1569 | +#ifndef MAP_POPULATE | ||
1570 | +# define MAP_POPULATE 0 | ||
1571 | +#endif | ||
1572 | + | ||
1573 | |||
1574 | /* Prototypes of local functions. */ | ||
1575 | static int read_fd (int fd, const char *fname, off64_t fdlen); | ||
1576 | @@ -483,8 +487,13 @@ map_file (int fd, off64_t start_off, off | ||
1577 | fd, start_off); | ||
1578 | if (mem != MAP_FAILED) | ||
1579 | { | ||
1580 | +#if !defined POSIX_MADV_SEQUENTIAL && defined MADV_SEQUENTIAL | ||
1581 | +# define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL | ||
1582 | +#endif | ||
1583 | +#ifdef POSIX_MADV_SEQUENTIAL | ||
1584 | /* We will go through the mapping sequentially. */ | ||
1585 | (void) posix_madvise (mem, map_size, POSIX_MADV_SEQUENTIAL); | ||
1586 | +#endif | ||
1587 | break; | ||
1588 | } | ||
1589 | if (errno != EINVAL && errno != ENOMEM) | ||
1590 | @@ -576,9 +585,11 @@ read_block (int fd, const char *fname, o | ||
1591 | elfmap_off = from & ~(ps - 1); | ||
1592 | elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size); | ||
1593 | |||
1594 | +#ifdef POSIX_FADV_SEQUENTIAL | ||
1595 | if (unlikely (elfmap == MAP_FAILED)) | ||
1596 | /* Let the kernel know we are going to read everything in sequence. */ | ||
1597 | (void) posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL); | ||
1598 | +#endif | ||
1599 | } | ||
1600 | |||
1601 | if (unlikely (elfmap == MAP_FAILED)) | ||
1602 | Index: elfutils-0.155/src/strip.c | ||
1603 | =================================================================== | ||
1604 | --- elfutils-0.155.orig/src/strip.c | ||
1605 | +++ elfutils-0.155/src/strip.c | ||
1606 | @@ -45,6 +45,12 @@ | ||
1607 | #include <libebl.h> | ||
1608 | #include <system.h> | ||
1609 | |||
1610 | +#ifdef HAVE_FUTIMES | ||
1611 | +# define FUTIMES(fd, fname, tvp) futimes (fd, tvp) | ||
1612 | +#else | ||
1613 | +# define FUTIMES(fd, fname, tvp) utimes (fname, tvp) | ||
1614 | +#endif | ||
1615 | + | ||
1616 | typedef uint8_t GElf_Byte; | ||
1617 | |||
1618 | /* Name and version of program. */ | ||
1619 | @@ -318,8 +324,18 @@ process_file (const char *fname) | ||
1620 | |||
1621 | /* If we have to preserve the timestamp, we need it in the | ||
1622 | format utimes() understands. */ | ||
1623 | +#ifdef HAVE_STRUCT_STAT_ST_ATIM | ||
1624 | TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim); | ||
1625 | +#else | ||
1626 | + tv[0].tv_sec = pre_st.st_atime; | ||
1627 | + tv[0].tv_usec = 0; | ||
1628 | +#endif | ||
1629 | +#ifdef HAVE_STRUCT_STAT_ST_MTIM | ||
1630 | TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim); | ||
1631 | +#else | ||
1632 | + tv[1].tv_sec = pre_st.st_atime; | ||
1633 | + tv[1].tv_usec = 0; | ||
1634 | +#endif | ||
1635 | } | ||
1636 | |||
1637 | /* Open the file. */ | ||
1638 | @@ -2055,7 +2071,7 @@ while computing checksum for debug infor | ||
1639 | /* If requested, preserve the timestamp. */ | ||
1640 | if (tvp != NULL) | ||
1641 | { | ||
1642 | - if (futimes (fd, tvp) != 0) | ||
1643 | + if (FUTIMES (fd, output_fname, tvp) != 0) | ||
1644 | { | ||
1645 | error (0, errno, gettext ("\ | ||
1646 | cannot set access and modification date of '%s'"), | ||
1647 | @@ -2112,7 +2128,7 @@ handle_ar (int fd, Elf *elf, const char | ||
1648 | |||
1649 | if (tvp != NULL) | ||
1650 | { | ||
1651 | - if (unlikely (futimes (fd, tvp) != 0)) | ||
1652 | + if (unlikely (FUTIMES (fd, fname, tvp) != 0)) | ||
1653 | { | ||
1654 | error (0, errno, gettext ("\ | ||
1655 | cannot set access and modification date of '%s'"), fname); | ||
1656 | Index: elfutils-0.155/tests/ChangeLog | ||
1657 | =================================================================== | ||
1658 | --- elfutils-0.155.orig/tests/ChangeLog | ||
1659 | +++ elfutils-0.155/tests/ChangeLog | ||
1660 | @@ -439,6 +439,8 @@ | ||
1661 | |||
1662 | 2008-01-21 Roland McGrath <roland@redhat.com> | ||
1663 | |||
1664 | + * line2addr.c (main): Revert last change. | ||
1665 | + | ||
1666 | * testfile45.S.bz2: Add tests for cltq, cqto. | ||
1667 | * testfile45.expect.bz2: Adjust. | ||
1668 | |||
1669 | @@ -1147,6 +1149,11 @@ | ||
1670 | * Makefile.am (TESTS): Add run-elflint-test.sh. | ||
1671 | (EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2. | ||
1672 | |||
1673 | +2005-05-31 Roland McGrath <roland@redhat.com> | ||
1674 | + | ||
1675 | + * Makefile.am (WEXTRA): New variable, substituted by configure. | ||
1676 | + (AM_CFLAGS): Use it in place of -Wextra. | ||
1677 | + | ||
1678 | 2005-05-24 Ulrich Drepper <drepper@redhat.com> | ||
1679 | |||
1680 | * get-files.c (main): Use correct format specifier. | ||
1681 | Index: elfutils-0.155/tests/line2addr.c | ||
1682 | =================================================================== | ||
1683 | --- elfutils-0.155.orig/tests/line2addr.c | ||
1684 | +++ elfutils-0.155/tests/line2addr.c | ||
1685 | @@ -124,7 +124,7 @@ main (int argc, char *argv[]) | ||
1686 | { | ||
1687 | struct args a = { .arg = argv[cnt] }; | ||
1688 | |||
1689 | - switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line)) | ||
1690 | + switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line)) | ||
1691 | { | ||
1692 | default: | ||
1693 | case 0: | ||
1694 | Index: elfutils-0.155/tests/Makefile.in | ||
1695 | =================================================================== | ||
1696 | --- elfutils-0.155.orig/tests/Makefile.in | ||
1697 | +++ elfutils-0.155/tests/Makefile.in | ||
1698 | @@ -35,14 +35,15 @@ build_triplet = @build@ | ||
1699 | host_triplet = @host@ | ||
1700 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ | ||
1701 | $(top_srcdir)/config/eu.am ChangeLog | ||
1702 | -@MUDFLAP_TRUE@am__append_1 = -fmudflap | ||
1703 | -@STANDALONE_FALSE@am__append_2 = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \ | ||
1704 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | ||
1705 | +@MUDFLAP_TRUE@am__append_2 = -fmudflap | ||
1706 | +@STANDALONE_FALSE@am__append_3 = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \ | ||
1707 | @STANDALONE_FALSE@ -I$(top_srcdir)/libdwfl \ | ||
1708 | @STANDALONE_FALSE@ -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \ | ||
1709 | @STANDALONE_FALSE@ -I$(top_srcdir)/lib -I.. | ||
1710 | |||
1711 | -@STANDALONE_FALSE@am__append_3 = -Wl,-rpath-link,../libasm:../libdw:../libelf | ||
1712 | -@TESTS_RPATH_TRUE@am__append_4 = -Wl,-rpath,$(BUILD_RPATH) | ||
1713 | +@STANDALONE_FALSE@am__append_4 = -Wl,-rpath-link,../libasm:../libdw:../libelf | ||
1714 | +@TESTS_RPATH_TRUE@am__append_5 = -Wl,-rpath,$(BUILD_RPATH) | ||
1715 | check_PROGRAMS = arextract$(EXEEXT) arsymtest$(EXEEXT) \ | ||
1716 | newfile$(EXEEXT) saridx$(EXEEXT) scnnames$(EXEEXT) \ | ||
1717 | sectiondump$(EXEEXT) showptable$(EXEEXT) update1$(EXEEXT) \ | ||
1718 | @@ -92,12 +93,12 @@ TESTS = run-arextract.sh run-arsymtest.s | ||
1719 | run-readelf-gdb_index.sh run-unstrip-n.sh run-low_high_pc.sh \ | ||
1720 | run-macro-test.sh run-elf_cntl_gelf_getshdr.sh \ | ||
1721 | run-test-archive64.sh $(am__EXEEXT_1) $(am__EXEEXT_3) \ | ||
1722 | - $(am__append_9) | ||
1723 | -@STANDALONE_FALSE@am__append_5 = msg_tst md5-sha1-test | ||
1724 | + $(am__append_10) | ||
1725 | @STANDALONE_FALSE@am__append_6 = msg_tst md5-sha1-test | ||
1726 | -@HAVE_LIBASM_TRUE@am__append_7 = $(asm_TESTS) | ||
1727 | +@STANDALONE_FALSE@am__append_7 = msg_tst md5-sha1-test | ||
1728 | @HAVE_LIBASM_TRUE@am__append_8 = $(asm_TESTS) | ||
1729 | -@ENABLE_DWZ_TRUE@am__append_9 = run-readelf-dwz-multi.sh | ||
1730 | +@HAVE_LIBASM_TRUE@am__append_9 = $(asm_TESTS) | ||
1731 | +@ENABLE_DWZ_TRUE@am__append_10 = run-readelf-dwz-multi.sh | ||
1732 | subdir = tests | ||
1733 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
1734 | am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ | ||
1735 | @@ -412,6 +413,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
1736 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
1737 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
1738 | LDFLAGS = @LDFLAGS@ | ||
1739 | +LD_AS_NEEDED = @LD_AS_NEEDED@ | ||
1740 | LEX = @LEX@ | ||
1741 | LEXLIB = @LEXLIB@ | ||
1742 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ | ||
1743 | @@ -441,6 +443,7 @@ SHELL = @SHELL@ | ||
1744 | STRIP = @STRIP@ | ||
1745 | USE_NLS = @USE_NLS@ | ||
1746 | VERSION = @VERSION@ | ||
1747 | +WEXTRA = @WEXTRA@ | ||
1748 | XGETTEXT = @XGETTEXT@ | ||
1749 | XGETTEXT_015 = @XGETTEXT_015@ | ||
1750 | XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ | ||
1751 | @@ -499,12 +502,11 @@ top_build_prefix = @top_build_prefix@ | ||
1752 | top_builddir = @top_builddir@ | ||
1753 | top_srcdir = @top_srcdir@ | ||
1754 | zip_LIBS = @zip_LIBS@ | ||
1755 | -INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_2) | ||
1756 | +INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_3) | ||
1757 | AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ | ||
1758 | - $($(*F)_no_Werror),,-Werror) $(if \ | ||
1759 | - $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ | ||
1760 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | ||
1761 | $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ | ||
1762 | - $(am__append_1) | ||
1763 | + $(am__append_1) $(am__append_2) | ||
1764 | @MUDFLAP_FALSE@libmudflap = | ||
1765 | @MUDFLAP_TRUE@libmudflap = -lmudflap | ||
1766 | COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ | ||
1767 | @@ -514,7 +516,7 @@ CLEANFILES = *.gcno *.gcda | ||
1768 | textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi | ||
1769 | @MUDFLAP_FALSE@BUILD_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf | ||
1770 | @MUDFLAP_TRUE@BUILD_RPATH = \$$ORIGIN/../backends | ||
1771 | -AM_LDFLAGS = $(am__append_3) $(am__append_4) | ||
1772 | +AM_LDFLAGS = $(am__append_4) $(am__append_5) | ||
1773 | @TESTS_RPATH_FALSE@tests_rpath = no | ||
1774 | @TESTS_RPATH_TRUE@tests_rpath = yes | ||
1775 | asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \ | ||