From d31bd24b40262ff97db47804472589a89a4bcfe4 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174770 91177308-0d34-0410-b5e6-96231b3b80d8 --- autoconf/m4/cxx_flag_check.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'autoconf') diff --git a/autoconf/m4/cxx_flag_check.m4 b/autoconf/m4/cxx_flag_check.m4 index 62454b7147..4b09744550 100644 --- a/autoconf/m4/cxx_flag_check.m4 +++ b/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