-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Add powerpc64-unknown-linux-gnuelfv2 target #144220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add powerpc64-unknown-linux-gnuelfv2 target #144220
Conversation
These commits modify compiler targets. Some changes occurred in src/doc/rustc/src/platform-support cc @Noratrieb |
This comment has been minimized.
This comment has been minimized.
Interesting, seems like a usecase like this one in particular is currently not intended, see here. The explicitly set ABI is processed in EDIT: This is an LLVM bug, it doesn't reset the data layout when the ABI is explicitly set, while it does on ARM |
LLVM side of the problem should hopefully get fixed by llvm/llvm-project#149725, |
255b058
to
755a1c9
Compare
|
755a1c9
to
ae5d567
Compare
This comment has been minimized.
This comment has been minimized.
This is virtually the same target as the existing -gnu target, but using the ELFv2 ABI instead of the ELFv1 ABI and made possible now that we expose target_abi = "elfv1" or "elfv2" on the 64-bit PowerPC targets. Signed-off-by: Jens Reidel <[email protected]>
Signed-off-by: Jens Reidel <[email protected]>
ae5d567
to
d7200f0
Compare
The job Click to see the possible cause of the failure (guessed by this bot)
|
url = https://github.com/Gelbpunkt/llvm-project.git | ||
branch = rust-ppc64-gnu-elfv2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remark: this is fine for experimenting, but we can't land it in master
with a fork. (I assume this is blocked on the upstream LLVM fix?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's blocked on the fix, but I'm not sure what to do afterwards. I guess it could be included in the Rust LLVM fork, but it still won't be included in some of the builders that use the old system LLVM. Those will fail CI like the aarch64-gnu-llvm-19-1
job above
@rustbot author |
Reminder, once the PR becomes ready for a review, use |
This is virtually the same target as the existing -gnu target, but using the ELFv2 ABI instead of the ELFv1 ABI and made possible now that we expose target_abi = "elfv1" or "elfv2" on the 64-bit PowerPC targets.
The ELFv2 ABI is the preferred ABI for powerpc64 when compatibility with ELFv1 is not required and therefore used by e.g. distributions that were bootstrapped after the introduction of ELFv2.
Copying the target tier policy:
That would be me.
This is an interesting one, because I'm not aware of any toolchain that has a target triple for ppc64 + glibc + ELFv2, even though it is a totally valid combination and actively in used by some distributions. Clang and GCC both simply use
-target powerpc64-unknown-linux-gnu -mabi=elfv2
to my knowledge (and cross-toolchains should be using--with-abi=elfv2
when configuring GCC). However, the chosen name should be somewhat in line with the other existing targets with special ABIs. Renamingpowerpc64-unknown-linux-gnu
topowerpc64-unknown-linux-gnuelfv1
at the same time to avoid ambiguity would've been an interesting idea, but it'd be a breaking change to a tier 2 target.This target isn't any different than the ELFv1 target in this regard.
Nothing to comment on here on my end.
This target implements the entire standard library.
Documentation can be found in the markdown document added by this PR.
Roger that :)
This PR doesn't touch any other targets.
The LLVM backend works.
r? compiler