Jan Kratochvil 2045415
--- elfutils/ChangeLog
Jan Kratochvil 2045415
+++ elfutils/ChangeLog
Jan Kratochvil 2045415
@@ -46,6 +46,8 @@
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 2012-01-24  Mark Wielaard  <mjw@redhat.com>
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
+	* configure.ac: Wrap AC_COMPILE_IFELSE sources in AC_LANG_SOURCE.
Jan Kratochvil 2045415
+
Jan Kratochvil 2045415
 	* COPYING: Fix address. Updated version from gnulib.
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 2012-01-23  Mark Wielaard  <mjw@redhat.com>
Jan Kratochvil 2045415
@@ -64,6 +66,9 @@
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 2011-10-08  Mike Frysinger  <vapier@gentoo.org>
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
+	* configure.ac (--disable-werror): Handle it, controlling BUILD_WERROR
Jan Kratochvil 2045415
+	automake option.
Jan Kratochvil 2045415
+
Jan Kratochvil 2045415
 	* configure.ac: Fix use of AC_ARG_ENABLE to handle $enableval correctly.
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 2011-10-02  Ulrich Drepper  <drepper@gmail.com>
Jan Kratochvil 2045415
@@ -85,6 +90,10 @@
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 	* configure.ac (LOCALEDIR, DATADIRNAME): Removed.
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
+2009-11-22  Roland McGrath  <roland@redhat.com>
Jan Kratochvil 2045415
+
Jan Kratochvil 2045415
+	* configure.ac: Use sed and expr instead of modern bash extensions.
Jan Kratochvil 2045415
+
Jan Kratochvil 2045415
 2009-09-21  Ulrich Drepper  <drepper@redhat.com>
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 	* configure.ac: Update for more modern autoconf.
Jan Kratochvil 2045415
@@ -93,6 +102,10 @@
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 	* configure.ac (zip_LIBS): Check for liblzma too.
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
+2009-08-17  Roland McGrath  <roland@redhat.com>
Jan Kratochvil 2045415
+
Jan Kratochvil 2045415
+	* configure.ac: Check for -fgnu89-inline; add it to WEXTRA if it works.
Jan Kratochvil 2045415
+
Jan Kratochvil 2045415
 2009-04-19  Roland McGrath  <roland@redhat.com>
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 	* configure.ac (eu_version): Round down here, not in version.h macros.
Jan Kratochvil 2045415
@@ -104,6 +117,8 @@
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 2009-01-23  Roland McGrath  <roland@redhat.com>
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
+	* configure.ac: Check for __builtin_popcount.
Jan Kratochvil 2045415
+
Jan Kratochvil 2045415
 	* configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 	* configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
Jan Kratochvil 2045415
@@ -184,6 +199,10 @@
Jan Kratochvil 2045415
 	* configure.ac: Add dummy automake conditional to get dependencies
Jan Kratochvil 2045415
 	for non-generic linker right.  See src/Makefile.am.
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
+2005-11-22  Roland McGrath  <roland@redhat.com>
Jan Kratochvil 2045415
+
Jan Kratochvil 2045415
+	* configure.ac: Check for --as-needed linker option.
Jan Kratochvil 2045415
+
Jan Kratochvil 2045415
 2005-11-18  Roland McGrath  <roland@redhat.com>
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 	* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
Jan Kratochvil 2045415
@@ -231,6 +250,17 @@
Jan Kratochvil 2045415
 	* Makefile.am (all_SUBDIRS): Add libdwfl.
Jan Kratochvil 2045415
 	* configure.ac: Write libdwfl/Makefile.
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
+2005-05-31  Roland McGrath  <roland@redhat.com>
Jan Kratochvil 2045415
+
Jan Kratochvil 2045415
+	* configure.ac (WEXTRA): Check for -Wextra and set this substitution.
Jan Kratochvil 2045415
+
Jan Kratochvil 2045415
+	* configure.ac: Check for struct stat st_?tim members.
Jan Kratochvil 2045415
+	* src/strip.c (process_file): Use st_?time if st_?tim are not there.
Jan Kratochvil 2045415
+
Jan Kratochvil 2045415
+	* configure.ac: Check for futimes function.
Jan Kratochvil 2045415
+	* src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead.
Jan Kratochvil 2045415
+	(handle_ar) [! HAVE_FUTIMES]: Likewise.
Jan Kratochvil 2045415
+
Jan Kratochvil 2045415
 2005-05-19  Roland McGrath  <roland@redhat.com>
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 	* configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros.
Jan Kratochvil 2045415
--- elfutils/Makefile.in
Jan Kratochvil 2045415
+++ elfutils/Makefile.in
Jan Kratochvil 2045415
@@ -256,6 +256,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
Jan Kratochvil 2045415
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
Jan Kratochvil 2045415
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
Jan Kratochvil 2045415
 LDFLAGS = @LDFLAGS@
Jan Kratochvil 2045415
+LD_AS_NEEDED = @LD_AS_NEEDED@
Jan Kratochvil 2045415
 LEX = @LEX@
Jan Kratochvil 2045415
 LEXLIB = @LEXLIB@
Jan Kratochvil 2045415
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
Jan Kratochvil 2045415
@@ -285,6 +286,7 @@ SHELL = @SHELL@
Jan Kratochvil 2045415
 STRIP = @STRIP@
Jan Kratochvil 2045415
 USE_NLS = @USE_NLS@
Jan Kratochvil 2045415
 VERSION = @VERSION@
Jan Kratochvil 2045415
+WEXTRA = @WEXTRA@
Jan Kratochvil 2045415
 XGETTEXT = @XGETTEXT@
Jan Kratochvil 2045415
 XGETTEXT_015 = @XGETTEXT_015@
Jan Kratochvil 2045415
 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
418cfd0
--- elfutils/backends/ChangeLog
418cfd0
+++ elfutils/backends/ChangeLog
Jan Kratochvil 2045415
@@ -188,6 +188,10 @@
bfd3a36
 	* ppc_attrs.c (ppc_check_object_attribute): Handle tag
bfd3a36
 	GNU_Power_ABI_Struct_Return.
bfd3a36
 
5c16b08
+2009-01-23  Roland McGrath  <roland@redhat.com>
5c16b08
+
5c16b08
+	* Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED).
5c16b08
+
5c16b08
 2008-10-04  Ulrich Drepper  <drepper@redhat.com>
5c16b08
 
5c16b08
 	* i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and
Jan Kratochvil 2045415
@@ -515,6 +519,11 @@
3025beb
 	* sparc_init.c: Likewise.
3025beb
 	* x86_64_init.c: Likewise.
3025beb
 
80ba80a
+2005-11-22  Roland McGrath  <roland@redhat.com>
80ba80a
+
80ba80a
+	* Makefile.am (LD_AS_NEEDED): New variable, substituted by configure.
80ba80a
+	(libebl_%.so rule): Use it in place of -Wl,--as-needed.
80ba80a
+
80ba80a
 2005-11-19  Roland McGrath  <roland@redhat.com>
80ba80a
 
80ba80a
 	* ppc64_reloc.def: REL30 -> ADDR30.
Jan Kratochvil 2045415
@@ -537,6 +546,9 @@
418cfd0
 	* Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
418cfd0
 	(CLEANFILES): Add libebl_$(m).so.
418cfd0
 
418cfd0
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
418cfd0
+	(AM_CFLAGS): Use it in place of -Wextra.
418cfd0
+
418cfd0
 	* ppc_reloc.def: Update bits per Alan Modra <amodra@bigpond.net.au>.
418cfd0
 	* ppc64_reloc.def: Likewise.
418cfd0
 
418cfd0
--- elfutils/backends/Makefile.am
418cfd0
+++ elfutils/backends/Makefile.am
Jan Kratochvil 2045415
@@ -112,7 +112,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a
ba5f203
 	$(LINK) -shared -o $(@:.map=.so) \
ba5f203
 		-Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
ba5f203
 		-Wl,--version-script,$(@:.so=.map) \
5c16b08
-		-Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap)
5c16b08
+		-Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap)
5c16b08
 	$(textrel_check)
5c16b08
 
ba5f203
 libebl_i386.so: $(cpu_i386)
418cfd0
--- elfutils/backends/Makefile.in
418cfd0
+++ elfutils/backends/Makefile.in
Jan Kratochvil 2045415
@@ -83,7 +83,8 @@ host_triplet = @host@
Jan Kratochvil 2045415
 DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
Jan Kratochvil 2045415
 	$(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
Jan Kratochvil 2045415
 	$(noinst_HEADERS) ChangeLog
Mark J. Wielaard 22346cb
-@MUDFLAP_TRUE@am__append_1 = -fmudflap
Mark J. Wielaard 22346cb
+@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
Mark J. Wielaard 22346cb
+@MUDFLAP_TRUE@am__append_2 = -fmudflap
Mark J. Wielaard 22346cb
 subdir = backends
Mark J. Wielaard 22346cb
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
Mark J. Wielaard 22346cb
 am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
Jan Kratochvil 2045415
@@ -266,6 +267,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
80ba80a
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
80ba80a
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
80ba80a
 LDFLAGS = @LDFLAGS@
80ba80a
+LD_AS_NEEDED = @LD_AS_NEEDED@
80ba80a
 LEX = @LEX@
80ba80a
 LEXLIB = @LEXLIB@
80ba80a
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
Jan Kratochvil 2045415
@@ -295,6 +297,7 @@ SHELL = @SHELL@
3cb5dfb
 STRIP = @STRIP@
418cfd0
 USE_NLS = @USE_NLS@
418cfd0
 VERSION = @VERSION@
418cfd0
+WEXTRA = @WEXTRA@
418cfd0
 XGETTEXT = @XGETTEXT@
3cb5dfb
 XGETTEXT_015 = @XGETTEXT_015@
f790d25
 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
Jan Kratochvil 2045415
@@ -357,10 +360,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr
Mark J. Wielaard 22346cb
 	-I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
ba5f203
 	-I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
ba5f203
 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
Mark J. Wielaard 22346cb
-	$($(*F)_no_Werror),,-Werror) $(if \
ba5f203
-	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
ba5f203
+	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
ba5f203
 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
Mark J. Wielaard 22346cb
-	$(am__append_1)
Mark J. Wielaard 22346cb
+	$(am__append_1) $(am__append_2)
ba5f203
 @MUDFLAP_FALSE@libmudflap = 
Mark J. Wielaard 22346cb
 @MUDFLAP_TRUE@libmudflap = -lmudflap
Mark J. Wielaard 22346cb
 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
Jan Kratochvil 2045415
@@ -834,7 +836,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a
ba5f203
 	$(LINK) -shared -o $(@:.map=.so) \
ba5f203
 		-Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
ba5f203
 		-Wl,--version-script,$(@:.so=.map) \
5c16b08
-		-Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap)
5c16b08
+		-Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap)
5c16b08
 	$(textrel_check)
5c16b08
 
ba5f203
 libebl_i386.so: $(cpu_i386)
Mark J. Wielaard 22346cb
--- elfutils/config/ChangeLog
Mark J. Wielaard 22346cb
+++ elfutils/config/ChangeLog
Jan Kratochvil 2045415
@@ -27,6 +27,10 @@
Mark J. Wielaard 22346cb
 
Mark J. Wielaard 22346cb
 	* known-dwarf.awk: Use gawk.
Mark J. Wielaard 22346cb
 
Mark J. Wielaard 22346cb
+2011-10-08  Mike Frysinger  <vapier@gentoo.org>
Mark J. Wielaard 22346cb
+
Mark J. Wielaard 22346cb
+	* eu.am [BUILD_WERROR]: Conditionalize -Werror use on this.
Mark J. Wielaard 22346cb
+
Mark J. Wielaard 22346cb
 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
Mark J. Wielaard 22346cb
 
Mark J. Wielaard 22346cb
 	* elfutils.spec.in: Add more BuildRequires.
Jan Kratochvil 2045415
--- elfutils/config/Makefile.in
Jan Kratochvil 2045415
+++ elfutils/config/Makefile.in
Jan Kratochvil 2045415
@@ -140,6 +140,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
Jan Kratochvil 2045415
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
Jan Kratochvil 2045415
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
Jan Kratochvil 2045415
 LDFLAGS = @LDFLAGS@
Jan Kratochvil 2045415
+LD_AS_NEEDED = @LD_AS_NEEDED@
Jan Kratochvil 2045415
 LEX = @LEX@
Jan Kratochvil 2045415
 LEXLIB = @LEXLIB@
Jan Kratochvil 2045415
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
Jan Kratochvil 2045415
@@ -169,6 +170,7 @@ SHELL = @SHELL@
Jan Kratochvil 2045415
 STRIP = @STRIP@
Jan Kratochvil 2045415
 USE_NLS = @USE_NLS@
Jan Kratochvil 2045415
 VERSION = @VERSION@
Jan Kratochvil 2045415
+WEXTRA = @WEXTRA@
Jan Kratochvil 2045415
 XGETTEXT = @XGETTEXT@
Jan Kratochvil 2045415
 XGETTEXT_015 = @XGETTEXT_015@
Jan Kratochvil 2045415
 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
ba5f203
--- elfutils/config/eu.am
ba5f203
+++ elfutils/config/eu.am
Mark J. Wielaard 22346cb
@@ -1,6 +1,6 @@
Mark J. Wielaard 22346cb
 ## Common automake fragments for elfutils subdirectory makefiles.
Mark J. Wielaard 22346cb
 ##
