mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-09 20:59:38 +02:00
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.
This commit is contained in:
parent
2c010b9c56
commit
54ce4fac80
@ -14,6 +14,9 @@ m4_define([_CHECK_ATOMIC_testbody], [[
|
||||
#include <cstdint>
|
||||
|
||||
int main() {
|
||||
std::atomic<bool> lock{true};
|
||||
std::atomic_exchange(&lock, false);
|
||||
|
||||
std::atomic<int64_t> a{};
|
||||
|
||||
int64_t v = 5;
|
||||
|
Loading…
x
Reference in New Issue
Block a user