diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-02-08 22:55:10 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-02-08 22:55:10 +0000 |
commit | d31bd24b40262ff97db47804472589a89a4bcfe4 (patch) | |
tree | feeb11481fc0b6f1041b152f8c1791f10f173953 /autoconf/m4 | |
parent | 1c66a18f84f25387d919c18c3d7a68ba22e18d01 (diff) | |
download | external_llvm-d31bd24b40262ff97db47804472589a89a4bcfe4.zip external_llvm-d31bd24b40262ff97db47804472589a89a4bcfe4.tar.gz external_llvm-d31bd24b40262ff97db47804472589a89a4bcfe4.tar.bz2 |
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
Diffstat (limited to 'autoconf/m4')
-rw-r--r-- | autoconf/m4/cxx_flag_check.m4 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/autoconf/m4/cxx_flag_check.m4 b/autoconf/m4/cxx_flag_check.m4 index 62454b7..4b09744 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`)]) |