Mark J. Wielaard 22346cb
-## Copyright (C) 2010 Red Hat, Inc.
Mark J. Wielaard 22346cb
+## Copyright (C) 2010-2011 Red Hat, Inc.
Mark J. Wielaard 22346cb
 ##
Mark Wielaard d10bca5
 ## This file is part of elfutils.
Mark Wielaard d10bca5
 ##
Mark Wielaard d10bca5
@@ -29,14 +29,20 @@
Mark Wielaard d10bca5
 ## not, see <http://www.gnu.org/licenses/>.
ba5f203
 ##
ba5f203
 
ba5f203
+WEXTRA = @WEXTRA@
ba5f203
+LD_AS_NEEDED = @LD_AS_NEEDED@
ba5f203
+
f790d25
 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
Jan Kratochvil 2045415
 AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
ba5f203
 AM_CFLAGS = -std=gnu99 -Wall -Wshadow \
Mark J. Wielaard 22346cb
-	    $(if $($(*F)_no_Werror),,-Werror) \
ba5f203
-	    $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
ba5f203
+	    $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
ba5f203
 	    $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \
ba5f203
 	    $($(*F)_CFLAGS)
ba5f203
 
Mark J. Wielaard 22346cb
+if BUILD_WERROR
Mark J. Wielaard 22346cb
+AM_CFLAGS += $(if $($(*F)_no_Werror),,-Werror)
Mark J. Wielaard 22346cb
+endif
Mark J. Wielaard 22346cb
+
Mark J. Wielaard 22346cb
 if MUDFLAP
Mark J. Wielaard 22346cb
 AM_CFLAGS += -fmudflap
Mark J. Wielaard 22346cb
 libmudflap = -lmudflap
5c16b08
--- elfutils/config.h.in
5c16b08
+++ elfutils/config.h.in
Mark Wielaard 2a5e99f
@@ -6,6 +6,9 @@
Mark Wielaard 2a5e99f
 /* Defined if libdw should support GNU ref_alt FORM, dwz multi files. */
Mark Wielaard 2a5e99f
 #undef ENABLE_DWZ
5c16b08
 
5c16b08
+/* Have __builtin_popcount. */
5c16b08
+#undef HAVE_BUILTIN_POPCOUNT
5c16b08
+
5c16b08
 /* $libdir subdirectory containing libebl modules. */
5c16b08
 #undef LIBEBL_SUBDIR
5c16b08
 
Jan Kratochvil 2045415
@@ -69,4 +72,7 @@
5c16b08
 /* Define for large files, on AIX-style hosts. */
5c16b08
 #undef _LARGE_FILES
5c16b08
 
5c16b08
+/* Stubbed out if missing compiler support. */
5c16b08
+#undef __thread
5c16b08
+
5c16b08
 #include <eu-config.h>
570047f
--- elfutils/configure
570047f
+++ elfutils/configure
Jan Kratochvil 2045415
@@ -618,6 +618,8 @@ ZLIB_TRUE
Mark J. Wielaard 22346cb
 LIBEBL_SUBDIR
Mark J. Wielaard 22346cb
 TESTS_RPATH_FALSE
Mark J. Wielaard 22346cb
 TESTS_RPATH_TRUE
Mark J. Wielaard 22346cb
+BUILD_WERROR_FALSE
Mark J. Wielaard 22346cb
+BUILD_WERROR_TRUE
Mark J. Wielaard 22346cb
 BUILD_STATIC_FALSE
Mark J. Wielaard 22346cb
 BUILD_STATIC_TRUE
Jan Kratochvil 2045415
 USE_VALGRIND_FALSE
Jan Kratochvil 2045415
@@ -635,6 +637,8 @@ NEVER_TRUE
f790d25
 base_cpu
f790d25
 NATIVE_LD_FALSE
3cb5dfb
 NATIVE_LD_TRUE
28fe4de
+LD_AS_NEEDED
28fe4de
+WEXTRA
28fe4de
 LEXLIB
28fe4de
 LEX_OUTPUT_ROOT
28fe4de
 LEX
Jan Kratochvil 2045415
@@ -755,6 +759,7 @@ enable_debugpred
Mark J. Wielaard 22346cb
 enable_gprof
Mark J. Wielaard 22346cb
 enable_gcov
Jan Kratochvil 2045415
 enable_valgrind
Mark J. Wielaard 22346cb
+enable_werror
Mark J. Wielaard 22346cb
 enable_tests_rpath
Mark J. Wielaard 22346cb
 enable_libebl_subdir
Mark J. Wielaard 22346cb
 with_zlib
Jan Kratochvil 2045415
@@ -1412,6 +1417,7 @@ Optional Features:
Mark J. Wielaard 22346cb
   --enable-gprof          build binaries with gprof support
Mark J. Wielaard 22346cb
   --enable-gcov           build binaries with gcov support
Jan Kratochvil 2045415
   --enable-valgrind       run all tests under valgrind
Mark J. Wielaard 22346cb
+  --disable-werror        do not build with -Werror
Mark J. Wielaard 22346cb
   --enable-tests-rpath    build $ORIGIN-using rpath into tests
Mark J. Wielaard 22346cb
   --enable-libebl-subdir=DIR
Mark J. Wielaard 22346cb
                           install libebl_CPU modules in $(libdir)/DIR
Jan Kratochvil 2045415
@@ -4012,6 +4018,130 @@ if test "x$ac_cv_c99" != xyes; then :
Roland McGrath c025a9f
   as_fn_error $? "gcc with C99 support required" "$LINENO" 5
b73b6ec
 fi
b73b6ec
 
0f58b0c
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra option to $CC" >&5
28fe4de
+$as_echo_n "checking for -Wextra option to $CC... " >&6; }
Mark J. Wielaard 22346cb
+if ${ac_cv_cc_wextra+:} false; then :
bfd3a36
+  $as_echo_n "(cached) " >&6
bfd3a36
+else
b73b6ec
+  old_CFLAGS="$CFLAGS"
b73b6ec
+CFLAGS="$CFLAGS -Wextra"
0f58b0c
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0f58b0c
+/* end confdefs.h.  */
b73b6ec
+void foo (void) { }
bfd3a36
+_ACEOF
0f58b0c
+if ac_fn_c_try_compile "$LINENO"; then :
b4dfabf
+  ac_cv_cc_wextra=yes
b73b6ec
+else
0f58b0c
+  ac_cv_cc_wextra=no
b73b6ec
+fi
3cb5dfb
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b73b6ec
+CFLAGS="$old_CFLAGS"
b73b6ec
+fi
0f58b0c
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_wextra" >&5
28fe4de
+$as_echo "$ac_cv_cc_wextra" >&6; }
b73b6ec
+
0f58b0c
+if test "x$ac_cv_cc_wextra" = xyes; then :
b73b6ec
+  WEXTRA=-Wextra
6788433
+else
6788433
+  WEXTRA=-W
b73b6ec
+fi
b73b6ec
+
0f58b0c
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fgnu89-inline option to $CC" >&5
e4d1f5c
+$as_echo_n "checking for -fgnu89-inline option to $CC... " >&6; }
Mark J. Wielaard 22346cb
+if ${ac_cv_cc_gnu89_inline+:} false; then :
e4d1f5c
+  $as_echo_n "(cached) " >&6
e4d1f5c
+else
e4d1f5c
+  old_CFLAGS="$CFLAGS"
e4d1f5c
+CFLAGS="$CFLAGS -fgnu89-inline -Werror"
0f58b0c
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0f58b0c
+/* end confdefs.h.  */
e4d1f5c
+
e4d1f5c
+void foo (void)
e4d1f5c
+{
e4d1f5c
+  inline void bar (void) {}
e4d1f5c
+  bar ();
e4d1f5c
+}
e4d1f5c
+extern inline void baz (void) {}
e4d1f5c
+
e4d1f5c
+_ACEOF
0f58b0c
+if ac_fn_c_try_compile "$LINENO"; then :
e4d1f5c
+  ac_cv_cc_gnu89_inline=yes
e4d1f5c
+else
0f58b0c
+  ac_cv_cc_gnu89_inline=no
e4d1f5c
+fi
e4d1f5c
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
e4d1f5c
+CFLAGS="$old_CFLAGS"
e4d1f5c
+fi
0f58b0c
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_gnu89_inline" >&5
e4d1f5c
+$as_echo "$ac_cv_cc_gnu89_inline" >&6; }
0f58b0c
+if test "x$ac_cv_cc_gnu89_inline" = xyes; then :
e4d1f5c
+  WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"
e4d1f5c
+fi
e4d1f5c
+
0f58b0c
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --as-needed linker option" >&5
28fe4de
+$as_echo_n "checking for --as-needed linker option... " >&6; }
Mark J. Wielaard 22346cb
+if ${ac_cv_as_needed+:} false; then :
28fe4de
+  $as_echo_n "(cached) " >&6
80ba80a
+else
80ba80a
+  cat > conftest.c <
80ba80a
+int main (void) { return 0; }
80ba80a
+EOF
80ba80a
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
80ba80a
+			    -fPIC -shared -o conftest.so conftest.c
80ba80a
+			    -Wl,--as-needed 1>&5'
0f58b0c
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
80ba80a
+  (eval $ac_try) 2>&5
80ba80a
+  ac_status=$?
0f58b0c
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
0f58b0c
+  test $ac_status = 0; }; }
80ba80a
+then
80ba80a
+  ac_cv_as_needed=yes
80ba80a
+else
80ba80a
+  ac_cv_as_needed=no
80ba80a
+fi
80ba80a
+rm -f conftest*
80ba80a
+fi
0f58b0c
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_as_needed" >&5
28fe4de
+$as_echo "$ac_cv_as_needed" >&6; }
0f58b0c
+if test "x$ac_cv_as_needed" = xyes; then :
80ba80a
+  LD_AS_NEEDED=-Wl,--as-needed
80ba80a
+else
80ba80a
+  LD_AS_NEEDED=
80ba80a
+fi
80ba80a
+
80ba80a
+
0f58b0c
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
5c16b08
+$as_echo_n "checking for __builtin_popcount... " >&6; }
Mark J. Wielaard 22346cb
+if ${ac_cv_popcount+:} false; then :
5c16b08
+  $as_echo_n "(cached) " >&6
5c16b08
+else
0f58b0c
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5c16b08
+/* end confdefs.h.  */
80ba80a
+
5c16b08
+int
5c16b08
+main ()
5c16b08
+{
5c16b08
+exit (__builtin_popcount (127));
5c16b08
+  ;
5c16b08
+  return 0;
5c16b08
+}
5c16b08
+_ACEOF
0f58b0c
+if ac_fn_c_try_link "$LINENO"; then :
5c16b08
+  ac_cv_popcount=yes
5c16b08
+else
0f58b0c
+  ac_cv_popcount=no
5c16b08
+fi
0f58b0c
+rm -f core conftest.err conftest.$ac_objext \
0f58b0c
+    conftest$ac_exeext conftest.$ac_ext
5c16b08
+fi
0f58b0c
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_popcount" >&5
5c16b08
+$as_echo "$ac_cv_popcount" >&6; }
0f58b0c
+if test "x$ac_cv_popcount" = xyes; then :
5c16b08
+
0f58b0c
+$as_echo "#define HAVE_BUILTIN_POPCOUNT 1" >>confdefs.h
5c16b08
+
5c16b08
+fi
5c16b08
+
0f58b0c
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support" >&5
bfd3a36
 $as_echo_n "checking for __thread support... " >&6; }
Mark J. Wielaard 22346cb
 if ${ac_cv_tls+:} false; then :
Jan Kratochvil 2045415
@@ -4048,7 +4178,13 @@ fi
0f58b0c
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5
5c16b08
 $as_echo "$ac_cv_tls" >&6; }
0f58b0c
 if test "x$ac_cv_tls" != xyes; then :
Roland McGrath c025a9f
-  as_fn_error $? "__thread support required" "$LINENO" 5
0f58b0c
+  if test "$use_locks" = yes; then :
Roland McGrath c025a9f
+  as_fn_error $? "--enable-thread-safety requires __thread support" "$LINENO" 5
5c16b08
+else
5c16b08
+
0f58b0c
+$as_echo "#define __thread /* empty: no multi-thread support */" >>confdefs.h
5c16b08
+
5c16b08
+fi
5c16b08
 fi
5c16b08
 
0f58b0c
 # Check whether --enable-largefile was given.
Jan Kratochvil 2045415
@@ -4458,6 +4594,22 @@ else
Mark J. Wielaard 22346cb
 fi
8cafad5
 
Mark J. Wielaard 22346cb
 
Mark J. Wielaard 22346cb
+# Check whether --enable-werror was given.
Mark J. Wielaard 22346cb
+if test "${enable_werror+set}" = set; then :
Mark J. Wielaard 22346cb
+  enableval=$enable_werror; enable_werror=$enableval
Mark J. Wielaard 22346cb
+else
Mark J. Wielaard 22346cb
+  enable_werror=yes
Mark J. Wielaard 22346cb
+fi
Mark J. Wielaard 22346cb
+
Mark J. Wielaard 22346cb
+ if test "$enable_werror" = yes; then
Mark J. Wielaard 22346cb
+  BUILD_WERROR_TRUE=
Mark J. Wielaard 22346cb
+  BUILD_WERROR_FALSE='#'
Mark J. Wielaard 22346cb
+else
Mark J. Wielaard 22346cb
+  BUILD_WERROR_TRUE='#'
Mark J. Wielaard 22346cb
+  BUILD_WERROR_FALSE=
Mark J. Wielaard 22346cb
+fi
Mark J. Wielaard 22346cb
+
Mark J. Wielaard 22346cb
+
Mark J. Wielaard 22346cb
 # Check whether --enable-tests-rpath was given.
