Skip to content

Commit 54ce4fa

Browse files
committed
build: improve macro for testing -latomic requirement
riscv builds are currently failing because -latomic isn't being linked against, when it is needed: ```bash /home/ubuntu/build/bitcoin/distsrc-riscv64-linux-gnu/src/bitcoin-util.cpp:98: undefined reference to `__atomic_exchange_1' ``` This exteneds our macro to ensure that -latomic is linked against when required.
1 parent 2c010b9 commit 54ce4fa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

build-aux/m4/l_atomic.m4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ m4_define([_CHECK_ATOMIC_testbody], [[
1414
#include <cstdint>
1515
1616
int main() {
17+
std::atomic<bool> lock{true};
18+
std::atomic_exchange(&lock, false);
19+
1720
std::atomic<int64_t> a{};
1821
1922
int64_t v = 5;

0 commit comments

Comments
 (0)