Merge patch series "RISC-V: Fix CONFIG_AS_HAS_OPTION_ARCH with tip of tree LLVM"
authorPalmer Dabbelt <palmer@rivosinc.com>
Sat, 17 Feb 2024 00:07:10 +0000 (16:07 -0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 21 Feb 2024 23:07:41 +0000 (15:07 -0800)
commit58506612bf023f03ab73a7237c09e1618b66b399
tree338c77bea61d8fc01e690f52f025694940d97c93
parent3951f6add519a8e954bf78691a412f65b24f4715
parent3aff0c459e77ac0fb1c4d6884433467f797f7357
Merge patch series "RISC-V: Fix CONFIG_AS_HAS_OPTION_ARCH with tip of tree LLVM"

Nathan Chancellor <nathan@kernel.org> says:

Eric reported that builds of LLVM with [1] (close to tip of tree) have
CONFIG_AS_HAS_OPTION_ARCH=n because the test for expected failure on
invalid input has started succeeding.

This Kconfig test was added because '.option arch' only causes an
assembler warning when it is unsupported, rather than a hard error,
which is what users of as-instr expect when something is unsupported.

This can be resolved by turning assembler warnings into errors with
'-Wa,--fatal-warnings' like we do with the compiler with '-Werror',
which is what the first patch does. The second patch removes the invalid
test, as the valid test is good enough with fatal warnings.

I have diffed several configurations for the different architectures
that use as-instr and I have found no issues.

[1]: https://github.com/llvm/llvm-project/commit/3ac9fe69f70a2b3541266daedbaaa7dc9c007a2a

* b4-shazam-merge:
  RISC-V: Drop invalid test from CONFIG_AS_HAS_OPTION_ARCH
  kbuild: Add -Wa,--fatal-warnings to as-instr invocation

Link: https://lore.kernel.org/r/20240125-fix-riscv-option-arch-llvm-18-v1-0-390ac9cc3cd0@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>