From 1f195bc327c5760d34fa571a758496900b48456c Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 21 Apr 2021 14:51:10 -0400 Subject: sim: use -Werror when probing for supported warning flags When building with clang, we get: error: unknown warning option '-Wmissing-parameter-type' [-Werror,-Wunknown-warning-option] This is because clang only warns by default when encountering an unknown warning option, and the probe for supported warning flags is done without -Werror. All flags are therefore accepted by configure, but then it breaks when actually compiling a source file with -Werror. This is equivalent to this commit in gdb: 3e019bdc20eb81b91ab5bc774386201b874c0bac gdb: Use -Werror when checking for (un)supported warning flags We then see some other compilation errors when building with clang and -Werror, they can be dealt with later. --- sim/mips/ChangeLog | 4 ++++ sim/mips/configure | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'sim/mips') diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index b5ca7e7..90ca806 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,7 @@ +2021-04-21 Simon Marchi + + * configure: Regenerate. + 2021-04-18 Mike Frysinger * configure: Regenerate. diff --git a/sim/mips/configure b/sim/mips/configure index e0612f7..72e1ee3 100755 --- a/sim/mips/configure +++ b/sim/mips/configure @@ -12057,7 +12057,7 @@ $as_echo_n "checking compiler warning flags... " >&6; } -Werr*) WERROR_CFLAGS=-Werror ;; *) # Check that GCC accepts it saved_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $w" + CFLAGS="$CFLAGS -Werror $w" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -- cgit v1.1