roland 418cfd
--- elfutils/backends/ChangeLog
roland 418cfd
+++ elfutils/backends/ChangeLog
roland 840723
@@ -258,6 +258,11 @@
roland 3025be
 	* sparc_init.c: Likewise.
roland 3025be
 	* x86_64_init.c: Likewise.
roland 3025be
 
roland 80ba80
+2005-11-22  Roland McGrath  <roland@redhat.com>
roland 80ba80
+
roland 80ba80
+	* Makefile.am (LD_AS_NEEDED): New variable, substituted by configure.
roland 80ba80
+	(libebl_%.so rule): Use it in place of -Wl,--as-needed.
roland 80ba80
+
roland 80ba80
 2005-11-19  Roland McGrath  <roland@redhat.com>
roland 80ba80
 
roland 80ba80
 	* ppc64_reloc.def: REL30 -> ADDR30.
roland 840723
@@ -280,6 +285,9 @@
roland 418cfd
 	* Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
roland 418cfd
 	(CLEANFILES): Add libebl_$(m).so.
roland 418cfd
 
roland 418cfd
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
roland 418cfd
+	(AM_CFLAGS): Use it in place of -Wextra.
roland 418cfd
+
roland 418cfd
 	* ppc_reloc.def: Update bits per Alan Modra <amodra@bigpond.net.au>.
roland 418cfd
 	* ppc64_reloc.def: Likewise.
roland 418cfd
 
roland 418cfd
--- elfutils/backends/Makefile.am
roland 418cfd
+++ elfutils/backends/Makefile.am
roland e23544
@@ -25,12 +25,14 @@
roland e23544
 ## <http://www.openinventionnetwork.com>.
roland 418cfd
 ##
roland 418cfd
 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DOBJDIR=\"$(shell pwd)\"
roland 418cfd
+WEXTRA = @WEXTRA@
roland 80ba80
+LD_AS_NEEDED = @LD_AS_NEEDED@
roland 418cfd
 if MUDFLAP
roland 418cfd
 AM_CFLAGS = -fmudflap
roland 418cfd
 else
roland 418cfd
 AM_CFLAGS =
roland 418cfd
 endif
roland 418cfd
-AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 \
roland 418cfd
+AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused $(WEXTRA) -Wformat=2 \
roland 418cfd
 	     -std=gnu99
roland 840723
 INCLUDES = -I$(srcdir) -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
roland 418cfd
 	   -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw \
roland 840723
@@ -59,7 +61,6 @@ endif
roland 80ba80
 
roland 840723
 textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
roland 840723
 
roland 840723
-
roland 840723
 i386_SRCS = i386_init.c i386_symbol.c i386_corenote.c \
roland 840723
 	    i386_retval.c i386_regs.c i386_auxv.c
roland 840723
 cpu_i386 = ../libcpu/libcpu_i386.a
roland 418cfd
--- elfutils/backends/Makefile.in
roland 418cfd
+++ elfutils/backends/Makefile.in
roland 840723
@@ -153,6 +153,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
roland 80ba80
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
roland 80ba80
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
roland 80ba80
 LDFLAGS = @LDFLAGS@
roland 80ba80
+LD_AS_NEEDED = @LD_AS_NEEDED@
roland 80ba80
 LEX = @LEX@
roland 80ba80
 LEXLIB = @LEXLIB@
roland 80ba80
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
roland 840723
@@ -182,6 +183,7 @@ SHELL = @SHELL@
roland 3cb5df
 STRIP = @STRIP@
roland 418cfd
 USE_NLS = @USE_NLS@
roland 418cfd
 VERSION = @VERSION@
roland 418cfd
+WEXTRA = @WEXTRA@
roland 418cfd
 XGETTEXT = @XGETTEXT@
roland 3cb5df
 XGETTEXT_015 = @XGETTEXT_015@
roland 418cfd
 YACC = @YACC@
roland 840723
@@ -237,9 +239,9 @@ target_alias = @target_alias@
roland 3cb5df
 top_builddir = @top_builddir@
roland 3cb5df
 top_srcdir = @top_srcdir@
roland 418cfd
 @MUDFLAP_FALSE@AM_CFLAGS = -fpic -Wall -Wshadow -Werror -Wunused \
roland 418cfd
-@MUDFLAP_FALSE@	-Wextra -Wformat=2 -std=gnu99
roland 418cfd
+@MUDFLAP_FALSE@	$(WEXTRA) -Wformat=2 -std=gnu99
roland 418cfd
 @MUDFLAP_TRUE@AM_CFLAGS = -fmudflap -fpic -Wall -Wshadow -Werror \
roland 418cfd
-@MUDFLAP_TRUE@	-Wunused -Wextra -Wformat=2 -std=gnu99
roland 418cfd
+@MUDFLAP_TRUE@	-Wunused $(WEXTRA) -Wformat=2 -std=gnu99
roland 840723
 INCLUDES = -I$(srcdir) -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
roland 418cfd
 	   -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw \
roland 418cfd
 	   -I$(top_srcdir)/lib -I..
roland 570047
--- elfutils/ChangeLog
roland 570047
+++ elfutils/ChangeLog
roland 840723
@@ -30,6 +30,10 @@
roland a99770
 	* configure.ac: Add dummy automake conditional to get dependencies
roland a99770
 	for non-generic linker right.  See src/Makefile.am.
roland a99770
 
roland 80ba80
+2005-11-22  Roland McGrath  <roland@redhat.com>
roland 80ba80
+
roland 80ba80
+	* configure.ac: Check for --as-needed linker option.
roland 80ba80
+
roland 80ba80
 2005-11-18  Roland McGrath  <roland@redhat.com>
roland 80ba80
 
roland 80ba80
 	* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
roland 840723
@@ -77,6 +81,17 @@
roland f995fa
 	* Makefile.am (all_SUBDIRS): Add libdwfl.
roland f995fa
 	* configure.ac: Write libdwfl/Makefile.
roland f995fa
 
roland f995fa
+2005-05-31  Roland McGrath  <roland@redhat.com>
roland 678843
+
roland 678843
+	* configure.ac (WEXTRA): Check for -Wextra and set this substitution.
roland 678843
+
roland f995fa
+ 	* configure.ac: Check for struct stat st_?tim members.
roland f995fa
+ 	* src/strip.c (process_file): Use st_?time if st_?tim are not there.
roland 678843
+
roland f995fa
+ 	* configure.ac: Check for futimes function.
roland f995fa
+ 	* src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead.
roland f995fa
+ 	(handle_ar) [! HAVE_FUTIMES]: Likewise.
roland 678843
+
roland f995fa
 2005-05-19  Roland McGrath  <roland@redhat.com>
roland 678843
 
roland f995fa
 	* configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros.
roland 570047
--- elfutils/config/Makefile.in
roland 570047
+++ elfutils/config/Makefile.in
roland 840723
@@ -72,6 +72,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
roland 80ba80
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
roland 80ba80
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
roland 80ba80
 LDFLAGS = @LDFLAGS@
roland 80ba80
+LD_AS_NEEDED = @LD_AS_NEEDED@
roland 80ba80
 LEX = @LEX@
roland 80ba80
 LEXLIB = @LEXLIB@
roland 80ba80
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
roland 840723
@@ -101,6 +102,7 @@ SHELL = @SHELL@
roland 3cb5df
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = @VERSION@
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland 3cb5df
 XGETTEXT_015 = @XGETTEXT_015@
roland b73b6e
 YACC = @YACC@
roland 570047
--- elfutils/configure
roland 570047
+++ elfutils/configure
roland 3cb5df
@@ -674,6 +674,8 @@ YFLAGS
roland 3cb5df
 LEX
roland 3cb5df
 LEX_OUTPUT_ROOT
roland 3cb5df
 LEXLIB
roland 3cb5df
+WEXTRA
roland 3cb5df
+LD_AS_NEEDED
roland 3cb5df
 LOCALEDIR
roland 3cb5df
 DATADIRNAME
roland 3cb5df
 NATIVE_LD_TRUE
roland 840723
@@ -3877,6 +3879,88 @@ echo "$as_me: error: gcc with C99 suppor
roland b73b6e
 fi
