[0.2] Backports, 0.2.189 release#5305
Merged
Merged
Conversation
Usage:
./etc/libc-util.py backport --branch backport-carrot
./etc/libc-util.py backport-pr-description --branch backport-carrot
There is a script on the libc-0.2 branch for backporting as well, but
this one uses a `git rebase` todo to be a bit more robust against
conflicts. The libc-0.2 script also doesn't pick from the correct SHAs
since the GitHub API doesn't give a list of commits as merged (instead,
only commits as they are in the PR).
(backport <rust-lang#5292>)
(cherry picked from commit 8195eb4)
Doing this doesn't cause any warnings to appear (backport <rust-lang#5277>) (cherry picked from commit e5e3355)
illumos usr/src/uts/common/sys/time_impl.h defines CLOCK_THREAD_CPUTIME_ID=2 (alias CLOCK_PROF) and CLOCK_PROCESS_CPUTIME_ID=5, but libc never bound them for solarish, so any crate that references these clock ids (e.g. the cpu-time crate) fails to build on illumos/solaris. Also drops the stale comment claiming clock_gettime(3c) "doesn't seem to accept anything other than CLOCK_REALTIME" -- that was true prior to illumos-gate commit dea9f5e6a49 (2021-10-16, "14126 clock_gettime() could work with thread/proc clocks"), which taught clock_gettime(3c) to honor the thread/process CPU-time clocks; both Oracle Solaris 11.4 and current illumos document and accept them. Verified at runtime on OpenIndiana 2026.04 via clock_gettime(3c) with both clock ids (both return 0). (backport <rust-lang#5274>) (cherry picked from commit efe08d7)
The new ci/cuttlefish-setup.sh is heavily inspired by Mesa CI's cuttlefish-runner.sh, credited in the script. For more details, see the following issue, of which this is part of: rust-lang#5262 In a nutshell, the libc x86_64 job never booted Android: it extracted bionic from a 2016-era (API 24) image and ran the test binaries directly on the Ubuntu host kernel. This makes the CI test boot the official stock Android 17 image via Cuttlefish. The virtual device boots inside the test container, self-contained: Cuttlefish host packages are installed in the x86_64-linux-android image and the container entrypoint creates the tap networking via the deb's sysv script as root, then drops to an unprivileged user. The container needs only the virtualization device nodes plus CAP_NET_ADMIN, the same flags upstream uses for its own containerized Cuttlefish CI, so nothing on the CI host is mutated and a local run reduces to the usual ./ci/run-docker.sh with no host setup beyond KVM. The container still cross-compiles with the NDK and drives the device over adb, reusing the runtest-android.rs wrapper unchanged. Device logs are uploaded as CI artifacts (again similar to Mesa). The other Android targets stay on the legacy SDK emulator for now. Assisted-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com> (backport <rust-lang#5269>) (cherry picked from commit e194438)
(backport <rust-lang#5245>) (cherry picked from commit 28a8833)
fix signedness of wchar_t under arm and aarch64. this was not correctly handled as this type will likely be defined in terms of predefined compiler macros [^1]. these macros expand to different types on our currently supported nuttx targets. they are only signed integers under riscv [^2]. [^1]: https://github.com/search?q=repo%3Aapache%2Fnuttx+%2F%5Cb_wchar_t%5Cb%2F&type=code [^2]: https://c.godbolt.org/z/czMY79vsh (backport <rust-lang#5245>) (cherry picked from commit 35095ff)
These were unintentionally removed as part of the "Fixes" commit. Fixes: 5bbfc84 ("windows(gnu): link to correct 32-bit time routines") Closes: rust-lang#5299 (backport <rust-lang#5300>) (cherry picked from commit 1268c28)
Starting with version 7.0, the Linux kernel gained support for clone3() on SPARC. Thus, it can be enabled in libc now. (backport <rust-lang#4980>) (cherry picked from commit 177e0cd)
The current behavior of automatically adding `unsafe` means the functions read differently from how they actually get defined. This gets confusing, especially in large blocks or diffs where the `f!` may not be obvious. Make the `unsafe` keyword required, similar to most Rust function definitions. (backport <rust-lang#5302>) (cherry picked from commit bbd9253)
bbd9253 ("macros: Require unsafe in `f!` invocations") made `unsafe` required in `f!`. Do the same for `safe_f!`, requiring a `safe` keyword. Similar to the `f!` changes, the goal is to make it more obvious whether a function is safe or not just by reading the signature. Technically `safe` isn't really required for that because by default functions are safe. However the `unsafe` requirement in `f!` is recent so the extra keyword helps avoid confusion as to whether `pub fn` is safe (default Rust) or unsafe (would previously be the case with `f!`). This also allows us to merge `f!` and `safe_f!` without risk of accidentally making any in-flight patches safe (if they used `f!` before `unsafe` was required). (backport <rust-lang#5303>) (cherry picked from commit c8b6cc2)
…faccessat, pthread_kill Link: https://github.com/emscripten-core/emscripten/blob/6a93f7db16cd8e5214b4c3c08a361ccab9ffc67e/system/lib/libc/musl/include/signal.h#L225-L227 Link: https://github.com/emscripten-core/emscripten/blob/6a93f7db16cd8e5214b4c3c08a361ccab9ffc67e/system/lib/libc/musl/include/signal.h#L230-L231 Link: https://github.com/emscripten-core/emscripten/blob/6a93f7db16cd8e5214b4c3c08a361ccab9ffc67e/system/lib/libc/musl/include/unistd.h#L88 (backport <rust-lang#5270>) (cherry picked from commit 47a05e9)
Collaborator
|
tgross35
enabled auto-merge
July 21, 2026 20:46
These showed after a recent commit removing the `allow`.
Build fails on `riscv32gc-unknown-linux-musl` because the fields `__pad1` and `__pad2` are duplicated. This likely came up during the apply then revert of the `timespec` change. Rename `__pad1` to `__st_rdev_padding` to match other musl `struct stat` instances. None of the others seem to have padding for `st_blksize` so this name is new but follows the same pattern.
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
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:
allows #5277time-related symbols #5300unsafeinf!invocations #5302safeinsafe_f!invocations #5303