File llvm-better-detect-64bit-atomics-support.patch of Package SLE153-llvm11
21
1
Better detect 64bit atomics support.
2
3
It appears that on i586 std::atomic<uint64_t>::load is compiled into
4
instruction, but std::atomic<double>::load uses __atomic_load_8. This must
5
be detected so the build system links it to libatomic.
6
Index: llvm-7.0.0.src/cmake/modules/CheckAtomic.cmake
7
===================================================================
8
--- llvm-7.0.0.src.orig/cmake/modules/CheckAtomic.cmake
9
+++ llvm-7.0.0.src/cmake/modules/CheckAtomic.cmake
10
11
#include <atomic>
12
#include <cstdint>
13
std::atomic<uint64_t> x (0);
14
+std::atomic<double> y (0);
15
int main() {
16
uint64_t i = x.load(std::memory_order_relaxed);
17
+ double j = y.load(std::memory_order_relaxed);
18
return 0;
19
}
20
" ${varname})
21