roland b73b6e
 
roland b73b6e
 
roland 3cb5df
+{ echo "$as_me:$LINENO: checking for -Wextra option to $CC" >&5
roland 3cb5df
+echo $ECHO_N "checking for -Wextra option to $CC... $ECHO_C" >&6; }
roland b73b6e
+if test "${ac_cv_cc_wextra+set}" = set; then
roland b73b6e
+  echo $ECHO_N "(cached) $ECHO_C" >&6
roland b73b6e
+else
roland b73b6e
+  old_CFLAGS="$CFLAGS"
roland b73b6e
+CFLAGS="$CFLAGS -Wextra"
roland b73b6e
+cat >conftest.$ac_ext <<_ACEOF
roland b73b6e
+void foo (void) { }
roland b73b6e
+_ACEOF
roland b73b6e
+rm -f conftest.$ac_objext
roland 3cb5df
+if { (ac_try="$ac_compile"
roland 3cb5df
+case "(($ac_try" in
roland 3cb5df
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
roland 3cb5df
+  *) ac_try_echo=$ac_try;;
roland 3cb5df
+esac
roland 3cb5df
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
roland 3cb5df
+  (eval "$ac_compile") 2>conftest.er1
roland b73b6e
+  ac_status=$?
roland b73b6e
+  grep -v '^ *+' conftest.er1 >conftest.err
roland b73b6e
+  rm -f conftest.er1
roland b73b6e
+  cat conftest.err >&5
roland b73b6e
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
roland 3cb5df
+  (exit $ac_status); } && {
roland 3cb5df
+	 test -z "$ac_c_werror_flag" ||
roland 3cb5df
+	 test ! -s conftest.err
roland 3cb5df
+       } && test -s conftest.$ac_objext; then
roland b4dfab
+  ac_cv_cc_wextra=yes
roland b73b6e
+else
roland b73b6e
+  echo "$as_me: failed program was:" >&5
roland b73b6e
+sed 's/^/| /' conftest.$ac_ext >&5
roland b73b6e
+
roland 3cb5df
+	ac_cv_cc_wextra=no
roland b73b6e
+fi
roland 3cb5df
+
roland 3cb5df
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
roland b73b6e
+CFLAGS="$old_CFLAGS"
roland b73b6e
+fi
roland 3cb5df
+{ echo "$as_me:$LINENO: result: $ac_cv_cc_wextra" >&5
roland 3cb5df
+echo "${ECHO_T}$ac_cv_cc_wextra" >&6; }
roland b73b6e
+
roland f995fa
+if test "x$ac_cv_cc_wextra" = xyes; then
roland b73b6e
+  WEXTRA=-Wextra
roland 678843
+else
roland 678843
+  WEXTRA=-W
roland b73b6e
+fi
roland b73b6e
+
roland b73b6e
+
roland 3cb5df
+{ echo "$as_me:$LINENO: checking for --as-needed linker option" >&5
roland 3cb5df
+echo $ECHO_N "checking for --as-needed linker option... $ECHO_C" >&6; }
roland 80ba80
+if test "${ac_cv_as_needed+set}" = set; then
roland 80ba80
+  echo $ECHO_N "(cached) $ECHO_C" >&6
roland 80ba80
+else
roland 80ba80
+  cat > conftest.c <
roland 80ba80
+int main (void) { return 0; }
roland 80ba80
+EOF
roland 80ba80
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
roland 80ba80
+			    -fPIC -shared -o conftest.so conftest.c
roland 80ba80
+			    -Wl,--as-needed 1>&5'
roland 80ba80
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
roland 80ba80
+  (eval $ac_try) 2>&5
roland 80ba80
+  ac_status=$?
roland 80ba80
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
roland 80ba80
+  (exit $ac_status); }; }
roland 80ba80
+then
roland 80ba80
+  ac_cv_as_needed=yes
roland 80ba80
+else
roland 80ba80
+  ac_cv_as_needed=no
roland 80ba80
+fi
roland 80ba80
+rm -f conftest*
roland 80ba80
+fi
roland 3cb5df
+{ echo "$as_me:$LINENO: result: $ac_cv_as_needed" >&5
roland 3cb5df
+echo "${ECHO_T}$ac_cv_as_needed" >&6; }
roland 80ba80
+if test "x$ac_cv_as_needed" = xyes; then
roland 80ba80
+  LD_AS_NEEDED=-Wl,--as-needed
roland 80ba80
+else
roland 80ba80
+  LD_AS_NEEDED=
roland 80ba80
+fi
roland 80ba80
+
roland 80ba80
+
roland 80ba80
+
roland 80ba80
+
roland b73b6e
 LOCALEDIR=$datadir
roland b73b6e
 
roland b73b6e
 cat >>confdefs.h <<_ACEOF
roland 840723
@@ -5621,10 +5705,10 @@ YFLAGS!$YFLAGS$ac_delim
roland 3cb5df
 LEX!$LEX$ac_delim
roland 3cb5df
 LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim
roland 3cb5df
 LEXLIB!$LEXLIB$ac_delim
roland 3cb5df
+WEXTRA!$WEXTRA$ac_delim
roland 3cb5df
+LD_AS_NEEDED!$LD_AS_NEEDED$ac_delim
roland 3cb5df
 LOCALEDIR!$LOCALEDIR$ac_delim
roland 3cb5df
 DATADIRNAME!$DATADIRNAME$ac_delim
roland 3cb5df
-NATIVE_LD_TRUE!$NATIVE_LD_TRUE$ac_delim
roland 3cb5df
-NATIVE_LD_FALSE!$NATIVE_LD_FALSE$ac_delim
roland 3cb5df
 _ACEOF
roland 3cb5df
 
roland 3cb5df
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
roland 840723
@@ -5666,6 +5750,8 @@ _ACEOF
roland 3cb5df
 ac_delim='%!_!# '
roland 3cb5df
 for ac_last_try in false false false false false :; do
roland 3cb5df
   cat >conf$$subs.sed <<_ACEOF
roland 3cb5df
+NATIVE_LD_TRUE!$NATIVE_LD_TRUE$ac_delim
roland 3cb5df
+NATIVE_LD_FALSE!$NATIVE_LD_FALSE$ac_delim
roland 3cb5df
 base_cpu!$base_cpu$ac_delim
roland 3cb5df
 NEVER_TRUE!$NEVER_TRUE$ac_delim
roland 3cb5df
 NEVER_FALSE!$NEVER_FALSE$ac_delim
roland 840723
@@ -5697,7 +5783,7 @@ LIBOBJS!$LIBOBJS$ac_delim
roland 3cb5df
 LTLIBOBJS!$LTLIBOBJS$ac_delim
roland 3cb5df
 _ACEOF
roland 3cb5df
 
roland 840723
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 29; then
roland 840723
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 31; then
roland 3cb5df
     break
roland 3cb5df
   elif $ac_last_try; then
roland 3cb5df
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
roland 570047
--- elfutils/configure.ac
roland 570047
+++ elfutils/configure.ac
roland 3cb5df
@@ -71,6 +71,34 @@ CFLAGS="$old_CFLAGS"])
Jakub Jelinek a769ac
 AS_IF([test "x$ac_cv_c99" != xyes],
Jakub Jelinek a769ac
       AC_MSG_ERROR([gcc with C99 support required]))
Jakub Jelinek a769ac
 
