]>
Commit | Line | Data |
---|---|---|
427948e0 MT |
1 | --- elfutils/backends/ChangeLog |
2 | +++ elfutils/backends/ChangeLog | |
3 | @@ -433,6 +433,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 | @@ -760,6 +764,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 | @@ -782,6 +791,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 | @@ -119,7 +119,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) | |
43 | + -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) | |
44 | @$(textrel_check) | |
45 | ||
46 | libebl_i386.so: $(cpu_i386) | |
47 | --- elfutils/backends/Makefile.in | |
48 | +++ elfutils/backends/Makefile.in | |
49 | @@ -83,6 +83,7 @@ host_triplet = @host@ | |
50 | DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ | |
51 | $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ | |
52 | $(noinst_HEADERS) ChangeLog | |
53 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | |
54 | subdir = backends | |
55 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | |
56 | am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ | |
57 | @@ -285,6 +286,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
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@ | |
65 | @@ -316,6 +318,7 @@ SHELL = @SHELL@ | |
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@ | |
73 | @@ -378,11 +381,11 @@ zip_LIBS = @zip_LIBS@ | |
74 | AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ | |
75 | -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ | |
76 | -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw | |
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 \ | |
84 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | |
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 | @@ -888,7 +891,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a | |
91 | $(LINK) -shared -o $(@:.map=.so) \ | |
92 | -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ | |
93 | -Wl,--version-script,$(@:.so=.map) \ | |
94 | - -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) | |
95 | + -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) | |
96 | @$(textrel_check) | |
97 | ||
98 | libebl_i386.so: $(cpu_i386) | |
99 | --- elfutils/ChangeLog | |
100 | +++ elfutils/ChangeLog | |
101 | @@ -187,6 +187,8 @@ | |
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> | |
110 | @@ -205,6 +207,9 @@ | |
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> | |
120 | @@ -226,6 +231,10 @@ | |
121 | ||
122 | * configure.ac (LOCALEDIR, DATADIRNAME): Removed. | |
123 | ||
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. | |
131 | @@ -234,6 +243,10 @@ | |
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. | |
142 | @@ -245,6 +258,8 @@ | |
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 | |
151 | @@ -325,6 +340,10 @@ | |
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. | |
162 | @@ -372,6 +391,17 @@ | |
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. | |
180 | --- elfutils/config/ChangeLog | |
181 | +++ elfutils/config/ChangeLog | |
182 | @@ -71,6 +71,10 @@ | |
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. | |
193 | --- elfutils/config/eu.am | |
194 | +++ elfutils/config/eu.am | |
195 | @@ -1,6 +1,6 @@ | |
196 | ## Common automake fragments for elfutils subdirectory makefiles. | |
197 | ## | |
198 | -## Copyright (C) 2010, 2014 Red Hat, Inc. | |
199 | +## Copyright (C) 2010-2011, 2014 Red Hat, Inc. | |
200 | ## | |
201 | ## This file is part of elfutils. | |
202 | ## | |
203 | @@ -29,13 +29,21 @@ | |
204 | ## not, see <http://www.gnu.org/licenses/>. | |
205 | ## | |
206 | ||
207 | +WEXTRA = @WEXTRA@ | |
208 | +LD_AS_NEEDED = @LD_AS_NEEDED@ | |
209 | + | |
210 | DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"' | |
211 | AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. | |
212 | -AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ | |
213 | +AM_CFLAGS = -std=gnu99 -Wall -Wshadow \ | |
214 | $(if $($(*F)_no_Werror),,-Werror) \ | |
215 | - $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ | |
216 | + $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \ | |
217 | + $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \ | |
218 | $($(*F)_CFLAGS) | |
219 | ||
220 | +if BUILD_WERROR | |
221 | +AM_CFLAGS += $(if $($(*F)_no_Werror),,-Werror) | |
222 | +endif | |
223 | + | |
224 | COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) | |
225 | ||
226 | %.os: %.c %.o | |
227 | --- elfutils/config/Makefile.in | |
228 | +++ elfutils/config/Makefile.in | |
229 | @@ -147,6 +147,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
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@ | |
237 | @@ -178,6 +179,7 @@ SHELL = @SHELL@ | |
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 | |
247 | @@ -3,6 +3,9 @@ | |
248 | /* Should ar and ranlib use -D behavior by default? */ | |
249 | #undef DEFAULT_AR_DETERMINISTIC | |
250 | ||
251 | +/* Have __builtin_popcount. */ | |
252 | +#undef HAVE_BUILTIN_POPCOUNT | |
253 | + | |
254 | /* Define to 1 if you have the <inttypes.h> header file. */ | |
255 | #undef HAVE_INTTYPES_H | |
256 | ||
257 | @@ -102,4 +105,7 @@ | |
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 | |
267 | @@ -663,6 +663,8 @@ ZLIB_TRUE | |
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 | |
275 | USE_VALGRIND_FALSE | |
276 | @@ -678,6 +680,8 @@ NEVER_TRUE | |
277 | base_cpu | |
278 | NATIVE_LD_FALSE | |
279 | NATIVE_LD_TRUE | |
280 | +LD_AS_NEEDED | |
281 | +WEXTRA | |
282 | NM | |
283 | READELF | |
284 | ac_ct_AR | |
285 | @@ -798,6 +802,7 @@ enable_debugpred | |
286 | enable_gprof | |
287 | enable_gcov | |
288 | enable_valgrind | |
289 | +enable_werror | |
290 | enable_tests_rpath | |
291 | enable_libebl_subdir | |
292 | with_zlib | |
293 | @@ -1455,6 +1460,7 @@ Optional Features: | |
294 | --enable-gprof build binaries with gprof support | |
295 | --enable-gcov build binaries with gcov support | |
296 | --enable-valgrind run all tests under valgrind | |
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 | |
301 | @@ -4843,6 +4849,130 @@ if test "x$ac_cv_c99" != xyes; then : | |
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 : | |
432 | @@ -4879,7 +5009,13 @@ fi | |
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. | |
447 | @@ -5246,6 +5382,22 @@ else | |
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 | |
470 | @@ -5983,7 +6135,7 @@ case "$eu_version" in | |
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 | ||
477 | ac_ext=c | |
478 | ac_cpp='$CPP $CPPFLAGS' | |
479 | @@ -6729,6 +6881,10 @@ if test -z "${BUILD_STATIC_TRUE}" && tes | |
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 | |
490 | --- elfutils/configure.ac | |
491 | +++ elfutils/configure.ac | |
492 | @@ -89,6 +89,54 @@ CFLAGS="$old_CFLAGS"]) | |
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" | |
499 | +AC_COMPILE_IFELSE([AC_LANG_SOURCE([void foo (void) { }])], | |
500 | + ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no) | |
501 | +CFLAGS="$old_CFLAGS"]) | |
502 | +AC_SUBST(WEXTRA) | |
503 | +AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W]) | |
504 | + | |
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" | |
508 | +AC_COMPILE_IFELSE([AC_LANG_SOURCE([ | |
509 | +void foo (void) | |
510 | +{ | |
511 | + inline void bar (void) {} | |
512 | + bar (); | |
513 | +} | |
514 | +extern inline void baz (void) {} | |
515 | +])], ac_cv_cc_gnu89_inline=yes, ac_cv_cc_gnu89_inline=no) | |
516 | +CFLAGS="$old_CFLAGS"]) | |
517 | +AS_IF([test "x$ac_cv_cc_gnu89_inline" = xyes], | |
518 | + [WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"]) | |
519 | + | |
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 | + | |
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.])]) | |
543 | + | |
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. | |
547 | @@ -104,7 +152,10 @@ static __thread int a; int foo (int b) { | |
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 | ||
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 | |
559 | @@ -183,6 +234,11 @@ AM_CONDITIONAL(USE_VALGRIND, test "$use_ | |
560 | AM_CONDITIONAL(BUILD_STATIC, [dnl | |
561 | test "$use_gprof" = yes -o "$use_gcov" = yes]) | |
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]) | |
571 | @@ -302,7 +358,7 @@ case "$eu_version" in | |
572 | esac | |
573 | ||
574 | # Round up to the next release API (x.y) version. | |
575 | -eu_version=$(( (eu_version + 999) / 1000 )) | |
576 | +eu_version=`expr \( $eu_version + 999 \) / 1000` | |
577 | ||
578 | AC_CHECK_SIZEOF(long) | |
579 | ||
580 | --- elfutils/lib/ChangeLog | |
581 | +++ elfutils/lib/ChangeLog | |
582 | @@ -65,6 +65,9 @@ | |
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> | |
592 | @@ -121,6 +124,11 @@ | |
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 | |
606 | @@ -162,6 +162,17 @@ asm (".section predict_data, \"aw\"; .pr | |
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) \ | |
624 | --- elfutils/lib/Makefile.in | |
625 | +++ elfutils/lib/Makefile.in | |
626 | @@ -82,6 +82,7 @@ host_triplet = @host@ | |
627 | DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \ | |
628 | $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ | |
629 | $(noinst_HEADERS) ChangeLog | |
630 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | |
631 | subdir = lib | |
632 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | |
633 | am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ | |
634 | @@ -197,6 +198,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
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@ | |
642 | @@ -228,6 +230,7 @@ SHELL = @SHELL@ | |
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@ | |
650 | @@ -289,9 +292,11 @@ top_srcdir = @top_srcdir@ | |
651 | zip_LIBS = @zip_LIBS@ | |
652 | AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ | |
653 | -I$(srcdir)/../libelf | |
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 | |
658 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | |
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_msg = echo "WARNING: TEXTREL found in '$@'" | |
664 | --- elfutils/libasm/ChangeLog | |
665 | +++ elfutils/libasm/ChangeLog | |
666 | @@ -87,6 +87,11 @@ | |
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. | |
678 | --- elfutils/libasm/Makefile.in | |
679 | +++ elfutils/libasm/Makefile.in | |
680 | @@ -83,8 +83,9 @@ host_triplet = @host@ | |
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 | |
684 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | |
685 | noinst_PROGRAMS = $(am__EXEEXT_1) | |
686 | -@USE_LOCKS_TRUE@am__append_1 = -lpthread | |
687 | +@USE_LOCKS_TRUE@am__append_2 = -lpthread | |
688 | subdir = libasm | |
689 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | |
690 | am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ | |
691 | @@ -248,6 +249,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
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@ | |
699 | @@ -279,6 +281,7 @@ SHELL = @SHELL@ | |
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@ | |
707 | @@ -341,11 +344,11 @@ zip_LIBS = @zip_LIBS@ | |
708 | AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ | |
709 | -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \ | |
710 | -I$(top_srcdir)/libdw | |
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 \ | |
718 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | |
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 | @@ -373,7 +376,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 = | |
731 | noinst_HEADERS = libasmP.h symbolhash.h | |
732 | EXTRA_DIST = libasm.map | |
733 | --- elfutils/libcpu/ChangeLog | |
734 | +++ elfutils/libcpu/ChangeLog | |
735 | @@ -51,6 +51,9 @@ | |
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 | ||
745 | @@ -380,6 +383,11 @@ | |
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 | |
759 | @@ -822,6 +822,7 @@ i386_disasm (const uint8_t **startp, con | |
760 | ||
761 | default: | |
762 | assert (! "INVALID not handled"); | |
763 | + abort (); | |
764 | } | |
765 | } | |
766 | else | |
767 | --- elfutils/libcpu/Makefile.in | |
768 | +++ elfutils/libcpu/Makefile.in | |
769 | @@ -84,6 +84,7 @@ DIST_COMMON = $(top_srcdir)/config/eu.am | |
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 | |
773 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | |
774 | @MAINTAINER_MODE_TRUE@noinst_PROGRAMS = i386_gendis$(EXEEXT) | |
775 | subdir = libcpu | |
776 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | |
777 | @@ -223,6 +224,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
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=) | |
785 | @@ -254,6 +256,7 @@ SHELL = @SHELL@ | |
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@ | |
793 | @@ -316,10 +319,11 @@ zip_LIBS = @zip_LIBS@ | |
794 | AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ | |
795 | -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ | |
796 | -I$(srcdir)/../libdw -I$(srcdir)/../libasm | |
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 | |
802 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | |
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) | |
808 | --- elfutils/libdw/ChangeLog | |
809 | +++ elfutils/libdw/ChangeLog | |
810 | @@ -717,6 +717,10 @@ | |
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. | |
821 | @@ -1076,6 +1080,10 @@ | |
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. | |
832 | @@ -1844,6 +1852,11 @@ | |
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 | ||
844 | --- elfutils/libdw/dwarf_begin_elf.c | |
845 | +++ elfutils/libdw/dwarf_begin_elf.c | |
846 | @@ -47,6 +47,14 @@ | |
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 | |
861 | --- elfutils/libdw/libdw.h | |
862 | +++ elfutils/libdw/libdw.h | |
863 | @@ -1003,7 +1003,7 @@ extern Dwarf_OOM dwarf_new_oom_handler ( | |
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) | |
872 | --- elfutils/libdw/Makefile.in | |
873 | +++ elfutils/libdw/Makefile.in | |
874 | @@ -84,7 +84,8 @@ DIST_COMMON = $(top_srcdir)/config/eu.am | |
875 | $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ | |
876 | $(include_HEADERS) $(noinst_HEADERS) $(pkginclude_HEADERS) \ | |
877 | ChangeLog | |
878 | -@BUILD_STATIC_TRUE@am__append_1 = -fpic | |
879 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | |
880 | +@BUILD_STATIC_TRUE@am__append_2 = -fpic | |
881 | noinst_PROGRAMS = $(am__EXEEXT_1) | |
882 | subdir = libdw | |
883 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | |
884 | @@ -298,6 +299,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
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@ | |
892 | @@ -329,6 +331,7 @@ SHELL = @SHELL@ | |
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@ | |
900 | @@ -390,10 +393,11 @@ top_srcdir = @top_srcdir@ | |
901 | zip_LIBS = @zip_LIBS@ | |
902 | AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ | |
903 | -I$(srcdir)/../libelf | |
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_msg = echo "WARNING: TEXTREL found in '$@'" | |
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 \ | |
952 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | |
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_msg = echo "WARNING: TEXTREL found in '$@'" | |
958 | --- elfutils/libdwfl/ChangeLog | |
959 | +++ elfutils/libdwfl/ChangeLog | |
960 | @@ -571,6 +571,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 | @@ -2336,6 +2351,11 @@ | |
983 | ||
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. | |
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 | #include "../libdw/memory-access.h" | |
1031 | ||
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 | |
1062 | --- elfutils/libdwfl/Makefile.in | |
1063 | +++ elfutils/libdwfl/Makefile.in | |
1064 | @@ -82,9 +82,10 @@ host_triplet = @host@ | |
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 | |
1068 | -@ZLIB_TRUE@am__append_1 = gzip.c | |
1069 | -@BZLIB_TRUE@am__append_2 = bzip2.c | |
1070 | -@LZMA_TRUE@am__append_3 = lzma.c | |
1071 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | |
1072 | +@ZLIB_TRUE@am__append_2 = gzip.c | |
1073 | +@BZLIB_TRUE@am__append_3 = bzip2.c | |
1074 | +@LZMA_TRUE@am__append_4 = lzma.c | |
1075 | subdir = libdwfl | |
1076 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | |
1077 | am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ | |
1078 | @@ -286,6 +287,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
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@ | |
1086 | @@ -317,6 +319,7 @@ SHELL = @SHELL@ | |
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@ | |
1094 | @@ -379,11 +382,11 @@ zip_LIBS = @zip_LIBS@ | |
1095 | AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. -I$(srcdir) \ | |
1096 | -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ | |
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 \ | |
1105 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | |
1106 | + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ | |
1107 | + $(am__append_1) | |
1108 | COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) | |
1109 | CLEANFILES = *.gcno *.gcda $(am_libdwfl_pic_a_OBJECTS) | |
1110 | textrel_msg = echo "WARNING: TEXTREL found in '$@'" | |
1111 | @@ -413,8 +416,8 @@ libdwfl_a_SOURCES = dwfl_begin.c dwfl_en | |
1112 | dwfl_module_register_names.c dwfl_segment_report_module.c \ | |
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 | |
1122 | --- elfutils/libebl/ChangeLog | |
1123 | +++ elfutils/libebl/ChangeLog | |
1124 | @@ -765,6 +765,11 @@ | |
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. | |
1136 | --- elfutils/libebl/Makefile.in | |
1137 | +++ elfutils/libebl/Makefile.in | |
1138 | @@ -82,6 +82,7 @@ host_triplet = @host@ | |
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 | |
1142 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | |
1143 | subdir = libebl | |
1144 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | |
1145 | am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ | |
1146 | @@ -249,6 +250,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
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@ | |
1154 | @@ -280,6 +282,7 @@ SHELL = @SHELL@ | |
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@ | |
1162 | @@ -342,9 +345,11 @@ zip_LIBS = @zip_LIBS@ | |
1163 | AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ | |
1164 | -I$(srcdir)/../libelf -I$(srcdir)/../libdw \ | |
1165 | -I$(srcdir)/../libasm | |
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 | |
1170 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | |
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_msg = echo "WARNING: TEXTREL found in '$@'" | |
1176 | --- elfutils/libelf/ChangeLog | |
1177 | +++ elfutils/libelf/ChangeLog | |
1178 | @@ -244,6 +244,11 @@ | |
1179 | ||
1180 | * elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check. | |
1181 | ||
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 | + | |
1187 | 2011-02-26 Mark Wielaard <mjw@redhat.com> | |
1188 | ||
1189 | * elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini. | |
1190 | @@ -921,6 +926,11 @@ | |
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. | |
1202 | --- elfutils/libelf/common.h | |
1203 | +++ elfutils/libelf/common.h | |
1204 | @@ -139,7 +139,7 @@ libelf_release_all (Elf *elf) | |
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)))) | |
1213 | @@ -148,7 +148,7 @@ libelf_release_all (Elf *elf) | |
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)))) | |
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. | |
1228 | This file is part of elfutils. | |
1229 | Written by Ulrich Drepper <drepper@redhat.com>, 2006. | |
1230 | ||
1231 | @@ -68,7 +68,9 @@ elf_cvt_gnuhash (void *dest, const void | |
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 | |
1244 | @@ -84,9 +84,10 @@ DIST_COMMON = $(top_srcdir)/config/eu.am | |
1245 | $(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \ | |
1246 | $(include_HEADERS) $(noinst_HEADERS) $(pkginclude_HEADERS) \ | |
1247 | ChangeLog | |
1248 | -@BUILD_STATIC_TRUE@am__append_1 = -fpic | |
1249 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | |
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 | |
1254 | subdir = libelf | |
1255 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | |
1256 | am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ | |
1257 | @@ -291,6 +292,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
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@ | |
1265 | @@ -322,6 +324,7 @@ SHELL = @SHELL@ | |
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@ | |
1273 | @@ -382,10 +385,11 @@ top_builddir = @top_builddir@ | |
1274 | top_srcdir = @top_srcdir@ | |
1275 | zip_LIBS = @zip_LIBS@ | |
1276 | AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. | |
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) | |
1282 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | |
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 | @@ -449,7 +453,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 = | |
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 | |
1299 | @@ -145,6 +145,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
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@ | |
1307 | @@ -176,6 +177,7 @@ SHELL = @SHELL@ | |
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 | |
1317 | @@ -263,6 +263,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
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@ | |
1325 | @@ -294,6 +295,7 @@ SHELL = @SHELL@ | |
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@ | |
1333 | --- elfutils/src/addr2line.c | |
1334 | +++ elfutils/src/addr2line.c | |
1335 | @@ -540,10 +540,10 @@ handle_address (const char *string, Dwfl | |
1336 | bool parsed = false; | |
1337 | int i, j; | |
1338 | char *name = NULL; | |
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') | |
1342 | parsed = adjust_to_section (name, &addr, dwfl); | |
1343 | - switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j)) | |
1344 | + switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j)) | |
1345 | { | |
1346 | default: | |
1347 | break; | |
1348 | --- elfutils/src/ChangeLog | |
1349 | +++ elfutils/src/ChangeLog | |
1350 | @@ -1371,8 +1371,16 @@ | |
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> | |
1367 | @@ -1536,6 +1544,8 @@ | |
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 | |
1376 | @@ -1719,6 +1729,11 @@ | |
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. | |
1388 | @@ -1970,6 +1985,8 @@ | |
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. | |
1397 | @@ -2409,6 +2426,10 @@ | |
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. | |
1408 | @@ -2485,6 +2506,10 @@ | |
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 | |
1419 | @@ -2833,6 +2858,11 @@ | |
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 | |
1431 | --- elfutils/src/findtextrel.c | |
1432 | +++ elfutils/src/findtextrel.c | |
1433 | @@ -502,7 +502,11 @@ ptrcompare (const void *p1, const void * | |
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 | { | |
1446 | --- elfutils/src/ld.h | |
1447 | +++ elfutils/src/ld.h | |
1448 | @@ -1114,6 +1114,7 @@ extern bool dynamically_linked_p (void); | |
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 | |
1456 | @@ -1131,5 +1132,6 @@ linked_from_dso_p (struct scninfo *scnin | |
1457 | ||
1458 | return sym->defined && sym->in_dso; | |
1459 | } | |
1460 | +#endif /* Optimizing and not GCC 4.2. */ | |
1461 | ||
1462 | #endif /* ld.h */ | |
1463 | --- elfutils/src/Makefile.am | |
1464 | +++ elfutils/src/Makefile.am | |
1465 | @@ -89,6 +89,11 @@ endif | |
1466 | # XXX While the file is not finished, don't warn about this | |
1467 | ldgeneric_no_Wunused = yes | |
1468 | ||
1469 | +# Buggy old compilers or libc headers. | |
1470 | +readelf_no_Werror = yes | |
1471 | +strings_no_Werror = yes | |
1472 | +addr2line_no_Wformat = yes | |
1473 | + | |
1474 | readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl | |
1475 | nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl \ | |
1476 | $(demanglelib) | |
1477 | --- elfutils/src/Makefile.in | |
1478 | +++ elfutils/src/Makefile.in | |
1479 | @@ -85,6 +85,7 @@ DIST_COMMON = $(top_srcdir)/config/eu.am | |
1480 | $(srcdir)/Makefile.am ldlex.c ldscript.c \ | |
1481 | $(top_srcdir)/config/depcomp $(top_srcdir)/config/ylwrap \ | |
1482 | $(noinst_HEADERS) ChangeLog | |
1483 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | |
1484 | bin_PROGRAMS = readelf$(EXEEXT) nm$(EXEEXT) size$(EXEEXT) \ | |
1485 | strip$(EXEEXT) ld$(EXEEXT) elflint$(EXEEXT) \ | |
1486 | findtextrel$(EXEEXT) addr2line$(EXEEXT) elfcmp$(EXEEXT) \ | |
1487 | @@ -93,9 +94,9 @@ bin_PROGRAMS = readelf$(EXEEXT) nm$(EXEE | |
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. | |
1491 | -@NEVER_TRUE@am__append_1 = libdummy.a | |
1492 | +@NEVER_TRUE@am__append_2 = libdummy.a | |
1493 | # -ldl is always needed for libebl. | |
1494 | -@NATIVE_LD_TRUE@am__append_2 = libld_elf.a | |
1495 | +@NATIVE_LD_TRUE@am__append_3 = libld_elf.a | |
1496 | @NATIVE_LD_TRUE@am_libld_elf_i386_pic_a_OBJECTS = | |
1497 | subdir = src | |
1498 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | |
1499 | @@ -159,7 +160,7 @@ am_ld_OBJECTS = ld.$(OBJEXT) ldgeneric.$ | |
1500 | ldscript.$(OBJEXT) symbolhash.$(OBJEXT) sectionhash.$(OBJEXT) \ | |
1501 | versionhash.$(OBJEXT) | |
1502 | ld_OBJECTS = $(am_ld_OBJECTS) | |
1503 | -ld_DEPENDENCIES = $(libebl) $(libelf) $(libeu) $(am__append_2) | |
1504 | +ld_DEPENDENCIES = $(libebl) $(libelf) $(libeu) $(am__append_3) | |
1505 | ld_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(ld_LDFLAGS) $(LDFLAGS) -o \ | |
1506 | $@ | |
1507 | am_libld_elf_i386_so_OBJECTS = | |
1508 | @@ -340,6 +341,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
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@ | |
1516 | @@ -371,6 +373,7 @@ SHELL = @SHELL@ | |
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@ | |
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 \ | |
1535 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | |
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 | @@ -452,8 +455,8 @@ AM_LFLAGS = -Pld -olex.yy.c | |
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) \ | |
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) | |
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 \ | |
1552 | @@ -479,13 +482,18 @@ libeu = ../lib/libeu.a | |
1553 | ||
1554 | # XXX While the file is not finished, don't warn about this | |
1555 | ldgeneric_no_Wunused = yes | |
1556 | + | |
1557 | +# Buggy old compilers or libc headers. | |
1558 | +readelf_no_Werror = yes | |
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 \ | |
1563 | $(demanglelib) | |
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) | |
1569 | ld_LDFLAGS = -rdynamic | |
1570 | elflint_LDADD = $(libebl) $(libelf) $(libeu) -ldl | |
1571 | findtextrel_LDADD = $(libdw) $(libelf) | |
1572 | --- elfutils/src/readelf.c | |
1573 | +++ elfutils/src/readelf.c | |
1574 | @@ -4368,10 +4368,12 @@ listptr_base (struct listptr *p) | |
1575 | return base; | |
1576 | } | |
1577 | ||
1578 | +static const char *listptr_name; | |
1579 | + | |
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 | ||
1589 | @@ -4467,8 +4469,11 @@ static void | |
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 | |
1603 | @@ -9539,7 +9544,7 @@ dump_archive_index (Elf *elf, const char | |
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, | |
1612 | --- elfutils/src/strings.c | |
1613 | +++ elfutils/src/strings.c | |
1614 | @@ -43,6 +43,10 @@ | |
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); | |
1625 | @@ -489,8 +493,13 @@ map_file (int fd, off64_t start_off, off | |
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) | |
1639 | @@ -581,9 +590,11 @@ read_block (int fd, const char *fname, o | |
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)) | |
1651 | --- elfutils/src/strip.c | |
1652 | +++ elfutils/src/strip.c | |
1653 | @@ -45,6 +45,12 @@ | |
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 | + | |
1663 | typedef uint8_t GElf_Byte; | |
1664 | ||
1665 | /* Name and version of program. */ | |
1666 | @@ -318,8 +324,18 @@ process_file (const char *fname) | |
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. */ | |
1685 | @@ -2091,7 +2107,7 @@ while computing checksum for debug infor | |
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'"), | |
1694 | @@ -2148,7 +2164,7 @@ handle_ar (int fd, Elf *elf, const char | |
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); | |
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__ | |
1713 | --- elfutils/tests/ChangeLog | |
1714 | +++ elfutils/tests/ChangeLog | |
1715 | @@ -421,6 +421,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 | @@ -1285,6 +1292,8 @@ | |
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 | ||
1738 | @@ -1993,6 +2002,11 @@ | |
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. | |
1750 | --- elfutils/tests/line2addr.c | |
1751 | +++ elfutils/tests/line2addr.c | |
1752 | @@ -124,7 +124,7 @@ main (int argc, char *argv[]) | |
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: | |
1761 | --- elfutils/tests/Makefile.am | |
1762 | +++ elfutils/tests/Makefile.am | |
1763 | @@ -365,6 +365,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) | |
1771 | --- elfutils/tests/Makefile.in | |
1772 | +++ elfutils/tests/Makefile.in | |
1773 | @@ -80,13 +80,14 @@ host_triplet = @host@ | |
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 | |
1777 | -@STANDALONE_FALSE@am__append_1 = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \ | |
1778 | +@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) | |
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 \ | |
1781 | @STANDALONE_FALSE@ -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \ | |
1782 | @STANDALONE_FALSE@ -I$(top_srcdir)/lib -I.. | |
1783 | ||
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) | |
1788 | check_PROGRAMS = arextract$(EXEEXT) arsymtest$(EXEEXT) \ | |
1789 | newfile$(EXEEXT) saridx$(EXEEXT) scnnames$(EXEEXT) \ | |
1790 | sectiondump$(EXEEXT) showptable$(EXEEXT) update1$(EXEEXT) \ | |
1791 | @@ -113,7 +114,7 @@ check_PROGRAMS = arextract$(EXEEXT) arsy | |
1792 | deleted$(EXEEXT) deleted-lib.so$(EXEEXT) \ | |
1793 | aggregate_size$(EXEEXT) vdsosyms$(EXEEXT) $(am__EXEEXT_1) \ | |
1794 | $(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 | @@ -159,14 +160,14 @@ TESTS = run-arextract.sh run-arsymtest.s | |
1801 | run-stack-i-test.sh run-readelf-dwz-multi.sh \ | |
1802 | run-allfcts-multi.sh run-deleted.sh run-linkmap-cut.sh \ | |
1803 | run-aggregate-size.sh vdsosyms$(EXEEXT) run-readelf-A.sh \ | |
1804 | - $(am__EXEEXT_2) $(am__append_7) $(am__append_8) \ | |
1805 | + $(am__EXEEXT_2) $(am__append_8) $(am__append_9) \ | |
1806 | $(am__EXEEXT_4) | |
1807 | -@STANDALONE_FALSE@am__append_5 = msg_tst md5-sha1-test | |
1808 | @STANDALONE_FALSE@am__append_6 = msg_tst md5-sha1-test | |
1809 | -@LZMA_TRUE@am__append_7 = run-readelf-s.sh run-dwflsyms.sh | |
1810 | -@ZLIB_TRUE@am__append_8 = run-readelf-zdebug.sh | |
1811 | -@HAVE_LIBASM_TRUE@am__append_9 = $(asm_TESTS) | |
1812 | +@STANDALONE_FALSE@am__append_7 = msg_tst md5-sha1-test | |
1813 | +@LZMA_TRUE@am__append_8 = run-readelf-s.sh run-dwflsyms.sh | |
1814 | +@ZLIB_TRUE@am__append_9 = run-readelf-zdebug.sh | |
1815 | @HAVE_LIBASM_TRUE@am__append_10 = $(asm_TESTS) | |
1816 | +@HAVE_LIBASM_TRUE@am__append_11 = $(asm_TESTS) | |
1817 | subdir = tests | |
1818 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | |
1819 | am__aclocal_m4_deps = $(top_srcdir)/m4/biarch.m4 \ | |
1820 | @@ -787,6 +788,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
1821 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | |
1822 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | |
1823 | LDFLAGS = @LDFLAGS@ | |
1824 | +LD_AS_NEEDED = @LD_AS_NEEDED@ | |
1825 | LEX = @LEX@ | |
1826 | LEXLIB = @LEXLIB@ | |
1827 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ | |
1828 | @@ -818,6 +820,7 @@ SHELL = @SHELL@ | |
1829 | STRIP = @STRIP@ | |
1830 | USE_NLS = @USE_NLS@ | |
1831 | VERSION = @VERSION@ | |
1832 | +WEXTRA = @WEXTRA@ | |
1833 | XGETTEXT = @XGETTEXT@ | |
1834 | XGETTEXT_015 = @XGETTEXT_015@ | |
1835 | XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ | |
1836 | @@ -877,12 +880,12 @@ top_build_prefix = @top_build_prefix@ | |
1837 | top_builddir = @top_builddir@ | |
1838 | top_srcdir = @top_srcdir@ | |
1839 | zip_LIBS = @zip_LIBS@ | |
1840 | -AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_1) | |
1841 | -AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ | |
1842 | - $(if $($(*F)_no_Werror),,-Werror) \ | |
1843 | - $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ | |
1844 | - $($(*F)_CFLAGS) | |
1845 | - | |
1846 | +AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_2) | |
1847 | +AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ | |
1848 | + $($(*F)_no_Werror),,-Werror) $(if \ | |
1849 | + $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ | |
1850 | + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ | |
1851 | + $(am__append_1) | |
1852 | COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) | |
1853 | CLEANFILES = *.gcno *.gcda | |
1854 | textrel_msg = echo "WARNING: TEXTREL found in '$@'" | |
1855 | @@ -890,7 +893,7 @@ textrel_msg = echo "WARNING: TEXTREL fou | |
1856 | @FATAL_TEXTREL_TRUE@textrel_found = $(textrel_msg); exit 1 | |
1857 | textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); fi | |
1858 | BUILD_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf | |
1859 | -AM_LDFLAGS = $(am__append_2) $(am__append_3) | |
1860 | +AM_LDFLAGS = $(am__append_3) $(am__append_4) | |
1861 | @TESTS_RPATH_FALSE@tests_rpath = no | |
1862 | @TESTS_RPATH_TRUE@tests_rpath = yes | |
1863 | asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \ | |
1864 | @@ -1106,6 +1109,7 @@ get_lines_LDADD = $(libdw) $(libelf) | |
1865 | get_files_LDADD = $(libdw) $(libelf) | |
1866 | get_aranges_LDADD = $(libdw) $(libelf) | |
1867 | allfcts_LDADD = $(libdw) $(libelf) | |
1868 | +line2addr_no_Wformat = yes | |
1869 | line2addr_LDADD = $(libdw) | |
1870 | addrscopes_LDADD = $(libdw) | |
1871 | funcscopes_LDADD = $(libdw) |