doc: document depends compiler configuration
What changed, and why it matters
This commit only adds documentation to the depends/README.md file explaining how to set compiler variables when building Bitcoin Core's dependency system. It does not change any code, build scripts, or behavior. There is no security issue here.
No action required. This is a benign documentation update.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit is a documentation-only change in depends/README.md. It clarifies that CC/CXX control target compilers while build_CC/build_CXX control native build tool compilers, and provides an example command for systems without gcc/g++. No executable code, build logic, or configuration defaults were modified.
Changed components
depends/README.mdInspect captured patch +12 / −0
diff --git a/depends/README.md b/depends/README.md
index 706c3db0..b12df135 100644
--- a/depends/README.md
+++ b/depends/README.md
@@ -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:
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.