Skip to content

musl: mips64: Swap order of si_errno and si_code in siginfo_t #4530

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

Merged
merged 1 commit into from
Jul 7, 2025

Conversation

Gelbpunkt
Copy link
Contributor

Description

All MIPS targets, 32-bit and 64-bit, swap these around.

Sources

https://git.musl-libc.org/cgit/musl/tree/arch/mips64/bits/signal.h#n103
https://git.musl-libc.org/cgit/musl/tree/include/signal.h#n100

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@Gelbpunkt
Copy link
Contributor Author

This fixes libc-test on mips64-unknown-linux-muslabi64. Since that's tier 3, I guess we can't test it in CI, bit of a shame since I'd prefer libc to not break on this target so that rustc remains bootstrappable.

@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Jul 7, 2025
@tgross35 tgross35 added this pull request to the merge queue Jul 7, 2025
Merged via the queue into rust-lang:main with commit 448abcf Jul 7, 2025
49 of 52 checks passed
@tgross35
Copy link
Contributor

tgross35 commented Jul 7, 2025

Since that's tier 3, I guess we can't test it in CI, bit of a shame since I'd prefer libc to not break on this target so that rustc remains bootstrappable.

I'm sure you were involved in the discussion but just in case: mips was demoted because we were having a number of problems, mostly with the backend (more details here), that were causing CI flakiness across all repos. It's very possible to get it back up to T2, but in addition to interested maintainers on the Rust side, we definitely need to make sure there are people actively supporting LLVM for the target.

@tgross35
Copy link
Contributor

tgross35 commented Jul 7, 2025

I see it was actually you who was talking about getting the target bumped in https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Tier.203.20CI.20Dockerfiles/with/494463179. One thing that may be worth doing if you're up for it: bors now supports optional try jobs, since we already have the mips dockerfiles it seems like that should be easy to wire up https://github.com/rust-lang/rust/blob/25cf7d13c960a3ac47d1424ca354077efb6946ff/src/ci/github-actions/jobs.yml#L166C10-L166C10. Just makes it easier to test whether mips things build in rust-lang/rust.

