RISC-V: Re-enable GCC+Rust builds
Asuna
spriteovo at gmail.com
Mon Sep 1 10:19:42 PDT 2025
> For example, there's a check in the riscv Kconfig menu to see if
> stack-protector-guard=tls can be used via a cc-option check. If that
> check passes with gcc as the compiler that option will be passed to
> the rust side of the build, where llvm might not support it.
If I understand correctly, the `-mstack-protector-guard` option is
already always filtered out by `bindgen_skip_c_flags` in
`rust/Makefile`, regardless of architecture. Therefore, we don't need to
do anything more, right?
> Similarly, turning on an extension like Zacas via a cc-option check
> could pass for gcc but not be usable when passed to the rust side,
> causing errors.
That makes sense. I might need to check the version of libclang for each
extension that passes the cc-option check for GCC to ensure it supports
them.
> These sorts of things should be prevented via Kconfig, not show up as
> confusing build errors.
I'm working on a patch, and intend to output an error message in
`arch/riscv/Makefile` then exit 1 when detecting an incompatible
gcc+libclang mix in use.
More information about the linux-riscv
mailing list