Commit Graph

9 Commits

Author SHA1 Message Date
Hennadii Stepanov
dd3e0fa125
build: Fix false positive CHECK_ATOMIC test for clang-15 2024-04-12 09:52:06 +02:00
Hennadii Stepanov
f8ca1357c8
build: Fix check whether -latomic needed 2024-01-04 11:47:47 +00:00
fanquake
ebc7063c80
doc: update docs for CHECK_ATOMIC macro
Clarify that supported versions of GCC are not affected, and that Clang
prior to version 15 still requires the explicit -latomic linking, when
compiling for 32-bit.
2023-11-02 16:53:58 +00:00
Andrew Chow
4de4221ab4 build: Check for std::atomic::exchange rather than std::atomic_exchange
Our usage of std::atomic is with it's own exchange function, not
std::atomic_exchange. So we should be looking specifically for that
function.

Additionally, -pthread and -lpthread have an effect on whether -latomic
will be needed, so the atomics check needs to use these flags as well.
This will make the flags in use better match what is actually used when
linking.

This removes the need for -latomic for riscv builds, which resolves a
guix cross architecture reproducibility issue.
2022-07-18 10:47:19 -04:00
MarcoFalke
fa25ce45e9
build: improve macro for testing -latomic requirement 2021-05-11 20:07:20 +02:00
fanquake
54ce4fac80
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.
2021-01-15 10:54:07 +08:00
Luke Dashjr
0c4e6ce88f Add MIT license to build-aux/m4 scripts 2016-09-21 23:01:46 +00:00
Luke Dashjr
3f8a5d8f6e Trivial: build-aux/m4/l_atomic: Fix typo 2016-09-21 23:01:46 +00:00
Anthony Towns
878faacd7b Add configure check for -latomic 2016-08-23 16:55:15 +10:00