Skip to content

Commit f8ca135

Browse files
committed
build: Fix check whether -latomic needed
1 parent 65c05db commit f8ca135

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

build-aux/m4/l_atomic.m4

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dnl permitted in any medium without royalty provided the copyright notice
44
dnl and this notice are preserved. This file is offered as-is, without any
55
dnl warranty.
66

7-
# Clang prior to version 15, when building for 32-bit,
7+
# Clang, when building for 32-bit,
88
# and linking against libstdc++, requires linking with
99
# -latomic if using the C++ atomic library.
1010
# Can be tested with: clang++ test.cpp -m32
@@ -24,6 +24,8 @@ m4_define([_CHECK_ATOMIC_testbody], [[
2424
2525
std::atomic<std::chrono::seconds> t{0s};
2626
t.store(2s);
27+
auto t1 = t.load();
28+
t.compare_exchange_strong(t1, 3s);
2729
2830
std::atomic<int64_t> a{};
2931

0 commit comments

Comments
 (0)