Proposal: change powerpc64 base CPU

#1

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?

0 Likes

#2

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

0 Likes

#3

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

0 Likes

#4

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.

0 Likes

#5

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.

0 Likes

#6

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

0 Likes

#7

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.

0 Likes

#8

Done. Thanks @cuviper!

0 Likes

#9

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

0 Likes