sim: use -Werror when probing for supported warning flags
authorSimon Marchi <simon.marchi@polymtl.ca>
Wed, 21 Apr 2021 18:51:10 +0000 (14:51 -0400)
committerMike Frysinger <vapier@gentoo.org>
Wed, 21 Apr 2021 23:48:35 +0000 (19:48 -0400)
commit1f195bc327c5760d34fa571a758496900b48456c
tree8a000c68cc54838a3e959297dce971827735e08e
parent7e7a35fbca94c5bfe45781067c75671ba508a0c8
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.
64 files changed:
sim/ChangeLog
sim/aarch64/ChangeLog
sim/aarch64/configure
sim/arm/ChangeLog
sim/arm/configure
sim/avr/ChangeLog
sim/avr/configure
sim/bfin/ChangeLog
sim/bfin/configure
sim/bpf/ChangeLog
sim/bpf/configure
sim/cr16/ChangeLog
sim/cr16/configure
sim/cris/ChangeLog
sim/cris/configure
sim/d10v/ChangeLog
sim/d10v/configure
sim/erc32/ChangeLog
sim/erc32/configure
sim/example-synacor/ChangeLog
sim/example-synacor/configure
sim/frv/ChangeLog
sim/frv/configure
sim/ft32/ChangeLog
sim/ft32/configure
sim/h8300/ChangeLog
sim/h8300/configure
sim/iq2000/ChangeLog
sim/iq2000/configure
sim/lm32/ChangeLog
sim/lm32/configure
sim/m32c/ChangeLog
sim/m32c/configure
sim/m32r/ChangeLog
sim/m32r/configure
sim/m4/sim_ac_option_warnings.m4
sim/m68hc11/ChangeLog
sim/m68hc11/configure
sim/mcore/ChangeLog
sim/mcore/configure
sim/microblaze/ChangeLog
sim/microblaze/configure
sim/mips/ChangeLog
sim/mips/configure
sim/mn10300/ChangeLog
sim/mn10300/configure
sim/moxie/ChangeLog
sim/moxie/configure
sim/msp430/ChangeLog
sim/msp430/configure
sim/or1k/ChangeLog
sim/or1k/configure
sim/pru/ChangeLog
sim/pru/configure
sim/riscv/ChangeLog
sim/riscv/configure
sim/rl78/ChangeLog
sim/rl78/configure
sim/rx/ChangeLog
sim/rx/configure
sim/sh/ChangeLog
sim/sh/configure
sim/v850/ChangeLog
sim/v850/configure