depends: Do not consider `CC` environment variable when detecting system
What changed, and why it matters
This is a small build-system fix in Bitcoin Core's dependency builder. It prevents the CC environment variable (which tells a build which C compiler to use) from confusing the script that guesses what platform is being built on. The change makes cross-compilation detection more reliable, but it is not a runtime security fix for Bitcoin nodes or wallets.
Treat as a normal build-system reliability fix. No urgent security deployment is required solely because of this commit. Users who build Bitcoin Core from source, especially cross-compilers, should ensure their build environment is updated. Review build logs if CC is set to confirm correct host/target detection.
Security signals we found
Build-system misconfiguration signal: environment variable CC could alter platform detection
Cross-compilation detection failure could lead to incorrect toolchain or target library selection
No direct memory-safety, cryptographic, consensus, or network-attack surface change present in diff
Evidence from the diff
The commit modifies depends/Makefile so that the BUILD triplet detection runs with CC unset: BUILD = $(shell unset CC && ./config.guess). Previously, if CC was set in the environment, config.guess could incorporate the compiler path or target into its guessed build platform, causing the depends build system to mis-detect whether cross-compilation was in use. This is a build-configuration correctness fix; it does not patch a vulnerability in consensus, networking, wallet, or RPC code.
Changed components
depends/MakefileBitcoin Core dependency build systemconfig.guess platform detectionInspect captured patch +1 / −1
diff --git a/depends/Makefile b/depends/Makefile
index fde108d2..c377187b 100644
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -49,7 +49,7 @@ FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
C_STANDARD ?= c11
CXX_STANDARD ?= c++20
-BUILD = $(shell ./config.guess)
+BUILD = $(shell unset CC && ./config.guess)
PATCHES_PATH = $(BASEDIR)/patches
BASEDIR = $(CURDIR)
HASH_LENGTH:=11
Why this scored 16/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.