Re: [PATCH V16 4/7] rust/powerpc: Set min rustc version for powerpc
flat view
From: Mukesh Kumar Chaurasiya <hidden>
Date: 2026-06-26 06:50:37
Also in:
lkml, llvm, rust-for-linux
On Tue, May 26, 2026 at 02:22:49PM +0530, Mukesh Kumar Chaurasiya wrote:
On Mon, May 25, 2026 at 08:16:53PM +0200, Miguel Ojeda wrote:quoted
On Wed, May 20, 2026 at 8:48 AM Mukesh Kumar Chaurasiya (IBM) [off-list ref] wrote:quoted
Minimum `rustc` version required for powerpc is 1.95 as some critical features required for compiling rust code for kernel are not there.Which critical features?Hey Miguel, Right now i can only think of inline asm. I can rerun the whole thing with 1.85 and figure out the issues with 1.85. I'll get back on this.quoted
quoted
For example Stable inline asm support which got merged in 1.95.It is not needed that the support is stable, but rather that everything you may need works.I wanted inline asm be stable, I was skeptical about inline asm to be unstable and potentially messing up the whole system. That's the reason I waited for the stable support to get merged before sending out this patch series.quoted
From a quick test (with a dummy example that may not be representative), ppc64 inline assembly seems to work for a long time, way before Rust 1.95. So, which is the actual version that it is needed? i.e. 1.95.0 doesn't seem to be required at least due to that.Yeah it may be true. I'll test out the 1.85 rustc and come back with the results.quoted
That is why I am asking about the critical features above, because it may be that this works since earlier versions. (I wonder if this patch and s390's similar one influenced each other?)I am not aware of s390x way of approaching support for rust so can't say anything about that.quoted
Thanks! Cheers, MiguelRegards, Mukesh
Hey Miguel, Sorry about delayed response on this. I ran it with rustc 1.85.1. CONFIG_RUSTC_VERSION_TEXT="rustc 1.85.1 (4eb161250 2025-03-15)" I got a linker error with this. ld.lld: error: undefined symbol: __subsf3
quoted
quoted
referenced by core.7dc3da321ed68c1f-cgu.0 rust/core.o:(<core::core_arch::powerpc::altivec::vector_float as core::ops::arith::Neg>::neg) in archive vmlinux.a referenced by core.7dc3da321ed68c1f-cgu.0 rust/core.o:(<core::core_arch::powerpc::altivec::vector_float as core::ops::arith::Neg>::neg) in archive vmlinux.a referenced by core.7dc3da321ed68c1f-cgu.0 rust/core.o:(<core::core_arch::powerpc::altivec::vector_float as core::ops::arith::Neg>::neg) in archive vmlinux.a referenced 1 more times
make[2]: *** [scripts/Makefile.vmlinux:72: vmlinux.unstripped] Error 1 make[1]: *** [/home/mkchauras/src/linux/Makefile:1367: vmlinux] Error 2 make: *** [Makefile:248: __sub-make] Error 2 This corresponds to a floating point instruction. Although we have disabled fpu, vsx and altivec we are still generating these. Seems like we have some issue with the rustc here. I didn't dive deeper into this. Is it ok if we keep 1.95 as base for powerpc64le? Regards, Mukesh