From ecd0384a319a6ce83ef6fac5a41d201b9ad243c3 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 21 May 2019 12:19:24 +0200 Subject: [PATCH] configure: Use a hopefully more robust way to fix AX_CHECK_COMPILE_FLAG The check for -Wno-extra-semi-stmt failed on Linux with clang++-7. Signed-off-by: Stefan Weil --- configure.ac | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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.