Mark J. Wielaard 22346cb
 if test "${enable_tests_rpath+set}" = set; then :
Mark J. Wielaard 22346cb
   enableval=$enable_tests_rpath; tests_use_rpath=$enableval
Jan Kratochvil 2045415
@@ -5178,7 +5330,7 @@ case "$eu_version" in
8cafad5
 esac
8cafad5
 
8cafad5
 # Round up to the next release API (x.y) version.
Mark J. Wielaard 22346cb
-eu_version=$(( (eu_version + 999) / 1000 ))
8cafad5
+eu_version=`expr \( $eu_version + 999 \) / 1000`
8cafad5
 
8cafad5
 cat >confcache <<\_ACEOF
8cafad5
 # This file is a shell script that caches the results of configure
Jan Kratochvil 2045415
@@ -5353,6 +5505,10 @@ if test -z "${BUILD_STATIC_TRUE}" && tes
Mark J. Wielaard 22346cb
   as_fn_error $? "conditional \"BUILD_STATIC\" was never defined.
Mark J. Wielaard 22346cb
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
Mark J. Wielaard 22346cb
 fi
Mark J. Wielaard 22346cb
+if test -z "${BUILD_WERROR_TRUE}" && test -z "${BUILD_WERROR_FALSE}"; then
Mark J. Wielaard 22346cb
+  as_fn_error $? "conditional \"BUILD_WERROR\" was never defined.
Mark J. Wielaard 22346cb
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
Mark J. Wielaard 22346cb
+fi
Mark J. Wielaard 22346cb
 if test -z "${TESTS_RPATH_TRUE}" && test -z "${TESTS_RPATH_FALSE}"; then
Mark J. Wielaard 22346cb
   as_fn_error $? "conditional \"TESTS_RPATH\" was never defined.
Mark J. Wielaard 22346cb
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
570047f
--- elfutils/configure.ac
570047f
+++ elfutils/configure.ac
Mark Wielaard 2a5e99f
@@ -90,6 +90,54 @@ CFLAGS="$old_CFLAGS"])
a769ac6
 AS_IF([test "x$ac_cv_c99" != xyes],
a769ac6
       AC_MSG_ERROR([gcc with C99 support required]))
a769ac6
 
a769ac6
+AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl
a769ac6
+old_CFLAGS="$CFLAGS"
a769ac6
+CFLAGS="$CFLAGS -Wextra"
Mark Wielaard d10bca5
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([void foo (void) { }])],
b4dfabf
+		  ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no)
a769ac6
+CFLAGS="$old_CFLAGS"])
a769ac6
+AC_SUBST(WEXTRA)
f995fa8
+AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W])
a769ac6
+
e4d1f5c
+AC_CACHE_CHECK([for -fgnu89-inline option to $CC], ac_cv_cc_gnu89_inline, [dnl
e4d1f5c
+old_CFLAGS="$CFLAGS"
e4d1f5c
+CFLAGS="$CFLAGS -fgnu89-inline -Werror"
Mark Wielaard d10bca5
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
e4d1f5c
+void foo (void)
e4d1f5c
+{
e4d1f5c
+  inline void bar (void) {}
e4d1f5c
+  bar ();
e4d1f5c
+}
e4d1f5c
+extern inline void baz (void) {}
Mark Wielaard d10bca5
+])], ac_cv_cc_gnu89_inline=yes, ac_cv_cc_gnu89_inline=no)
e4d1f5c
+CFLAGS="$old_CFLAGS"])
e4d1f5c
+AS_IF([test "x$ac_cv_cc_gnu89_inline" = xyes],
e4d1f5c
+      [WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"])
e4d1f5c
+
80ba80a
+AC_CACHE_CHECK([for --as-needed linker option],
80ba80a
+	       ac_cv_as_needed, [dnl
80ba80a
+cat > conftest.c <
80ba80a
+int main (void) { return 0; }
80ba80a
+EOF
80ba80a
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
80ba80a
+			    -fPIC -shared -o conftest.so conftest.c
80ba80a
+			    -Wl,--as-needed 1>&AS_MESSAGE_LOG_FD])
80ba80a
+then
80ba80a
+  ac_cv_as_needed=yes
80ba80a
+else
80ba80a
+  ac_cv_as_needed=no
80ba80a
+fi
80ba80a
+rm -f conftest*])
80ba80a
+AS_IF([test "x$ac_cv_as_needed" = xyes],
80ba80a
+      [LD_AS_NEEDED=-Wl,--as-needed], [LD_AS_NEEDED=])
80ba80a
+AC_SUBST(LD_AS_NEEDED)
80ba80a
+
5c16b08
+AC_CACHE_CHECK([for __builtin_popcount], ac_cv_popcount, [dnl
5c16b08
+AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[exit (__builtin_popcount (127));]])],
5c16b08
+	       ac_cv_popcount=yes, ac_cv_popcount=no)])
5c16b08
+AS_IF([test "x$ac_cv_popcount" = xyes],
5c16b08
+      [AC_DEFINE([HAVE_BUILTIN_POPCOUNT], [1], [Have __builtin_popcount.])])
80ba80a
+
bfd3a36
 AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
bfd3a36
 # Use the same flags that we use for our DSOs, so the test is representative.
bfd3a36
 # Some old compiler/linker/libc combinations fail some ways and not others.
Mark Wielaard 2a5e99f
@@ -105,7 +153,10 @@ static __thread int a; int foo (int b) {
bfd3a36
 CFLAGS="$save_CFLAGS"
bfd3a36
 LDFLAGS="$save_LDFLAGS"])
5c16b08
 AS_IF([test "x$ac_cv_tls" != xyes],
bfd3a36
-      AC_MSG_ERROR([__thread support required]))
5c16b08
+      [AS_IF([test "$use_locks" = yes],
5c16b08
+	     [AC_MSG_ERROR([--enable-thread-safety requires __thread support])],
5c16b08
+	     [AC_DEFINE([__thread], [/* empty: no multi-thread support */],
5c16b08
+			[Stubbed out if missing compiler support.])])])
5c16b08
 
f790d25
 dnl This test must come as early as possible after the compiler configuration
f790d25
 dnl tests, because the choice of the file model can (in principle) affect
Jan Kratochvil 2045415
@@ -204,6 +255,11 @@ AM_CONDITIONAL(USE_VALGRIND, test "$use_
Mark J. Wielaard 22346cb
 AM_CONDITIONAL(BUILD_STATIC, [dnl
Mark J. Wielaard 22346cb
 test "$use_mudflap" = yes -o "$use_gprof" = yes -o "$use_gcov" = yes])
Mark J. Wielaard 22346cb
 
Mark J. Wielaard 22346cb
+AC_ARG_ENABLE([werror],
Mark J. Wielaard 22346cb
+AS_HELP_STRING([--disable-werror],[do not build with -Werror]),
Mark J. Wielaard 22346cb
+	       [enable_werror=$enableval], [enable_werror=yes])
Mark J. Wielaard 22346cb
+AM_CONDITIONAL(BUILD_WERROR, test "$enable_werror" = yes)
Mark J. Wielaard 22346cb
+
Mark J. Wielaard 22346cb
 AC_ARG_ENABLE([tests-rpath],
Mark J. Wielaard 22346cb
 AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]),
Mark J. Wielaard 22346cb
 	       [tests_use_rpath=$enableval], [tests_use_rpath=no])
Jan Kratochvil 2045415
@@ -315,6 +371,6 @@ case "$eu_version" in
8cafad5
 esac
8cafad5
 
8cafad5
 # Round up to the next release API (x.y) version.
Mark J. Wielaard 22346cb
-eu_version=$(( (eu_version + 999) / 1000 ))
8cafad5
+eu_version=`expr \( $eu_version + 999 \) / 1000`
8cafad5
 
8cafad5
 AC_OUTPUT
570047f
--- elfutils/lib/ChangeLog
570047f
+++ elfutils/lib/ChangeLog
Jan Kratochvil 2045415
@@ -57,6 +57,9 @@
e4d1f5c
 
bfd3a36
 2009-01-23  Roland McGrath  <roland@redhat.com>
bfd3a36
 
5c16b08
+	* eu-config.h [! HAVE_BUILTIN_POPCOUNT]
5c16b08
+	(__builtin_popcount): New inline function.
5c16b08
+
bfd3a36
 	* eu-config.h: Add multiple inclusion protection.
5c16b08
 
bfd3a36
 2009-01-17  Ulrich Drepper  <drepper@redhat.com>
Jan Kratochvil 2045415
@@ -113,6 +116,11 @@
5fa3867
 	* Makefile.am (libeu_a_SOURCES): Add it.
5fa3867
 	* system.h: Declare crc32_file.
5fa3867
 
a769ac6
+2005-02-07  Roland McGrath  <roland@redhat.com>
a769ac6
+
a769ac6
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
a769ac6
+	(AM_CFLAGS): Use it in place of -Wextra.
a769ac6
+
5fa3867
 2005-04-30  Ulrich Drepper  <drepper@redhat.com>
a769ac6
 
5fa3867
 	* Makefile.am: Use -ffunction-sections for xmalloc.c.
570047f
--- elfutils/lib/Makefile.in
570047f
+++ elfutils/lib/Makefile.in
Jan Kratochvil 2045415
@@ -82,7 +82,8 @@ host_triplet = @host@
Jan Kratochvil 2045415
 DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
