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

Tier 3 target proposal: bare-metal loongarch64 #628

Closed
1 of 3 tasks
heiher opened this issue May 6, 2023 · 5 comments
Closed
1 of 3 tasks

Tier 3 target proposal: bare-metal loongarch64 #628

heiher opened this issue May 6, 2023 · 5 comments
Labels
major-change A proposal to make a major change to rustc major-change-accepted A major change proposal that was accepted T-compiler Add this label so rfcbot knows to poll the compiler team

Comments

@heiher
Copy link

heiher commented May 6, 2023

Proposal

This compiler MCP proposes new targets, loongarch64-unknown-none{-softfloat}, for bare-metal or "freestanding" loongarch64 binaries with no operating system, using ELF as the object format. This target is intended for firmware, kernels, modules, and other software running without an operating system.

Target Tier Policy Acknowledgements

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.)

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.

Target Descriptions
loongarch64-unknown-none LoongArch 64-bit, LP64D ABI (freestanding, hardfloat)
loongarch64-unknown-none-softfloat LoongArch 64-bit, LP64S ABI (freestanding, softfloat)

ISA Docs

Target names should not introduce undue confusion or ambiguity unless absolutely necessary to maintain ecosystem compatibility. For example, if the name of the target makes people extremely likely to form incorrect beliefs about what it targets, the name should be changed or augmented to disambiguate it.

👍

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.

There are no known legal issues or license incompatibilities.

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 discussion

👍

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.

The loongarch64-unknown-none* target will implement core, and will support users using alloc with their own memory allocator. The loongarch64-unknown-none* target will not support std, and will not provide a default memory allocator.

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.

👍

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.

👍

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.

👍

Mentors or Reviewers

r? @wesleywiser

Process

The main points of the Major Change Process are as follows:

  • File an issue describing the proposal.
  • A compiler team member or contributor who is knowledgeable in the area can second by writing @rustbot second.
    • Finding a "second" suffices for internal changes. If however, you are proposing a new public-facing feature, such as a -C flag, then full team check-off is required.
    • Compiler team members can initiate a check-off via @rfcbot fcp merge on either the MCP or the PR.
  • Once an MCP is seconded, the Final Comment Period begins. If no objections are raised after 10 days, the MCP is considered approved.

You can read more about Major Change Proposals on forge.

Comments

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

@heiher heiher added major-change A proposal to make a major change to rustc T-compiler Add this label so rfcbot knows to poll the compiler team labels May 6, 2023
@rustbot
Copy link
Collaborator

rustbot commented May 6, 2023

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

cc @rust-lang/compiler @rust-lang/compiler-contributors

@rustbot
Copy link
Collaborator

rustbot commented May 6, 2023

Error: The feature assign is not enabled in this repository.
To enable it add its section in the triagebot.toml in the root of the repository.

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.

@rustbot rustbot added the to-announce Announce this issue on triage meeting label May 6, 2023
@heiher
Copy link
Author

heiher commented May 8, 2023

Most Rust freestanding/bare-metal targets use just -unknown-none here. Are the names loongarch64-unknown-none and loongarch64-unknown-none-softfloat suggested? or Any ideas are welcome. :)

Target Descriptions
loongarch64-unknown-none LoongArch 64-bit, LP64D ABI (freestanding, hardfloat)
loongarch64-unknown-none-softfloat LoongArch 64-bit, LP64S ABI (freestanding, softfloat)

@wesleywiser
Copy link
Member

@rustbot second

loongarch64-unknown-none and loongarch64-unkown-none-softfloat seem reasonable to me.

@rustbot rustbot added the final-comment-period The FCP has started, most (if not all) team members are in agreement label May 18, 2023
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label May 25, 2023
@apiraino
Copy link
Contributor

apiraino commented Jun 6, 2023

@rustbot label -final-comment-period +major-change-accepted

@apiraino apiraino closed this as completed Jun 6, 2023
@rustbot rustbot added major-change-accepted A major change proposal that was accepted to-announce Announce this issue on triage meeting and removed final-comment-period The FCP has started, most (if not all) team members are in agreement labels Jun 6, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jun 6, 2023
…apkin

Add new Tier-3 targets: `loongarch64-unknown-none*`

This PR adds new Tier-3 targets `loongarch64-unknown-none*` that are introduced by MCP rust-lang/compiler-team#628
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major-change A proposal to make a major change to rustc major-change-accepted A major change proposal that was accepted T-compiler Add this label so rfcbot knows to poll the compiler team
Projects
None yet
Development

No branches or pull requests

4 participants