Skip to content

Conversation

Gelbpunkt and others added 18 commits July 28, 2025 20:10
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)
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)
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)
@rustbot
Copy link
Collaborator

rustbot commented Jul 29, 2025

⚠️ Warning ⚠️

  • Pull requests are usually filed against the main branch for this repo, but this one is against libc-0.2. Please double check that you specified the right target!

mbyx and others added 2 commits July 28, 2025 20:24
(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)
@tgross35 tgross35 enabled auto-merge July 29, 2025 01:29
@tgross35 tgross35 added this pull request to the merge queue Jul 29, 2025
Merged via the queue into rust-lang:libc-0.2 with commit a56dcac Jul 29, 2025
48 of 49 checks passed
@tgross35 tgross35 deleted the backport-piquillo branch July 29, 2025 02:11
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.

5 participants