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