Jakub Jelinek a769ac
+AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl
Jakub Jelinek a769ac
+old_CFLAGS="$CFLAGS"
Jakub Jelinek a769ac
+CFLAGS="$CFLAGS -Wextra"
Jakub Jelinek a769ac
+AC_COMPILE_IFELSE([void foo (void) { }],
roland b4dfab
+		  ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no)
Jakub Jelinek a769ac
+CFLAGS="$old_CFLAGS"])
Jakub Jelinek a769ac
+AC_SUBST(WEXTRA)
roland f995fa
+AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W])
Jakub Jelinek a769ac
+
roland 80ba80
+AC_CACHE_CHECK([for --as-needed linker option],
roland 80ba80
+	       ac_cv_as_needed, [dnl
roland 80ba80
+cat > conftest.c <
roland 80ba80
+int main (void) { return 0; }
roland 80ba80
+EOF
roland 80ba80
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
roland 80ba80
+			    -fPIC -shared -o conftest.so conftest.c
roland 80ba80
+			    -Wl,--as-needed 1>&AS_MESSAGE_LOG_FD])
roland 80ba80
+then
roland 80ba80
+  ac_cv_as_needed=yes
roland 80ba80
+else
roland 80ba80
+  ac_cv_as_needed=no
roland 80ba80
+fi
roland 80ba80
+rm -f conftest*])
roland 80ba80
+AS_IF([test "x$ac_cv_as_needed" = xyes],
roland 80ba80
+      [LD_AS_NEEDED=-Wl,--as-needed], [LD_AS_NEEDED=])
roland 80ba80
+AC_SUBST(LD_AS_NEEDED)
roland 80ba80
+
roland 80ba80
+
Jakub Jelinek a769ac
 LOCALEDIR=$datadir
Jakub Jelinek a769ac
 AC_SUBST(LOCALEDIR)
Jakub Jelinek a769ac
 AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR")
roland 570047
--- elfutils/lib/ChangeLog
roland 570047
+++ elfutils/lib/ChangeLog
roland e23544
@@ -16,6 +16,11 @@
roland 5fa386
 	* Makefile.am (libeu_a_SOURCES): Add it.
roland 5fa386
 	* system.h: Declare crc32_file.
roland 5fa386
 
Jakub Jelinek a769ac
+2005-02-07  Roland McGrath  <roland@redhat.com>
Jakub Jelinek a769ac
+
Jakub Jelinek a769ac
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
Jakub Jelinek a769ac
+	(AM_CFLAGS): Use it in place of -Wextra.
Jakub Jelinek a769ac
+
roland 5fa386
 2005-04-30  Ulrich Drepper  <drepper@redhat.com>
Jakub Jelinek a769ac
 
roland 5fa386
 	* Makefile.am: Use -ffunction-sections for xmalloc.c.
roland 570047
--- elfutils/lib/Makefile.am
roland 570047
+++ elfutils/lib/Makefile.am
roland e23544
@@ -25,12 +25,13 @@
roland e23544
 ## <http://www.openinventionnetwork.com>.
Jakub Jelinek a769ac
 ##
Jakub Jelinek a769ac
 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
Jakub Jelinek a769ac
+WEXTRA = @WEXTRA@
Jakub Jelinek a769ac
 if MUDFLAP
Jakub Jelinek a769ac
 AM_CFLAGS = -fmudflap
Jakub Jelinek a769ac
 else
Jakub Jelinek a769ac
 AM_CFLAGS =
Jakub Jelinek a769ac
 endif
Jakub Jelinek a769ac
-AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra $($(*F)_CFLAGS)
Jakub Jelinek a769ac
+AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused $(WEXTRA) $($(*F)_CFLAGS)
Jakub Jelinek a769ac
 INCLUDES = -I$(srcdir)/../libelf -I..
Jakub Jelinek a769ac
 
Jakub Jelinek a769ac
 noinst_LIBRARIES = libeu.a
roland 570047
--- elfutils/lib/Makefile.in
roland 570047
+++ elfutils/lib/Makefile.in
roland 840723
@@ -92,6 +92,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
roland 80ba80
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
roland 80ba80
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
roland 80ba80
 LDFLAGS = @LDFLAGS@
roland 80ba80
+LD_AS_NEEDED = @LD_AS_NEEDED@
roland 80ba80
 LEX = @LEX@
roland 80ba80
 LEXLIB = @LEXLIB@
roland 80ba80
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
roland 840723
@@ -121,6 +122,7 @@ SHELL = @SHELL@
roland 3cb5df
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = @VERSION@
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland 3cb5df
 XGETTEXT_015 = @XGETTEXT_015@
roland b73b6e
 YACC = @YACC@
roland 840723
@@ -176,9 +178,9 @@ target_alias = @target_alias@
roland 3cb5df
 top_builddir = @top_builddir@
roland 3cb5df
 top_srcdir = @top_srcdir@
roland b73b6e
 @MUDFLAP_FALSE@AM_CFLAGS = -fpic -Wall -Wshadow -Werror -Wunused \
roland b73b6e
-@MUDFLAP_FALSE@	-Wextra $($(*F)_CFLAGS)
roland b73b6e
+@MUDFLAP_FALSE@	$(WEXTRA) $($(*F)_CFLAGS)
roland b73b6e
 @MUDFLAP_TRUE@AM_CFLAGS = -fmudflap -fpic -Wall -Wshadow -Werror \
roland b73b6e
-@MUDFLAP_TRUE@	-Wunused -Wextra $($(*F)_CFLAGS)
roland b73b6e
+@MUDFLAP_TRUE@	-Wunused $(WEXTRA) $($(*F)_CFLAGS)
roland b73b6e
 INCLUDES = -I$(srcdir)/../libelf -I..
roland b73b6e
 noinst_LIBRARIES = libeu.a
roland e23544
 libeu_a_SOURCES = xstrndup.c xmalloc.c next_prime.c \
roland f995fa
--- elfutils/libasm/ChangeLog
roland f995fa
+++ elfutils/libasm/ChangeLog
roland 840723
@@ -54,6 +54,11 @@
roland 2ca692
 	* asm_error.c: Add new error ASM_E_IOERROR.
roland 2ca692
 	* libasmP.h: Add ASM_E_IOERROR definition.
roland 2ca692
 
roland f995fa
+2005-05-31  Roland McGrath  <roland@redhat.com>
roland f995fa
+
roland f995fa
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
roland f995fa
+	(AM_CFLAGS): Use it in place of -Wextra.
roland f995fa
+
roland f995fa
 2005-02-15  Ulrich Drepper  <drepper@redhat.com>
roland f995fa
 
roland 2ca692
 	* Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
roland 570047
--- elfutils/libasm/Makefile.am
roland 570047
+++ elfutils/libasm/Makefile.am
roland e23544
@@ -25,12 +25,13 @@
roland e23544
 ## <http://www.openinventionnetwork.com>.
Jakub Jelinek a769ac
 ##
Jakub Jelinek a769ac
 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
Jakub Jelinek a769ac
+WEXTRA = @WEXTRA@
Jakub Jelinek a769ac
 if MUDFLAP
Jakub Jelinek a769ac
 AM_CFLAGS = -fmudflap
Jakub Jelinek a769ac
 else
Jakub Jelinek a769ac
 AM_CFLAGS =
Jakub Jelinek a769ac
 endif
roland 2ca692
-AM_CFLAGS += -std=gnu99 -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2
roland 2ca692
+AM_CFLAGS += -std=gnu99 -Wall -Wshadow -Werror -Wunused $(WEXTRA) -Wformat=2
roland 418cfd
 INCLUDES = -I. -I$(srcdir) -I.. \
roland 418cfd
 	   -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl -I$(top_srcdir)/libdw\
Jakub Jelinek a769ac
 	   -I$(top_srcdir)/lib
roland 570047
--- elfutils/libasm/Makefile.in
roland 570047
+++ elfutils/libasm/Makefile.in
roland 840723
@@ -126,6 +126,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
roland 80ba80
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
roland 80ba80
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
roland 80ba80
 LDFLAGS = @LDFLAGS@
roland 80ba80
+LD_AS_NEEDED = @LD_AS_NEEDED@
roland 80ba80
 LEX = @LEX@
roland 80ba80
 LEXLIB = @LEXLIB@
roland 80ba80
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
roland 840723
@@ -155,6 +156,7 @@ SHELL = @SHELL@
roland 3cb5df
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = 1
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland 3cb5df
 XGETTEXT_015 = @XGETTEXT_015@
roland b73b6e
 YACC = @YACC@
roland 840723
@@ -210,9 +212,9 @@ target_alias = @target_alias@
roland 3cb5df
 top_builddir = @top_builddir@
roland 3cb5df
 top_srcdir = @top_srcdir@
roland 2ca692
 @MUDFLAP_FALSE@AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Werror -Wunused \
