diff --git a/configure.ac b/configure.ac index 3166c78a..a36656b0 100644 --- a/configure.ac +++ b/configure.ac @@ -112,12 +112,11 @@ case "${host_os}" in esac WERROR=-Werror -# The test code used by AX_CHECK_COMPILE_FLAG uses an empty statement. -# clang++-8 can emit a warning for that which must be disabled. -AX_CHECK_COMPILE_FLAG([-Wno-extra-semi-stmt], [WERROR="$WERROR -Wno-extra-semi-stmt"]) -# The test code used by AX_CHECK_COMPILE_FLAG uses macros which are unused. -# That must not break the check, so disable a related warning if necessary. -AX_CHECK_COMPILE_FLAG([-Wno-unused-macros], [WERROR="$WERROR -Wno-unused-macros"]) +# The test code used by AX_CHECK_COMPILE_FLAG uses an empty statement +# and unused macros which must not raise a compiler error, but it must +# be an error if flags like -avx are ignored on ARM and other +# architectures because they are unsupported. +AX_CHECK_COMPILE_FLAG([-Werror=unused-command-line-argument], [WERROR=-Werror=unused-command-line-argument]) ## Checks for supported compiler options.