Repository navigation
[Backport release-26.05] llvmPackages_{22,23,git}.compiler-rt: fix no-libc build on aarch64-linux - #570190
Merged
Conversation
LLVM 22 dropped the `__has_include(<sys/auxv.h>)` guards from the AArch64 LSE-atomics and FMV feature detection in compiler-rt's builtins (llvm/llvm-project#161751, released in 22.1.0). The no-libc variant of compiler-rt, which libcxx and the libc++ clang wrappers are built with, has no libc headers, so lib/builtins/cpu_model/aarch64.c fails with fatal error: 'sys/auxv.h' file not found and llvmPackages_22.{compiler-rt-no-libc,libcxx,libcxxClang,clangUseLLVM} cannot be built on aarch64-linux; the same holds for llvmPackages_23 and llvmPackages_git. Hydra has no aarch64-linux build of any of these jobs, while the llvmPackages_21 ones build. Restore the LLVM 21 behaviour for the no-libc build: guard both `#elif defined(__linux__)` branches with `__has_include(<sys/auxv.h>)`, so LSE detection is skipped and __aarch64_have_lse_atomics stays false without a libc, as it did in 21. The FMV branch is already compiled out in this configuration by COMPILER_RT_DISABLE_AARCH64_FMV (ded560c). The substitution applies unchanged to 22.1.8, 23.1.0 and the git snapshot. Only compiler-rt-no-libc and what is built on top of it change, and only on aarch64-linux: compiler-rt (with libc), clang, libllvm, lld and the stdenv keep their derivations, and nothing changes on x86_64-linux. The gate includes isLinux because Darwin builds compiler-rt-no-libc without a libc as well but never takes the __linux__ branches; without it every llvmPackages_{22,23} derivation on aarch64-darwin would rebuild for no effect. Fixes #495155. Assisted-by: Claude Code (Claude Fable 5.1) (cherry picked from commit 8c59070)
6 of 13 tasks
nixpkgs-ci
Bot
requested review from
a team and
balsoft
and removed request for
a team
October 4, 2026 15:27
peterwaller-arm
approved these changes
Oct 5, 2026
whispersofthedawn
approved these changes
Oct 6, 2026
whispersofthedawn
left a comment
Contributor
There was a problem hiding this comment.
built all revdeps on aarch64-linux, seems fine
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.
Bot-based backport to
release-26.05, triggered by a label in #566346.Before merging, ensure that this backport is acceptable for the release.
Even as a non-committer, if you find that it is not acceptable, leave a comment.
Tip
If you maintain all packages touched by this pull request, and they are all located under
pkgs/by-name/*, you can comment@NixOS/nixpkgs-merge-bot mergeto automatically merge this PR using thenixpkgs-merge-bot.