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