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
This commit is contained in:
Panu Matilainen 2012-07-12 12:52:31 +03:00
parent 928386a317
commit f9c69f803f
1 changed files with 1 additions and 1 deletions

View File

@ -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"