Jan Kratochvil 2045415
 	$(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
Jan Kratochvil 2045415
 	$(noinst_HEADERS) ChangeLog
Mark J. Wielaard 22346cb
-@MUDFLAP_TRUE@am__append_1 = -fmudflap
Mark J. Wielaard 22346cb
+@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
Mark J. Wielaard 22346cb
+@MUDFLAP_TRUE@am__append_2 = -fmudflap
Mark J. Wielaard 22346cb
 subdir = lib
Mark J. Wielaard 22346cb
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
Mark J. Wielaard 22346cb
 am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
Jan Kratochvil 2045415
@@ -193,6 +194,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
80ba80a
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
80ba80a
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
80ba80a
 LDFLAGS = @LDFLAGS@
80ba80a
+LD_AS_NEEDED = @LD_AS_NEEDED@
80ba80a
 LEX = @LEX@
80ba80a
 LEXLIB = @LEXLIB@
80ba80a
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
Jan Kratochvil 2045415
@@ -222,6 +224,7 @@ SHELL = @SHELL@
3cb5dfb
 STRIP = @STRIP@
b73b6ec
 USE_NLS = @USE_NLS@
b73b6ec
 VERSION = @VERSION@
b73b6ec
+WEXTRA = @WEXTRA@
b73b6ec
 XGETTEXT = @XGETTEXT@
3cb5dfb
 XGETTEXT_015 = @XGETTEXT_015@
f790d25
 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
Jan Kratochvil 2045415
@@ -283,10 +286,9 @@ zip_LIBS = @zip_LIBS@
Jan Kratochvil 2045415
 AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \
ba5f203
 	-I$(srcdir)/../libelf
ba5f203
 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
Mark J. Wielaard 22346cb
-	$($(*F)_no_Werror),,-Werror) $(if \
ba5f203
-	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
ba5f203
+	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
ba5f203
 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
Mark J. Wielaard 22346cb
-	$(am__append_1) -fpic
Mark J. Wielaard 22346cb
+	$(am__append_1) $(am__append_2) -fpic
ba5f203
 @MUDFLAP_FALSE@libmudflap = 
Mark J. Wielaard 22346cb
 @MUDFLAP_TRUE@libmudflap = -lmudflap
Mark J. Wielaard 22346cb
 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
Jan Kratochvil 2045415
--- elfutils/lib/eu-config.h
Jan Kratochvil 2045415
+++ elfutils/lib/eu-config.h
Jan Kratochvil 2045415
@@ -162,6 +162,17 @@ asm (".section predict_data, \"aw\"; .pr
Jan Kratochvil 2045415
 /* This macro is used by the tests conditionalize for standalone building.  */
Jan Kratochvil 2045415
 #define ELFUTILS_HEADER(name) <lib##name.h>
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
+#ifndef HAVE_BUILTIN_POPCOUNT
Jan Kratochvil 2045415
+# define __builtin_popcount hakmem_popcount
Jan Kratochvil 2045415
+static inline unsigned int __attribute__ ((unused))
Jan Kratochvil 2045415
+hakmem_popcount (unsigned int x)
Jan Kratochvil 2045415
+{
Jan Kratochvil 2045415
+  /* HAKMEM 169 */
Jan Kratochvil 2045415
+  unsigned int n = x - ((x >> 1) & 033333333333) - ((x >> 2) & 011111111111);
Jan Kratochvil 2045415
+  return ((n + (n >> 3)) & 030707070707) % 63;
Jan Kratochvil 2045415
+}
Jan Kratochvil 2045415
+#endif	/* HAVE_BUILTIN_POPCOUNT */
Jan Kratochvil 2045415
+
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 #ifdef SHARED
Jan Kratochvil 2045415
 # define OLD_VERSION(name, version) \
f995fa8
--- elfutils/libasm/ChangeLog
f995fa8
+++ elfutils/libasm/ChangeLog
Jan Kratochvil 2045415
@@ -75,6 +75,11 @@
2ca6928
 	* asm_error.c: Add new error ASM_E_IOERROR.
2ca6928
 	* libasmP.h: Add ASM_E_IOERROR definition.
2ca6928
 
f995fa8
+2005-05-31  Roland McGrath  <roland@redhat.com>
f995fa8
+
f995fa8
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
f995fa8
+	(AM_CFLAGS): Use it in place of -Wextra.
f995fa8
+
f995fa8
 2005-02-15  Ulrich Drepper  <drepper@redhat.com>
f995fa8
 
2ca6928
 	* Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
570047f
--- elfutils/libasm/Makefile.in
570047f
+++ elfutils/libasm/Makefile.in
Jan Kratochvil 2045415
@@ -83,10 +83,11 @@ host_triplet = @host@
Jan Kratochvil 2045415
 DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
Jan Kratochvil 2045415
 	$(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
Jan Kratochvil 2045415
 	$(noinst_HEADERS) $(pkginclude_HEADERS) ChangeLog
Mark J. Wielaard 22346cb
-@MUDFLAP_TRUE@am__append_1 = -fmudflap
Mark J. Wielaard 22346cb
+@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
Mark J. Wielaard 22346cb
+@MUDFLAP_TRUE@am__append_2 = -fmudflap
Mark J. Wielaard 22346cb
 @MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1)
Mark J. Wielaard 22346cb
 @MUDFLAP_TRUE@am_libasm_pic_a_OBJECTS =
Mark J. Wielaard 22346cb
-@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_2 = -lpthread
Mark J. Wielaard 22346cb
+@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_3 = -lpthread
Mark J. Wielaard 22346cb
 subdir = libasm
Mark J. Wielaard 22346cb
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
Mark J. Wielaard 22346cb
 am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
Jan Kratochvil 2045415
@@ -245,6 +246,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
80ba80a
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
80ba80a
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
80ba80a
 LDFLAGS = @LDFLAGS@
80ba80a
+LD_AS_NEEDED = @LD_AS_NEEDED@
80ba80a
 LEX = @LEX@
80ba80a
 LEXLIB = @LEXLIB@
80ba80a
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
Jan Kratochvil 2045415
@@ -274,6 +276,7 @@ SHELL = @SHELL@
3cb5dfb
 STRIP = @STRIP@
b73b6ec
 USE_NLS = @USE_NLS@
b73b6ec
 VERSION = 1
b73b6ec
+WEXTRA = @WEXTRA@
b73b6ec
 XGETTEXT = @XGETTEXT@
3cb5dfb
 XGETTEXT_015 = @XGETTEXT_015@
f790d25
 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
Jan Kratochvil 2045415
@@ -336,10 +339,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr
Mark J. Wielaard 22346cb
 	-I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \
ba5f203
 	-I$(top_srcdir)/libdw
ba5f203
 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
Mark J. Wielaard 22346cb
-	$($(*F)_no_Werror),,-Werror) $(if \
ba5f203
-	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
ba5f203
+	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
ba5f203
 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
Mark J. Wielaard 22346cb
-	$(am__append_1)
Mark J. Wielaard 22346cb
+	$(am__append_1) $(am__append_2)
ba5f203
 @MUDFLAP_FALSE@libmudflap = 
Mark J. Wielaard 22346cb
 @MUDFLAP_TRUE@libmudflap = -lmudflap
Mark J. Wielaard 22346cb
 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
Jan Kratochvil 2045415
@@ -368,7 +370,7 @@ libasm_a_SOURCES = asm_begin.c asm_abort
Mark J. Wielaard 22346cb
 
Mark J. Wielaard 22346cb
 @MUDFLAP_FALSE@libasm_pic_a_SOURCES = 
Mark J. Wielaard 22346cb
 @MUDFLAP_FALSE@am_libasm_pic_a_OBJECTS = $(libasm_a_SOURCES:.c=.os)
Mark J. Wielaard 22346cb
-@MUDFLAP_FALSE@libasm_so_LDLIBS = $(am__append_2)
Mark J. Wielaard 22346cb
+@MUDFLAP_FALSE@libasm_so_LDLIBS = $(am__append_3)
Mark J. Wielaard 22346cb
 @MUDFLAP_FALSE@libasm_so_SOURCES = 
Mark J. Wielaard 22346cb
 noinst_HEADERS = libasmP.h symbolhash.h
Mark J. Wielaard 22346cb
 EXTRA_DIST = libasm.map
570047f
--- elfutils/libcpu/ChangeLog
570047f
+++ elfutils/libcpu/ChangeLog
Jan Kratochvil 2045415
@@ -47,6 +47,9 @@
fbfe249
 
bfd3a36
 2009-01-23  Roland McGrath  <roland@redhat.com>
bfd3a36
 
5c16b08
+	* i386_disasm.c (i386_disasm): Add abort after assert-constant for old
5c16b08
+	compilers that don't realize it's noreturn.
5c16b08
+
bfd3a36
 	* Makefile.am (i386_parse_CFLAGS): Use quotes around command
bfd3a36
 	substitution that can produce leading whitespace.
5c16b08
 
Jan Kratochvil 2045415
@@ -376,6 +379,11 @@
840723d
 	* defs/i386.doc: New file.
840723d
 	* defs/x86_64: New file.
840723d
 
6788433
+2005-04-04  Roland McGrath  <roland@redhat.com>
6788433
+
6788433
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
6788433
+	(AM_CFLAGS): Use it instead of -Wextra.
6788433
+
6788433
 2005-02-15  Ulrich Drepper  <drepper@redhat.com>
6788433
 
6788433
 	* Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
570047f
--- elfutils/libcpu/Makefile.in
570047f
+++ elfutils/libcpu/Makefile.in
Jan Kratochvil 2045415
@@ -84,7 +84,8 @@ DIST_COMMON = $(top_srcdir)/config/eu.am
Jan Kratochvil 2045415
 	$(srcdir)/Makefile.am i386_lex.c i386_parse.c \
Jan Kratochvil 2045415
 	$(top_srcdir)/config/depcomp $(top_srcdir)/config/ylwrap \
Jan Kratochvil 2045415
 	$(am__noinst_HEADERS_DIST) ChangeLog
Mark J. Wielaard 22346cb
-@MUDFLAP_TRUE@am__append_1 = -fmudflap
Mark J. Wielaard 22346cb
+@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
Mark J. Wielaard 22346cb
+@MUDFLAP_TRUE@am__append_2 = -fmudflap
Mark J. Wielaard 22346cb
 @MAINTAINER_MODE_TRUE@noinst_PROGRAMS = i386_gendis$(EXEEXT)
Mark J. Wielaard 22346cb
 subdir = libcpu
Mark J. Wielaard 22346cb
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
Jan Kratochvil 2045415
@@ -220,6 +221,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
80ba80a
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
80ba80a
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
80ba80a
 LDFLAGS = @LDFLAGS@
80ba80a
+LD_AS_NEEDED = @LD_AS_NEEDED@
80ba80a
 LEX = @LEX@
80ba80a
 LEXLIB = @LEXLIB@
840723d
 LEX_OUTPUT_ROOT = lex.$(
Jan Kratochvil 2045415
@@ -249,6 +251,7 @@ SHELL = @SHELL@
3cb5dfb
 STRIP = @STRIP@
b73b6ec
 USE_NLS = @USE_NLS@
b73b6ec
 VERSION = @VERSION@
b73b6ec
+WEXTRA = @WEXTRA@
b73b6ec
 XGETTEXT = @XGETTEXT@
3cb5dfb
 XGETTEXT_015 = @XGETTEXT_015@
f790d25
 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
Jan Kratochvil 2045415
@@ -311,10 +314,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr
Mark J. Wielaard 22346cb
 	-I$(srcdir)/../libelf -I$(srcdir)/../libebl \
ba5f203
 	-I$(srcdir)/../libdw -I$(srcdir)/../libasm
ba5f203
 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
Mark J. Wielaard 22346cb
-	$($(*F)_no_Werror),,-Werror) $(if \
ba5f203
-	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
ba5f203
+	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
ba5f203
 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
Mark J. Wielaard 22346cb
-	$(am__append_1) -fpic -fdollars-in-identifiers
Mark J. Wielaard 22346cb
+	$(am__append_1) $(am__append_2) -fpic -fdollars-in-identifiers
ba5f203
 @MUDFLAP_FALSE@libmudflap = 
Mark J. Wielaard 22346cb
 @MUDFLAP_TRUE@libmudflap = -lmudflap
Mark J. Wielaard 22346cb
 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
Jan Kratochvil 2045415
--- elfutils/libcpu/i386_disasm.c
Jan Kratochvil 2045415
+++ elfutils/libcpu/i386_disasm.c
Jan Kratochvil 2045415
@@ -822,6 +822,7 @@ i386_disasm (const uint8_t **startp, con
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 			default:
Jan Kratochvil 2045415
 			  assert (! "INVALID not handled");
Jan Kratochvil 2045415
+			  abort ();
Jan Kratochvil 2045415
 			}
Jan Kratochvil 2045415
 		    }
Jan Kratochvil 2045415
 		  else
f995fa8
--- elfutils/libdw/ChangeLog
f995fa8
+++ elfutils/libdw/ChangeLog
Jan Kratochvil 2045415
@@ -177,6 +177,10 @@
Mark J. Wielaard 22346cb
 
Mark J. Wielaard 22346cb
 	* Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
Mark J. Wielaard 22346cb
 
Mark J. Wielaard 22346cb
+2011-07-20  Mark Wielaard  <mjw@redhat.com>
Mark J. Wielaard 22346cb
+
Mark J. Wielaard 22346cb
+	* dwarf_begin_elf.c: Add fallback for be64toh if not defined.
Mark J. Wielaard 22346cb
+
Mark J. Wielaard 22346cb
 2011-07-14  Mark Wielaard  <mjw@redhat.com>
Mark J. Wielaard 22346cb
 
Mark J. Wielaard 22346cb
 	* libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
Jan Kratochvil 2045415
@@ -536,6 +540,10 @@
e4d1f5c
 
e4d1f5c
 	* dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
e4d1f5c
 
e4d1f5c
+2009-08-17  Roland McGrath  <roland@redhat.com>
e4d1f5c
+
e4d1f5c
+	* libdw.h: Disable extern inlines for GCC 4.2.
e4d1f5c
+
e4d1f5c
 2009-08-10  Roland McGrath  <roland@redhat.com>
e4d1f5c
 
e4d1f5c
 	* dwarf_getscopevar.c: Use dwarf_diename.
Jan Kratochvil 2045415
@@ -1304,6 +1312,11 @@
f995fa8
 
f995fa8
 2005-05-31  Roland McGrath  <roland@redhat.com>
f995fa8
 
f995fa8
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
f995fa8
+	(AM_CFLAGS): Use it in place of -Wextra.
f995fa8
+
f995fa8
+2005-05-31  Roland McGrath  <roland@redhat.com>
f995fa8
+
f995fa8
 	* dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
f995fa8
 	formref offset.
f995fa8
 
570047f
--- elfutils/libdw/Makefile.in
570047f
+++ elfutils/libdw/Makefile.in
Jan Kratochvil 2045415
@@ -84,8 +84,9 @@ DIST_COMMON = $(top_srcdir)/config/eu.am
Jan Kratochvil 2045415
 	$(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
Jan Kratochvil 2045415
 	$(include_HEADERS) $(noinst_HEADERS) $(pkginclude_HEADERS) \
Jan Kratochvil 2045415
 	ChangeLog
Mark J. Wielaard 22346cb
-@MUDFLAP_TRUE@am__append_1 = -fmudflap
Mark J. Wielaard 22346cb
-@BUILD_STATIC_TRUE@am__append_2 = -fpic
Mark J. Wielaard 22346cb
+@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
Mark J. Wielaard 22346cb
+@MUDFLAP_TRUE@am__append_2 = -fmudflap
Mark J. Wielaard 22346cb
+@BUILD_STATIC_TRUE@am__append_3 = -fpic
Mark J. Wielaard 22346cb
 @MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1)
Mark J. Wielaard 22346cb
 @MUDFLAP_TRUE@am_libdw_pic_a_OBJECTS =
Mark J. Wielaard 22346cb
 subdir = libdw
Jan Kratochvil 2045415
@@ -291,6 +292,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
80ba80a
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
80ba80a
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
80ba80a
 LDFLAGS = @LDFLAGS@
80ba80a
+LD_AS_NEEDED = @LD_AS_NEEDED@
80ba80a
 LEX = @LEX@
80ba80a
 LEXLIB = @LEXLIB@
80ba80a
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
Jan Kratochvil 2045415
@@ -320,6 +322,7 @@ SHELL = @SHELL@
3cb5dfb
 STRIP = @STRIP@
b73b6ec
 USE_NLS = @USE_NLS@
b73b6ec
 VERSION = 1
b73b6ec
+WEXTRA = @WEXTRA@
b73b6ec
 XGETTEXT = @XGETTEXT@
3cb5dfb
 XGETTEXT_015 = @XGETTEXT_015@
f790d25
 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
Jan Kratochvil 2045415
@@ -381,10 +384,9 @@ zip_LIBS = @zip_LIBS@
Jan Kratochvil 2045415
 AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \
ba5f203
 	-I$(srcdir)/../libelf
ba5f203
 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
Mark J. Wielaard 22346cb
-	$($(*F)_no_Werror),,-Werror) $(if \
ba5f203
-	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
ba5f203
+	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
ba5f203
 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
Mark J. Wielaard 22346cb
-	$(am__append_1) $(am__append_2)
Mark J. Wielaard 22346cb
+	$(am__append_1) $(am__append_2) $(am__append_3)
ba5f203
 @MUDFLAP_FALSE@libmudflap = 
Mark J. Wielaard 22346cb
 @MUDFLAP_TRUE@libmudflap = -lmudflap
Mark J. Wielaard 22346cb
 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
Jan Kratochvil 2045415
--- elfutils/libdw/dwarf_begin_elf.c
Jan Kratochvil 2045415
+++ elfutils/libdw/dwarf_begin_elf.c
Jan Kratochvil 2045415
@@ -48,6 +48,14 @@
Jan Kratochvil 2045415
 #if USE_ZLIB
Jan Kratochvil 2045415
 # include <endian.h>
Jan Kratochvil 2045415
 # define crc32		loser_crc32
Jan Kratochvil 2045415
+# ifndef be64toh
Jan Kratochvil 2045415
+#  include <byteswap.h>
Jan Kratochvil 2045415
+#  if __BYTE_ORDER == __LITTLE_ENDIAN
Jan Kratochvil 2045415
+#   define be64toh(x) bswap_64 (x)
Jan Kratochvil 2045415
+#  else
Jan Kratochvil 2045415
+#   define be64toh(x) (x)
Jan Kratochvil 2045415
+#  endif
Jan Kratochvil 2045415
+# endif
Jan Kratochvil 2045415
 # include <zlib.h>
Jan Kratochvil 2045415
 # undef crc32
Jan Kratochvil 2045415
 #endif
Jan Kratochvil 2045415
--- elfutils/libdw/libdw.h
Jan Kratochvil 2045415
+++ elfutils/libdw/libdw.h
Jan Kratochvil 2045415
@@ -831,7 +831,7 @@ extern Dwarf_OOM dwarf_new_oom_handler (
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 /* Inline optimizations.  */
Jan Kratochvil 2045415
-#ifdef __OPTIMIZE__
Jan Kratochvil 2045415
+#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
Jan Kratochvil 2045415
 /* Return attribute code of given attribute.  */
Jan Kratochvil 2045415
 __libdw_extern_inline unsigned int
Jan Kratochvil 2045415
 dwarf_whatattr (Dwarf_Attribute *attr)
f995fa8
--- elfutils/libdwfl/ChangeLog
f995fa8
+++ elfutils/libdwfl/ChangeLog
Jan Kratochvil 2045415
@@ -1659,6 +1659,11 @@
469b3c7
 
f995fa8
 2005-07-21  Roland McGrath  <roland@redhat.com>
f995fa8
 
f995fa8
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
f995fa8
+	(AM_CFLAGS): Use it in place of -Wextra.
f995fa8
+
f995fa8
+2005-07-21  Roland McGrath  <roland@redhat.com>
f995fa8
+
f995fa8
 	* Makefile.am (noinst_HEADERS): Add loc2c.c.
f995fa8
 
f995fa8
 	* test2.c (main): Check sscanf result to quiet warning.
f995fa8
--- elfutils/libdwfl/Makefile.in
f995fa8
+++ elfutils/libdwfl/Makefile.in
Jan Kratochvil 2045415
@@ -82,11 +82,12 @@ host_triplet = @host@
Jan Kratochvil 2045415
 DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
Jan Kratochvil 2045415
 	$(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
Jan Kratochvil 2045415
 	$(noinst_HEADERS) $(pkginclude_HEADERS) ChangeLog
Mark J. Wielaard 22346cb
-@MUDFLAP_TRUE@am__append_1 = -fmudflap
Mark J. Wielaard 22346cb
-@MUDFLAP_FALSE@am__append_2 = libdwfl_pic.a
Mark J. Wielaard 22346cb
-@ZLIB_TRUE@am__append_3 = gzip.c
Mark J. Wielaard 22346cb
-@BZLIB_TRUE@am__append_4 = bzip2.c
Mark J. Wielaard 22346cb
-@LZMA_TRUE@am__append_5 = lzma.c
Mark J. Wielaard 22346cb
+@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
Mark J. Wielaard 22346cb
+@MUDFLAP_TRUE@am__append_2 = -fmudflap
Mark J. Wielaard 22346cb
+@MUDFLAP_FALSE@am__append_3 = libdwfl_pic.a
Mark J. Wielaard 22346cb
+@ZLIB_TRUE@am__append_4 = gzip.c
Mark J. Wielaard 22346cb
+@BZLIB_TRUE@am__append_5 = bzip2.c
Mark J. Wielaard 22346cb
+@LZMA_TRUE@am__append_6 = lzma.c
Mark J. Wielaard 22346cb
 @MUDFLAP_TRUE@am_libdwfl_pic_a_OBJECTS =
Mark J. Wielaard 22346cb
 subdir = libdwfl
Mark J. Wielaard 22346cb
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
Jan Kratochvil 2045415
@@ -280,6 +281,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
80ba80a
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
80ba80a
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
80ba80a
 LDFLAGS = @LDFLAGS@
80ba80a
+LD_AS_NEEDED = @LD_AS_NEEDED@
80ba80a
 LEX = @LEX@
80ba80a
 LEXLIB = @LEXLIB@
80ba80a
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
Jan Kratochvil 2045415
@@ -309,6 +311,7 @@ SHELL = @SHELL@
3cb5dfb
 STRIP = @STRIP@
f995fa8
 USE_NLS = @USE_NLS@
f995fa8
 VERSION = 1
f995fa8
+WEXTRA = @WEXTRA@
f995fa8
 XGETTEXT = @XGETTEXT@
3cb5dfb
 XGETTEXT_015 = @XGETTEXT_015@
f790d25
 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
Jan Kratochvil 2045415
@@ -371,10 +374,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr
Mark J. Wielaard 22346cb
 	-I$(srcdir)/../libelf -I$(srcdir)/../libebl \
ba5f203
 	-I$(srcdir)/../libdw
ba5f203
 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
Mark J. Wielaard 22346cb
-	$($(*F)_no_Werror),,-Werror) $(if \
ba5f203
-	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
ba5f203
+	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
ba5f203
 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
Mark J. Wielaard 22346cb
-	$(am__append_1)
Mark J. Wielaard 22346cb
+	$(am__append_1) $(am__append_2)
ba5f203
 @MUDFLAP_FALSE@libmudflap = 
Mark J. Wielaard 22346cb
 @MUDFLAP_TRUE@libmudflap = -lmudflap
Mark J. Wielaard 22346cb
 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
Jan Kratochvil 2045415
@@ -382,7 +384,7 @@ COMPILE.os = $(filter-out -fprofile-arcs
Mark J. Wielaard 22346cb
 
Mark J. Wielaard 22346cb
 CLEANFILES = *.gcno *.gcda $(am_libdwfl_pic_a_OBJECTS)
Mark J. Wielaard 22346cb
 textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
Mark J. Wielaard 22346cb
-noinst_LIBRARIES = libdwfl.a $(am__append_2)
Mark J. Wielaard 22346cb
+noinst_LIBRARIES = libdwfl.a $(am__append_3)
Mark J. Wielaard 22346cb
 pkginclude_HEADERS = libdwfl.h
Mark J. Wielaard 22346cb
 libdwfl_a_SOURCES = dwfl_begin.c dwfl_end.c dwfl_error.c \
Mark J. Wielaard 22346cb
 	dwfl_version.c dwfl_module.c dwfl_report_elf.c relocate.c \
Jan Kratochvil 2045415
@@ -403,8 +405,8 @@ libdwfl_a_SOURCES = dwfl_begin.c dwfl_en
Mark J. Wielaard 22346cb
 	dwfl_module_getsym.c dwfl_module_addrname.c \
Mark J. Wielaard 22346cb
 	dwfl_module_addrsym.c dwfl_module_return_value_location.c \
Mark J. Wielaard 22346cb
 	dwfl_module_register_names.c dwfl_segment_report_module.c \
Mark J. Wielaard 22346cb
-	link_map.c core-file.c open.c image-header.c $(am__append_3) \
Mark J. Wielaard 22346cb
-	$(am__append_4) $(am__append_5)
Mark J. Wielaard 22346cb
+	link_map.c core-file.c open.c image-header.c $(am__append_4) \
Mark J. Wielaard 22346cb
+	$(am__append_5) $(am__append_6)
Mark J. Wielaard 22346cb
 @MUDFLAP_FALSE@libdwfl = $(libdw)
Mark J. Wielaard 22346cb
 @MUDFLAP_TRUE@libdwfl = libdwfl.a $(libdw) $(libebl) $(libelf) $(libeu)
Mark J. Wielaard 22346cb
 @MUDFLAP_FALSE@libdw = ../libdw/libdw.so
f995fa8
--- elfutils/libebl/ChangeLog
f995fa8
+++ elfutils/libebl/ChangeLog
Jan Kratochvil 2045415
@@ -674,6 +674,11 @@
f995fa8
 	* Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
f995fa8
 	tracking works right.
f995fa8
 
f995fa8
+2005-05-31  Roland McGrath  <roland@redhat.com>
f995fa8
+
f995fa8
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
f995fa8
+	(AM_CFLAGS): Use it in place of -Wextra.
f995fa8
+
f995fa8
 2005-05-21  Ulrich Drepper  <drepper@redhat.com>
f995fa8
 
f995fa8
 	* libebl_x86_64.map: Add x86_64_core_note.
570047f
--- elfutils/libebl/Makefile.in
570047f
+++ elfutils/libebl/Makefile.in
Jan Kratochvil 2045415
@@ -82,7 +82,8 @@ host_triplet = @host@
Jan Kratochvil 2045415
 DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
Jan Kratochvil 2045415
 	$(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
Jan Kratochvil 2045415
 	$(noinst_HEADERS) $(pkginclude_HEADERS) ChangeLog
Mark J. Wielaard 22346cb
-@MUDFLAP_TRUE@am__append_1 = -fmudflap
Mark J. Wielaard 22346cb
+@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
Mark J. Wielaard 22346cb
+@MUDFLAP_TRUE@am__append_2 = -fmudflap
Mark J. Wielaard 22346cb
 subdir = libebl
Mark J. Wielaard 22346cb
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
Mark J. Wielaard 22346cb
 am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
Jan Kratochvil 2045415
@@ -242,6 +243,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
80ba80a
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
80ba80a
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
80ba80a
 LDFLAGS = @LDFLAGS@
80ba80a
+LD_AS_NEEDED = @LD_AS_NEEDED@
80ba80a
 LEX = @LEX@
80ba80a
 LEXLIB = @LEXLIB@
80ba80a
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
Jan Kratochvil 2045415
@@ -271,6 +273,7 @@ SHELL = @SHELL@
3cb5dfb
 STRIP = @STRIP@
b73b6ec
 USE_NLS = @USE_NLS@
b73b6ec
 VERSION = 1
b73b6ec
+WEXTRA = @WEXTRA@
b73b6ec
 XGETTEXT = @XGETTEXT@
3cb5dfb
 XGETTEXT_015 = @XGETTEXT_015@
f790d25
 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
Jan Kratochvil 2045415
@@ -333,10 +336,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr
Mark J. Wielaard 22346cb
 	-I$(srcdir)/../libelf -I$(srcdir)/../libdw \
ba5f203
 	-I$(srcdir)/../libasm
ba5f203
 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
Mark J. Wielaard 22346cb
-	$($(*F)_no_Werror),,-Werror) $(if \
ba5f203
-	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
ba5f203
+	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
ba5f203
 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
Mark J. Wielaard 22346cb
-	$(am__append_1) -fpic
Mark J. Wielaard 22346cb
+	$(am__append_1) $(am__append_2) -fpic
ba5f203
 @MUDFLAP_FALSE@libmudflap = 
Mark J. Wielaard 22346cb
 @MUDFLAP_TRUE@libmudflap = -lmudflap
Mark J. Wielaard 22346cb
 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
f995fa8
--- elfutils/libelf/ChangeLog
f995fa8
+++ elfutils/libelf/ChangeLog
Jan Kratochvil 2045415
@@ -46,6 +46,11 @@
Mark Wielaard d10bca5
 
Mark Wielaard d10bca5
 	* elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check.
Mark Wielaard d10bca5
 
Mark J. Wielaard 22346cb
+2011-03-10  Roland McGrath  <roland@redhat.com>
Mark J. Wielaard 22346cb
+
Mark J. Wielaard 22346cb
+	* gnuhash_xlate.h (elf_cvt_gnuhash): Avoid post-increment in bswap_32
Mark J. Wielaard 22346cb
+	argument, since some implementations are buggy macros.
Mark J. Wielaard 22346cb
+
Mark Wielaard d10bca5
 2011-02-26  Mark Wielaard  <mjw@redhat.com>
Mark J. Wielaard 22346cb
 
Mark Wielaard d10bca5
 	* elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.
Jan Kratochvil 2045415
@@ -723,6 +728,11 @@
5c16b08
 
5c16b08
 	* elf.h: Update from glibc.
469b3c7
 
f995fa8
+2005-05-31  Roland McGrath  <roland@redhat.com>
f995fa8
+
f995fa8
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
f995fa8
+	(AM_CFLAGS): Use it in place of -Wextra.
f995fa8
+
5c16b08
 2005-05-08  Roland McGrath  <roland@redhat.com>
f995fa8
 
5c16b08
 	* elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
570047f
--- elfutils/libelf/Makefile.in
570047f
+++ elfutils/libelf/Makefile.in
Jan Kratochvil 2045415
@@ -84,11 +84,12 @@ DIST_COMMON = $(top_srcdir)/config/eu.am
Jan Kratochvil 2045415
 	$(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
Jan Kratochvil 2045415
 	$(include_HEADERS) $(noinst_HEADERS) $(pkginclude_HEADERS) \
Jan Kratochvil 2045415
 	ChangeLog
Mark J. Wielaard 22346cb
-@MUDFLAP_TRUE@am__append_1 = -fmudflap
Mark J. Wielaard 22346cb
-@BUILD_STATIC_TRUE@am__append_2 = -fpic
Mark J. Wielaard 22346cb
+@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
Mark J. Wielaard 22346cb
+@MUDFLAP_TRUE@am__append_2 = -fmudflap
Mark J. Wielaard 22346cb
+@BUILD_STATIC_TRUE@am__append_3 = -fpic
Mark J. Wielaard 22346cb
 @MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1)
Mark J. Wielaard 22346cb
 @MUDFLAP_TRUE@am_libelf_pic_a_OBJECTS =
Mark J. Wielaard 22346cb
-@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_3 = -lpthread
Mark J. Wielaard 22346cb
+@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_4 = -lpthread
Mark J. Wielaard 22346cb
 subdir = libelf
Mark J. Wielaard 22346cb
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
Mark J. Wielaard 22346cb
 am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
Jan Kratochvil 2045415
@@ -288,6 +289,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
80ba80a
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
80ba80a
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
80ba80a
 LDFLAGS = @LDFLAGS@
80ba80a
+LD_AS_NEEDED = @LD_AS_NEEDED@
80ba80a
 LEX = @LEX@
80ba80a
 LEXLIB = @LEXLIB@
80ba80a
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
Jan Kratochvil 2045415
@@ -317,6 +319,7 @@ SHELL = @SHELL@
3cb5dfb
 STRIP = @STRIP@
b73b6ec
 USE_NLS = @USE_NLS@
b73b6ec
 VERSION = 1
b73b6ec
+WEXTRA = @WEXTRA@
b73b6ec
 XGETTEXT = @XGETTEXT@
3cb5dfb
 XGETTEXT_015 = @XGETTEXT_015@
f790d25
 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
Jan Kratochvil 2045415
@@ -377,10 +380,9 @@ top_srcdir = @top_srcdir@
Mark J. Wielaard 22346cb
 zip_LIBS = @zip_LIBS@
Jan Kratochvil 2045415
 AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
ba5f203
 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
Mark J. Wielaard 22346cb
-	$($(*F)_no_Werror),,-Werror) $(if \
ba5f203
-	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
ba5f203
+	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
ba5f203
 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
Mark J. Wielaard 22346cb
-	$(am__append_1) $(am__append_2)
Mark J. Wielaard 22346cb
+	$(am__append_1) $(am__append_2) $(am__append_3)
ba5f203
 @MUDFLAP_FALSE@libmudflap = 
Mark J. Wielaard 22346cb
 @MUDFLAP_TRUE@libmudflap = -lmudflap
Mark J. Wielaard 22346cb
 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
Jan Kratochvil 2045415
@@ -445,7 +447,7 @@ libelf_a_SOURCES = elf_version.c elf_has
Mark J. Wielaard 22346cb
 
Mark J. Wielaard 22346cb
 @MUDFLAP_FALSE@libelf_pic_a_SOURCES = 
Mark J. Wielaard 22346cb
 @MUDFLAP_FALSE@am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
Mark J. Wielaard 22346cb
-@MUDFLAP_FALSE@libelf_so_LDLIBS = $(am__append_3)
Mark J. Wielaard 22346cb
+@MUDFLAP_FALSE@libelf_so_LDLIBS = $(am__append_4)
Mark J. Wielaard 22346cb
 @MUDFLAP_FALSE@libelf_so_SOURCES = 
Mark J. Wielaard 22346cb
 noinst_HEADERS = elf.h abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \
Mark J. Wielaard 22346cb
 		 version_xlate.h gnuhash_xlate.h note_xlate.h dl-hash.h
Jan Kratochvil 2045415
--- elfutils/libelf/common.h
Jan Kratochvil 2045415
+++ elfutils/libelf/common.h
Jan Kratochvil 2045415
@@ -139,7 +139,7 @@ libelf_release_all (Elf *elf)
Jan Kratochvil 2045415
   (Var) = (sizeof (Var) == 1						      \
Jan Kratochvil 2045415
 	   ? (unsigned char) (Var)					      \
Jan Kratochvil 2045415
 	   : (sizeof (Var) == 2						      \
Jan Kratochvil 2045415
-	      ? bswap_16 (Var)						      \
Jan Kratochvil 2045415
+	      ? (unsigned short int) bswap_16 (Var)			      \
Jan Kratochvil 2045415
 	      : (sizeof (Var) == 4					      \
Jan Kratochvil 2045415
 		 ? bswap_32 (Var)					      \
Jan Kratochvil 2045415
 		 : bswap_64 (Var))))
Jan Kratochvil 2045415
@@ -148,7 +148,7 @@ libelf_release_all (Elf *elf)
Jan Kratochvil 2045415
   (Dst) = (sizeof (Var) == 1						      \
Jan Kratochvil 2045415
 	   ? (unsigned char) (Var)					      \
Jan Kratochvil 2045415
 	   : (sizeof (Var) == 2						      \
Jan Kratochvil 2045415
-	      ? bswap_16 (Var)						      \
Jan Kratochvil 2045415
+	      ? (unsigned short int) bswap_16 (Var)			      \
Jan Kratochvil 2045415
 	      : (sizeof (Var) == 4					      \
Jan Kratochvil 2045415
 		 ? bswap_32 (Var)					      \
Jan Kratochvil 2045415
 		 : bswap_64 (Var))))
Jan Kratochvil 2045415
--- elfutils/libelf/gnuhash_xlate.h
Jan Kratochvil 2045415
+++ elfutils/libelf/gnuhash_xlate.h
Jan Kratochvil 2045415
@@ -1,5 +1,5 @@
Jan Kratochvil 2045415
 /* Conversion functions for versioning information.
Jan Kratochvil 2045415
-   Copyright (C) 2006, 2007 Red Hat, Inc.
Jan Kratochvil 2045415
+   Copyright (C) 2006-2011 Red Hat, Inc.
Jan Kratochvil 2045415
    This file is part of elfutils.
Jan Kratochvil 2045415
    Written by Ulrich Drepper <drepper@redhat.com>, 2006.
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
@@ -68,7 +68,9 @@ elf_cvt_gnuhash (void *dest, const void
Jan Kratochvil 2045415
   dest32 = (Elf32_Word *) &dest64[bitmask_words];
Jan Kratochvil 2045415
   while (len >= 4)
Jan Kratochvil 2045415
     {
Jan Kratochvil 2045415
-      *dest32++ = bswap_32 (*src32++);
Jan Kratochvil 2045415
+      *dest32 = bswap_32 (*src32);
Jan Kratochvil 2045415
+      ++dest32;
Jan Kratochvil 2045415
+      ++src32;
Jan Kratochvil 2045415
       len -= 4;
Jan Kratochvil 2045415
     }
Jan Kratochvil 2045415
 }
570047f
--- elfutils/m4/Makefile.in
570047f
+++ elfutils/m4/Makefile.in
Jan Kratochvil 2045415
@@ -139,6 +139,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
80ba80a
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
80ba80a
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
80ba80a
 LDFLAGS = @LDFLAGS@
80ba80a
+LD_AS_NEEDED = @LD_AS_NEEDED@
80ba80a
 LEX = @LEX@
80ba80a
 LEXLIB = @LEXLIB@
80ba80a
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
Jan Kratochvil 2045415
@@ -168,6 +169,7 @@ SHELL = @SHELL@
3cb5dfb
 STRIP = @STRIP@
b73b6ec
 USE_NLS = @USE_NLS@
b73b6ec
 VERSION = @VERSION@
b73b6ec
+WEXTRA = @WEXTRA@
b73b6ec
 XGETTEXT = @XGETTEXT@
3cb5dfb
 XGETTEXT_015 = @XGETTEXT_015@
f790d25
 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
f995fa8
--- elfutils/src/ChangeLog
f995fa8
+++ elfutils/src/ChangeLog
Jan Kratochvil 2045415
@@ -766,8 +766,16 @@
e4d1f5c
 	* readelf.c (attr_callback): Use print_block only when we don't use
e4d1f5c
 	print_ops.
e4d1f5c
 
e4d1f5c
+2009-08-17  Roland McGrath  <roland@redhat.com>
e4d1f5c
+
e4d1f5c
+	* ld.h: Disable extern inlines for GCC 4.2.
e4d1f5c
+
e4d1f5c
 2009-08-14  Roland McGrath  <roland@redhat.com>
e4d1f5c
 
e4d1f5c
+	* strings.c (read_block): Conditionalize posix_fadvise use
e4d1f5c
+	on [POSIX_FADV_SEQUENTIAL].
e4d1f5c
+	From Petr Salinger <Petr.Salinger@seznam.cz>.
e4d1f5c
+
e4d1f5c
 	* ar.c (do_oper_extract): Use pathconf instead of statfs.
e4d1f5c
 
e4d1f5c
 2009-08-01  Ulrich Drepper  <drepper@redhat.com>
Jan Kratochvil 2045415
@@ -931,6 +939,8 @@
5c16b08
 	* readelf.c (print_debug_frame_section): Use t instead of j formats
5c16b08
 	for ptrdiff_t OFFSET.
5c16b08
 
5c16b08
+	* addr2line.c (handle_address): Use %a instead of %m for compatibility.
5c16b08
+
5c16b08
 2009-01-21  Ulrich Drepper  <drepper@redhat.com>
5c16b08
 
5c16b08
 	* elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
Jan Kratochvil 2045415
@@ -1114,6 +1124,11 @@
fa1a8eb
 	that matches its PT_LOAD's p_flags &~ PF_W.  On sparc, PF_X really
fa1a8eb
 	is valid in RELRO.
fa1a8eb
 
fb2677a
+2008-03-01  Roland McGrath  <roland@redhat.com>
fb2677a
+
fb2677a
+	* readelf.c (dump_archive_index): Tweak portability hack
fb2677a
+	to match [__GNUC__ < 4] too.
fb2677a
+
fb2677a
 2008-02-29  Roland McGrath  <roland@redhat.com>
fb2677a
 
fb2677a
 	* readelf.c (print_attributes): Add a cast.
Jan Kratochvil 2045415
@@ -1365,6 +1380,8 @@
a7b828d
 
a7b828d
 	* readelf.c (hex_dump): Fix rounding error in whitespace calculation.
a7b828d
 
2dfc22c
+	* Makefile.am (readelf_no_Werror): New variable.
2dfc22c
+
2dfc22c
 2007-10-15  Roland McGrath  <roland@redhat.com>
2dfc22c
 
2dfc22c
 	* make-debug-archive.in: New file.
Jan Kratochvil 2045415
@@ -1804,6 +1821,10 @@
9a3c170
 	* elflint.c (valid_e_machine): Add EM_ALPHA.
9a3c170
 	Reported by Christian Aichinger <Greek0@gmx.net>.
9a3c170
 
9a3c170
+	* strings.c (map_file): Define POSIX_MADV_SEQUENTIAL to
9a3c170
+	MADV_SEQUENTIAL if undefined.  	Don't call posix_madvise
9a3c170
+	if neither is defined.
9a3c170
+
9a3c170
 2006-08-08  Ulrich Drepper  <drepper@redhat.com>
9a3c170
 
9a3c170
 	* elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
Jan Kratochvil 2045415
@@ -1880,6 +1901,10 @@
a997709
 	* Makefile.am: Add hacks to create dependency files for non-generic
a997709
 	linker.
a997709
 
3c3d383
+2006-04-05  Roland McGrath  <roland@redhat.com>
3c3d383
+
3c3d383
+	* strings.c (MAP_POPULATE): Define to 0 if undefined.
3c3d383
+
3c3d383
 2006-06-12  Ulrich Drepper  <drepper@redhat.com>
3c3d383
 
3c3d383
 	* ldgeneric.c (ld_generic_generate_sections): Don't create .interp
Jan Kratochvil 2045415
@@ -2228,6 +2253,11 @@
f995fa8
 	* readelf.c (print_debug_loc_section): Fix indentation for larger
f995fa8
 	address size.
f995fa8
 
f995fa8
+2005-05-31  Roland McGrath  <roland@redhat.com>
f995fa8
+
f995fa8
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
f995fa8
+	(AM_CFLAGS): Use it in place of -Wextra.
f995fa8
+
f995fa8
 2005-05-30  Roland McGrath  <roland@redhat.com>
f995fa8
 
f995fa8
 	* readelf.c (print_debug_line_section): Print section offset of each
570047f
--- elfutils/src/Makefile.am
570047f
+++ elfutils/src/Makefile.am
Mark Wielaard d10bca5
@@ -95,6 +95,9 @@ addr2line_no_Wformat = yes
2dfc22c
 # XXX While the file is not finished, don't warn about this
2dfc22c
 ldgeneric_no_Wunused = yes
2dfc22c
 
2dfc22c
+# Buggy old compilers.
2dfc22c
+readelf_no_Werror = yes
2dfc22c
+
2dfc22c
 readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
Mark J. Wielaard 22346cb
 nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \
Mark J. Wielaard 22346cb
 	   $(demanglelib)
570047f
--- elfutils/src/Makefile.in
570047f
+++ elfutils/src/Makefile.in
Jan Kratochvil 2045415
@@ -85,7 +85,8 @@ DIST_COMMON = $(top_srcdir)/config/eu.am
Jan Kratochvil 2045415
 	$(srcdir)/Makefile.am ldlex.c ldscript.c \
Jan Kratochvil 2045415
 	$(top_srcdir)/config/depcomp $(top_srcdir)/config/ylwrap \
Jan Kratochvil 2045415
 	$(noinst_HEADERS) ChangeLog
Mark J. Wielaard 22346cb
-@MUDFLAP_TRUE@am__append_1 = -fmudflap
Mark J. Wielaard 22346cb
+@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
Mark J. Wielaard 22346cb
+@MUDFLAP_TRUE@am__append_2 = -fmudflap
Mark J. Wielaard 22346cb
 bin_PROGRAMS = readelf$(EXEEXT) nm$(EXEEXT) size$(EXEEXT) \
Mark J. Wielaard 22346cb
 	strip$(EXEEXT) ld$(EXEEXT) elflint$(EXEEXT) \
Mark J. Wielaard 22346cb
 	findtextrel$(EXEEXT) addr2line$(EXEEXT) elfcmp$(EXEEXT) \
Jan Kratochvil 2045415
@@ -94,9 +95,9 @@ bin_PROGRAMS = readelf$(EXEEXT) nm$(EXEE
Mark J. Wielaard 22346cb
 @NATIVE_LD_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1)
Mark J. Wielaard 22346cb
 # We never build this library but we need to get the dependency files
Mark J. Wielaard 22346cb
 # of all the linker backends that might be used in a non-generic linker.
Mark J. Wielaard 22346cb
-@NEVER_TRUE@am__append_2 = libdummy.a
Mark J. Wielaard 22346cb
+@NEVER_TRUE@am__append_3 = libdummy.a
Mark J. Wielaard 22346cb
 # -ldl is always needed for libebl.
Mark J. Wielaard 22346cb
-@NATIVE_LD_TRUE@am__append_3 = libld_elf.a
Mark J. Wielaard 22346cb
+@NATIVE_LD_TRUE@am__append_4 = libld_elf.a
Mark J. Wielaard 22346cb
 @NATIVE_LD_TRUE@am_libld_elf_i386_pic_a_OBJECTS =
Mark J. Wielaard 22346cb
 subdir = src
Mark J. Wielaard 22346cb
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
Jan Kratochvil 2045415
@@ -164,7 +165,7 @@ am_ld_OBJECTS = ld.$(OBJEXT) ldgeneric.$
Mark J. Wielaard 22346cb
 	versionhash.$(OBJEXT)
Mark J. Wielaard 22346cb
 ld_OBJECTS = $(am_ld_OBJECTS)
Mark J. Wielaard 22346cb
 ld_DEPENDENCIES = $(libebl) $(libelf) $(libeu) $(am__DEPENDENCIES_1) \
Mark J. Wielaard 22346cb
-	$(am__append_3)
Mark J. Wielaard 22346cb
+	$(am__append_4)
Mark J. Wielaard 22346cb
 ld_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(ld_LDFLAGS) $(LDFLAGS) -o \
Mark J. Wielaard 22346cb
 	$@
Mark J. Wielaard 22346cb
 am_libld_elf_i386_so_OBJECTS =
Jan Kratochvil 2045415
@@ -338,6 +339,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
80ba80a
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
80ba80a
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
80ba80a
 LDFLAGS = @LDFLAGS@
80ba80a
+LD_AS_NEEDED = @LD_AS_NEEDED@
80ba80a
 LEX = @LEX@
80ba80a
 LEXLIB = @LEXLIB@
80ba80a
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
Jan Kratochvil 2045415
@@ -367,6 +369,7 @@ SHELL = @SHELL@
3cb5dfb
 STRIP = @STRIP@
b73b6ec
 USE_NLS = @USE_NLS@
b73b6ec
 VERSION = @VERSION@
b73b6ec
+WEXTRA = @WEXTRA@
b73b6ec
 XGETTEXT = @XGETTEXT@
3cb5dfb
 XGETTEXT_015 = @XGETTEXT_015@
f790d25
 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
Jan Kratochvil 2045415
@@ -430,10 +433,9 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_sr
Mark J. Wielaard 22346cb
 	-I$(srcdir)/../libdw -I$(srcdir)/../libdwfl \
ba5f203
 	-I$(srcdir)/../libasm
ba5f203
 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
Mark J. Wielaard 22346cb
-	$($(*F)_no_Werror),,-Werror) $(if \
ba5f203
-	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
ba5f203
+	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
ba5f203
 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
Mark J. Wielaard 22346cb
-	$(am__append_1)
Mark J. Wielaard 22346cb
+	$(am__append_1) $(am__append_2)
ba5f203
 @MUDFLAP_FALSE@libmudflap = 
Mark J. Wielaard 22346cb
 @MUDFLAP_TRUE@libmudflap = -lmudflap
Mark J. Wielaard 22346cb
 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
Jan Kratochvil 2045415
@@ -449,8 +451,8 @@ AM_LFLAGS = -Pld -olex.yy.c
Mark J. Wielaard 22346cb
 native_ld = @native_ld@
Mark J. Wielaard 22346cb
 ld_dsos = libld_elf_i386_pic.a
Mark J. Wielaard 22346cb
 @NATIVE_LD_FALSE@noinst_LIBRARIES = libld_elf.a libar.a $(ld_dsos) \
Mark J. Wielaard 22346cb
-@NATIVE_LD_FALSE@	$(am__append_2)
Mark J. Wielaard 22346cb
-@NATIVE_LD_TRUE@noinst_LIBRARIES = libld_elf.a libar.a $(am__append_2)
Mark J. Wielaard 22346cb
+@NATIVE_LD_FALSE@	$(am__append_3)
Mark J. Wielaard 22346cb
+@NATIVE_LD_TRUE@noinst_LIBRARIES = libld_elf.a libar.a $(am__append_3)
Mark J. Wielaard 22346cb
 @NATIVE_LD_TRUE@native_ld_cflags = -DBASE_ELF_NAME=elf_$(base_cpu)
Mark J. Wielaard 22346cb
 @NEVER_TRUE@libdummy_a_SOURCES = i386_ld.c
Mark J. Wielaard 22346cb
 ld_SOURCES = ld.c ldgeneric.c ldlex.l ldscript.y symbolhash.c sectionhash.c \
Jan Kratochvil 2045415
@@ -479,6 +481,9 @@ strings_no_Wformat = yes
5c16b08
 addr2line_no_Wformat = yes
2dfc22c
 # XXX While the file is not finished, don't warn about this
2dfc22c
 ldgeneric_no_Wunused = yes
2dfc22c
+
2dfc22c
+# Buggy old compilers.
2dfc22c
+readelf_no_Werror = yes
2dfc22c
 readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
Mark J. Wielaard 22346cb
 nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \
Mark J. Wielaard 22346cb
 	   $(demanglelib)
Jan Kratochvil 2045415
@@ -486,7 +491,7 @@ nm_LDADD = $(libdw) $(libebl) $(libelf)
2dfc22c
 size_LDADD = $(libelf) $(libeu) $(libmudflap)
Mark J. Wielaard 22346cb
 strip_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
Mark J. Wielaard 22346cb
 ld_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \
Mark J. Wielaard 22346cb
-	$(am__append_3)
Mark J. Wielaard 22346cb
+	$(am__append_4)
Mark J. Wielaard 22346cb
 ld_LDFLAGS = -rdynamic
Mark J. Wielaard 22346cb
 elflint_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
Mark J. Wielaard 22346cb
 findtextrel_LDADD = $(libdw) $(libelf) $(libmudflap)
Jan Kratochvil 2045415
--- elfutils/src/addr2line.c
Jan Kratochvil 2045415
+++ elfutils/src/addr2line.c
Jan Kratochvil 2045415
@@ -448,10 +448,10 @@ handle_address (const char *string, Dwfl
Jan Kratochvil 2045415
       bool parsed = false;
Jan Kratochvil 2045415
       int i, j;
Jan Kratochvil 2045415
       char *name = NULL;
Jan Kratochvil 2045415
-      if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
Jan Kratochvil 2045415
+      if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
Jan Kratochvil 2045415
 	  && string[i] == '\0')
Jan Kratochvil 2045415
 	parsed = adjust_to_section (name, &addr, dwfl);
Jan Kratochvil 2045415
-      switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
Jan Kratochvil 2045415
+      switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
Jan Kratochvil 2045415
 	{
Jan Kratochvil 2045415
 	default:
Jan Kratochvil 2045415
 	  break;
Jan Kratochvil 2045415
--- elfutils/src/findtextrel.c
Jan Kratochvil 2045415
+++ elfutils/src/findtextrel.c
Jan Kratochvil 2045415
@@ -496,7 +496,11 @@ ptrcompare (const void *p1, const void *
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 static void
Jan Kratochvil 2045415
-check_rel (size_t nsegments, struct segments segments[nsegments],
Jan Kratochvil 2045415
+check_rel (size_t nsegments, struct segments segments[
Jan Kratochvil 2045415
+#if __GNUC__ >= 4
Jan Kratochvil 2045415
+						      nsegments
Jan Kratochvil 2045415
+#endif
Jan Kratochvil 2045415
+	   ],
Jan Kratochvil 2045415
 	   GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw,
Jan Kratochvil 2045415
 	   const char *fname, bool more_than_one, void **knownsrcs)
Jan Kratochvil 2045415
 {
Jan Kratochvil 2045415
--- elfutils/src/ld.h
Jan Kratochvil 2045415
+++ elfutils/src/ld.h
Jan Kratochvil 2045415
@@ -1114,6 +1114,7 @@ extern bool dynamically_linked_p (void);
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 /* Checked whether the symbol is undefined and referenced from a DSO.  */
Jan Kratochvil 2045415
 extern bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx);
Jan Kratochvil 2045415
+#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
Jan Kratochvil 2045415
 #ifdef __GNUC_STDC_INLINE__
Jan Kratochvil 2045415
 __attribute__ ((__gnu_inline__))
Jan Kratochvil 2045415
 #endif
Jan Kratochvil 2045415
@@ -1131,5 +1132,6 @@ linked_from_dso_p (struct scninfo *scnin
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
   return sym->defined && sym->in_dso;
Jan Kratochvil 2045415
 }
Jan Kratochvil 2045415
+#endif	/* Optimizing and not GCC 4.2.  */
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
 #endif	/* ld.h */
fb2677a
--- elfutils/src/readelf.c
fb2677a
+++ elfutils/src/readelf.c
Jan Kratochvil 2045415
@@ -4170,10 +4170,12 @@ listptr_base (struct listptr *p)
Jan Kratochvil 2045415
   return base;
Jan Kratochvil 2045415
 }
Roland McGrath 1548e59
 
Roland McGrath 1548e59
+static const char *listptr_name;
Jan Kratochvil 2045415
+
Roland McGrath 1548e59
 static int
Roland McGrath 1548e59
-compare_listptr (const void *a, const void *b, void *arg)
Roland McGrath 1548e59
+compare_listptr (const void *a, const void *b)
Roland McGrath 1548e59
 {
Roland McGrath 1548e59
-  const char *name = arg;
Roland McGrath 1548e59
+  const char *const name = listptr_name;
Roland McGrath 1548e59
   struct listptr *p1 = (void *) a;
Roland McGrath 1548e59
   struct listptr *p2 = (void *) b;
Roland McGrath 1548e59
 
Jan Kratochvil 2045415
@@ -4262,8 +4264,11 @@ static void
Roland McGrath 1548e59
 sort_listptr (struct listptr_table *table, const char *name)
Roland McGrath 1548e59
 {
Roland McGrath 1548e59
   if (table->n > 0)
Roland McGrath 1548e59
-    qsort_r (table->table, table->n, sizeof table->table[0],
Roland McGrath 1548e59
-	     &compare_listptr, (void *) name);
Roland McGrath 1548e59
+    {
Roland McGrath 1548e59
+      listptr_name = name;
Roland McGrath 1548e59
+      qsort (table->table, table->n, sizeof table->table[0],
Roland McGrath 1548e59
+	     &compare_listptr);
Roland McGrath 1548e59
+    }
Roland McGrath 1548e59
 }
Roland McGrath 1548e59
 
Roland McGrath 1548e59
 static bool
Jan Kratochvil 2045415
@@ -8986,7 +8991,7 @@ dump_archive_index (Elf *elf, const char
fb2677a
 	  if (unlikely (elf_rand (elf, as_off) == 0)
fb2677a
 	      || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf))
fb2677a
 			   == NULL))
fb2677a
-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)
fb2677a
+#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) || __GNUC__ < 4
fb2677a
 	    while (1)
fb2677a
 #endif
fb2677a
 	      error (EXIT_FAILURE, 0,
3c3d383
--- elfutils/src/strings.c
3c3d383
+++ elfutils/src/strings.c
Mark Wielaard d10bca5
@@ -43,6 +43,10 @@
3c3d383
 
3c3d383
 #include <system.h>
3c3d383
 
3c3d383
+#ifndef MAP_POPULATE
3c3d383
+# define MAP_POPULATE 0
3c3d383
+#endif
3c3d383
+
3c3d383
 
3c3d383
 /* Prototypes of local functions.  */
3c3d383
 static int read_fd (int fd, const char *fname, off64_t fdlen);
Mark Wielaard d10bca5
@@ -483,8 +487,13 @@ map_file (int fd, off64_t start_off, off
9a3c170
 		    fd, start_off);
9a3c170
       if (mem != MAP_FAILED)
9a3c170
 	{
9a3c170
+#if !defined POSIX_MADV_SEQUENTIAL && defined MADV_SEQUENTIAL
9a3c170
+# define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
9a3c170
+#endif
9a3c170
+#ifdef POSIX_MADV_SEQUENTIAL
9a3c170
 	  /* We will go through the mapping sequentially.  */
9a3c170
 	  (void) posix_madvise (mem, map_size, POSIX_MADV_SEQUENTIAL);
9a3c170
+#endif
9a3c170
 	  break;
9a3c170
 	}
9a3c170
       if (errno != EINVAL && errno != ENOMEM)
Mark Wielaard d10bca5
@@ -576,9 +585,11 @@ read_block (int fd, const char *fname, o
e4d1f5c
       elfmap_off = from & ~(ps - 1);
e4d1f5c
       elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size);
e4d1f5c
 
e4d1f5c
+#ifdef POSIX_FADV_SEQUENTIAL
e4d1f5c
       if (unlikely (elfmap == MAP_FAILED))
e4d1f5c
 	/* Let the kernel know we are going to read everything in sequence.  */
e4d1f5c
 	(void) posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
e4d1f5c
+#endif
e4d1f5c
     }
e4d1f5c
 
e4d1f5c
   if (unlikely (elfmap == MAP_FAILED))
570047f
--- elfutils/src/strip.c
570047f
+++ elfutils/src/strip.c
Mark Wielaard d10bca5
@@ -45,6 +45,12 @@
b73b6ec
 #include <libebl.h>
b73b6ec
 #include <system.h>
b73b6ec
 
b73b6ec
+#ifdef HAVE_FUTIMES
b73b6ec
+# define FUTIMES(fd, fname, tvp) futimes (fd, tvp)
b73b6ec
+#else
b73b6ec
+# define FUTIMES(fd, fname, tvp) utimes (fname, tvp)
b73b6ec
+#endif
b73b6ec
+
Mark J. Wielaard 22346cb
 typedef uint8_t GElf_Byte;
b73b6ec
 
b73b6ec
 /* Name and version of program.  */
Mark Wielaard d10bca5
@@ -318,8 +324,18 @@ process_file (const char *fname)
a769ac6
 
a769ac6
       /* If we have to preserve the timestamp, we need it in the
a769ac6
 	 format utimes() understands.  */
a769ac6
+#ifdef HAVE_STRUCT_STAT_ST_ATIM
a769ac6
       TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim);
a769ac6
+#else
a769ac6
+      tv[0].tv_sec = pre_st.st_atime;
a769ac6
+      tv[0].tv_usec = 0;
a769ac6
+#endif
a769ac6
+#ifdef HAVE_STRUCT_STAT_ST_MTIM
a769ac6
       TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim);
