From c9fd7b2aa5086205a626f8312bbaa5043b72a6d7 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 16 May 2016 21:35:48 -0700 Subject: 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 --- configure.in | 4 ++++ 1 file changed, 4 insertions(+) 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 PA_ADD_CFLAGS([-Wpedantic-ms-format],[-Wno-pedantic-ms-format]) PA_ADD_CFLAGS([-Wc90-c99-compat]) -- cgit v1.2.1