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

Add powerpc-unknown-linux-muslspe compile target #127905

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

BKPepe
Copy link
Contributor

@BKPepe BKPepe commented Jul 18, 2024

This is almost identical to already existing targets:

  • powerpc_unknown_linux_musl.rs
  • powerpc_unknown_linux_gnuspe.rs

It has support for PowerPC SPE (muslspe), which
can be used with GCC version up to 8. It is useful for Freescale or IBM cores like e500.

This was verified to be working with OpenWrt build system for CZ.NIC's Turris 1.x routers, which are using Freescale P2020, e500v2, so add it as a Tier 3 target.

Follow-up of #100860

@rustbot
Copy link
Collaborator

rustbot commented Jul 18, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @GuillaumeGomez (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 18, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jul 18, 2024

Some changes occurred in src/doc/rustc/src/platform-support

cc @Nilstrieb

These commits modify compiler targets.
(See the Target Tier Policy.)

@rust-log-analyzer

This comment has been minimized.

@BKPepe
Copy link
Contributor Author

BKPepe commented Jul 18, 2024

A tier 3 target must have a designated developer or developers (the "target maintainers") on record to be CCed when issues arise regarding the target. (The mechanism to track and CC such developers may evolve over time.)

@BKPepe

Targets must use naming consistent with any existing targets; for instance, a target for the same CPU or OS as an existing Rust target should use the same name for that CPU or OS. Targets should normally use the same names and naming conventions as used elsewhere in the broader ecosystem beyond Rust (such as in other toolchains), unless they have a very good reason to diverge. Changing the name of a target can be highly disruptive, especially once the target reaches a higher tier, so getting the name right is important even for a tier 3 target.

I have not change the name of the target, I created in similar way muslspe as it is done for gnuspe, so it is consistent with any other existing targets.

Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous legal terms for the Rust project or for Rust developers or users.

Yep, that's correct.

Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party. If any member of an approving Rust team serves as one of the maintainers of a target, or has any legal or employment requirement (explicit or implicit) that might affect their decisions regarding a target, they must recuse themselves from any approval decisions regarding the target's tier status, though they may otherwise participate in discussions.

Agreed

Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate (core for most targets, alloc for targets that can support dynamic memory allocation, std for targets with an operating system or equivalent layer of system-provided functionality), but may leave some code unimplemented (either unavailable or stubbed out as appropriate), whether because the target makes it impossible to implement or challenging to implement. The authors of pull requests are not obligated to avoid calling any portions of the standard library on the basis of a tier 3 target not implementing those portions.

Support for this target should be identical to the existing powerpc support such as:

  • powerpc-unknown-linux-gnu/spe
  • powerpc-unknown-linux-musl

The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible. If the target supports running binaries, or running tests (even if they do not pass), the documentation must explain how to run such binaries or tests for the target, using emulation if possible or dedicated hardware if necessary.

My use-case is to compile rust for Turris 1.x routers, which runs OpenWrt as explained in platform documentation support.

Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target. In particular, do not post comments (automated or manual) on a PR that derail or suggest a block on the PR based on a tier 3 target. Do not send automated messages or notifications (via any medium, including via @) to a PR author or others involved with a PR regarding a tier 3 target, unless they have opted into such messages.

Agreed

Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target.

Agreed

Tier 3 targets must be able to produce assembly using at least one of rustc's supported backends from any host target.

It does.

@tgross35
Copy link
Contributor

Cc @wesleywiser who did an initial review in #100860

@GuillaumeGomez
Copy link
Member

r? wesleywiser

@rust-log-analyzer

This comment has been minimized.

@workingjubilee
Copy link
Member

tidy error: tests/assembly/targets/: missing assembly test for powerpc_unknown_linux_muslspe

@BKPepe
Copy link
Contributor Author

BKPepe commented Jul 18, 2024

Yeah, I see that. Will look into it.

@BKPepe
Copy link
Contributor Author

BKPepe commented Jul 18, 2024

It should be fixed now.

This is almost identical to already existing targets:
- powerpc_unknown_linux_musl.rs
- powerpc_unknown_linux_gnuspe.rs

It has support for PowerPC SPE (muslspe), which
can be used with GCC version up to 8. It is useful for Freescale or IBM
cores like e500.

This was verified to be working with OpenWrt build system for CZ.NIC's
Turris 1.x routers, which are using Freescale P2020, e500v2, so add it as
a Tier 3 target.
@wesleywiser
Copy link
Member

Thanks @BKPepe!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 14, 2024

📌 Commit 89f3064 has been approved by wesleywiser

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 14, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 14, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#125970 (CommandExt::before_exec: deprecate safety in edition 2024)
 - rust-lang#127905 (Add powerpc-unknown-linux-muslspe compile target)
 - rust-lang#128925 (derive(SmartPointer): register helper attributes)
 - rust-lang#128946 (Hash Ipv*Addr as an integer)
 - rust-lang#128963 (Add possibility to generate rustdoc JSON output to stdout)
 - rust-lang#129015 (Update books)
 - rust-lang#129067 (Use `append` instead of `extend(drain(..))`)
 - rust-lang#129100 (Fix dependencies cron job)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 15, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#125970 (CommandExt::before_exec: deprecate safety in edition 2024)
 - rust-lang#127905 (Add powerpc-unknown-linux-muslspe compile target)
 - rust-lang#128925 (derive(SmartPointer): register helper attributes)
 - rust-lang#128946 (Hash Ipv*Addr as an integer)
 - rust-lang#128963 (Add possibility to generate rustdoc JSON output to stdout)
 - rust-lang#129015 (Update books)
 - rust-lang#129067 (Use `append` instead of `extend(drain(..))`)
 - rust-lang#129100 (Fix dependencies cron job)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 442ba18 into rust-lang:master Aug 15, 2024
6 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 15, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 15, 2024
Rollup merge of rust-lang#127905 - BKPepe:powerpc-muslspe, r=wesleywiser

Add powerpc-unknown-linux-muslspe compile target

This is almost identical to already existing targets:
- powerpc_unknown_linux_musl.rs
- powerpc_unknown_linux_gnuspe.rs

It has support for PowerPC SPE (muslspe), which
can be used with GCC version up to 8. It is useful for Freescale or IBM cores like e500.

This was verified to be working with OpenWrt build system for CZ.NIC's Turris 1.x routers, which are using Freescale P2020, e500v2, so add it as a Tier 3 target.

Follow-up of rust-lang#100860
admin-turris pushed a commit to turris-cz/os-build that referenced this pull request Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants