Skip to content

Commit

Permalink
configure: Use a hopefully more robust way to fix AX_CHECK_COMPILE_FLAG
Browse files Browse the repository at this point in the history
The check for -Wno-extra-semi-stmt failed on Linux with clang++-7.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed May 21, 2019
1 parent b96df3a commit c926bdb
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions configure.ac
Expand Up @@ -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.

Expand Down

0 comments on commit c926bdb

Please sign in to comment.