Re: [PATCH v3] RISC-V: re-enable gcc + rust builds
From: Conor Dooley
Date: Tue Sep 16 2025 - 13:21:54 EST
On Sun, Sep 14, 2025 at 03:16:40PM +0800, Asuna Yang wrote:
> +config TOOLCHAIN_MATCHES_ZICSR_ZIFENCEI
> + def_bool y
> + # https://github.com/llvm/llvm-project/commit/22e199e6afb1263c943c0c0d4498694e15bf8a16
> + depends on TOOLCHAIN_NEEDS_OLD_ISA_SPEC || !TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI || RUST_BINDGEN_LIBCLANG_VERSION >= 170000
> + help
> + LLVM/Clang >= 17.0.0 starts recognizing Zicsr/Zifencei in -march, passing
> + them to -march doesn't generate an error anymore, and passing them or not
> + doesn't have any real difference, it still follows ISA before version
> + 20190608 - Zicsr/Zifencei are included in base ISA.
> +
> + The current latest version of LLVM/Clang still does not require explicit
> + Zicsr/Zifencei to enable these two extensions, Clang just accepts them in
> + -march and then silently ignores them.
I still don't really like the name of this option, but I don't really
have any good suggestions for what to call this.
Reviewed-by: Conor Dooley <conor.dooley@xxxxxxxxxxxxx>
Cheers,
Conor.
Attachment:
signature.asc
Description: PGP signature