roland 2ca692
-@MUDFLAP_FALSE@	-Wextra -Wformat=2
roland 2ca692
+@MUDFLAP_FALSE@	$(WEXTRA) -Wformat=2
roland 2ca692
 @MUDFLAP_TRUE@AM_CFLAGS = -fmudflap -std=gnu99 -Wall -Wshadow -Werror \
roland 2ca692
-@MUDFLAP_TRUE@	-Wunused -Wextra -Wformat=2
roland 2ca692
+@MUDFLAP_TRUE@	-Wunused $(WEXTRA) -Wformat=2
roland 418cfd
 INCLUDES = -I. -I$(srcdir) -I.. \
roland 418cfd
 	   -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl -I$(top_srcdir)/libdw\
roland b73b6e
 	   -I$(top_srcdir)/lib
roland 570047
--- elfutils/libcpu/ChangeLog
roland 570047
+++ elfutils/libcpu/ChangeLog
roland 0b5898
@@ -262,6 +262,11 @@
roland 840723
 	* defs/i386.doc: New file.
roland 840723
 	* defs/x86_64: New file.
roland 840723
 
roland 678843
+2005-04-04  Roland McGrath  <roland@redhat.com>
roland 678843
+
roland 678843
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
roland 678843
+	(AM_CFLAGS): Use it instead of -Wextra.
roland 678843
+
roland 678843
 2005-02-15  Ulrich Drepper  <drepper@redhat.com>
roland 678843
 
roland 678843
 	* Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
roland 570047
--- elfutils/libcpu/Makefile.am
roland 570047
+++ elfutils/libcpu/Makefile.am
roland 840723
@@ -30,7 +30,8 @@ AM_CFLAGS = -fmudflap
roland 840723
 else
roland 840723
 AM_CFLAGS =
roland 840723
 endif
roland 840723
-AM_CFLAGS += -Wall -Wshadow -Wunused -Wextra -std=gnu99 -fpic \
roland c881c2
+WEXTRA = @WEXTRA@
roland 840723
+AM_CFLAGS += -Wall -Wshadow -Wunused $(WEXTRA) -std=gnu99 -fpic \
roland 840723
 	     $($(*F)_CFLAGS) \
roland 840723
 	     $(if $($(*F)_no_Werror),,-Werror)
roland 840723
 INCLUDES = -I$(srcdir) -I$(srcdir)/../lib -I$(srcdir)/../libelf \
roland 570047
--- elfutils/libcpu/Makefile.in
roland 570047
+++ elfutils/libcpu/Makefile.in
roland 840723
@@ -109,6 +109,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
roland 80ba80
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
roland 80ba80
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
roland 80ba80
 LDFLAGS = @LDFLAGS@
roland 80ba80
+LD_AS_NEEDED = @LD_AS_NEEDED@
roland 80ba80
 LEX = @LEX@
roland 80ba80
 LEXLIB = @LEXLIB@
