build: Fix check whether -latomic needed
This commit is contained in:
1 file changed
+3
-1
@@ -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 and this notice are preserved. This file is offered as-is, without any
|
||||||
dnl warranty.
|
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
|
# and linking against libstdc++, requires linking with
|
||||||
# -latomic if using the C++ atomic library.
|
# -latomic if using the C++ atomic library.
|
||||||
# Can be tested with: clang++ test.cpp -m32
|
# Can be tested with: clang++ test.cpp -m32
|
||||||
@@ -24,6 +24,8 @@ m4_define([_CHECK_ATOMIC_testbody], [[
|
|||||||
|
|
||||||
std::atomic<std::chrono::seconds> t{0s};
|
std::atomic<std::chrono::seconds> t{0s};
|
||||||
t.store(2s);
|
t.store(2s);
|
||||||
|
auto t1 = t.load();
|
||||||
|
t.compare_exchange_strong(t1, 3s);
|
||||||
|
|
||||||
std::atomic<int64_t> a{};
|
std::atomic<int64_t> a{};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user