diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2024-01-04 11:47:47 +0000 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2024-01-04 11:47:47 +0000 |
commit | f8ca1357c8205ceff732dcfb0d2bad79b40b611b (patch) | |
tree | 0f15f9f5965dfa7314513409fce2e6206d52298c /build-aux | |
parent | 65c05db660b2ca1d0076b0d8573a6760b3228068 (diff) |
build: Fix check whether `-latomic` needed
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/m4/l_atomic.m4 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/build-aux/m4/l_atomic.m4 b/build-aux/m4/l_atomic.m4 index 5e65257d77..aa00168fce 100644 --- a/build-aux/m4/l_atomic.m4 +++ b/build-aux/m4/l_atomic.m4 @@ -4,7 +4,7 @@ dnl permitted in any medium without royalty provided the copyright notice dnl and this notice are preserved. This file is offered as-is, without any dnl warranty. -# Clang prior to version 15, when building for 32-bit, +# Clang, when building for 32-bit, # and linking against libstdc++, requires linking with # -latomic if using the C++ atomic library. # Can be tested with: clang++ test.cpp -m32 @@ -24,6 +24,8 @@ m4_define([_CHECK_ATOMIC_testbody], [[ std::atomic<std::chrono::seconds> t{0s}; t.store(2s); + auto t1 = t.load(); + t.compare_exchange_strong(t1, 3s); std::atomic<int64_t> a{}; |