(Also, since you seem to be familiar with mips, you may be interested in some discussion about its asm clobbers https://rust-lang.zulipchat.com/#narrow/channel/216763-project-inline-asm/topic/How.20to.20specify.20.241.20as.20clobbered.20on.20mips/with/525101231)

@Gelbpunkt
Copy link
Contributor Author

Just makes it easier to test whether mips things build in rust-lang/rust.

The issue I was trying to get at is that currently, the mips64 musl target rustc builds fine, but it wasn't working whatsoever because of libc. No try-job for dist-* would have caught that unless it would have tried using the compiled artifacts. If we were to run libc-test against this target, we would at least rule that out as a reason for a broken compiler. Especially with how long things take to propagate through the ecosystem with new libc releases (rustc still vendors like 10? different versions), ensuring libc-test passes is even more important IMO. It will probably take a while until the compiler is ready to use on mips64-musl again, just because of the slow adoption.

@tgross35
Copy link
Contributor

tgross35 commented Jul 7, 2025

I'm not strongly opposed to adding a job here if that's a problem and you are interested, it just has to be set up as non-blocking and hopefully not need too much new config. I think before doing that, however, it would be good to list yourself as a target maintainer for whichever you are interested in supporting (just a PR to update https://github.com/rust-lang/rust/tree/25cf7d13c960a3ac47d1424ca354077efb6946ff/src/doc/rustc/src/platform-support) to indicate this isn't for a totally unsupported target.

@Gelbpunkt
Copy link
Contributor Author

Sure, I'd be happy to do that :)

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 8, 2025
…labi64-target-maintainer, r=jieyouxu

Add target maintainer information for mips64-unknown-linux-muslabi64

The `mips64-unknown-linux-muslabi64` target is currently rather broken, but I'm working on getting it fixed so that it can at least be used again.

While I can't commit to maintaining the LLVM side of this target, I don't mind looking into any other MIPS or musl-related issues that arise with this target.

See e.g. rust-lang#143409 for some rustc fixes I have in the pipeline and rust-lang/libc#4509, rust-lang/libc#4527, rust-lang/libc#4528, rust-lang/libc#4529, rust-lang/libc#4530 for fixing the libc definitions for this target.

I'm adding myself as a maintainer mostly due to [this interaction](rust-lang/libc#4530 (comment)).

LLVM support has been a concern for these targets in the past, but it shouldn't hurt to have a nominal maintainer for these even if they remain tier 3. From my experience, LLVM for MIPS is working well nowadays unless you decide to use LLD, which is horribly broken on MIPS.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 8, 2025
…labi64-target-maintainer, r=jieyouxu

Add target maintainer information for mips64-unknown-linux-muslabi64

The `mips64-unknown-linux-muslabi64` target is currently rather broken, but I'm working on getting it fixed so that it can at least be used again.

While I can't commit to maintaining the LLVM side of this target, I don't mind looking into any other MIPS or musl-related issues that arise with this target.

See e.g. rust-lang#143409 for some rustc fixes I have in the pipeline and rust-lang/libc#4509, rust-lang/libc#4527, rust-lang/libc#4528, rust-lang/libc#4529, rust-lang/libc#4530 for fixing the libc definitions for this target.

I'm adding myself as a maintainer mostly due to [this interaction](rust-lang/libc#4530 (comment)).

LLVM support has been a concern for these targets in the past, but it shouldn't hurt to have a nominal maintainer for these even if they remain tier 3. From my experience, LLVM for MIPS is working well nowadays unless you decide to use LLD, which is horribly broken on MIPS.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 8, 2025
…labi64-target-maintainer, r=jieyouxu

Add target maintainer information for mips64-unknown-linux-muslabi64

The `mips64-unknown-linux-muslabi64` target is currently rather broken, but I'm working on getting it fixed so that it can at least be used again.

While I can't commit to maintaining the LLVM side of this target, I don't mind looking into any other MIPS or musl-related issues that arise with this target.

See e.g. rust-lang#143409 for some rustc fixes I have in the pipeline and rust-lang/libc#4509, rust-lang/libc#4527, rust-lang/libc#4528, rust-lang/libc#4529, rust-lang/libc#4530 for fixing the libc definitions for this target.

I'm adding myself as a maintainer mostly due to [this interaction](rust-lang/libc#4530 (comment)).

LLVM support has been a concern for these targets in the past, but it shouldn't hurt to have a nominal maintainer for these even if they remain tier 3. From my experience, LLVM for MIPS is working well nowadays unless you decide to use LLD, which is horribly broken on MIPS.
rust-timer added a commit to rust-lang/rust that referenced this pull request Jul 8, 2025
Rollup merge of #143622 - Gelbpunkt:mips64-unknown-linux-muslabi64-target-maintainer, r=jieyouxu

Add target maintainer information for mips64-unknown-linux-muslabi64

The `mips64-unknown-linux-muslabi64` target is currently rather broken, but I'm working on getting it fixed so that it can at least be used again.

While I can't commit to maintaining the LLVM side of this target, I don't mind looking into any other MIPS or musl-related issues that arise with this target.

See e.g. #143409 for some rustc fixes I have in the pipeline and rust-lang/libc#4509, rust-lang/libc#4527, rust-lang/libc#4528, rust-lang/libc#4529, rust-lang/libc#4530 for fixing the libc definitions for this target.

I'm adding myself as a maintainer mostly due to [this interaction](rust-lang/libc#4530 (comment)).

LLVM support has been a concern for these targets in the past, but it shouldn't hurt to have a nominal maintainer for these even if they remain tier 3. From my experience, LLVM for MIPS is working well nowadays unless you decide to use LLD, which is horribly broken on MIPS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-linux O-musl O-unix stable-nominated This PR should be considered for cherry-pick to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants