[PATCH v4 0/4] RISC-V: re-enable gcc + rust builds

Asuna Yang spriteovo at gmail.com
Sun Nov 23 16:23:20 PST 2025


Previous v3 patch:
https://lore.kernel.org/linux-riscv/20250914-gcc-rust-v3-v3-1-34d4d5864144@gmail.com/T/#u

v3 checks option availability via libclang's version. According to
Vivian's suggestion, v4 checks option availability by directly running
bindgen.

Compared to v3, commits are split into finer granularity, as suggested
by Miguel and Vivian. Regarding checking for undefined for
`BINDGEN_TARGET`, I've placed it in a separate commit. Since it's really
small, I think it's not really necessary to send it as a new patch
email.

Regarding Vivian's mention of riscv32 support, the documentation does
not declare riscv32 is maintained, and I have limited experience with
riscv32 and no strong motivation to test it. Therefore, this patch
didn't consider riscv32.

Signed-off-by: Asuna Yang <SpriteOvO at gmail.com>
---
Asuna Yang (4):
      rust: export BINDGEN_TARGET from a separate Makefile
      rust: generate a fatal error if BINDGEN_TARGET is undefined
      rust: add a Kconfig function to test for support of bindgen options
      RISC-V: fix gcc + rust builds

 Documentation/rust/arch-support.rst |  2 +-
 Makefile                            |  2 ++
 arch/riscv/Kconfig                  | 35 ++++++++++++++++++++++++++++++++++-
 rust/Makefile                       | 11 ++---------
 scripts/Kconfig.include             |  5 +++++
 scripts/Makefile.rust               | 14 ++++++++++++++
 6 files changed, 58 insertions(+), 11 deletions(-)
---
base-commit: f824272b6e3fe24950abc527136e8140f67b0b23
change-id: 20251124-gcc-rust-v4-1584dec7e5df

Best regards,
-- 
Asuna Yang <SpriteOvO at gmail.com>




More information about the linux-riscv mailing list