a769ac6
+#else
a769ac6
+      tv[1].tv_sec = pre_st.st_atime;
a769ac6
+      tv[1].tv_usec = 0;
a769ac6
+#endif
a769ac6
     }
a769ac6
 
a769ac6
   /* Open the file.  */
Jan Kratochvil 2045415
@@ -2060,7 +2076,7 @@ while computing checksum for debug infor
a769ac6
   /* If requested, preserve the timestamp.  */
a769ac6
   if (tvp != NULL)
a769ac6
     {
a769ac6
-      if (futimes (fd, tvp) != 0)
b73b6ec
+      if (FUTIMES (fd, output_fname, tvp) != 0)
a769ac6
 	{
a769ac6
 	  error (0, errno, gettext ("\
5fa3867
 cannot set access and modification date of '%s'"),
Jan Kratochvil 2045415
@@ -2117,7 +2133,7 @@ handle_ar (int fd, Elf *elf, const char
a769ac6
 
a769ac6
   if (tvp != NULL)
a769ac6
     {
a769ac6
-      if (unlikely (futimes (fd, tvp) != 0))
b73b6ec
+      if (unlikely (FUTIMES (fd, fname, tvp) != 0))
a769ac6
 	{
a769ac6
 	  error (0, errno, gettext ("\
5fa3867
 cannot set access and modification date of '%s'"), fname);
f995fa8
--- elfutils/tests/ChangeLog
f995fa8
+++ elfutils/tests/ChangeLog
Jan Kratochvil 2045415
@@ -652,6 +652,8 @@
fb2677a
 
fb2677a
 2008-01-21  Roland McGrath  <roland@redhat.com>
fb2677a
 
fb2677a
+	* line2addr.c (main): Revert last change.
fb2677a
+
fb2677a
 	* testfile45.S.bz2: Add tests for cltq, cqto.
fb2677a
 	* testfile45.expect.bz2: Adjust.
fb2677a
 
Jan Kratochvil 2045415
@@ -1360,6 +1362,11 @@
f995fa8
 	* Makefile.am (TESTS): Add run-elflint-test.sh.
f995fa8
 	(EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
f995fa8
 
f995fa8
+2005-05-31  Roland McGrath  <roland@redhat.com>
f995fa8
+
f995fa8
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
f995fa8
+	(AM_CFLAGS): Use it in place of -Wextra.
f995fa8
+
f995fa8
 2005-05-24  Ulrich Drepper  <drepper@redhat.com>
f995fa8
 
f995fa8
 	* get-files.c (main): Use correct format specifier.
570047f
--- elfutils/tests/Makefile.in
570047f
+++ elfutils/tests/Makefile.in
Jan Kratochvil 2045415
@@ -80,14 +80,15 @@ host_triplet = @host@
Jan Kratochvil 2045415
 DIST_COMMON = $(top_srcdir)/config/eu.am $(srcdir)/Makefile.in \
Jan Kratochvil 2045415
 	$(srcdir)/Makefile.am $(top_srcdir)/config/depcomp \
Jan Kratochvil 2045415
 	$(top_srcdir)/config/test-driver ChangeLog
Mark J. Wielaard 22346cb
-@MUDFLAP_TRUE@am__append_1 = -fmudflap
Mark J. Wielaard 22346cb
-@STANDALONE_FALSE@am__append_2 = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
Mark J. Wielaard 22346cb
+@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror)
Mark J. Wielaard 22346cb
+@MUDFLAP_TRUE@am__append_2 = -fmudflap
Mark J. Wielaard 22346cb
+@STANDALONE_FALSE@am__append_3 = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
Mark J. Wielaard 22346cb
 @STANDALONE_FALSE@	    -I$(top_srcdir)/libdwfl \
Mark J. Wielaard 22346cb
 @STANDALONE_FALSE@	    -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \
Mark J. Wielaard 22346cb
 @STANDALONE_FALSE@	    -I$(top_srcdir)/lib -I..
Mark J. Wielaard 22346cb
 
Mark J. Wielaard 22346cb
-@STANDALONE_FALSE@am__append_3 = -Wl,-rpath-link,../libasm:../libdw:../libelf
Mark J. Wielaard 22346cb
-@TESTS_RPATH_TRUE@am__append_4 = -Wl,-rpath,$(BUILD_RPATH)
Mark J. Wielaard 22346cb
+@STANDALONE_FALSE@am__append_4 = -Wl,-rpath-link,../libasm:../libdw:../libelf
Mark J. Wielaard 22346cb
+@TESTS_RPATH_TRUE@am__append_5 = -Wl,-rpath,$(BUILD_RPATH)
Mark Wielaard 2a5e99f
 check_PROGRAMS = arextract$(EXEEXT) arsymtest$(EXEEXT) \
Mark J. Wielaard 22346cb
 	newfile$(EXEEXT) saridx$(EXEEXT) scnnames$(EXEEXT) \
Mark J. Wielaard 22346cb
 	sectiondump$(EXEEXT) showptable$(EXEEXT) update1$(EXEEXT) \
Jan Kratochvil 2045415
@@ -140,14 +141,14 @@ TESTS = run-arextract.sh run-arsymtest.s
Mark Wielaard 2a5e99f
 	run-macro-test.sh run-elf_cntl_gelf_getshdr.sh \
Jan Kratochvil 2045415
 	run-test-archive64.sh run-readelf-vmcoreinfo.sh \
Jan Kratochvil 2045415
 	run-readelf-mixed-corenote.sh run-dwfllines.sh \
Jan Kratochvil 2045415
-	run-dwfl-report-elf-align.sh $(am__EXEEXT_1) $(am__append_7) \
Jan Kratochvil 2045415
-	$(am__EXEEXT_3) $(am__append_10)
Mark J. Wielaard 22346cb
-@STANDALONE_FALSE@am__append_5 = msg_tst md5-sha1-test
Jan Kratochvil 2045415
+	run-dwfl-report-elf-align.sh $(am__EXEEXT_1) $(am__append_8) \
Jan Kratochvil 2045415
+	$(am__EXEEXT_3) $(am__append_11)
Mark J. Wielaard 22346cb
 @STANDALONE_FALSE@am__append_6 = msg_tst md5-sha1-test
Jan Kratochvil 2045415
-@LZMA_TRUE@am__append_7 = run-readelf-s.sh run-dwflsyms.sh
Jan Kratochvil 2045415
-@HAVE_LIBASM_TRUE@am__append_8 = $(asm_TESTS)
Mark J. Wielaard 22346cb
+@STANDALONE_FALSE@am__append_7 = msg_tst md5-sha1-test
Jan Kratochvil 2045415
+@LZMA_TRUE@am__append_8 = run-readelf-s.sh run-dwflsyms.sh
Jan Kratochvil 2045415
 @HAVE_LIBASM_TRUE@am__append_9 = $(asm_TESTS)
Jan Kratochvil 2045415
-@ENABLE_DWZ_TRUE@am__append_10 = run-readelf-dwz-multi.sh
Jan Kratochvil 2045415
+@HAVE_LIBASM_TRUE@am__append_10 = $(asm_TESTS)
Jan Kratochvil 2045415
+@ENABLE_DWZ_TRUE@am__append_11 = run-readelf-dwz-multi.sh
Mark J. Wielaard 22346cb
 subdir = tests
Mark J. Wielaard 22346cb
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
Mark J. Wielaard 22346cb
 am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
Jan Kratochvil 2045415
@@ -722,6 +723,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
80ba80a
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
80ba80a
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
80ba80a
 LDFLAGS = @LDFLAGS@
80ba80a
+LD_AS_NEEDED = @LD_AS_NEEDED@
80ba80a
 LEX = @LEX@
80ba80a
 LEXLIB = @LEXLIB@
80ba80a
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
Jan Kratochvil 2045415
@@ -751,6 +753,7 @@ SHELL = @SHELL@
3cb5dfb
 STRIP = @STRIP@
b73b6ec
 USE_NLS = @USE_NLS@
b73b6ec
 VERSION = @VERSION@
b73b6ec
+WEXTRA = @WEXTRA@
b73b6ec
 XGETTEXT = @XGETTEXT@
3cb5dfb
 XGETTEXT_015 = @XGETTEXT_015@
f790d25
 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
Jan Kratochvil 2045415
@@ -809,12 +812,11 @@ top_build_prefix = @top_build_prefix@
Mark J. Wielaard 22346cb
 top_builddir = @top_builddir@
Mark J. Wielaard 22346cb
 top_srcdir = @top_srcdir@
Mark J. Wielaard 22346cb
 zip_LIBS = @zip_LIBS@
Jan Kratochvil 2045415
-AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_2)
Jan Kratochvil 2045415
+AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_3)
ba5f203
 AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
Mark J. Wielaard 22346cb
-	$($(*F)_no_Werror),,-Werror) $(if \
ba5f203
-	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
ba5f203
+	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
ba5f203
 	$($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
Mark J. Wielaard 22346cb
-	$(am__append_1)
Mark J. Wielaard 22346cb
+	$(am__append_1) $(am__append_2)
ba5f203
 @MUDFLAP_FALSE@libmudflap = 
Mark J. Wielaard 22346cb
 @MUDFLAP_TRUE@libmudflap = -lmudflap
Mark J. Wielaard 22346cb
 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\
Jan Kratochvil 2045415
@@ -824,7 +826,7 @@ CLEANFILES = *.gcno *.gcda
Mark J. Wielaard 22346cb
 textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
Mark J. Wielaard 22346cb
 @MUDFLAP_FALSE@BUILD_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf
Mark J. Wielaard 22346cb
 @MUDFLAP_TRUE@BUILD_RPATH = \$$ORIGIN/../backends
Mark J. Wielaard 22346cb
-AM_LDFLAGS = $(am__append_3) $(am__append_4)
Mark J. Wielaard 22346cb
+AM_LDFLAGS = $(am__append_4) $(am__append_5)
Mark J. Wielaard 22346cb
 @TESTS_RPATH_FALSE@tests_rpath = no
Mark J. Wielaard 22346cb
 @TESTS_RPATH_TRUE@tests_rpath = yes
Mark J. Wielaard 22346cb
 asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
Jan Kratochvil 2045415
--- elfutils/tests/line2addr.c
Jan Kratochvil 2045415
+++ elfutils/tests/line2addr.c
Jan Kratochvil 2045415
@@ -124,7 +124,7 @@ main (int argc, char *argv[])
Jan Kratochvil 2045415
     {
Jan Kratochvil 2045415
       struct args a = { .arg = argv[cnt] };
Jan Kratochvil 2045415
 
Jan Kratochvil 2045415
-      switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
Jan Kratochvil 2045415
+      switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
Jan Kratochvil 2045415
 	{
Jan Kratochvil 2045415
 	default:
Jan Kratochvil 2045415
 	case 0: