Proposal: change powerpc64 base CPU

Currently, following targets use “ppc64” as base CPU: powerpc64-unknown-linux-gnu, powerpc64-unknown-linux-musl, powerpc64-unknown-freebsd.

In LLVM, “ppc64” implies “+altivec”. This is unfortunate, because it means Rust targets are unusable on devices based on PowerPC e5500, which is fairly popular. In particular, #43610 is about QorIQ P5040 SoC using PowerPC e5500 core, and #59040 is about QorIQ T1042 SoC using PowerPC e5500 core.

Thoughts?

Can’t you simply disable this target feature with rustc flag -C target-feature=-altivec?

No, because standard library distributed by rustup is compiled with +altivec.

Ah, I guess it’s yet another use case for RFC 2663 then. Meanwhile I think you can work around it by using xargo to recompile std.

In addition to the cpu target rustc sets for LLVM, we may need to consider the C/C++ toolchain – our current configuration defaults to emit code for power4, which I believe still assumes AltiVec.

We could potentially add a new target spec for this too, just as we have many arm/thumb variations. I imagine we would only provide std for this target, not full rustc and cargo, to limit CI budget.

I would like to nominate this issue for the decision by the compiler team, but I don’t know the process. Help appreciated.

File an issue and apply the labels I-nominated and T-compiler. Try to attend their next team meeting if you can, but I don’t know when that is off-hand.

Done. Thanks @cuviper!

The compiler team meets Thursdays at 10am EST on Zulip in the t-compiler channel.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.