Skip to content

Commit c926bdb

Browse files
committed
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 <sw@weilnetz.de>
1 parent b96df3a commit c926bdb

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

configure.ac

+5-6
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,11 @@ case "${host_os}" in
112112
esac
113113

114114
WERROR=-Werror
115-
# The test code used by AX_CHECK_COMPILE_FLAG uses an empty statement.
116-
# clang++-8 can emit a warning for that which must be disabled.
117-
AX_CHECK_COMPILE_FLAG([-Wno-extra-semi-stmt], [WERROR="$WERROR -Wno-extra-semi-stmt"])
118-
# The test code used by AX_CHECK_COMPILE_FLAG uses macros which are unused.
119-
# That must not break the check, so disable a related warning if necessary.
120-
AX_CHECK_COMPILE_FLAG([-Wno-unused-macros], [WERROR="$WERROR -Wno-unused-macros"])
115+
# The test code used by AX_CHECK_COMPILE_FLAG uses an empty statement
116+
# and unused macros which must not raise a compiler error, but it must
117+
# be an error if flags like -avx are ignored on ARM and other
118+
# architectures because they are unsupported.
119+
AX_CHECK_COMPILE_FLAG([-Werror=unused-command-line-argument], [WERROR=-Werror=unused-command-line-argument])
121120

122121
## Checks for supported compiler options.
123122

0 commit comments

Comments
 (0)