Re: [PATCH V17 0/7] Rust Support for powerpc
Link Mauve <[email protected]> Tue, 4 Aug 2026 22:39:27 +0200
| Newsgroups | gmane.linux.ports.ppc.embedded |
|---|---|
| Message-ID | <anJN_3eAlTqxqfnI__25963.0573842273$1785875987$gmane$org@desktop> |
Hi, On Tue, Aug 04, 2026 at 01:22:17PM -0700, Nathan Chancellor wrote: > On Tue, Aug 04, 2026 at 12:11:57PM +0200, Link Mauve wrote: > > Hi, > > […] > > > > I just tested those again in linux-next, with the Wii support series on > > top, but now the kernel fails to build due to ARCH_WARN_ASM and > > ARCH_WARN_REACHABLE not being defined on PowerPC: > > I also see the following warnings (in addition to that error): > > warning: unknown and unstable feature specified for `-Ctarget-feature`: `mma` > | > = note: it is still passed through to the codegen backend, but use of this feature might be unsound and the behavior of this feature can change in the future > = help: consider filing a feature request > > warning: unstable feature specified for `-Ctarget-feature`: `vsx` > | > = note: this feature is not stably supported; its behavior can change in the future > > warning: unknown and unstable feature specified for `-Ctarget-feature`: `hard-float` > | > = note: it is still passed through to the codegen backend, but use of this feature might be unsound and the behavior of this feature can change in the future > = help: consider filing a feature request > > warning: unstable feature specified for `-Ctarget-feature`: `altivec` > | > = note: this feature is not stably supported; its behavior can change in the future Those four are explicitly disabled in arch/powerpc/Makefile, but only for CONFIG_PPC64, not for CONFIG_PPC… Maybe they should, I’ve only tested 32-bit on the Wii which has no altivec or vsx, but has hard floats, and I’m not sure about mma. Could you test this patch on your platform? I’ll submit it properly if it does fix those four warnings: ``` diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 9385db478c59..8fba9310acfa 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -63,10 +63,10 @@ endif ifdef CONFIG_PPC64 KBUILD_RUSTFLAGS += --target=powerpc64le-unknown-linux-gnu -KBUILD_RUSTFLAGS += -Ctarget-feature=-mma,-vsx,-hard-float,-altivec else KBUILD_RUSTFLAGS += --target=powerpc-unknown-linux-gnu endif +KBUILD_RUSTFLAGS += -Ctarget-feature=-mma,-vsx,-hard-float,-altivec ifdef CONFIG_CPU_LITTLE_ENDIAN KBUILD_CPPFLAGS += -mlittle-endian ``` > > clang diag: arch/powerpc/include/uapi/asm/ioctl.h:5:9: warning: '_IOC_SIZEBITS' macro redefined [-Wmacro-redefined] > clang diag: arch/powerpc/include/uapi/asm/ioctl.h:6:9: warning: '_IOC_DIRBITS' macro redefined [-Wmacro-redefined] > clang diag: arch/powerpc/include/uapi/asm/ioctl.h:8:9: warning: '_IOC_NONE' macro redefined [-Wmacro-redefined] > clang diag: arch/powerpc/include/uapi/asm/ioctl.h:10:9: warning: '_IOC_WRITE' macro redefined [-Wmacro-redefined] > warning: 4 warnings emitted I have no idea about those. > > when building this series in next-20260804 with rustc 1.97.1. I am not > sure where the clang diagnostic warnings come from. I assume the target > feature warnings are expected but it would be good to get those > addressed sooner rather than later. I see '-hard-float' has an issue > open > > https://github.com/rust-lang/rust/issues/117347 In the kernel we want to disallow all floats, unless there is a very specific and cibled usecase. This issue is about enabling them. And no, warnings are never expected, you just tested on a platform neither of us tested until now. :) > > but I don't think I see issues open for the other ones. > > -- > Cheers, > Nathan -- Link Mauve