mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-04 07:07:45 +01: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
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue