The -Werror flag is great for development, but not so great with releases. Often times newer (or older) versions of gcc like to warn about different things, or in different ways depending on the architecture (we don't think that the maintainer is going to test building for every one out there).
So add a knob for distros to turn off -Werror in their builds.
Signed-off-by: Mike Frysinger vapier@gentoo.org --- config/eu.am | 5 ++++- configure.ac | 5 +++++ 2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/config/eu.am b/config/eu.am index f259c5b..4c10f55 100644 --- a/config/eu.am +++ b/config/eu.am @@ -28,11 +28,14 @@ DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"' INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. AM_CFLAGS = -std=gnu99 -Wall -Wshadow \ - $(if $($(*F)_no_Werror),,-Werror) \ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \ $($(*F)_CFLAGS)
+if BUILD_WERROR +AM_CFLAGS += $(if $($(*F)_no_Werror),,-Werror) +endif + if MUDFLAP AM_CFLAGS += -fmudflap libmudflap = -lmudflap diff --git a/configure.ac b/configure.ac index a9f1fc9..4c6248c 100644 --- a/configure.ac +++ b/configure.ac @@ -170,6 +170,11 @@ AM_CONDITIONAL(GCOV, test "$use_gcov" = yes) AM_CONDITIONAL(BUILD_STATIC, [dnl test "$use_mudflap" = yes -o "$use_gprof" = yes -o "$use_gcov" = yes])
+AC_ARG_ENABLE([werror], +AS_HELP_STRING([--disable-werror],[do not build with -Werror]), + [enable_werror=$enableval], [enable_werror=yes]) +AM_CONDITIONAL(BUILD_WERROR, test "$enable_werror" = yes) + AC_ARG_ENABLE([tests-rpath], AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]), [tests_use_rpath=yes], [tests_use_rpath=no])
If it's not tested it shouldn't be released. Your thinking is completely backward.
On Tuesday, October 04, 2011 03:20:10 Ulrich Drepper wrote:
If it's not tested it shouldn't be released. Your thinking is completely backward.
you missed the point completely. there's no way you're going to build elfutils across gcc-4.{4,5,6,7,+} and glibc-2.{11,12,13,14,+} over a variety of architectures, compiler optimizations, and configure options. expecting that kind of coverage is completely unrealistic, and i already know there are a bunch of architectures you'd refuse to bother with.
distributions however do build over these array of configurations, and the vast majority of warnings arising from the build are simply irrelevant noise. applying patches to distros to address new warnings is a complete waste of time. e.x. gcc-4.6 includes much better warnings like -Wunused-but-set- variable which have absolutely no bearing on the generated code.
if your logic were actually true, i would wonder why significantly more relevant projects like binutils or gdb or gcc include --disable-werror configure flags. -mike
elfutils-devel@lists.fedorahosted.org