Merge bitcoin/bitcoin#33902: doc: Document compiler configuration for native depends packages

4c07cf87e2288d4a8b0174ad64e52f455de9029e doc: document depends compiler configuration (will)

Pull request description:

  Fixes: #33859

  Previously one had to read the Makefile (and various *.mk configuration
  files) to see how to correctly override CC and CXX when building native
  depends packages.

  Detail this in README.md to make it clearer.

ACKs for top commit:
  maflcko:
    review ACK 4c07cf87e2288d4a8b0174ad64e52f455de9029e 🛶
  hebasto:
    ACK 4c07cf87e2288d4a8b0174ad64e52f455de9029e.
  sedited:
    ACK 4c07cf87e2288d4a8b0174ad64e52f455de9029e
  fanquake:
    ACK 4c07cf87e2288d4a8b0174ad64e52f455de9029e

Tree-SHA512: ca61087b7c232c74782602a28d914e7bb35d1469472bb7862941c0fdec2277bf1d0e6604d4058c319c6a7b2cd04a70b7f0d0afbbb847e5c3812c6afb0cf1cfb3
This commit is contained in:
merge-script 2026-03-11 13:39:22 +00:00
commit ce6f182091
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

View File

@ -108,6 +108,18 @@ The following can be set when running make: `make FOO=bar`
If some packages are not built, for example `make NO_WALLET=1`, the appropriate CMake cache
variables will be set when generating the Bitcoin Core buildsystem. In this case, `-DENABLE_WALLET=OFF`.
## Compiler Configuration
`CC` and `CXX` control target compilers. `build_CC` and `build_CXX` control
compilers for native build tools (e.g. `native_capnp`, `native_qt`), which
default to `gcc`/`g++` on Linux and `clang`/`clang++` on macOS/FreeBSD/OpenBSD
(see `./depends/builders/*.mk`).
On a system where the default build compiler is not available (e.g. Linux
without gcc/g++), you could use the following to build all packages using clang:
make -C depends build_CC=clang build_CXX=clang++ CC=clang CXX=clang++
## Cross compilation
To build for another arch/OS: