News: 0001652597

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Rust For Linux 7.3 Begins Seeing Fixes To Prepare For Rust's GCC Backend

([Linux Kernel] 3 Hours Ago rustc_codegen_gcc)


In addition to the [1]POWER/PowerPC code adding Rust kernel support , the main set of Rust programming language updates for the Linux 7.3 kernel have now been submitted. Most notable are early fixes toward eventually allowing the experimental Rust GCC back-end to be used as an alternative to the official rustc compiler with LLVM code generation.

In addition to " a bunch of fixes " in general for the Rust Linux kernel code, the Linux 7.3 pull also includes the initial round of fixes for using Rust's GCC "rustc_codegen_gcc" back-end. That Rust GCC work remains ongoing and still very experimental but at least fixes to the Linux kernel are beginning to land in preparing for that eventual stage of supporting the GCC back-end for being able to compile the Rust kernel code. This includes various build error fixes such as due to ambiguity over the rustc-dev component.

The motivation of the development is using GCC code generation by rustc for architectures not supported by LLVM but are supported by GCC. There are a number of CPU architectures supported by the Linux kernel and GCC but not supported by LLVM like m68k, Alpha, and other embedded/micro-controller ISAs.. This also allows employing GCC's compiler optimizations. The latest rustc_codegen_gcc code can be found via [2]rustc_codegen_gcc on GitHub . This isn't to be confused with gccrs as the GCC front-end for Rust.

The Rust updates for this next kernel version also include other toolchain and infrastructure updates like fixing future Clang warnings. Plus updates to the various Rust modules used within the kernel. The full list of Rust changes for Linux 7.3 can be found via [3]this pull request .



[1] https://www.phoronix.com/news/Linux-7.3-PowerPC-Rust

[2] https://github.com/rust-lang/rustc_codegen_gcc

[3] https://lore.kernel.org/rust-for-linux/20260816191926.230123-1-ojeda@kernel.org/



* Endy needs to consult coffee :P
<Endy> coffee the bot person, not coffee the beverage :)
<knghtbrd> consulting the beverage may help too =>