-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
LLVM platform stdenvs lack __atomic_* routines #391740
Copy link
Copy link
Open
Labels
2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: llvm/clangIssues related to llvmPackages, clangStdenv and relatedIssues related to llvmPackages, clangStdenv and related6.topic: stdenvStandard environmentStandard environment
Metadata
Metadata
Assignees
Labels
2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: llvm/clangIssues related to llvmPackages, clangStdenv and relatedIssues related to llvmPackages, clangStdenv and related6.topic: stdenvStandard environmentStandard environment
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
No status
In certain occasions, both gcc and LLVM emit libcalls to a set of equivalent
__atomic_*routines.-latomic)This means specifying
useLLVM = true;for a platform yields an stdenv that does not provide these routines anywhere, making it impossible to build certain programs. Trivial example:I'm not sure how we should fix that. Since the set of routines should coincide, perhaps after #132340 we could try using gcc's libatomic in LLVM stdenvs. Assuming we want to use compiler-rt's implementation (which btw does not depend on pthreads), their recommended setup seems to be shipping those symbols in a shared library (which I presume would be named
libatomic.soto match gcc's requirements on user builds). But from feedback I got, I think we do not plan on shipping these symbols in a separate library and would instead like to ship them inbuiltins.a? I'm not sure and this is the first thing I'd like to understand before attempting to fix anything.