Re: [PATCH V6 2/3] rust: Add PowerPC support

From: Alice Ryhl

Date: Sun Feb 22 2026 - 13:10:08 EST


On Tue, Feb 10, 2026 at 10:00 AM Mukesh Kumar Chaurasiya (IBM)
<mkchauras@xxxxxxxxx> wrote:
>
> From: Link Mauve <linkmauve@xxxxxxxxxxxx>
>
> For now only Big Endian 32-bit PowerPC is supported, as that is the only
> hardware I have. This has been tested on the Nintendo Wii so far, but I
> plan on also using it on the GameCube, Wii U and Apple G4.
>
> These changes aren’t the only ones required to get the kernel to compile
> and link on PowerPC, libcore will also have to be changed to not use
> integer division to format u64, u128 and core::time::Duration, otherwise
> __udivdi3() and __umoddi3() will have to be added. I have tested this
> change by replacing the three implementations with unimplemented!() and
> it linked just fine.
>
> Signed-off-by: Link Mauve <linkmauve@xxxxxxxxxxxx>
> Signed-off-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@xxxxxxxxx>

> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index a58b1029592c..9fd82c75dcbd 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -61,6 +61,8 @@ else
> KBUILD_LDFLAGS_MODULE += $(objtree)/arch/powerpc/lib/crtsavres.o
> endif
>
> +KBUILD_RUSTFLAGS += --target=powerpc-unknown-linux-gnu

This needs to be a softfloat target.

Alice