Skip to content

[0.2] Backports#5055

Merged
tgross35 merged 10 commits intorust-lang:libc-0.2from
tgross35:backport-vitelotte
Apr 13, 2026
Merged

[0.2] Backports#5055
tgross35 merged 10 commits intorust-lang:libc-0.2from
tgross35:backport-vitelotte

Conversation

dropbear32 and others added 9 commits April 13, 2026 09:23
The latest nightly hits an ICE in CI from [1].

[1]: rust-lang/rust#154878

(backport <rust-lang#5048>)
(cherry picked from commit e26a0bd)
The `musl32_time64` cfg previously conflated two distinct concepts:

1. Type definitions: `time_t` is `i64`, `suseconds_t` is `i64`,
   `timespec` has padding — applies to all 32-bit musl v1.2.3+ targets
   including hexagon.

2. Symbol redirects: `clock_gettime` → `__clock_gettime64` etc.,
   corresponding to musl's `_REDIR_TIME64` — applies only to arm,
   mips, powerpc, and x86.

Hexagon was added to musl after the time64 transition and never had a
32-bit `time_t`, so its libc exports `clock_gettime` directly with no
`__*_time64` symbols. Applying the link-name redirects caused undefined
symbol errors at link time (rust-lang/rust#154686).

Introduce a new `musl_redir_time64` cfg for the symbol redirects and
restrict it to arches that define `_REDIR_TIME64`. Keep `musl32_time64`
for the type/struct meaning, now set generically for all 32-bit musl
v1.2.3+ targets (removing explicit `target_arch = "hexagon"` conditions).

(backport <rust-lang#5040>)
(cherry picked from commit a6b660c)
(backport <rust-lang#5043>)
(cherry picked from commit 9b6bf99)
ESP-IDF v6.0 switched from newlib to picolibc as default C library.
Picolibc uses Linux-compatible O_APPEND/O_CREAT/O_TRUNC values which
differ from newlib. Add espidf_picolibc cfg to select the correct values.

(backport <rust-lang#5035>)
(cherry picked from commit 434c916)
Add missing constants and fix type mismatches for hexagon-unknown-linux-musl, enabling the rustix crate to build.

* Constants added to errno, syscalls, poll, fs, memory, termios
* Type fixes (c_int -> tcflag_t): EXTPROC, FLUSHO, IEXTEN, TOSTOP
* ipc_perm.__seq changed from c_ushort to c_int with proper __pad1/__pad2 fields to match hexagon musl headers.

(backport <rust-lang#5042>)
(cherry picked from commit e5880b8)
After having tested out GNU on Windows x86, it seemed like the only
issue was related to a wrongly aligned/sized `max_align_t`. This has
been fixed, and the test suite seems to be running just fine in CI now
for the above platform/environment.

There were also some environment variables in CI that seemed to be set
for the purposes of changing the Mingw toolchain set up, but that
weren't truly being used as the job that ran the script that used those
was being triggered earlier in the CI pipeline. Because CI logs seem to
reveal this has been the case for some time, this has also been
altogether removed.

(backport <rust-lang#5050>)
(cherry picked from commit 3a5c5d7)
(backport <rust-lang#5051>)
(cherry picked from commit 30fd290)
@rustbot rustbot added A-CI Area: CI-related items S-waiting-on-review labels Apr 13, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 13, 2026

⚠️ 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!

The relevant PR has been reverted in rust-lang/rust.

This reverts commit e26a0bd.

(backport <rust-lang#5054>)
(cherry picked from commit 3ba93f8)
@tgross35 tgross35 enabled auto-merge April 13, 2026 09:28
@tgross35 tgross35 added this pull request to the merge queue Apr 13, 2026
Merged via the queue into rust-lang:libc-0.2 with commit 1027d1c Apr 13, 2026
51 checks passed
@tgross35 tgross35 deleted the backport-vitelotte branch April 13, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: CI-related items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants