From f9c69f803f74bd458269c7a06def494ea63387e6 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 12 Jul 2012 12:52:31 +0300 Subject: [PATCH] Run gcc supported flags test with -Werror - On gcc versions supporting -fstack-protector, not all platforms support this feature, causing gcc to emit only a warning instead of an error. Which then causes warning-spew on every compiled file. Run all the supported flag tests with -Werror to turn the warnings into errors, there could be other similar cases besides stack protector. - Patch originally from Arnaud Patard according to this Mandriva commit: http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages?view=revision&revision=448632 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 24d0d2c54..edd72d45a 100644 --- a/configure.ac +++ b/configure.ac @@ -43,7 +43,7 @@ if test "$GCC" = yes; then old_cflags=$CFLAGS echo for flag in $cflags_to_try; do - CFLAGS="$CFLAGS $flag" + CFLAGS="$CFLAGS $flag -Werror" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],[ echo " $flag" RPMCFLAGS="$RPMCFLAGS $flag"