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:
parent
928386a317
commit
f9c69f803f
|
@ -43,7 +43,7 @@ if test "$GCC" = yes; then
|
||||||
old_cflags=$CFLAGS
|
old_cflags=$CFLAGS
|
||||||
echo
|
echo
|
||||||
for flag in $cflags_to_try; do
|
for flag in $cflags_to_try; do
|
||||||
CFLAGS="$CFLAGS $flag"
|
CFLAGS="$CFLAGS $flag -Werror"
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],[
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],[
|
||||||
echo " $flag"
|
echo " $flag"
|
||||||
RPMCFLAGS="$RPMCFLAGS $flag"
|
RPMCFLAGS="$RPMCFLAGS $flag"
|
||||||
|
|
Loading…
Reference in New Issue