Skip to content
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

Promote powerpc64le-unknown-freebsd to Tier 2 #80586

Open
pkubaj opened this issue Jan 1, 2021 · 10 comments
Open

Promote powerpc64le-unknown-freebsd to Tier 2 #80586

pkubaj opened this issue Jan 1, 2021 · 10 comments
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. O-freebsd Operating system: FreeBSD O-PowerPC Target: PowerPC processors T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@pkubaj
Copy link
Contributor

pkubaj commented Jan 1, 2021

We are interested in making powerpc64 (and in the future powerpc64le) Tier 2 in Rust, to make it easier to test nightly builds in our package cluster. What would be necessary to do it?

Some other powerpc* targets (for Linux) are already Tier 2.

@camelid camelid added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. O-PowerPC Target: PowerPC processors C-feature-request Category: A feature request, i.e: not implemented / a PR. labels Jan 1, 2021
@tesuji

This comment has been minimized.

@rustbot rustbot added the T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. label Jan 3, 2021
@pkubaj
Copy link
Contributor Author

pkubaj commented Jan 11, 2021

Our ELFv1 port currently requires external patch to link with non-base compiler (that is non-upstreamable).

However, ELFv2 currently works without any patches (apart from replacing ELFv1 with ELFv2 in compiler/rustc_target/src/abi/call/powerpc64.rs and adding ELFv2 to compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs). Once rust-lang/rfcs#2992 lands, we'll be able to just set ELFv2 in our platform config, so there will be no patching.

Since rust-lang/rfcs#2992 seems to be ready, I expect this issue will soon be fixed. It will be enough if only ELFv2 gets proper support, ELFv1 is long obsolete and we can just patch it on our own until we decide to drop it.

@tesuji
Copy link
Contributor

tesuji commented Jan 11, 2021

cc @pietroalbini or @Mark-Simulacrum as infra team members.

@Mark-Simulacrum
Copy link
Member

I am inclined to wait for rust-lang/rfcs#2803 to get approved before we examine new targets or tier movement for existing targets.

@sanxiyn sanxiyn added the O-freebsd Operating system: FreeBSD label Nov 10, 2021
@sanxiyn
Copy link
Member

sanxiyn commented Nov 10, 2021

Now target tier policy RFC is merged, can we proceed here?

@pkubaj
Copy link
Contributor Author

pkubaj commented Nov 10, 2021

I'm quite unsure how to solve the ABI issue. FreeBSD targets ELFv2 ABI on big-endian, same as e.g. OpenBSD, Void Linux and Adelie Linux (so we're not alone).
We currently use those patches:
https://cgit.freebsd.org/ports/tree/lang/rust/files/powerpc64-elfv2/patch-compiler_rustc__target_src_abi_call_powerpc64.rs
https://cgit.freebsd.org/ports/tree/lang/rust/files/powerpc64-elfv2/patch-compiler_rustc__target_src_spec_powerpc64__unknown__freebsd.rs

FreeBSD will support big-endian POWER and there are no plans to drop it, but given that there's no way to specify ABI and we need to patch Rust, I think it would be nice to switch to PR to refer powerpc64le-unknown-freebsd target.
In POWER world, little-endian is generally considered the future and, while the newer CPUs support big-endian as well, most people nowadays run little-endian.

Is that reasonable?

@pkubaj pkubaj changed the title Promote powerpc64-unknown-freebsd to Tier 2 Promote powerpc64le-unknown-freebsd to Tier 2 Nov 23, 2021
@workingjubilee
Copy link
Contributor

Is #80970 inappropriate for specifying/conditionalizing on ABI?

@pkubaj
Copy link
Contributor Author

pkubaj commented Jul 22, 2023

It's not really necessary. powerpc64le-unknown-freebsd supports only ELFv2, so it will be appriopriate to just hardcode the ABI. On the other hand, powerpc64-unknown-freebsd supports both ELFv1 and ELFv2, so specifying ABI would be helpful, but ELFv1 is just FreeBSD 12.4-RELEASE (of the supported versions) and that one will be supported just until the end of year. We removed support for Rust on ELFv1 in FreeBSD ports anyway and the users are advised to migrate to at least 13.x (which is ELFv2). I believe it will be fine to just hardcode ELFv2 as well at this point.

@workingjubilee
Copy link
Contributor

workingjubilee commented Jul 23, 2023

Oh. In that case, because these are tier 3 targets currently and thus much more subject to change, and because the goal would be to demand ELFv2 anyways, I believe that it would be more appropriate to simply change things as-necessary to enforce that they use ELFv2 before elevating anything to tier 2.

It's fine if, in doing this, two FreeBSD targets would demand different FreeBSD OS version minimums, at your preference. We don't demand that sort of consistency.

Otherwise, please refer to the target tier policy.

@pkubaj
Copy link
Contributor Author

pkubaj commented Aug 24, 2023

It looks like we (in FreeBSD) already have no powerpc64* patches, so it should probably be possible to build Rust in the CI without any changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. O-freebsd Operating system: FreeBSD O-PowerPC Target: PowerPC processors T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

7 participants