summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff')
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff1122
1 files changed, 1122 insertions, 0 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff
new file mode 100644
index 0000000000..d3a7246220
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff
@@ -0,0 +1,1122 @@
1Index: elfutils-0.148/backends/ChangeLog
2===================================================================
3--- elfutils-0.148.orig/backends/ChangeLog 2010-04-13 20:08:02.000000000 +0000
4+++ elfutils-0.148/backends/ChangeLog 2010-07-03 13:04:07.000000000 +0000
5@@ -106,6 +106,10 @@
6 * ppc_attrs.c (ppc_check_object_attribute): Handle tag
7 GNU_Power_ABI_Struct_Return.
8
9+2009-01-23 Roland McGrath <roland@redhat.com>
10+
11+ * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED).
12+
13 2008-10-04 Ulrich Drepper <drepper@redhat.com>
14
15 * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and
16@@ -433,6 +437,11 @@
17 * sparc_init.c: Likewise.
18 * x86_64_init.c: Likewise.
19
20+2005-11-22 Roland McGrath <roland@redhat.com>
21+
22+ * Makefile.am (LD_AS_NEEDED): New variable, substituted by configure.
23+ (libebl_%.so rule): Use it in place of -Wl,--as-needed.
24+
25 2005-11-19 Roland McGrath <roland@redhat.com>
26
27 * ppc64_reloc.def: REL30 -> ADDR30.
28@@ -455,6 +464,9 @@
29 * Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
30 (CLEANFILES): Add libebl_$(m).so.
31
32+ * Makefile.am (WEXTRA): New variable, substituted by configure.
33+ (AM_CFLAGS): Use it in place of -Wextra.
34+
35 * ppc_reloc.def: Update bits per Alan Modra <amodra@bigpond.net.au>.
36 * ppc64_reloc.def: Likewise.
37
38Index: elfutils-0.148/backends/Makefile.am
39===================================================================
40--- elfutils-0.148.orig/backends/Makefile.am 2010-04-13 20:08:02.000000000 +0000
41+++ elfutils-0.148/backends/Makefile.am 2010-07-03 13:04:07.000000000 +0000
42@@ -103,7 +103,7 @@
43 $(LINK) -shared -o $(@:.map=.so) \
44 -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
45 -Wl,--version-script,$(@:.so=.map) \
46- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap)
47+ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap)
48 $(textrel_check)
49
50 libebl_i386.so: $(cpu_i386)
51Index: elfutils-0.148/backends/Makefile.in
52===================================================================
53--- elfutils-0.148.orig/backends/Makefile.in 2010-06-28 19:07:33.000000000 +0000
54+++ elfutils-0.148/backends/Makefile.in 2010-07-03 13:04:07.000000000 +0000
55@@ -165,6 +165,7 @@
56 INSTALL_SCRIPT = @INSTALL_SCRIPT@
57 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
58 LDFLAGS = @LDFLAGS@
59+LD_AS_NEEDED = @LD_AS_NEEDED@
60 LEX = @LEX@
61 LEXLIB = @LEXLIB@
62 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
63@@ -194,6 +195,7 @@
64 STRIP = @STRIP@
65 USE_NLS = @USE_NLS@
66 VERSION = @VERSION@
67+WEXTRA = @WEXTRA@
68 XGETTEXT = @XGETTEXT@
69 XGETTEXT_015 = @XGETTEXT_015@
70 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
71@@ -257,7 +259,7 @@
72 -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
73 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
74 $($(*F)_no_Werror),,-Werror) $(if \
75- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
76+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
77 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
78 $(am__append_1)
79 @MUDFLAP_FALSE@libmudflap =
80@@ -698,7 +700,7 @@
81 $(LINK) -shared -o $(@:.map=.so) \
82 -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
83 -Wl,--version-script,$(@:.so=.map) \
84- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap)
85+ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap)
86 $(textrel_check)
87
88 libebl_i386.so: $(cpu_i386)
89Index: elfutils-0.148/ChangeLog
90===================================================================
91--- elfutils-0.148.orig/ChangeLog 2010-04-21 14:26:40.000000000 +0000
92+++ elfutils-0.148/ChangeLog 2010-07-03 13:04:07.000000000 +0000
93@@ -2,6 +2,10 @@
94
95 * configure.ac (LOCALEDIR, DATADIRNAME): Removed.
96
97+2009-11-22 Roland McGrath <roland@redhat.com>
98+
99+ * configure.ac: Use sed and expr instead of modern bash extensions.
100+
101 2009-09-21 Ulrich Drepper <drepper@redhat.com>
102
103 * configure.ac: Update for more modern autoconf.
104@@ -10,6 +14,10 @@
105
106 * configure.ac (zip_LIBS): Check for liblzma too.
107
108+2009-08-17 Roland McGrath <roland@redhat.com>
109+
110+ * configure.ac: Check for -fgnu89-inline; add it to WEXTRA if it works.
111+
112 2009-04-19 Roland McGrath <roland@redhat.com>
113
114 * configure.ac (eu_version): Round down here, not in version.h macros.
115@@ -21,6 +29,8 @@
116
117 2009-01-23 Roland McGrath <roland@redhat.com>
118
119+ * configure.ac: Check for __builtin_popcount.
120+
121 * configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
122
123 * configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
124@@ -101,6 +111,10 @@
125 * configure.ac: Add dummy automake conditional to get dependencies
126 for non-generic linker right. See src/Makefile.am.
127
128+2005-11-22 Roland McGrath <roland@redhat.com>
129+
130+ * configure.ac: Check for --as-needed linker option.
131+
132 2005-11-18 Roland McGrath <roland@redhat.com>
133
134 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
135@@ -148,6 +162,17 @@
136 * Makefile.am (all_SUBDIRS): Add libdwfl.
137 * configure.ac: Write libdwfl/Makefile.
138
139+2005-05-31 Roland McGrath <roland@redhat.com>
140+
141+ * configure.ac (WEXTRA): Check for -Wextra and set this substitution.
142+
143+ * configure.ac: Check for struct stat st_?tim members.
144+ * src/strip.c (process_file): Use st_?time if st_?tim are not there.
145+
146+ * configure.ac: Check for futimes function.
147+ * src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead.
148+ (handle_ar) [! HAVE_FUTIMES]: Likewise.
149+
150 2005-05-19 Roland McGrath <roland@redhat.com>
151
152 * configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros.
153Index: elfutils-0.148/config/eu.am
154===================================================================
155--- elfutils-0.148.orig/config/eu.am 2010-04-21 14:26:40.000000000 +0000
156+++ elfutils-0.148/config/eu.am 2010-07-03 13:04:07.000000000 +0000
157@@ -25,11 +25,14 @@
158 ## <http://www.openinventionnetwork.com>.
159 ##
160
161+WEXTRA = @WEXTRA@
162+LD_AS_NEEDED = @LD_AS_NEEDED@
163+
164 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
165 INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
166 AM_CFLAGS = -std=gnu99 -Wall -Wshadow \
167 $(if $($(*F)_no_Werror),,-Werror) \
168- $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
169+ $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
170 $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \
171 $($(*F)_CFLAGS)
172
173Index: elfutils-0.148/config/Makefile.in
174===================================================================
175--- elfutils-0.148.orig/config/Makefile.in 2010-06-28 19:07:34.000000000 +0000
176+++ elfutils-0.148/config/Makefile.in 2010-07-03 13:04:07.000000000 +0000
177@@ -76,6 +76,7 @@
178 INSTALL_SCRIPT = @INSTALL_SCRIPT@
179 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
180 LDFLAGS = @LDFLAGS@
181+LD_AS_NEEDED = @LD_AS_NEEDED@
182 LEX = @LEX@
183 LEXLIB = @LEXLIB@
184 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
185@@ -105,6 +106,7 @@
186 STRIP = @STRIP@
187 USE_NLS = @USE_NLS@
188 VERSION = @VERSION@
189+WEXTRA = @WEXTRA@
190 XGETTEXT = @XGETTEXT@
191 XGETTEXT_015 = @XGETTEXT_015@
192 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
193Index: elfutils-0.148/config.h.in
194===================================================================
195--- elfutils-0.148.orig/config.h.in 2010-06-28 19:07:37.000000000 +0000
196+++ elfutils-0.148/config.h.in 2010-07-03 13:04:07.000000000 +0000
197@@ -1,5 +1,8 @@
198 /* config.h.in. Generated from configure.ac by autoheader. */
199
200+/* Have __builtin_popcount. */
201+#undef HAVE_BUILTIN_POPCOUNT
202+
203 /* $libdir subdirectory containing libebl modules. */
204 #undef LIBEBL_SUBDIR
205
206@@ -55,4 +58,7 @@
207 /* Define for large files, on AIX-style hosts. */
208 #undef _LARGE_FILES
209
210+/* Stubbed out if missing compiler support. */
211+#undef __thread
212+
213 #include <eu-config.h>
214Index: elfutils-0.148/configure.ac
215===================================================================
216--- elfutils-0.148.orig/configure.ac 2010-06-28 19:07:26.000000000 +0000
217+++ elfutils-0.148/configure.ac 2010-07-03 13:04:07.000000000 +0000
218@@ -73,6 +73,54 @@
219 AS_IF([test "x$ac_cv_c99" != xyes],
220 AC_MSG_ERROR([gcc with C99 support required]))
221
222+AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl
223+old_CFLAGS="$CFLAGS"
224+CFLAGS="$CFLAGS -Wextra"
225+AC_COMPILE_IFELSE([void foo (void) { }],
226+ ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no)
227+CFLAGS="$old_CFLAGS"])
228+AC_SUBST(WEXTRA)
229+AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W])
230+
231+AC_CACHE_CHECK([for -fgnu89-inline option to $CC], ac_cv_cc_gnu89_inline, [dnl
232+old_CFLAGS="$CFLAGS"
233+CFLAGS="$CFLAGS -fgnu89-inline -Werror"
234+AC_COMPILE_IFELSE([
235+void foo (void)
236+{
237+ inline void bar (void) {}
238+ bar ();
239+}
240+extern inline void baz (void) {}
241+], ac_cv_cc_gnu89_inline=yes, ac_cv_cc_gnu89_inline=no)
242+CFLAGS="$old_CFLAGS"])
243+AS_IF([test "x$ac_cv_cc_gnu89_inline" = xyes],
244+ [WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"])
245+
246+AC_CACHE_CHECK([for --as-needed linker option],
247+ ac_cv_as_needed, [dnl
248+cat > conftest.c <<EOF
249+int main (void) { return 0; }
250+EOF
251+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
252+ -fPIC -shared -o conftest.so conftest.c
253+ -Wl,--as-needed 1>&AS_MESSAGE_LOG_FD])
254+then
255+ ac_cv_as_needed=yes
256+else
257+ ac_cv_as_needed=no
258+fi
259+rm -f conftest*])
260+AS_IF([test "x$ac_cv_as_needed" = xyes],
261+ [LD_AS_NEEDED=-Wl,--as-needed], [LD_AS_NEEDED=])
262+AC_SUBST(LD_AS_NEEDED)
263+
264+AC_CACHE_CHECK([for __builtin_popcount], ac_cv_popcount, [dnl
265+AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[exit (__builtin_popcount (127));]])],
266+ ac_cv_popcount=yes, ac_cv_popcount=no)])
267+AS_IF([test "x$ac_cv_popcount" = xyes],
268+ [AC_DEFINE([HAVE_BUILTIN_POPCOUNT], [1], [Have __builtin_popcount.])])
269+
270 AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
271 # Use the same flags that we use for our DSOs, so the test is representative.
272 # Some old compiler/linker/libc combinations fail some ways and not others.
273@@ -88,7 +136,10 @@
274 CFLAGS="$save_CFLAGS"
275 LDFLAGS="$save_LDFLAGS"])
276 AS_IF([test "x$ac_cv_tls" != xyes],
277- AC_MSG_ERROR([__thread support required]))
278+ [AS_IF([test "$use_locks" = yes],
279+ [AC_MSG_ERROR([--enable-thread-safety requires __thread support])],
280+ [AC_DEFINE([__thread], [/* empty: no multi-thread support */],
281+ [Stubbed out if missing compiler support.])])])
282
283 dnl This test must come as early as possible after the compiler configuration
284 dnl tests, because the choice of the file model can (in principle) affect
285@@ -251,7 +302,7 @@
286
287 # 1.234<whatever> -> 1234<whatever>
288 case "$PACKAGE_VERSION" in
289-[[0-9]].*) eu_version="${PACKAGE_VERSION/./}" ;;
290+[[0-9]].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
291 *) AC_MSG_ERROR([confused by version number '$PACKAGE_VERSION']) ;;
292 esac
293 case "$eu_version" in
294@@ -280,6 +331,6 @@
295 esac
296
297 # Round up to the next release API (x.y) version.
298-[eu_version=$[($eu_version + 999) / 1000]]
299+eu_version=`expr \( $eu_version + 999 \) / 1000`
300
301 AC_OUTPUT
302Index: elfutils-0.148/lib/ChangeLog
303===================================================================
304--- elfutils-0.148.orig/lib/ChangeLog 2010-06-28 19:05:56.000000000 +0000
305+++ elfutils-0.148/lib/ChangeLog 2010-07-03 13:04:07.000000000 +0000
306@@ -14,6 +14,9 @@
307
308 2009-01-23 Roland McGrath <roland@redhat.com>
309
310+ * eu-config.h [! HAVE_BUILTIN_POPCOUNT]
311+ (__builtin_popcount): New inline function.
312+
313 * eu-config.h: Add multiple inclusion protection.
314
315 2009-01-17 Ulrich Drepper <drepper@redhat.com>
316@@ -70,6 +73,11 @@
317 * Makefile.am (libeu_a_SOURCES): Add it.
318 * system.h: Declare crc32_file.
319
320+2005-02-07 Roland McGrath <roland@redhat.com>
321+
322+ * Makefile.am (WEXTRA): New variable, substituted by configure.
323+ (AM_CFLAGS): Use it in place of -Wextra.
324+
325 2005-04-30 Ulrich Drepper <drepper@redhat.com>
326
327 * Makefile.am: Use -ffunction-sections for xmalloc.c.
328Index: elfutils-0.148/lib/eu-config.h
329===================================================================
330--- elfutils-0.148.orig/lib/eu-config.h 2009-08-12 14:23:22.000000000 +0000
331+++ elfutils-0.148/lib/eu-config.h 2010-07-03 13:04:07.000000000 +0000
332@@ -182,6 +182,17 @@
333 /* This macro is used by the tests conditionalize for standalone building. */
334 #define ELFUTILS_HEADER(name) <lib##name.h>
335
336+#ifndef HAVE_BUILTIN_POPCOUNT
337+# define __builtin_popcount hakmem_popcount
338+static inline unsigned int __attribute__ ((unused))
339+hakmem_popcount (unsigned int x)
340+{
341+ /* HAKMEM 169 */
342+ unsigned int n = x - ((x >> 1) & 033333333333) - ((x >> 2) & 011111111111);
343+ return ((n + (n >> 3)) & 030707070707) % 63;
344+}
345+#endif /* HAVE_BUILTIN_POPCOUNT */
346+
347
348 #ifdef SHARED
349 # define OLD_VERSION(name, version) \
350Index: elfutils-0.148/lib/Makefile.in
351===================================================================
352--- elfutils-0.148.orig/lib/Makefile.in 2010-06-28 19:07:33.000000000 +0000
353+++ elfutils-0.148/lib/Makefile.in 2010-07-03 13:04:07.000000000 +0000
354@@ -99,6 +99,7 @@
355 INSTALL_SCRIPT = @INSTALL_SCRIPT@
356 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
357 LDFLAGS = @LDFLAGS@
358+LD_AS_NEEDED = @LD_AS_NEEDED@
359 LEX = @LEX@
360 LEXLIB = @LEXLIB@
361 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
362@@ -128,6 +129,7 @@
363 STRIP = @STRIP@
364 USE_NLS = @USE_NLS@
365 VERSION = @VERSION@
366+WEXTRA = @WEXTRA@
367 XGETTEXT = @XGETTEXT@
368 XGETTEXT_015 = @XGETTEXT_015@
369 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
370@@ -190,7 +192,7 @@
371 -I$(srcdir)/../libelf
372 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
373 $($(*F)_no_Werror),,-Werror) $(if \
374- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
375+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
376 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
377 $(am__append_1) -fpic
378 @MUDFLAP_FALSE@libmudflap =
379Index: elfutils-0.148/libasm/ChangeLog
380===================================================================
381--- elfutils-0.148.orig/libasm/ChangeLog 2010-03-05 05:48:23.000000000 +0000
382+++ elfutils-0.148/libasm/ChangeLog 2010-07-03 13:04:07.000000000 +0000
383@@ -67,6 +67,11 @@
384 * asm_error.c: Add new error ASM_E_IOERROR.
385 * libasmP.h: Add ASM_E_IOERROR definition.
386
387+2005-05-31 Roland McGrath <roland@redhat.com>
388+
389+ * Makefile.am (WEXTRA): New variable, substituted by configure.
390+ (AM_CFLAGS): Use it in place of -Wextra.
391+
392 2005-02-15 Ulrich Drepper <drepper@redhat.com>
393
394 * Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
395Index: elfutils-0.148/libasm/Makefile.in
396===================================================================
397--- elfutils-0.148.orig/libasm/Makefile.in 2010-06-28 19:07:33.000000000 +0000
398+++ elfutils-0.148/libasm/Makefile.in 2010-07-03 13:04:07.000000000 +0000
399@@ -147,6 +147,7 @@
400 INSTALL_SCRIPT = @INSTALL_SCRIPT@
401 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
402 LDFLAGS = @LDFLAGS@
403+LD_AS_NEEDED = @LD_AS_NEEDED@
404 LEX = @LEX@
405 LEXLIB = @LEXLIB@
406 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
407@@ -176,6 +177,7 @@
408 STRIP = @STRIP@
409 USE_NLS = @USE_NLS@
410 VERSION = 1
411+WEXTRA = @WEXTRA@
412 XGETTEXT = @XGETTEXT@
413 XGETTEXT_015 = @XGETTEXT_015@
414 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
415@@ -239,7 +241,7 @@
416 -I$(top_srcdir)/libdw
417 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
418 $($(*F)_no_Werror),,-Werror) $(if \
419- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
420+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
421 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
422 $(am__append_1)
423 @MUDFLAP_FALSE@libmudflap =
424Index: elfutils-0.148/libcpu/ChangeLog
425===================================================================
426--- elfutils-0.148.orig/libcpu/ChangeLog 2010-03-05 05:48:23.000000000 +0000
427+++ elfutils-0.148/libcpu/ChangeLog 2010-07-03 13:04:07.000000000 +0000
428@@ -9,6 +9,9 @@
429
430 2009-01-23 Roland McGrath <roland@redhat.com>
431
432+ * i386_disasm.c (i386_disasm): Add abort after assert-constant for old
433+ compilers that don't realize it's noreturn.
434+
435 * Makefile.am (i386_parse_CFLAGS): Use quotes around command
436 substitution that can produce leading whitespace.
437
438@@ -338,6 +341,11 @@
439 * defs/i386.doc: New file.
440 * defs/x86_64: New file.
441
442+2005-04-04 Roland McGrath <roland@redhat.com>
443+
444+ * Makefile.am (WEXTRA): New variable, substituted by configure.
445+ (AM_CFLAGS): Use it instead of -Wextra.
446+
447 2005-02-15 Ulrich Drepper <drepper@redhat.com>
448
449 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
450Index: elfutils-0.148/libcpu/i386_disasm.c
451===================================================================
452--- elfutils-0.148.orig/libcpu/i386_disasm.c 2009-01-08 20:56:36.000000000 +0000
453+++ elfutils-0.148/libcpu/i386_disasm.c 2010-07-03 13:04:07.000000000 +0000
454@@ -791,6 +791,7 @@
455
456 default:
457 assert (! "INVALID not handled");
458+ abort ();
459 }
460 }
461 else
462Index: elfutils-0.148/libcpu/Makefile.in
463===================================================================
464--- elfutils-0.148.orig/libcpu/Makefile.in 2010-06-28 19:07:33.000000000 +0000
465+++ elfutils-0.148/libcpu/Makefile.in 2010-07-03 13:04:07.000000000 +0000
466@@ -116,6 +116,7 @@
467 INSTALL_SCRIPT = @INSTALL_SCRIPT@
468 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
469 LDFLAGS = @LDFLAGS@
470+LD_AS_NEEDED = @LD_AS_NEEDED@
471 LEX = @LEX@
472 LEXLIB = @LEXLIB@
473 LEX_OUTPUT_ROOT = lex.$(<F:lex.l=)
474@@ -145,6 +146,7 @@
475 STRIP = @STRIP@
476 USE_NLS = @USE_NLS@
477 VERSION = @VERSION@
478+WEXTRA = @WEXTRA@
479 XGETTEXT = @XGETTEXT@
480 XGETTEXT_015 = @XGETTEXT_015@
481 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
482@@ -208,7 +210,7 @@
483 -I$(srcdir)/../libdw -I$(srcdir)/../libasm
484 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
485 $($(*F)_no_Werror),,-Werror) $(if \
486- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
487+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
488 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
489 $(am__append_1) -fpic -fdollars-in-identifiers
490 @MUDFLAP_FALSE@libmudflap =
491Index: elfutils-0.148/libdw/ChangeLog
492===================================================================
493--- elfutils-0.148.orig/libdw/ChangeLog 2010-06-28 19:05:56.000000000 +0000
494+++ elfutils-0.148/libdw/ChangeLog 2010-07-03 13:04:07.000000000 +0000
495@@ -276,6 +276,10 @@
496
497 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
498
499+2009-08-17 Roland McGrath <roland@redhat.com>
500+
501+ * libdw.h: Disable extern inlines for GCC 4.2.
502+
503 2009-08-10 Roland McGrath <roland@redhat.com>
504
505 * dwarf_getscopevar.c: Use dwarf_diename.
506@@ -1044,6 +1048,11 @@
507
508 2005-05-31 Roland McGrath <roland@redhat.com>
509
510+ * Makefile.am (WEXTRA): New variable, substituted by configure.
511+ (AM_CFLAGS): Use it in place of -Wextra.
512+
513+2005-05-31 Roland McGrath <roland@redhat.com>
514+
515 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
516 formref offset.
517
518Index: elfutils-0.148/libdw/libdw.h
519===================================================================
520--- elfutils-0.148.orig/libdw/libdw.h 2010-06-28 19:05:56.000000000 +0000
521+++ elfutils-0.148/libdw/libdw.h 2010-07-03 13:04:07.000000000 +0000
522@@ -842,7 +842,7 @@
523
524
525 /* Inline optimizations. */
526-#ifdef __OPTIMIZE__
527+#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
528 /* Return attribute code of given attribute. */
529 __libdw_extern_inline unsigned int
530 dwarf_whatattr (Dwarf_Attribute *attr)
531Index: elfutils-0.148/libdw/Makefile.in
532===================================================================
533--- elfutils-0.148.orig/libdw/Makefile.in 2010-06-28 19:07:33.000000000 +0000
534+++ elfutils-0.148/libdw/Makefile.in 2010-07-03 13:04:07.000000000 +0000
535@@ -191,6 +191,7 @@
536 INSTALL_SCRIPT = @INSTALL_SCRIPT@
537 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
538 LDFLAGS = @LDFLAGS@
539+LD_AS_NEEDED = @LD_AS_NEEDED@
540 LEX = @LEX@
541 LEXLIB = @LEXLIB@
542 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
543@@ -220,6 +221,7 @@
544 STRIP = @STRIP@
545 USE_NLS = @USE_NLS@
546 VERSION = 1
547+WEXTRA = @WEXTRA@
548 XGETTEXT = @XGETTEXT@
549 XGETTEXT_015 = @XGETTEXT_015@
550 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
551@@ -282,7 +284,7 @@
552 -I$(srcdir)/../libelf
553 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
554 $($(*F)_no_Werror),,-Werror) $(if \
555- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
556+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
557 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
558 $(am__append_1) $(am__append_2)
559 @MUDFLAP_FALSE@libmudflap =
560Index: elfutils-0.148/libdwfl/ChangeLog
561===================================================================
562--- elfutils-0.148.orig/libdwfl/ChangeLog 2010-06-28 19:05:56.000000000 +0000
563+++ elfutils-0.148/libdwfl/ChangeLog 2010-07-03 13:04:07.000000000 +0000
564@@ -1265,6 +1265,11 @@
565
566 2005-07-21 Roland McGrath <roland@redhat.com>
567
568+ * Makefile.am (WEXTRA): New variable, substituted by configure.
569+ (AM_CFLAGS): Use it in place of -Wextra.
570+
571+2005-07-21 Roland McGrath <roland@redhat.com>
572+
573 * Makefile.am (noinst_HEADERS): Add loc2c.c.
574
575 * test2.c (main): Check sscanf result to quiet warning.
576Index: elfutils-0.148/libdwfl/Makefile.in
577===================================================================
578--- elfutils-0.148.orig/libdwfl/Makefile.in 2010-06-28 19:07:33.000000000 +0000
579+++ elfutils-0.148/libdwfl/Makefile.in 2010-07-03 13:04:07.000000000 +0000
580@@ -181,6 +181,7 @@
581 INSTALL_SCRIPT = @INSTALL_SCRIPT@
582 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
583 LDFLAGS = @LDFLAGS@
584+LD_AS_NEEDED = @LD_AS_NEEDED@
585 LEX = @LEX@
586 LEXLIB = @LEXLIB@
587 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
588@@ -210,6 +211,7 @@
589 STRIP = @STRIP@
590 USE_NLS = @USE_NLS@
591 VERSION = 1
592+WEXTRA = @WEXTRA@
593 XGETTEXT = @XGETTEXT@
594 XGETTEXT_015 = @XGETTEXT_015@
595 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
596@@ -273,7 +275,7 @@
597 -I$(srcdir)/../libdw
598 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
599 $($(*F)_no_Werror),,-Werror) $(if \
600- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
601+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
602 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
603 $(am__append_1)
604 @MUDFLAP_FALSE@libmudflap =
605Index: elfutils-0.148/libebl/ChangeLog
606===================================================================
607--- elfutils-0.148.orig/libebl/ChangeLog 2010-03-05 05:48:23.000000000 +0000
608+++ elfutils-0.148/libebl/ChangeLog 2010-07-03 13:04:07.000000000 +0000
609@@ -624,6 +624,11 @@
610 * Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
611 tracking works right.
612
613+2005-05-31 Roland McGrath <roland@redhat.com>
614+
615+ * Makefile.am (WEXTRA): New variable, substituted by configure.
616+ (AM_CFLAGS): Use it in place of -Wextra.
617+
618 2005-05-21 Ulrich Drepper <drepper@redhat.com>
619
620 * libebl_x86_64.map: Add x86_64_core_note.
621Index: elfutils-0.148/libebl/Makefile.in
622===================================================================
623--- elfutils-0.148.orig/libebl/Makefile.in 2010-06-28 19:07:34.000000000 +0000
624+++ elfutils-0.148/libebl/Makefile.in 2010-07-03 13:04:07.000000000 +0000
625@@ -143,6 +143,7 @@
626 INSTALL_SCRIPT = @INSTALL_SCRIPT@
627 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
628 LDFLAGS = @LDFLAGS@
629+LD_AS_NEEDED = @LD_AS_NEEDED@
630 LEX = @LEX@
631 LEXLIB = @LEXLIB@
632 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
633@@ -172,6 +173,7 @@
634 STRIP = @STRIP@
635 USE_NLS = @USE_NLS@
636 VERSION = 1
637+WEXTRA = @WEXTRA@
638 XGETTEXT = @XGETTEXT@
639 XGETTEXT_015 = @XGETTEXT_015@
640 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
641@@ -235,7 +237,7 @@
642 -I$(srcdir)/../libasm
643 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
644 $($(*F)_no_Werror),,-Werror) $(if \
645- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
646+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
647 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
648 $(am__append_1) -fpic
649 @MUDFLAP_FALSE@libmudflap =
650Index: elfutils-0.148/libelf/ChangeLog
651===================================================================
652--- elfutils-0.148.orig/libelf/ChangeLog 2010-06-14 21:17:20.000000000 +0000
653+++ elfutils-0.148/libelf/ChangeLog 2010-07-03 13:04:07.000000000 +0000
654@@ -657,6 +657,11 @@
655
656 * elf.h: Update from glibc.
657
658+2005-05-31 Roland McGrath <roland@redhat.com>
659+
660+ * Makefile.am (WEXTRA): New variable, substituted by configure.
661+ (AM_CFLAGS): Use it in place of -Wextra.
662+
663 2005-05-08 Roland McGrath <roland@redhat.com>
664
665 * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
666Index: elfutils-0.148/libelf/common.h
667===================================================================
668--- elfutils-0.148.orig/libelf/common.h 2009-01-08 20:56:36.000000000 +0000
669+++ elfutils-0.148/libelf/common.h 2010-07-03 13:04:07.000000000 +0000
670@@ -160,7 +160,7 @@
671 (Var) = (sizeof (Var) == 1 \
672 ? (unsigned char) (Var) \
673 : (sizeof (Var) == 2 \
674- ? bswap_16 (Var) \
675+ ? (unsigned short int) bswap_16 (Var) \
676 : (sizeof (Var) == 4 \
677 ? bswap_32 (Var) \
678 : bswap_64 (Var))))
679@@ -169,7 +169,7 @@
680 (Dst) = (sizeof (Var) == 1 \
681 ? (unsigned char) (Var) \
682 : (sizeof (Var) == 2 \
683- ? bswap_16 (Var) \
684+ ? (unsigned short int) bswap_16 (Var) \
685 : (sizeof (Var) == 4 \
686 ? bswap_32 (Var) \
687 : bswap_64 (Var))))
688Index: elfutils-0.148/libelf/Makefile.in
689===================================================================
690--- elfutils-0.148.orig/libelf/Makefile.in 2010-06-28 19:07:34.000000000 +0000
691+++ elfutils-0.148/libelf/Makefile.in 2010-07-03 13:04:07.000000000 +0000
692@@ -189,6 +189,7 @@
693 INSTALL_SCRIPT = @INSTALL_SCRIPT@
694 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
695 LDFLAGS = @LDFLAGS@
696+LD_AS_NEEDED = @LD_AS_NEEDED@
697 LEX = @LEX@
698 LEXLIB = @LEXLIB@
699 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
700@@ -218,6 +219,7 @@
701 STRIP = @STRIP@
702 USE_NLS = @USE_NLS@
703 VERSION = 1
704+WEXTRA = @WEXTRA@
705 XGETTEXT = @XGETTEXT@
706 XGETTEXT_015 = @XGETTEXT_015@
707 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
708@@ -279,7 +281,7 @@
709 INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
710 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
711 $($(*F)_no_Werror),,-Werror) $(if \
712- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
713+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
714 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
715 $(am__append_1) $(am__append_2)
716 @MUDFLAP_FALSE@libmudflap =
717Index: elfutils-0.148/m4/Makefile.in
718===================================================================
719--- elfutils-0.148.orig/m4/Makefile.in 2010-06-28 19:07:34.000000000 +0000
720+++ elfutils-0.148/m4/Makefile.in 2010-07-03 13:04:07.000000000 +0000
721@@ -75,6 +75,7 @@
722 INSTALL_SCRIPT = @INSTALL_SCRIPT@
723 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
724 LDFLAGS = @LDFLAGS@
725+LD_AS_NEEDED = @LD_AS_NEEDED@
726 LEX = @LEX@
727 LEXLIB = @LEXLIB@
728 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
729@@ -104,6 +105,7 @@
730 STRIP = @STRIP@
731 USE_NLS = @USE_NLS@
732 VERSION = @VERSION@
733+WEXTRA = @WEXTRA@
734 XGETTEXT = @XGETTEXT@
735 XGETTEXT_015 = @XGETTEXT_015@
736 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
737Index: elfutils-0.148/Makefile.in
738===================================================================
739--- elfutils-0.148.orig/Makefile.in 2010-06-28 19:07:33.000000000 +0000
740+++ elfutils-0.148/Makefile.in 2010-07-03 13:04:07.000000000 +0000
741@@ -155,6 +155,7 @@
742 INSTALL_SCRIPT = @INSTALL_SCRIPT@
743 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
744 LDFLAGS = @LDFLAGS@
745+LD_AS_NEEDED = @LD_AS_NEEDED@
746 LEX = @LEX@
747 LEXLIB = @LEXLIB@
748 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
749@@ -184,6 +185,7 @@
750 STRIP = @STRIP@
751 USE_NLS = @USE_NLS@
752 VERSION = @VERSION@
753+WEXTRA = @WEXTRA@
754 XGETTEXT = @XGETTEXT@
755 XGETTEXT_015 = @XGETTEXT_015@
756 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
757Index: elfutils-0.148/src/addr2line.c
758===================================================================
759--- elfutils-0.148.orig/src/addr2line.c 2010-05-28 14:38:30.000000000 +0000
760+++ elfutils-0.148/src/addr2line.c 2010-07-03 13:05:40.000000000 +0000
761@@ -447,10 +447,10 @@
762 bool parsed = false;
763 int i, j;
764 char *name = NULL;
765- if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
766+ if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
767 && string[i] == '\0')
768 parsed = adjust_to_section (name, &addr, dwfl);
769- switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
770+ switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
771 {
772 default:
773 break;
774Index: elfutils-0.148/src/ChangeLog
775===================================================================
776--- elfutils-0.148.orig/src/ChangeLog 2010-06-28 19:05:56.000000000 +0000
777+++ elfutils-0.148/src/ChangeLog 2010-07-03 13:04:08.000000000 +0000
778@@ -165,8 +165,16 @@
779 * readelf.c (attr_callback): Use print_block only when we don't use
780 print_ops.
781
782+2009-08-17 Roland McGrath <roland@redhat.com>
783+
784+ * ld.h: Disable extern inlines for GCC 4.2.
785+
786 2009-08-14 Roland McGrath <roland@redhat.com>
787
788+ * strings.c (read_block): Conditionalize posix_fadvise use
789+ on [POSIX_FADV_SEQUENTIAL].
790+ From Petr Salinger <Petr.Salinger@seznam.cz>.
791+
792 * ar.c (do_oper_extract): Use pathconf instead of statfs.
793
794 2009-08-01 Ulrich Drepper <drepper@redhat.com>
795@@ -330,6 +338,8 @@
796 * readelf.c (print_debug_frame_section): Use t instead of j formats
797 for ptrdiff_t OFFSET.
798
799+ * addr2line.c (handle_address): Use %a instead of %m for compatibility.
800+
801 2009-01-21 Ulrich Drepper <drepper@redhat.com>
802
803 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
804@@ -513,6 +523,11 @@
805 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
806 is valid in RELRO.
807
808+2008-03-01 Roland McGrath <roland@redhat.com>
809+
810+ * readelf.c (dump_archive_index): Tweak portability hack
811+ to match [__GNUC__ < 4] too.
812+
813 2008-02-29 Roland McGrath <roland@redhat.com>
814
815 * readelf.c (print_attributes): Add a cast.
816@@ -764,6 +779,8 @@
817
818 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
819
820+ * Makefile.am (readelf_no_Werror): New variable.
821+
822 2007-10-15 Roland McGrath <roland@redhat.com>
823
824 * make-debug-archive.in: New file.
825@@ -1203,6 +1220,10 @@
826 * elflint.c (valid_e_machine): Add EM_ALPHA.
827 Reported by Christian Aichinger <Greek0@gmx.net>.
828
829+ * strings.c (map_file): Define POSIX_MADV_SEQUENTIAL to
830+ MADV_SEQUENTIAL if undefined. Don't call posix_madvise
831+ if neither is defined.
832+
833 2006-08-08 Ulrich Drepper <drepper@redhat.com>
834
835 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
836@@ -1279,6 +1300,10 @@
837 * Makefile.am: Add hacks to create dependency files for non-generic
838 linker.
839
840+2006-04-05 Roland McGrath <roland@redhat.com>
841+
842+ * strings.c (MAP_POPULATE): Define to 0 if undefined.
843+
844 2006-06-12 Ulrich Drepper <drepper@redhat.com>
845
846 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
847@@ -1627,6 +1652,11 @@
848 * readelf.c (print_debug_loc_section): Fix indentation for larger
849 address size.
850
851+2005-05-31 Roland McGrath <roland@redhat.com>
852+
853+ * Makefile.am (WEXTRA): New variable, substituted by configure.
854+ (AM_CFLAGS): Use it in place of -Wextra.
855+
856 2005-05-30 Roland McGrath <roland@redhat.com>
857
858 * readelf.c (print_debug_line_section): Print section offset of each
859Index: elfutils-0.148/src/findtextrel.c
860===================================================================
861--- elfutils-0.148.orig/src/findtextrel.c 2009-02-11 01:12:59.000000000 +0000
862+++ elfutils-0.148/src/findtextrel.c 2010-07-03 13:04:08.000000000 +0000
863@@ -490,7 +490,11 @@
864
865
866 static void
867-check_rel (size_t nsegments, struct segments segments[nsegments],
868+check_rel (size_t nsegments, struct segments segments[
869+#if __GNUC__ >= 4
870+ nsegments
871+#endif
872+ ],
873 GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw,
874 const char *fname, bool more_than_one, void **knownsrcs)
875 {
876Index: elfutils-0.148/src/ld.h
877===================================================================
878--- elfutils-0.148.orig/src/ld.h 2009-06-13 22:39:51.000000000 +0000
879+++ elfutils-0.148/src/ld.h 2010-07-03 13:04:08.000000000 +0000
880@@ -1122,6 +1122,7 @@
881
882 /* Checked whether the symbol is undefined and referenced from a DSO. */
883 extern bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx);
884+#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
885 #ifdef __GNUC_STDC_INLINE__
886 __attribute__ ((__gnu_inline__))
887 #endif
888@@ -1139,5 +1140,6 @@
889
890 return sym->defined && sym->in_dso;
891 }
892+#endif /* Optimizing and not GCC 4.2. */
893
894 #endif /* ld.h */
895Index: elfutils-0.148/src/Makefile.am
896===================================================================
897--- elfutils-0.148.orig/src/Makefile.am 2010-03-05 05:48:23.000000000 +0000
898+++ elfutils-0.148/src/Makefile.am 2010-07-03 13:04:08.000000000 +0000
899@@ -99,6 +99,9 @@
900 # XXX While the file is not finished, don't warn about this
901 ldgeneric_no_Wunused = yes
902
903+# Buggy old compilers.
904+readelf_no_Werror = yes
905+
906 readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
907 nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
908 size_LDADD = $(libelf) $(libeu) $(libmudflap)
909Index: elfutils-0.148/src/Makefile.in
910===================================================================
911--- elfutils-0.148.orig/src/Makefile.in 2010-06-28 19:07:34.000000000 +0000
912+++ elfutils-0.148/src/Makefile.in 2010-07-03 13:04:08.000000000 +0000
913@@ -228,6 +228,7 @@
914 INSTALL_SCRIPT = @INSTALL_SCRIPT@
915 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
916 LDFLAGS = @LDFLAGS@
917+LD_AS_NEEDED = @LD_AS_NEEDED@
918 LEX = @LEX@
919 LEXLIB = @LEXLIB@
920 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
921@@ -257,6 +258,7 @@
922 STRIP = @STRIP@
923 USE_NLS = @USE_NLS@
924 VERSION = @VERSION@
925+WEXTRA = @WEXTRA@
926 XGETTEXT = @XGETTEXT@
927 XGETTEXT_015 = @XGETTEXT_015@
928 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
929@@ -321,7 +323,7 @@
930 -I$(srcdir)/../libasm
931 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
932 $($(*F)_no_Werror),,-Werror) $(if \
933- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
934+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
935 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
936 $(am__append_1)
937 @MUDFLAP_FALSE@libmudflap =
938@@ -368,6 +370,9 @@
939 addr2line_no_Wformat = yes
940 # XXX While the file is not finished, don't warn about this
941 ldgeneric_no_Wunused = yes
942+
943+# Buggy old compilers.
944+readelf_no_Werror = yes
945 readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
946 nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
947 size_LDADD = $(libelf) $(libeu) $(libmudflap)
948Index: elfutils-0.148/src/readelf.c
949===================================================================
950--- elfutils-0.148.orig/src/readelf.c 2010-06-28 19:05:56.000000000 +0000
951+++ elfutils-0.148/src/readelf.c 2010-07-03 13:04:08.000000000 +0000
952@@ -7845,7 +7845,7 @@
953 if (unlikely (elf_rand (elf, as_off) == 0)
954 || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf))
955 == NULL))
956-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)
957+#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) || __GNUC__ < 4
958 while (1)
959 #endif
960 error (EXIT_FAILURE, 0,
961Index: elfutils-0.148/src/strings.c
962===================================================================
963--- elfutils-0.148.orig/src/strings.c 2009-02-11 01:12:59.000000000 +0000
964+++ elfutils-0.148/src/strings.c 2010-07-03 13:04:08.000000000 +0000
965@@ -51,6 +51,10 @@
966
967 #include <system.h>
968
969+#ifndef MAP_POPULATE
970+# define MAP_POPULATE 0
971+#endif
972+
973
974 /* Prototypes of local functions. */
975 static int read_fd (int fd, const char *fname, off64_t fdlen);
976@@ -491,8 +495,13 @@
977 fd, start_off);
978 if (mem != MAP_FAILED)
979 {
980+#if !defined POSIX_MADV_SEQUENTIAL && defined MADV_SEQUENTIAL
981+# define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
982+#endif
983+#ifdef POSIX_MADV_SEQUENTIAL
984 /* We will go through the mapping sequentially. */
985 (void) posix_madvise (mem, map_size, POSIX_MADV_SEQUENTIAL);
986+#endif
987 break;
988 }
989 if (errno != EINVAL && errno != ENOMEM)
990@@ -586,9 +595,11 @@
991 elfmap_off = from & ~(ps - 1);
992 elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size);
993
994+#ifdef POSIX_FADV_SEQUENTIAL
995 if (unlikely (elfmap == MAP_FAILED))
996 /* Let the kernel know we are going to read everything in sequence. */
997 (void) posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
998+#endif
999 }
1000
1001 if (unlikely (elfmap == MAP_FAILED))
1002Index: elfutils-0.148/src/strip.c
1003===================================================================
1004--- elfutils-0.148.orig/src/strip.c 2010-01-15 09:05:55.000000000 +0000
1005+++ elfutils-0.148/src/strip.c 2010-07-03 13:04:08.000000000 +0000
1006@@ -53,6 +53,12 @@
1007 #include <libebl.h>
1008 #include <system.h>
1009
1010+#ifdef HAVE_FUTIMES
1011+# define FUTIMES(fd, fname, tvp) futimes (fd, tvp)
1012+#else
1013+# define FUTIMES(fd, fname, tvp) utimes (fname, tvp)
1014+#endif
1015+
1016
1017 /* Name and version of program. */
1018 static void print_version (FILE *stream, struct argp_state *state);
1019@@ -301,8 +307,18 @@
1020
1021 /* If we have to preserve the timestamp, we need it in the
1022 format utimes() understands. */
1023+#ifdef HAVE_STRUCT_STAT_ST_ATIM
1024 TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim);
1025+#else
1026+ tv[0].tv_sec = pre_st.st_atime;
1027+ tv[0].tv_usec = 0;
1028+#endif
1029+#ifdef HAVE_STRUCT_STAT_ST_MTIM
1030 TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim);
1031+#else
1032+ tv[1].tv_sec = pre_st.st_atime;
1033+ tv[1].tv_usec = 0;
1034+#endif
1035 }
1036
1037 /* Open the file. */
1038@@ -1747,7 +1763,7 @@
1039 /* If requested, preserve the timestamp. */
1040 if (tvp != NULL)
1041 {
1042- if (futimes (fd, tvp) != 0)
1043+ if (FUTIMES (fd, output_fname, tvp) != 0)
1044 {
1045 error (0, errno, gettext ("\
1046 cannot set access and modification date of '%s'"),
1047@@ -1804,7 +1820,7 @@
1048
1049 if (tvp != NULL)
1050 {
1051- if (unlikely (futimes (fd, tvp) != 0))
1052+ if (unlikely (FUTIMES (fd, fname, tvp) != 0))
1053 {
1054 error (0, errno, gettext ("\
1055 cannot set access and modification date of '%s'"), fname);
1056Index: elfutils-0.148/tests/ChangeLog
1057===================================================================
1058--- elfutils-0.148.orig/tests/ChangeLog 2010-06-28 19:05:56.000000000 +0000
1059+++ elfutils-0.148/tests/ChangeLog 2010-07-03 13:04:08.000000000 +0000
1060@@ -154,6 +154,8 @@
1061
1062 2008-01-21 Roland McGrath <roland@redhat.com>
1063
1064+ * line2addr.c (main): Revert last change.
1065+
1066 * testfile45.S.bz2: Add tests for cltq, cqto.
1067 * testfile45.expect.bz2: Adjust.
1068
1069@@ -862,6 +864,11 @@
1070 * Makefile.am (TESTS): Add run-elflint-test.sh.
1071 (EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
1072
1073+2005-05-31 Roland McGrath <roland@redhat.com>
1074+
1075+ * Makefile.am (WEXTRA): New variable, substituted by configure.
1076+ (AM_CFLAGS): Use it in place of -Wextra.
1077+
1078 2005-05-24 Ulrich Drepper <drepper@redhat.com>
1079
1080 * get-files.c (main): Use correct format specifier.
1081Index: elfutils-0.148/tests/line2addr.c
1082===================================================================
1083--- elfutils-0.148.orig/tests/line2addr.c 2009-01-08 20:56:37.000000000 +0000
1084+++ elfutils-0.148/tests/line2addr.c 2010-07-03 13:04:08.000000000 +0000
1085@@ -132,7 +132,7 @@
1086 {
1087 struct args a = { .arg = argv[cnt] };
1088
1089- switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
1090+ switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
1091 {
1092 default:
1093 case 0:
1094Index: elfutils-0.148/tests/Makefile.in
1095===================================================================
1096--- elfutils-0.148.orig/tests/Makefile.in 2010-06-28 19:07:34.000000000 +0000
1097+++ elfutils-0.148/tests/Makefile.in 2010-07-03 13:04:08.000000000 +0000
1098@@ -372,6 +372,7 @@
1099 INSTALL_SCRIPT = @INSTALL_SCRIPT@
1100 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
1101 LDFLAGS = @LDFLAGS@
1102+LD_AS_NEEDED = @LD_AS_NEEDED@
1103 LEX = @LEX@
1104 LEXLIB = @LEXLIB@
1105 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
1106@@ -401,6 +402,7 @@
1107 STRIP = @STRIP@
1108 USE_NLS = @USE_NLS@
1109 VERSION = @VERSION@
1110+WEXTRA = @WEXTRA@
1111 XGETTEXT = @XGETTEXT@
1112 XGETTEXT_015 = @XGETTEXT_015@
1113 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
1114@@ -462,7 +464,7 @@
1115 INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_2)
1116 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
1117 $($(*F)_no_Werror),,-Werror) $(if \
1118- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
1119+ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
1120 $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
1121 $(am__append_1)
1122 @MUDFLAP_FALSE@libmudflap =