summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2016-05-16 21:35:48 -0700
committerH. Peter Anvin <hpa@zytor.com>2016-05-16 21:35:48 -0700
commitc9fd7b2aa5086205a626f8312bbaa5043b72a6d7 (patch)
tree1850c6a6c767c122ca13c8fe45aa08eeb12afe83
parentacbf8f0e1972eb690c91c5bca5b8c1c960dde4b5 (diff)
downloadnasm-c9fd7b2aa5086205a626f8312bbaa5043b72a6d7.tar.gz
configure: correctly discover -W options for clang
clang doesn't error out on unknown -W options unless -Werror=unknown-warning-option is specified first, so do that so the configure script can do its job. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--configure.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 56e0ce69..61a9f7b0 100644
--- a/configure.in
+++ b/configure.in
@@ -183,6 +183,10 @@ AC_ARG_ENABLE([ccache],
[])
PA_ADD_CFLAGS([-pedantic])
+dnl LLVM doesn't error out on invalid -W options unless this option is
+dnl specified first. Enable this so this script can actually discover
+dnl which -W options are possible for this compiler.
+PA_ADD_CFLAGS([-Werror=unknown-warning-option])
dnl Suppress format warning on Windows targets due to their <inttypes.h>
PA_ADD_CFLAGS([-Wpedantic-ms-format],[-Wno-pedantic-ms-format])
PA_ADD_CFLAGS([-Wc90-c99-compat])