depends: Fix cross-compiling on macOS for Windows
What changed, and why it matters
This is a build-system fix for people who compile Bitcoin's dependency Qt on a Mac but intend to run it on Windows. It swaps a wrong variable (host_os) for the correct one (build_os) and turns off two Apple-specific version checks that do not apply when the final target is Windows. There is no indication this changes runtime behavior or fixes a security vulnerability.
No security action required. Treat as a normal build-system maintenance commit.
Security signals we found
No security-relevant code change observed
Build-system-only change in depends package recipe
No mention of vulnerability, CVE, security, researcher, or incident in commit message
Evidence from the diff
The commit modifies depends/packages/native_qt.mk. Native packages run on the build machine, so their configuration should key off build_os, not host_os. The previous code passed XCODE_VERSION to the Qt build whenever host_os was darwin, which is incorrect for a macOS→Windows cross-compile because the build machine is macOS but the host is Windows. The patch changes the guard to build_os and replaces the Xcode version flag with two disable flags: QT_NO_APPLE_SDK_MAX_VERSION_CHECK and QT_NO_XCODE_MIN_VERSION_CHECK. This is a correctness/reliability fix in the dependency build, not a code change to Bitcoin Core itself.
Changed components
depends/packages/native_qt.mkInspect captured patch +2 / −2
diff --git a/depends/packages/native_qt.mk b/depends/packages/native_qt.mk
index 310c9f13..3e1e5626 100644
--- a/depends/packages/native_qt.mk
+++ b/depends/packages/native_qt.mk
@@ -97,9 +97,9 @@ ifneq ($(V),)
$(package)_cmake_opts += --log-level=STATUS
endif
-ifeq ($(host_os),darwin)
-$(package)_cmake_opts += -DQT_INTERNAL_XCODE_VERSION=$(XCODE_VERSION)
+ifeq ($(build_os),darwin)
$(package)_cmake_opts += -DQT_NO_APPLE_SDK_MAX_VERSION_CHECK=ON
+$(package)_cmake_opts += -DQT_NO_XCODE_MIN_VERSION_CHECK=ON
endif
endef
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.