… function templates
7ec6081 refactor: Add missing explicit instantiations of function templates (Hennadii Stepanov)
Pull request description:
The `SignatureHash` and `SignatureHashSchnorr` function templates are defined in `interpreter.cpp` but are also used from other translation units, which have relied on implicit instantiations being emitted in that file. The standard does not guarantee that.
This PR adds the missing explicit instantiations. It fixes linker errors (see the nightly builds with [libstdc++](https://cdash.fish.foo/builds/941/build) and [libc++](https://cdash.fish.foo/builds/951/build)) when building with Clang 24, where module-local optimizer hints are now enabled by default. The change was introduced in llvm/llvm-project#238529.
A successful build of this branch with Clang 24 is available here: hebasto/bitcoin-core-nightly#496.
As a workaround, Clang's previous behavior can be [restored](hebasto/bitcoin-core-nightly#495) with the `-fno-module-local-hints` flag.
ACKs for top commit:
maflcko:
review ACK 7ec6081 🔌
sedited:
ACK 7ec6081
Tree-SHA512: d49b578876df77f4636d750e5c11c094308b06c8803d3ef2bd1644303dcaf25a9af9afd695f93ecaf76f7dd43ef158221cc355518c039ad8fc80612fa229cf8d
Cherry-picked-from: bitcoin/bitcoin@8e09dc7
Upstream commit: bitcoin/bitcoin@8e09dc7
7ec6081ecab27b1ff453f986567b299f7b76d994 refactor: Add missing explicit instantiations of function templates (Hennadii Stepanov)
Pull request description:
The
SignatureHashandSignatureHashSchnorrfunction templates are defined ininterpreter.cppbut are also used from other translation units, which have relied on implicit instantiations being emitted in that file. The standard does not guarantee that.This PR adds the missing explicit instantiations. It fixes linker errors (see the nightly builds with libstdc++ and libc++) when building with Clang 24, where module-local optimizer hints are now enabled by default. The change was introduced in llvm/llvm-project#238529.
A successful build of this branch with Clang 24 is available here: hebasto/bitcoin-core-nightly#496.
As a workaround, Clang's previous behavior can be restored with the
-fno-module-local-hintsflag.ACKs for top commit:
maflcko:
review ACK 7ec6081ecab27b1ff453f986567b299f7b76d994 🔌
sedited:
ACK 7ec6081ecab27b1ff453f986567b299f7b76d994
Tree-SHA512: d49b578876df77f4636d750e5c11c094308b06c8803d3ef2bd1644303dcaf25a9af9afd695f93ecaf76f7dd43ef158221cc355518c039ad8fc80612fa229cf8d
Mirrored from audited staging PR: BTC4Peace/bitcoin-agentic-workflow#43