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.
pull/826/head
fanquake 4 years ago
parent 2c010b9c56
commit 54ce4fac80
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

@ -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…
Cancel
Save