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 mips32r6 and mips64r6 target_arch detection #3268

Merged
merged 2 commits into from Jul 10, 2023
Merged

Conversation

chenx97
Copy link
Contributor

@chenx97 chenx97 commented Jun 7, 2023

This PR introduces "mips32r6" and "mips64r6" as valid target_arch values, and would be the arch values used by Tier-3 targets mipsisa32r6-unknown-linux-gnu, mipsisa32r6el-unknown-linux-gnu, mipsisa64r6-unknown-linux-gnuabi64 and mipsisa64r6el-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.

@rustbot
Copy link
Collaborator

rustbot commented Jun 7, 2023

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 (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
Copy link
Collaborator

rustbot commented Jun 7, 2023

Some changes occurred in OpenBSD module

cc @semarie

@semarie
Copy link
Contributor

semarie commented Jun 7, 2023

I think the modification of src/unix/bsd/netbsdlike/openbsd/mod.rs isn't expected. It is modifying an OpenBSD part and not a Linux part. It shouldn't break anything, but it would be confusing.

@chenx97
Copy link
Contributor Author

chenx97 commented Jun 7, 2023

I think the modification of src/unix/bsd/netbsdlike/openbsd/mod.rs isn't expected. It is modifying an OpenBSD part and not a Linux part. It shouldn't break anything, but it would be confusing.

Changes reverted

@semarie
Copy link
Contributor

semarie commented Jun 7, 2023

thanks

@chenx97 chenx97 changed the title add mips64r6 target_arch detection add mips32r6 and mips64r6 target_arch detection Jun 25, 2023
@chenx97
Copy link
Contributor Author

chenx97 commented Jun 25, 2023

Commits of this PR have been changed to only affect GNU/Linux.

@JohnTitor
Copy link
Member

I'm going to r+ once MCP passes.

@chenx97
Copy link
Contributor Author

chenx97 commented Jul 7, 2023

I'm going to r+ once MCP passes.

It just passed.

@chenx97
Copy link
Contributor Author

chenx97 commented Jul 7, 2023

what's happening to the freebsd CI here?

@JohnTitor
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jul 10, 2023

📌 Commit 7d80488 has been approved by JohnTitor

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jul 10, 2023

⌛ Testing commit 7d80488 with merge 92e5d67...

@bors
Copy link
Contributor

bors commented Jul 10, 2023

☀️ Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14
Approved by: JohnTitor
Pushing 92e5d67 to main...

@bors bors merged commit 92e5d67 into rust-lang:main Jul 10, 2023
10 of 11 checks passed
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 18, 2023
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.
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Jul 20, 2023
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.
@chenx97 chenx97 deleted the mips64r6 branch August 3, 2023 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants