mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-20 22:27:17 -08:00
63b4ae7aaa6e520706e1237b649d8fe29f5aba83
Several packages depend on GCC's libatomic to perform atomic operations.
For example, this compiles without -latomic:
```c
_Atomic struct {
int v[1];
} a;
atomic_store(&a, a);
```
But this fails with error "undefined reference to __atomic_store_16"
without -latomic:
```c
_Atomic struct {
int v[4];
} b;
atomic_store(&b, b);
```
LLVM does not have a libatomic.so, but an atomic builtin to support such
operations. However, it is disabled by default to allow use of system
libatomic while using LLVM as a compiler. Pure LLVM environments
without GCC installed require this builtin. This commit adds
`-DCOMPILER_RT_EXCLUDE_ATOMIC_BUILTIN=OFF` cmake option to enable
the builtin.
Bug: https://bugs.gentoo.org/911340
Signed-off-by: mojyack <mojyack@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/39168
Signed-off-by: Michał Górny <mgorny@gentoo.org>
…
…
…
…
…
…
…
…
Description
No description provided
9.8 GiB
Languages
Shell
98%
Roff
1.4%
Emacs Lisp
0.2%
C
0.1%