-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[0.2] Backports #4590
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
[0.2] Backports #4590
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These aren't defined on musl. Split them up like done e.g. in loongarch64. Signed-off-by: Jens Reidel <[email protected]> (backport <rust-lang#4512>) (cherry picked from commit 27bf19c)
CARGO_CFG_TARGET_ARCH is powerpc64 on both powerpc64 and powerpc64le. This would cause the powerpc64le semver files to be unused. Replace the powerpc64 files with the powerpc64le ones, they are compatible with each other and only differ in endianess. Linux, musl and glibc share the same code for both endian targets. See the cargo documentation: https://doc.rust-lang.org/reference/conditional-compilation.html#target_arch Signed-off-by: Jens Reidel <[email protected]> (backport <rust-lang#4512>) (cherry picked from commit 2881ee5)
These overwrite the value with their own. https://git.musl-libc.org/cgit/musl/tree/arch/powerpc/bits/termios.h#n2 https://git.musl-libc.org/cgit/musl/tree/arch/powerpc64/bits/termios.h#n2 Signed-off-by: Jens Reidel <[email protected]> (backport <rust-lang#4513>) (cherry picked from commit f8e5a84)
powerpc and powerpc64 have different definitions for these in musl. The powerpc values were correct, but powerpc64 ones were not. This was changed in musl 1.1.17. See https://git.musl-libc.org/cgit/musl/commit/?id=c10bc61508dc52b8315084e628f36a6c3c2dabb1 Signed-off-by: Jens Reidel <[email protected]> (backport <rust-lang#4516>) (cherry picked from commit 5c0742b)
musl defines EDEADLK to be 35 on powerpc64 and EDEADLOCK to be 58. This has always been the case since the introduction of powerpc64 support in musl. See: https://git.musl-libc.org/cgit/musl/tree/arch/powerpc64/bits/errno.h#n35 https://git.musl-libc.org/cgit/musl/tree/arch/powerpc64/bits/errno.h#n58 Signed-off-by: Jens Reidel <[email protected]> (backport <rust-lang#4517>) (cherry picked from commit 3e28d99)
PowerPC targets use their own, separate definitions of termios that change the order of the c_line and c_cc fields. See: https://git.musl-libc.org/cgit/musl/tree/arch/powerpc/bits/termios.h#n3 https://git.musl-libc.org/cgit/musl/tree/arch/powerpc64/bits/termios.h#n3 Signed-off-by: Jens Reidel <[email protected]> (backport <rust-lang#4518>) (cherry picked from commit 0dfd754)
powerpc64 is the only 64-bit target that doesn't use the generic definition for these in musl. See https://git.musl-libc.org/cgit/musl/tree/arch/powerpc64/bits/shm.h#n3 Signed-off-by: Jens Reidel <[email protected]> (backport <rust-lang#4519>) (cherry picked from commit 1ac2a19)
(backport <rust-lang#4523>) (cherry picked from commit 9ccce07)
This value was set to 1024 for all targets in the following commit: https://git.musl-libc.org/cgit/musl/commit/?id=bc695a5ac1d7929e5c1ad5297eb47e146cccd157 Since loongarch64 requires musl 1.2.5, the expected value there is different than the other targets, which still target an earlier musl. Signed-off-by: Jens Reidel <[email protected]> (backport <rust-lang#4520>) (cherry picked from commit 046bed5)
musl-libc does not define RTLD_DEEPBIND on any architecture. Fixes: 88de388 ("add definitions for s390x musl targets") (backport <rust-lang#4515>) (cherry picked from commit 6faa6d3)
musl-libc does not define O_FSYNC on any architecture, since commit v1.1.15-15-gc1f4ed15 (committed 2016-08-30): https://git.musl-libc.org/cgit/musl/commit/?id=c1f4ed150137d793c9d07356305a89e8785e7e02 Fixes: 88de388 ("add definitions for s390x musl targets") (backport <rust-lang#4515>) (cherry picked from commit a5b89d3)
(backport <rust-lang#4524>) (cherry picked from commit 336e3f1)
64-bit MIPS has the same special definition as 32-bit MIPS in musl. See https://git.musl-libc.org/cgit/musl/tree/arch/mips64/bits/statfs.h Signed-off-by: Jens Reidel <[email protected]> (backport <rust-lang#4527>) (cherry picked from commit 4ea56f7)
All MIPS targets, 32-bit and 64-bit, swap these around. See: 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 Signed-off-by: Jens Reidel <[email protected]> (backport <rust-lang#4530>) (cherry picked from commit 76072a6)
mips64 uses the same definitions for these as the 32-bit targets. See e.g.: https://github.com/torvalds/linux/blob/master/arch/mips/include/uapi/asm/siginfo.h#L21 https://git.musl-libc.org/cgit/musl/tree/arch/mips64/bits/signal.h#n96 Signed-off-by: Jens Reidel <[email protected]> (backport <rust-lang#4529>) (cherry picked from commit dff820c)
stack_t is sigaltstack, which in musl has a special definition for MIPS that switches around ss_size and ss_flags. The 32-bit definition was already correct. See: https://git.musl-libc.org/cgit/musl/tree/arch/mips64/bits/signal.h#n67 Signed-off-by: Jens Reidel <[email protected]> (backport <rust-lang#4528>) (cherry picked from commit 3d3392b)
Our cache does not seem to be working. rust-cache takes RUSTFLAGS into account, so it is possible that there is a problem due to it getting set dynamically. This is more than likely not the cause, but it is worth a try and is cleaner anyway. (backport <rust-lang#4537>) (cherry picked from commit be84d13)
We don't need alloc or std, so save some CI time by only building `core`. (backport <rust-lang#4538>) (cherry picked from commit d96fb20)
|
(backport <rust-lang#4548>) (cherry picked from commit 2e5e02c)
This was introduced in 2a68f7f ("Add musl_v1_2_3 feature"). Fixes: rust-lang#4526 (backport <rust-lang#4550>) (cherry picked from commit 4c52a68)
Merged
via the queue into
rust-lang:libc-0.2
with commit Jul 29, 2025
a56dcac
48 of 49 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport the following:
core
with-Zbuild-std
#4538target_os
->target_arch
check #4550