dd3e0fa12534c9e782dc9c24d2e30b70a0d73176 build: Fix false positive `CHECK_ATOMIC` test for clang-15 (Hennadii Stepanov)
Pull request description:
On the master branch @ 0de63b8b46eff5cda85b4950062703324ba65a80, a building `bitcoind` with clang-15 for `i686-pc-linux-gnu` fails to link:
```
CXXLD bitcoind
/usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o): in function `std::remove_volatile<double>::type std::__atomic_impl::load<double>(double const*, std::memory_order)':
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:948: undefined reference to `__atomic_load'
/usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o): in function `void std::__atomic_impl::store<double>(double*, std::remove_volatile<double>::type, std::memory_order)':
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:940: undefined reference to `__atomic_store'
/usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o): in function `void std::__atomic_impl::store<double>(double*, std::remove_volatile<double>::type, std::memory_order)':
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:940: undefined reference to `__atomic_store'
/usr/bin/ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:940: undefined reference to `__atomic_store'
/usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o): in function `std::remove_volatile<double>::type std::__atomic_impl::load<double>(double const*, std::memory_order)':
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:948: undefined reference to `__atomic_load'
/usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o): in function `void std::__atomic_impl::store<double>(double*, std::remove_volatile<double>::type, std::memory_order)':
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:940: undefined reference to `__atomic_store'
/usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-backup.o): in function `void std::__atomic_impl::store<double>(double*, std::remove_volatile<double>::type, std::memory_order)':
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:940: undefined reference to `__atomic_store'
/usr/bin/ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:940: undefined reference to `__atomic_store'
/usr/bin/ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:940: undefined reference to `__atomic_store'
/usr/bin/ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:940: undefined reference to `__atomic_store'
/usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-backup.o):/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:940: more undefined references to `__atomic_store' follow
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
due to false positive `CHECK_ATOMIC` test in the `configure` script.
This PR fixes this test.
ACKs for top commit:
maflcko:
review ACK dd3e0fa12534c9e782dc9c24d2e30b70a0d73176
fanquake:
ACK dd3e0fa12534c9e782dc9c24d2e30b70a0d73176
Tree-SHA512: b60acf8d83fc84cc3280d95028395d341ed9ed2fcf38ae0a101d50aa19cc35540e9763aa36668c4dc1e1bc7e1f33dbda0e662df39c9e414a284ef91d7fc55fba
4101fea620 Merge bitcoin/bitcoin#28304: doc: Remove confusing assert linter (fanquake)
c59cb158e5 Merge bitcoin/bitcoin#26282: wallet: have prune error take precedence over assumedvalid (fanquake)
e2e8598c5a Merge bitcoin/bitcoin#23997: wallet: avoid rescans under assumed-valid blocks (Andrew Chow)
b66eebe64d Merge bitcoin/bitcoin#25599: build: Check for std::atomic::exchange rather than std::atomic_exchange (fanquake)
1204dc0f83 Merge bitcoin/bitcoin#25486: test: fix failing test `interface_usdt_utxocache.py` (MacroFake)
de17997621 Merge bitcoin/bitcoin#24062: refactor: replace RecursiveMutex `m_most_recent_block_mutex` with Mutex (MacroFake)
c91f010e0e Merge bitcoin/bitcoin#25092: doc: various developer notes updates (MacroFake)
f39fcd1402 Merge bitcoin/bitcoin#24988: lint: Mention NONFATAL_UNREACHABLE in lint-assertions.py (fanquake)
Pull request description:
## Issue being fixed or feature implemented
Batch of trivial backports
## What was done?
See commits
## How Has This Been Tested?
built locally; large combined merge passed tests locally
## Breaking Changes
Should be none
## Checklist:
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
ACKs for top commit:
UdjinM6:
utACK 4101fea620
kwvg:
utACK 4101fea620
Tree-SHA512: e948ff58b256f2ecb9611681f773570d233985f1470e3eaa6899f3b7e53701c06f56ed5b965d250e22764938b0afebc8d85f92879ba111a0e20127cd63e99809
4de4221ab4b645ff77503c777c9b195a962e9fa1 build: Check for std::atomic::exchange rather than std::atomic_exchange (Andrew Chow)
Pull request description:
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.
This removes the need for -latomic for riscv builds, which resolves a guix cross architecture reproducibility issue.
ACKs for top commit:
hebasto:
ACK 4de4221ab4b645ff77503c777c9b195a962e9fa1
fanquake:
ACK 4de4221ab4b645ff77503c777c9b195a962e9fa1
Tree-SHA512: dd8225fc9c6a335601f611700003d0249b9ef941efa502db39306129677929d013048e9221be1d6d7f0ea2d90313d4b87de239f441be21b25bea40a6c19a031e
f8ca1357c8205ceff732dcfb0d2bad79b40b611b build: Fix check whether `-latomic` needed (Hennadii Stepanov)
Pull request description:
Clang >=15 still might need linking against `libatomic`.
We use `std::atomic<std::chrono::seconds>::compare_exchange_strong` in `net_processing.cpp`.
Addresses the https://github.com/bitcoin/bitcoin/pull/29165#discussion_r1440293694.
ACKs for top commit:
maflcko:
lgtm ACK f8ca1357c8205ceff732dcfb0d2bad79b40b611b
fanquake:
ACK f8ca1357c8205ceff732dcfb0d2bad79b40b611b
Tree-SHA512: ba8b6a88fd3471a206d068e8a000a053c99cb46d26bd04624418ddb066b3b9664a569ec8a1569af67c96b3e27f13dccbd5e24f985290ac072b6d74c92524e35d
ebc7063c80135dd6f3e7b9418e8f4bf217bd8db7 doc: update docs for CHECK_ATOMIC macro (fanquake)
Pull request description:
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.
ACKs for top commit:
hebasto:
ACK ebc7063c80135dd6f3e7b9418e8f4bf217bd8db7.
Tree-SHA512: 6044dc28547431cfde7e89b663b5f9a86a4cb801212a21c3dbb18a1c41a53640480c3e4e944050dc3ec4cded9bc4c1f8eae8dbb60596289fef49bb13a8b53b76
0c4e6ce Add MIT license to build-aux/m4 scripts (Luke Dashjr)
3f8a5d8 Trivial: build-aux/m4/l_atomic: Fix typo (Luke Dashjr)
3b4b6dc Add MIT license to autogen.sh and share/genbuild.sh (Luke Dashjr)
f4dffdd Add MIT license to Makefiles (Luke Dashjr)