roland 840723
 LEX_OUTPUT_ROOT = lex.$(
roland 840723
@@ -138,6 +139,7 @@ SHELL = @SHELL@
roland 3cb5df
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = @VERSION@
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland 3cb5df
 XGETTEXT_015 = @XGETTEXT_015@
roland b73b6e
 YACC = @YACC@
roland 840723
@@ -192,10 +194,10 @@ sysconfdir = @sysconfdir@
roland b73b6e
 target_alias = @target_alias@
roland 3cb5df
 top_builddir = @top_builddir@
roland 3cb5df
 top_srcdir = @top_srcdir@
roland 840723
-@MUDFLAP_FALSE@AM_CFLAGS = -Wall -Wshadow -Wunused -Wextra -std=gnu99 \
roland 840723
-@MUDFLAP_FALSE@	-fpic $($(*F)_CFLAGS) $(if \
roland 840723
+@MUDFLAP_FALSE@AM_CFLAGS = -Wall -Wshadow -Wunused $(WEXTRA) \
roland 840723
+@MUDFLAP_FALSE@	-std=gnu99 -fpic $($(*F)_CFLAGS) $(if \
roland 840723
 @MUDFLAP_FALSE@	$($(*F)_no_Werror),,-Werror)
roland 840723
-@MUDFLAP_TRUE@AM_CFLAGS = -fmudflap -Wall -Wshadow -Wunused -Wextra \
roland 840723
+@MUDFLAP_TRUE@AM_CFLAGS = -fmudflap -Wall -Wshadow -Wunused $(WEXTRA) \
roland 840723
 @MUDFLAP_TRUE@	-std=gnu99 -fpic $($(*F)_CFLAGS) $(if \
roland 840723
 @MUDFLAP_TRUE@	$($(*F)_no_Werror),,-Werror)
roland 840723
 INCLUDES = -I$(srcdir) -I$(srcdir)/../lib -I$(srcdir)/../libelf \
roland f995fa
--- elfutils/libdw/ChangeLog
roland f995fa
+++ elfutils/libdw/ChangeLog
roland 840723
@@ -482,6 +482,11 @@
roland f995fa
 
roland f995fa
 2005-05-31  Roland McGrath  <roland@redhat.com>
roland f995fa
 
roland f995fa
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
roland f995fa
+	(AM_CFLAGS): Use it in place of -Wextra.
roland f995fa
+
roland f995fa
+2005-05-31  Roland McGrath  <roland@redhat.com>
roland f995fa
+
roland f995fa
 	* dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
roland f995fa
 	formref offset.
roland f995fa
 
roland 570047
--- elfutils/libdw/Makefile.am
roland 570047
+++ elfutils/libdw/Makefile.am
roland e23544
@@ -25,6 +25,7 @@
roland e23544
 ## <http://www.openinventionnetwork.com>.
Jakub Jelinek a769ac
 ##
roland f995fa
 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DIS_LIBDW
Jakub Jelinek a769ac
+WEXTRA = @WEXTRA@
Jakub Jelinek a769ac
 if MUDFLAP
Jakub Jelinek a769ac
 AM_CFLAGS = -fmudflap
Jakub Jelinek a769ac
 else
roland e23544
@@ -33,7 +34,7 @@ endif
roland 418cfd
 if BUILD_STATIC
roland 418cfd
 AM_CFLAGS += -fpic
Jakub Jelinek a769ac
 endif
Jakub Jelinek a769ac
-AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 -Wextra -std=gnu99
Jakub Jelinek a769ac
+AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 $(WEXTRA) -std=gnu99
Jakub Jelinek a769ac
 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib
Jakub Jelinek a769ac
 VERSION = 1
Jakub Jelinek a769ac
 
roland 570047
--- elfutils/libdw/Makefile.in
roland 570047
+++ elfutils/libdw/Makefile.in
roland 840723
@@ -164,6 +164,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
roland 80ba80
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
roland 80ba80
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
roland 80ba80
 LDFLAGS = @LDFLAGS@
roland 80ba80
+LD_AS_NEEDED = @LD_AS_NEEDED@
roland 80ba80
 LEX = @LEX@
roland 80ba80
 LEXLIB = @LEXLIB@
roland 80ba80
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
roland 840723
@@ -193,6 +194,7 @@ SHELL = @SHELL@
roland 3cb5df
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = 1
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland 3cb5df
 XGETTEXT_015 = @XGETTEXT_015@
roland b73b6e
 YACC = @YACC@
roland 840723
@@ -248,9 +250,10 @@ target_alias = @target_alias@
roland 3cb5df
 top_builddir = @top_builddir@
roland 3cb5df
 top_srcdir = @top_srcdir@
roland 418cfd
 @MUDFLAP_FALSE@AM_CFLAGS = $(am__append_1) -Wall -Werror -Wshadow \
roland 418cfd
-@MUDFLAP_FALSE@	-Wunused -Wformat=2 -Wextra -std=gnu99
roland 418cfd
+@MUDFLAP_FALSE@	-Wunused -Wformat=2 $(WEXTRA) -std=gnu99
roland 418cfd
 @MUDFLAP_TRUE@AM_CFLAGS = -fmudflap $(am__append_1) -Wall -Werror \
roland 418cfd
-@MUDFLAP_TRUE@	-Wshadow -Wunused -Wformat=2 -Wextra -std=gnu99
roland 418cfd
+@MUDFLAP_TRUE@	-Wshadow -Wunused -Wformat=2 $(WEXTRA) \
roland 418cfd
+@MUDFLAP_TRUE@	-std=gnu99
roland b73b6e
 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib
roland 65b080
 COMPILE.os = $(filter-out -fprofile-arcs, $(filter-out -ftest-coverage, \
roland 65b080
 						       $(COMPILE)))
roland f995fa
--- elfutils/libdwfl/ChangeLog
roland f995fa
+++ elfutils/libdwfl/ChangeLog
roland 840723
@@ -744,6 +744,11 @@
roland 469b3c
 
roland f995fa
 2005-07-21  Roland McGrath  <roland@redhat.com>
roland f995fa
 
roland f995fa
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
roland f995fa
+	(AM_CFLAGS): Use it in place of -Wextra.
roland f995fa
+
roland f995fa
+2005-07-21  Roland McGrath  <roland@redhat.com>
roland f995fa
+
roland f995fa
 	* Makefile.am (noinst_HEADERS): Add loc2c.c.
roland f995fa
 
roland f995fa
 	* test2.c (main): Check sscanf result to quiet warning.
roland f995fa
--- elfutils/libdwfl/Makefile.am
roland f995fa
+++ elfutils/libdwfl/Makefile.am
roland e23544
@@ -27,12 +27,13 @@
roland e23544
 ## <http://www.openinventionnetwork.com>.
roland f995fa
 ##
roland f995fa
 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
roland f995fa
+WEXTRA = @WEXTRA@
roland f995fa
 if MUDFLAP
roland f995fa
 AM_CFLAGS = -fmudflap
roland f995fa
 else
roland f995fa
 AM_CFLAGS =
roland f995fa
 endif
roland f995fa
-AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 -Wextra -std=gnu99
roland f995fa
+AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 $(WEXTRA) -std=gnu99
roland f995fa
 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
roland f995fa
 	   -I$(srcdir)/../libdw -I.. -I$(srcdir)/../lib
roland f995fa
 VERSION = 1
roland f995fa
--- elfutils/libdwfl/Makefile.in
roland f995fa
+++ elfutils/libdwfl/Makefile.in
roland 840723
@@ -129,6 +129,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
roland 80ba80
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
roland 80ba80
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
roland 80ba80
 LDFLAGS = @LDFLAGS@
roland 80ba80
+LD_AS_NEEDED = @LD_AS_NEEDED@
roland 80ba80
 LEX = @LEX@
roland 80ba80
 LEXLIB = @LEXLIB@
roland 80ba80
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
roland 840723
@@ -158,6 +159,7 @@ SHELL = @SHELL@
roland 3cb5df
 STRIP = @STRIP@
roland f995fa
 USE_NLS = @USE_NLS@
roland f995fa
 VERSION = 1
roland f995fa
+WEXTRA = @WEXTRA@
roland f995fa
 XGETTEXT = @XGETTEXT@
roland 3cb5df
 XGETTEXT_015 = @XGETTEXT_015@
roland f995fa
 YACC = @YACC@
roland 840723
@@ -213,9 +215,9 @@ target_alias = @target_alias@
roland 3cb5df
 top_builddir = @top_builddir@
roland 3cb5df
 top_srcdir = @top_srcdir@
roland f995fa
 @MUDFLAP_FALSE@AM_CFLAGS = -Wall -Werror -Wshadow -Wunused -Wformat=2 \
roland f995fa
-@MUDFLAP_FALSE@	-Wextra -std=gnu99
roland f995fa
+@MUDFLAP_FALSE@	$(WEXTRA) -std=gnu99
roland f995fa
 @MUDFLAP_TRUE@AM_CFLAGS = -fmudflap -Wall -Werror -Wshadow -Wunused \
roland f995fa
-@MUDFLAP_TRUE@	-Wformat=2 -Wextra -std=gnu99
roland f995fa
+@MUDFLAP_TRUE@	-Wformat=2 $(WEXTRA) -std=gnu99
roland f995fa
 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
roland f995fa
 	   -I$(srcdir)/../libdw -I.. -I$(srcdir)/../lib
roland f995fa
 
roland f995fa
--- elfutils/libebl/ChangeLog
roland f995fa
+++ elfutils/libebl/ChangeLog
roland a7b828
@@ -505,6 +505,11 @@
roland f995fa
 	* Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
roland f995fa
 	tracking works right.
roland f995fa
 
roland f995fa
+2005-05-31  Roland McGrath  <roland@redhat.com>
roland f995fa
+
roland f995fa
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
roland f995fa
+	(AM_CFLAGS): Use it in place of -Wextra.
roland f995fa
+
roland f995fa
 2005-05-21  Ulrich Drepper  <drepper@redhat.com>
roland f995fa
 
roland f995fa
 	* libebl_x86_64.map: Add x86_64_core_note.
roland 570047
--- elfutils/libebl/Makefile.am
roland 570047
+++ elfutils/libebl/Makefile.am
roland e23544
@@ -25,12 +25,13 @@
roland e23544
 ## <http://www.openinventionnetwork.com>.
Jakub Jelinek a769ac
 ##
Jakub Jelinek a769ac
 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DOBJDIR=\"$(shell pwd)\"
Jakub Jelinek a769ac
+WEXTRA = @WEXTRA@
Jakub Jelinek a769ac
 if MUDFLAP
Jakub Jelinek a769ac
 AM_CFLAGS = -fmudflap
Jakub Jelinek a769ac
 else
Jakub Jelinek a769ac
 AM_CFLAGS =
Jakub Jelinek a769ac
 endif
Jakub Jelinek a769ac
-AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 \
Jakub Jelinek a769ac
+AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused $(WEXTRA) -Wformat=2 \
Jakub Jelinek a769ac
 	     -std=gnu99
Jakub Jelinek a769ac
 
roland 418cfd
 INCLUDES = -I$(srcdir) -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw \
roland 570047
--- elfutils/libebl/Makefile.in
roland 570047
+++ elfutils/libebl/Makefile.in
roland 840723
@@ -121,6 +121,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
roland 80ba80
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
roland 80ba80
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
roland 80ba80
 LDFLAGS = @LDFLAGS@
roland 80ba80
+LD_AS_NEEDED = @LD_AS_NEEDED@
roland 80ba80
 LEX = @LEX@
roland 80ba80
 LEXLIB = @LEXLIB@
roland 80ba80
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
roland 840723
@@ -150,6 +151,7 @@ SHELL = @SHELL@
roland 3cb5df
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = 1
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland 3cb5df
 XGETTEXT_015 = @XGETTEXT_015@
roland b73b6e
 YACC = @YACC@
roland 840723
@@ -205,9 +207,9 @@ target_alias = @target_alias@
roland 3cb5df
 top_builddir = @top_builddir@
roland 3cb5df
 top_srcdir = @top_srcdir@
roland b73b6e
 @MUDFLAP_FALSE@AM_CFLAGS = -fpic -Wall -Wshadow -Werror -Wunused \
roland b73b6e
-@MUDFLAP_FALSE@	-Wextra -Wformat=2 -std=gnu99
roland b73b6e
+@MUDFLAP_FALSE@	$(WEXTRA) -Wformat=2 -std=gnu99
roland b73b6e
 @MUDFLAP_TRUE@AM_CFLAGS = -fmudflap -fpic -Wall -Wshadow -Werror \
roland b73b6e
-@MUDFLAP_TRUE@	-Wunused -Wextra -Wformat=2 -std=gnu99
roland b73b6e
+@MUDFLAP_TRUE@	-Wunused $(WEXTRA) -Wformat=2 -std=gnu99
roland 418cfd
 INCLUDES = -I$(srcdir) -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw \
roland 840723
 	   -I$(top_srcdir)/lib -I.. -I$(srcdir)/../libasm
roland 418cfd
 
roland f995fa
--- elfutils/libelf/ChangeLog
roland f995fa
+++ elfutils/libelf/ChangeLog
roland 840723
@@ -333,6 +333,11 @@
roland 469b3c
 	If section content hasn't been read yet, do it before looking for the
roland 469b3c
 	block size.  If no section data present, infer size of section header.
roland 469b3c
 
roland f995fa
+2005-05-31  Roland McGrath  <roland@redhat.com>
roland f995fa
+
roland f995fa
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
roland f995fa
+	(AM_CFLAGS): Use it in place of -Wextra.
roland f995fa
+
roland f995fa
 2005-05-11  Ulrich Drepper  <drepper@redhat.com>
roland f995fa
 
roland f995fa
 	* elf.h: Update again.
roland f995fa
--- elfutils/libelf/common.h
roland f995fa
+++ elfutils/libelf/common.h
roland 840723
@@ -159,7 +159,7 @@ libelf_release_all (Elf *elf)
roland f995fa
   (Var) = (sizeof (Var) == 1						      \
roland f995fa
 	   ? (unsigned char) (Var)					      \
roland f995fa
 	   : (sizeof (Var) == 2						      \
roland f995fa
-	      ? bswap_16 (Var)						      \
roland f995fa
+	      ? (unsigned short int) bswap_16 (Var)			      \
roland f995fa
 	      : (sizeof (Var) == 4					      \
roland f995fa
 		 ? bswap_32 (Var)					      \
roland f995fa
 		 : bswap_64 (Var))))
roland 840723
@@ -168,7 +168,7 @@ libelf_release_all (Elf *elf)
roland f995fa
   (Dst) = (sizeof (Var) == 1						      \
roland f995fa
 	   ? (unsigned char) (Var)					      \
roland f995fa
 	   : (sizeof (Var) == 2						      \
roland f995fa
-	      ? bswap_16 (Var)						      \
roland f995fa
+	      ? (unsigned short int) bswap_16 (Var)			      \
roland f995fa
 	      : (sizeof (Var) == 4					      \
roland f995fa
 		 ? bswap_32 (Var)					      \
roland f995fa
 		 : bswap_64 (Var))))
roland 570047
--- elfutils/libelf/Makefile.am
roland 570047
+++ elfutils/libelf/Makefile.am
roland e23544
@@ -25,6 +25,7 @@
roland e23544
 ## <http://www.openinventionnetwork.com>.
Jakub Jelinek a769ac
 ##
Jakub Jelinek a769ac
 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
Jakub Jelinek a769ac
+WEXTRA = @WEXTRA@
Jakub Jelinek a769ac
 if MUDFLAP
roland 511c10
 AM_CFLAGS = -fmudflap
Jakub Jelinek a769ac
 else
roland e23544
@@ -33,7 +34,10 @@ endif
roland 511c10
 if BUILD_STATIC
roland 511c10
 AM_CFLAGS += -fpic
Jakub Jelinek a769ac
 endif
Jakub Jelinek a769ac
-AM_CFLAGS += -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 -std=gnu99 \
roland 850d0e
+if BUILD_STATIC
roland 850d0e
+AM_CFLAGS += -fpic
roland 850d0e
+endif
Jakub Jelinek a769ac
+AM_CFLAGS += -Wall -Wshadow -Werror -Wunused $(WEXTRA) -Wformat=2 -std=gnu99 \
Jakub Jelinek a769ac
 	     $($(*F)_CFLAGS)
Jakub Jelinek a769ac
 INCLUDES = -I$(srcdir) -I$(top_srcdir)/lib -I..
Jakub Jelinek a769ac
 GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
roland 570047
--- elfutils/libelf/Makefile.in
roland 570047
+++ elfutils/libelf/Makefile.in
roland 3cb5df
@@ -34,7 +34,7 @@ PRE_UNINSTALL = :
roland 850d0e
 POST_UNINSTALL = :
roland 850d0e
 build_triplet = @build@
roland 850d0e
 host_triplet = @host@
roland 850d0e
-@BUILD_STATIC_TRUE@am__append_1 = -fpic
roland 850d0e
+@BUILD_STATIC_TRUE@am__append_1 = -fpic -fpic
roland 850d0e
 @MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1)
roland 850d0e
 @MUDFLAP_TRUE@am_libelf_pic_a_OBJECTS =
roland 850d0e
 subdir = libelf
roland 840723
@@ -170,6 +170,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
roland 80ba80
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
roland 80ba80
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
roland 80ba80
 LDFLAGS = @LDFLAGS@
roland 80ba80
+LD_AS_NEEDED = @LD_AS_NEEDED@
roland 80ba80
 LEX = @LEX@
roland 80ba80
 LEXLIB = @LEXLIB@
roland 80ba80
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
roland 840723
@@ -199,6 +200,7 @@ SHELL = @SHELL@
roland 3cb5df
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = 1
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland 3cb5df
 XGETTEXT_015 = @XGETTEXT_015@
roland b73b6e
 YACC = @YACC@
roland 840723
@@ -254,10 +256,10 @@ target_alias = @target_alias@
roland 3cb5df
 top_builddir = @top_builddir@
roland 3cb5df
 top_srcdir = @top_srcdir@
roland 511c10
 @MUDFLAP_FALSE@AM_CFLAGS = $(am__append_1) -Wall -Wshadow -Werror \
roland 511c10
-@MUDFLAP_FALSE@	-Wunused -Wextra -Wformat=2 -std=gnu99 \
roland 511c10
+@MUDFLAP_FALSE@	-Wunused $(WEXTRA) -Wformat=2 -std=gnu99 \
roland 511c10
 @MUDFLAP_FALSE@	$($(*F)_CFLAGS)
roland 511c10
 @MUDFLAP_TRUE@AM_CFLAGS = -fmudflap $(am__append_1) -Wall -Wshadow \
roland 511c10
-@MUDFLAP_TRUE@	-Werror -Wunused -Wextra -Wformat=2 -std=gnu99 \
roland 511c10
+@MUDFLAP_TRUE@	-Werror -Wunused $(WEXTRA) -Wformat=2 -std=gnu99 \
roland b73b6e
 @MUDFLAP_TRUE@	$($(*F)_CFLAGS)
roland b73b6e
 INCLUDES = -I$(srcdir) -I$(top_srcdir)/lib -I..
roland b73b6e
 GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
roland 570047
--- elfutils/m4/Makefile.in
roland 570047
+++ elfutils/m4/Makefile.in
roland 840723
@@ -71,6 +71,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
roland 80ba80
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
roland 80ba80
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
roland 80ba80
 LDFLAGS = @LDFLAGS@
roland 80ba80
+LD_AS_NEEDED = @LD_AS_NEEDED@
roland 80ba80
 LEX = @LEX@
roland 80ba80
 LEXLIB = @LEXLIB@
roland 80ba80
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
roland 840723
@@ -100,6 +101,7 @@ SHELL = @SHELL@
roland 3cb5df
 STRIP = @STRIP@
roland f995fa
 USE_NLS = @USE_NLS@
roland f995fa
 VERSION = @VERSION@
roland f995fa
+WEXTRA = @WEXTRA@
roland f995fa
 XGETTEXT = @XGETTEXT@
roland 3cb5df
 XGETTEXT_015 = @XGETTEXT_015@
roland f995fa
 YACC = @YACC@
roland f995fa
--- elfutils/Makefile.in
roland f995fa
+++ elfutils/Makefile.in
roland 840723
@@ -98,6 +98,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
roland 80ba80
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
roland 80ba80
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
roland 80ba80
 LDFLAGS = @LDFLAGS@
roland 80ba80
+LD_AS_NEEDED = @LD_AS_NEEDED@
roland 80ba80
 LEX = @LEX@
roland 80ba80
 LEXLIB = @LEXLIB@
roland 80ba80
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
roland 840723
@@ -127,6 +128,7 @@ SHELL = @SHELL@
roland 3cb5df
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = @VERSION@
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland 3cb5df
 XGETTEXT_015 = @XGETTEXT_015@
roland b73b6e
 YACC = @YACC@
roland f995fa
--- elfutils/src/ChangeLog
roland f995fa
+++ elfutils/src/ChangeLog
roland 840723
@@ -126,6 +126,8 @@
roland a7b828
 
roland a7b828
 	* readelf.c (hex_dump): Fix rounding error in whitespace calculation.
roland a7b828
 
roland 2dfc22
+	* Makefile.am (readelf_no_Werror): New variable.
roland 2dfc22
+
roland 2dfc22
 2007-10-15  Roland McGrath  <roland@redhat.com>
roland 2dfc22
 
roland 2dfc22
 	* make-debug-archive.in: New file.
roland 840723
@@ -565,6 +567,10 @@
roland 9a3c17
 	* elflint.c (valid_e_machine): Add EM_ALPHA.
roland 9a3c17
 	Reported by Christian Aichinger <Greek0@gmx.net>.
roland 9a3c17
 
roland 9a3c17
+	* strings.c (map_file): Define POSIX_MADV_SEQUENTIAL to
roland 9a3c17
+	MADV_SEQUENTIAL if undefined.  	Don't call posix_madvise
roland 9a3c17
+	if neither is defined.
roland 9a3c17
+
roland 9a3c17
 2006-08-08  Ulrich Drepper  <drepper@redhat.com>
roland 9a3c17
 
roland 9a3c17
 	* elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
roland 840723
@@ -641,6 +647,10 @@
roland a99770
 	* Makefile.am: Add hacks to create dependency files for non-generic
roland a99770
 	linker.
roland a99770
 
roland 3c3d38
+2006-04-05  Roland McGrath  <roland@redhat.com>
roland 3c3d38
+
roland 3c3d38
+	* strings.c (MAP_POPULATE): Define to 0 if undefined.
roland 3c3d38
+
roland 3c3d38
 2006-06-12  Ulrich Drepper  <drepper@redhat.com>
roland 3c3d38
 
roland 3c3d38
 	* ldgeneric.c (ld_generic_generate_sections): Don't create .interp
roland 840723
@@ -989,6 +999,11 @@
roland f995fa
 	* readelf.c (print_debug_loc_section): Fix indentation for larger
roland f995fa
 	address size.
roland f995fa
 
roland f995fa
+2005-05-31  Roland McGrath  <roland@redhat.com>
roland f995fa
+
roland f995fa
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
roland f995fa
+	(AM_CFLAGS): Use it in place of -Wextra.
roland f995fa
+
roland f995fa
 2005-05-30  Roland McGrath  <roland@redhat.com>
roland f995fa
 
roland f995fa
 	* readelf.c (print_debug_line_section): Print section offset of each
roland f995fa
--- elfutils/src/findtextrel.c
roland f995fa
+++ elfutils/src/findtextrel.c
roland e23544
@@ -488,7 +488,11 @@ ptrcompare (const void *p1, const void *
roland f995fa
 
roland f995fa
 
roland f995fa
 static void
roland f995fa
-check_rel (size_t nsegments, struct segments segments[nsegments],
roland f995fa
+check_rel (size_t nsegments, struct segments segments[
roland f995fa
+#if __GNUC__ >= 4
roland f995fa
+						      nsegments
roland f995fa
+#endif
roland f995fa
+	   ],
roland f995fa
 	   GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw,
roland f995fa
 	   const char *fname, bool more_than_one, void **knownsrcs)
roland f995fa
 {
roland 570047
--- elfutils/src/Makefile.am
roland 570047
+++ elfutils/src/Makefile.am
roland e23544
@@ -26,6 +26,7 @@
Jakub Jelinek a769ac
 ##
roland 840723
 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H $(YYDEBUG) -DDEBUGPRED=@DEBUGPRED@ \
Jakub Jelinek a769ac
        -DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\"
Jakub Jelinek a769ac
+WEXTRA = @WEXTRA@
Jakub Jelinek a769ac
 if MUDFLAP
roland 850d0e
 AM_CFLAGS = -fmudflap
Jakub Jelinek a769ac
 else
roland e23544
@@ -33,7 +34,7 @@ AM_CFLAGS =
Jakub Jelinek a769ac
 endif
roland 511c10
 AM_CFLAGS += -Wall -Wshadow -std=gnu99 $(native_ld_cflags) \
roland 511c10
 	     $(if $($(*F)_no_Werror),,-Werror) \
roland 511c10
-	     $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
roland 511c10
+	     $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
roland 2a32e1
 	     $(if $($(*F)_no_Wformat),,-Wformat=2) $(CFLAGS_$(*F))
roland 511c10
 
roland fb15a5
 INCLUDES = -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
roland 840723
@@ -111,6 +112,9 @@ strings_no_Wformat = yes
roland 2dfc22
 # XXX While the file is not finished, don't warn about this
roland 2dfc22
 ldgeneric_no_Wunused = yes
roland 2dfc22
 
roland 2dfc22
+# Buggy old compilers.
roland 2dfc22
+readelf_no_Werror = yes
roland 2dfc22
+
roland 2dfc22
 readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
roland 2dfc22
 nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
roland 2dfc22
 size_LDADD = $(libelf) $(libeu) $(libmudflap)
roland 570047
--- elfutils/src/Makefile.in
roland 570047
+++ elfutils/src/Makefile.in
roland 840723
@@ -201,6 +201,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
roland 80ba80
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
roland 80ba80
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
roland 80ba80
 LDFLAGS = @LDFLAGS@
roland 80ba80
+LD_AS_NEEDED = @LD_AS_NEEDED@
roland 80ba80
 LEX = @LEX@
roland 80ba80
 LEXLIB = @LEXLIB@
roland 80ba80
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
roland 840723
@@ -230,6 +231,7 @@ SHELL = @SHELL@
roland 3cb5df
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = @VERSION@
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland 3cb5df
 XGETTEXT_015 = @XGETTEXT_015@
roland b73b6e
 YACC = @YACC@ -d
roland 840723
@@ -287,13 +289,13 @@ top_srcdir = @top_srcdir@
roland 511c10
 @MUDFLAP_FALSE@AM_CFLAGS = -Wall -Wshadow -std=gnu99 \
roland 511c10
 @MUDFLAP_FALSE@	$(native_ld_cflags) $(if \
roland 511c10
 @MUDFLAP_FALSE@	$($(*F)_no_Werror),,-Werror) $(if \
roland 511c10
-@MUDFLAP_FALSE@	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
roland 511c10
+@MUDFLAP_FALSE@	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
roland 2a32e1
 @MUDFLAP_FALSE@	$($(*F)_no_Wformat),,-Wformat=2) \
roland 2a32e1
 @MUDFLAP_FALSE@	$(CFLAGS_$(*F))
roland 850d0e
 @MUDFLAP_TRUE@AM_CFLAGS = -fmudflap -Wall -Wshadow -std=gnu99 \
roland 850d0e
 @MUDFLAP_TRUE@	$(native_ld_cflags) $(if \
roland 511c10
 @MUDFLAP_TRUE@	$($(*F)_no_Werror),,-Werror) $(if \
roland 511c10
-@MUDFLAP_TRUE@	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
roland 511c10
+@MUDFLAP_TRUE@	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
roland 2a32e1
 @MUDFLAP_TRUE@	$($(*F)_no_Wformat),,-Wformat=2) $(CFLAGS_$(*F))
roland fb15a5
 INCLUDES = -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
roland fb15a5
 	   -I$(srcdir)/../libdw -I$(srcdir)/../libdwfl \
roland 840723
@@ -337,6 +339,9 @@ size_no_Wformat = yes
roland 2dfc22
 strings_no_Wformat = yes
roland 2dfc22
 # XXX While the file is not finished, don't warn about this
roland 2dfc22
 ldgeneric_no_Wunused = yes
roland 2dfc22
+
roland 2dfc22
+# Buggy old compilers.
roland 2dfc22
+readelf_no_Werror = yes
roland 2dfc22
 readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
roland 2dfc22
 nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
roland 2dfc22
 size_LDADD = $(libelf) $(libeu) $(libmudflap)
roland 3c3d38
--- elfutils/src/strings.c
roland 3c3d38
+++ elfutils/src/strings.c
roland 3c3d38
@@ -51,6 +51,10 @@
roland 3c3d38
 
roland 3c3d38
 #include <system.h>
roland 3c3d38
 
roland 3c3d38
+#ifndef MAP_POPULATE
roland 3c3d38
+# define MAP_POPULATE 0
roland 3c3d38
+#endif
roland 3c3d38
+
roland 3c3d38
 
roland 3c3d38
 /* Prototypes of local functions.  */
roland 3c3d38
 static int read_fd (int fd, const char *fname, off64_t fdlen);
roland 9a3c17
@@ -491,8 +495,13 @@ map_file (int fd, off64_t start_off, off
roland 9a3c17
 		    fd, start_off);
roland 9a3c17
       if (mem != MAP_FAILED)
roland 9a3c17
 	{
roland 9a3c17
+#if !defined POSIX_MADV_SEQUENTIAL && defined MADV_SEQUENTIAL
roland 9a3c17
+# define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
roland 9a3c17
+#endif
roland 9a3c17
+#ifdef POSIX_MADV_SEQUENTIAL
roland 9a3c17
 	  /* We will go through the mapping sequentially.  */
roland 9a3c17
 	  (void) posix_madvise (mem, map_size, POSIX_MADV_SEQUENTIAL);
roland 9a3c17
+#endif
roland 9a3c17
 	  break;
roland 9a3c17
 	}
roland 9a3c17
       if (errno != EINVAL && errno != ENOMEM)
roland 570047
--- elfutils/src/strip.c
roland 570047
+++ elfutils/src/strip.c
roland e23544
@@ -52,6 +52,12 @@
roland b73b6e
 #include <libebl.h>
roland b73b6e
 #include <system.h>
roland b73b6e
 
roland b73b6e
+#ifdef HAVE_FUTIMES
roland b73b6e
+# define FUTIMES(fd, fname, tvp) futimes (fd, tvp)
roland b73b6e
+#else
roland b73b6e
+# define FUTIMES(fd, fname, tvp) utimes (fname, tvp)
roland b73b6e
+#endif
roland b73b6e
+
roland b73b6e
 
roland b73b6e
 /* Name and version of program.  */
roland b73b6e
 static void print_version (FILE *stream, struct argp_state *state);
roland e23544
@@ -300,8 +306,18 @@ process_file (const char *fname)
Jakub Jelinek a769ac
 
Jakub Jelinek a769ac
       /* If we have to preserve the timestamp, we need it in the
Jakub Jelinek a769ac
 	 format utimes() understands.  */
Jakub Jelinek a769ac
+#ifdef HAVE_STRUCT_STAT_ST_ATIM
Jakub Jelinek a769ac
       TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim);
Jakub Jelinek a769ac
+#else
Jakub Jelinek a769ac
+      tv[0].tv_sec = pre_st.st_atime;
Jakub Jelinek a769ac
+      tv[0].tv_usec = 0;
Jakub Jelinek a769ac
+#endif
Jakub Jelinek a769ac
+#ifdef HAVE_STRUCT_STAT_ST_MTIM
Jakub Jelinek a769ac
       TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim);
Jakub Jelinek a769ac
+#else
Jakub Jelinek a769ac
+      tv[1].tv_sec = pre_st.st_atime;
Jakub Jelinek a769ac
+      tv[1].tv_usec = 0;
Jakub Jelinek a769ac
+#endif
Jakub Jelinek a769ac
     }
Jakub Jelinek a769ac
 
Jakub Jelinek a769ac
   /* Open the file.  */
roland 840723
@@ -1703,7 +1719,7 @@ handle_elf (int fd, Elf *elf, const char
Jakub Jelinek a769ac
   /* If requested, preserve the timestamp.  */
Jakub Jelinek a769ac
   if (tvp != NULL)
Jakub Jelinek a769ac
     {
Jakub Jelinek a769ac
-      if (futimes (fd, tvp) != 0)
roland b73b6e
+      if (FUTIMES (fd, output_fname, tvp) != 0)
Jakub Jelinek a769ac
 	{
Jakub Jelinek a769ac
 	  error (0, errno, gettext ("\
roland 5fa386
 cannot set access and modification date of '%s'"),
roland 840723
@@ -1760,7 +1776,7 @@ handle_ar (int fd, Elf *elf, const char 
Jakub Jelinek a769ac
 
Jakub Jelinek a769ac
   if (tvp != NULL)
Jakub Jelinek a769ac
     {
Jakub Jelinek a769ac
-      if (unlikely (futimes (fd, tvp) != 0))
roland b73b6e
+      if (unlikely (FUTIMES (fd, fname, tvp) != 0))
Jakub Jelinek a769ac
 	{
Jakub Jelinek a769ac
 	  error (0, errno, gettext ("\
roland 5fa386
 cannot set access and modification date of '%s'"), fname);
roland f995fa
--- elfutils/tests/ChangeLog
roland f995fa
+++ elfutils/tests/ChangeLog
roland 840723
@@ -703,6 +703,11 @@
roland f995fa
 	* Makefile.am (TESTS): Add run-elflint-test.sh.
roland f995fa
 	(EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
roland f995fa
 
roland f995fa
+2005-05-31  Roland McGrath  <roland@redhat.com>
roland f995fa
+
roland f995fa
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
roland f995fa
+	(AM_CFLAGS): Use it in place of -Wextra.
roland f995fa
+
roland f995fa
 2005-05-24  Ulrich Drepper  <drepper@redhat.com>
roland f995fa
 
roland f995fa
 	* get-files.c (main): Use correct format specifier.
roland f995fa
--- elfutils/tests/Makefile.am
roland f995fa
+++ elfutils/tests/Makefile.am
roland e23544
@@ -25,12 +25,13 @@
roland e23544
 ## <http://www.openinventionnetwork.com>.
roland f995fa
 ##
roland f995fa
 DEFS = -DHAVE_CONFIG_H -D_GNU_SOURCE
roland f995fa
+WEXTRA = @WEXTRA@
roland f995fa
 if MUDFLAP
roland f995fa
-AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 -fmudflap\
roland f995fa
+AM_CFLAGS = -Wall -Werror $(WEXTRA) -std=gnu99 -fmudflap\
roland f995fa
 	    $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
roland 418cfd
 BUILD_RPATH = \$$ORIGIN/../backends
roland f995fa
 else
roland f995fa
-AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 \
roland f995fa
+AM_CFLAGS = -Wall -Werror $(WEXTRA) -std=gnu99 \
roland f995fa
 	    $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
roland 418cfd
 BUILT_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf
roland f995fa
 endif
roland 570047
--- elfutils/tests/Makefile.in
roland 570047
+++ elfutils/tests/Makefile.in
roland 840723
@@ -325,6 +325,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
roland 80ba80
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
roland 80ba80
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
roland 80ba80
 LDFLAGS = @LDFLAGS@
roland 80ba80
+LD_AS_NEEDED = @LD_AS_NEEDED@
roland 80ba80
 LEX = @LEX@
roland 80ba80
 LEXLIB = @LEXLIB@
roland 80ba80
 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
roland 840723
@@ -354,6 +355,7 @@ SHELL = @SHELL@
roland 3cb5df
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = @VERSION@
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland 3cb5df
 XGETTEXT_015 = @XGETTEXT_015@
roland b73b6e
 YACC = @YACC@
roland 840723
@@ -408,10 +410,10 @@ sysconfdir = @sysconfdir@
roland f995fa
 target_alias = @target_alias@
roland 3cb5df
 top_builddir = @top_builddir@
roland 3cb5df
 top_srcdir = @top_srcdir@
roland f995fa
-@MUDFLAP_FALSE@AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 \
roland f995fa
+@MUDFLAP_FALSE@AM_CFLAGS = -Wall -Werror $(WEXTRA) -std=gnu99 \
roland f995fa
 @MUDFLAP_FALSE@	    $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
roland f995fa
 
roland f995fa
-@MUDFLAP_TRUE@AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 -fmudflap\
roland f995fa
+@MUDFLAP_TRUE@AM_CFLAGS = -Wall -Werror $(WEXTRA) -std=gnu99 -fmudflap\
roland f995fa
 @MUDFLAP_TRUE@	    $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
roland f995fa
 
roland 418cfd
 @MUDFLAP_TRUE@BUILD_RPATH = \$$ORIGIN/../backends