-
Notifications
You must be signed in to change notification settings - Fork 1k
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 mips32r6 and mips64r6 target_arch detection #3268
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon. 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 (
|
Some changes occurred in OpenBSD module cc @semarie |
I think the modification of |
Changes reverted |
thanks |
Commits of this PR have been changed to only affect GNU/Linux. |
I'm going to r+ once MCP passes. |
It just passed. |
what's happening to the freebsd CI here? |
@bors r+ |
☀️ Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14 |
add mips64r6 and mips32r6 as target_arch values This PR introduces `"mips32r6"` and `"mips64r6"` as valid `target_arch` values, and would be the arch value used by Tier-3 targets `mipsisa32r6-unknown-linux-gnu`, `mipsisa32r6el-unknown-linux-gnu`, `mipsisa64r6-unknown-linux-gnuabi64` and `mipsisa64r6el-unknown-linux-gnuabi64`. This PR was inspired by `rustix` attempting to link traditional mips64el objects with mips64r6el objects when building for mips64r6, even though `rustix` recently removed outline assembly support. This is because currently this target's `target_arch` is `"mips64"` and rustix has its respective assembly implementation as well as a pre-compiled little-endian static library prepared for mips64el, a tier-2 target with the same `target_arch`. After some [discussions on zulip](https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Add.20New.20Values.20To.20MIPS_ALLOWED_FEATURES.20compiler-team.23595), I decided to treat mips64r6 as an independent architecture from Rust's POV, since these two architectures are incompatible anyway. This PR is now waiting for `libc` to release a new version with [support](rust-lang/libc#3268) for these `target_arch` values. It is not expected to introduce changes to any other target, especially Tier-1 and Tier-2 targets. This PR has its corresponding [MCP](rust-lang/compiler-team#632) approved.
add mips64r6 and mips32r6 as target_arch values This PR introduces `"mips32r6"` and `"mips64r6"` as valid `target_arch` values, and would be the arch value used by Tier-3 targets `mipsisa32r6-unknown-linux-gnu`, `mipsisa32r6el-unknown-linux-gnu`, `mipsisa64r6-unknown-linux-gnuabi64` and `mipsisa64r6el-unknown-linux-gnuabi64`. This PR was inspired by `rustix` attempting to link traditional mips64el objects with mips64r6el objects when building for mips64r6, even though `rustix` recently removed outline assembly support. This is because currently this target's `target_arch` is `"mips64"` and rustix has its respective assembly implementation as well as a pre-compiled little-endian static library prepared for mips64el, a tier-2 target with the same `target_arch`. After some [discussions on zulip](https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Add.20New.20Values.20To.20MIPS_ALLOWED_FEATURES.20compiler-team.23595), I decided to treat mips64r6 as an independent architecture from Rust's POV, since these two architectures are incompatible anyway. This PR is now waiting for `libc` to release a new version with [support](rust-lang/libc#3268) for these `target_arch` values. It is not expected to introduce changes to any other target, especially Tier-1 and Tier-2 targets. This PR has its corresponding [MCP](rust-lang/compiler-team#632) approved.
This PR introduces
"mips32r6"
and"mips64r6"
as validtarget_arch
values, and would be the arch values used by Tier-3 targetsmipsisa32r6-unknown-linux-gnu
,mipsisa32r6el-unknown-linux-gnu
,mipsisa64r6-unknown-linux-gnuabi64
andmipsisa64r6el-unknown-linux-gnuabi64
.This PR is made for rust-lang/rust#112374.
This PR has a corresponding MCP waiting for review.
mips64r6 has the same ABIs, syscall conventions, and various magic numbers as mips64 does. So this PR just adds mips64r6 to all mips64 detection macros. Similarly, mips32r6 share their ABIs, syscall conventions and various magic with mips, so the PR just adds mips32r6 to where mips is to be detected.