From c1ec8734036319d18f87555bc1b728e46299c54a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Filip=20Ros=C3=A9en?= Date: Thu, 23 Feb 2017 14:54:17 +0100 Subject: [PATCH] m4: fix c++ check for -f flags Both gcc and clang generate warnings for unsupported -f$FLAG by default, meaning that the previous implementation would consider unsupported flags as supported (as a warning is not an error that fails compilation). The addition of -Werror treats warnings as errors, and will prevent false-positives in terms of -f$FLAG support. Signed-off-by: Jean-Baptiste Kempf --- m4/flags.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/flags.m4 b/m4/flags.m4 index 0a5c7c923f..0907f3b076 100644 --- a/m4/flags.m4 +++ b/m4/flags.m4 @@ -48,7 +48,7 @@ AC_DEFUN([RDC_PROG_CXX_FLAGS_IFELSE], CXXFLAGS_save="${CXXFLAGS}" as_ac_var=`echo "ac_cv_prog_cxx_flags_$1" | $as_tr_sh` AC_CACHE_CHECK([if $CXX accepts $1], [$as_ac_var], [ - CXXFLAGS="${CXXFLAGS} $1" + CXXFLAGS="${CXXFLAGS} -Werror $1" AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [ eval "$as_ac_var=yes" ],[ -- 2.11.4.GIT