Skip to content
Commit 8db4f87f authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Greg Kroah-Hartman
Browse files

kbuild: Add -Wa,--fatal-warnings to as-instr invocation



commit 0ee695a4 upstream.

Certain assembler instruction tests may only induce warnings from the
assembler on an unsupported instruction or option, which causes as-instr
to succeed when it was expected to fail. Some tests workaround this
limitation by additionally testing that invalid input fails as expected.
However, this is fragile if the assembler is changed to accept the
invalid input, as it will cause the instruction/option to be unavailable
like it was unsupported even when it is.

Use '-Wa,--fatal-warnings' in the as-instr macro to turn these warnings
into hard errors, which avoids this fragility and makes tests more
robust and well formed.

Cc: stable@vger.kernel.org
Suggested-by: default avatarEric Biggers <ebiggers@kernel.org>
Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
Tested-by: default avatarEric Biggers <ebiggers@google.com>
Tested-by: default avatarAndy Chiu <andybnac@gmail.com>
Reviewed-by: default avatarAndy Chiu <andybnac@gmail.com>
Tested-by: default avatarConor Dooley <conor.dooley@microchip.com>
Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
Acked-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20240125-fix-riscv-option-arch-llvm-18-v1-1-390ac9cc3cd0@kernel.org


Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9537603a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment