From f89ffcd705f57d910dd972f9b1f1e6e827f2960e Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 8 Feb 2013 22:55:10 +0000 Subject: configure: when performing a compiler feature test for a -Wno-foo flag, attempt to use -Wfoo instead of -Wno-foo. This works around a bug in some versions of gcc, where it will silently accept an unknown -Wno-foo option, but will generate an error for a compile which uses -Wno-foo if that compile also triggers any warnings. llvm-svn: 174770 --- llvm/autoconf/m4/cxx_flag_check.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/autoconf') diff --git a/llvm/autoconf/m4/cxx_flag_check.m4 b/llvm/autoconf/m4/cxx_flag_check.m4 index 62454b7147f..4b097445501 100644 --- a/llvm/autoconf/m4/cxx_flag_check.m4 +++ b/llvm/autoconf/m4/cxx_flag_check.m4 @@ -1,2 +1,2 @@ AC_DEFUN([CXX_FLAG_CHECK], - [AC_SUBST($1, `$CXX -Werror $2 -fsyntax-only -xc /dev/null 2>/dev/null && echo $2`)]) + [AC_SUBST($1, `$CXX -Werror patsubst($2, [^-Wno-], [-W]) -fsyntax-only -xc /dev/null 2>/dev/null && echo $2`)]) -- cgit v1.2.3