Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
riscv: fix detection of toolchain Zicbom support
It is not sufficient to check if a toolchain supports a particular extension without checking if the linker, assembler etc support that extension too. For example, Clang 15 supports Zicbom but GNU bintutils 2.35.2 does not, leading build errors like so: riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_c2p0_zicbom1p0_zihintpause2p0: Invalid or unknown z ISA extension: 'zicbom' Convert CC_HAS_ZICBOM to TOOLCHAIN_HAS_ZICBOM & check if each of the compiler, assembler and linker support Zicbom. Reported-by: Kevin Hilman <khilman@baylibre.com> Link: ClangBuiltLinux#1714 Link: https://storage.kernelci.org/next/master/next-20220920/riscv/defconfig+CONFIG_EFI=n/clang-16/logs/kernel.log Fixes: 1631ba1 ("riscv: Add support for non-coherent devices using zicbom extension") Signed-off-by: Conor Dooley <conor.dooley@microchip.com> --- The other extensions with toolchain impact need this too, certainly Zihintpause does & possibly Zicsr/Zifencei?
- Loading branch information