cmake: Provide `install_name_tool` stub instead of disabling it
What changed, and why it matters
This is a build-system fix for Bitcoin Core's CMake configuration when cross-compiling macOS binaries from Linux. It replaces a workaround that disabled a CMake tool check with a harmless stub command, restoring compatibility with newer CMake versions. There is no security issue in the change itself.
No security action required; treat as a normal build-system fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit changes how Bitcoin Core’s CMake setup satisfies CMake’s expectation of an install_name_tool when cross-compiling for Darwin from a non-Darwin host. Previously it set CMAKE_PLATFORM_HAS_INSTALLNAME FALSE to suppress the check; CMake 4.0.5+/4.1.0 no longer accepts that, causing configuration failures with the Ninja generator. The patch instead points CMAKE_INSTALL_NAME_TOOL to cmake -E true, a no-op stub, matching the existing approach in the depends build subsystem. This is purely a build-configuration compatibility fix.
Changed components
CMakeLists.txt build configurationInspect captured patch +1 / −1
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8d5a5dd2..66d4112f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -77,7 +77,7 @@ if(CMAKE_VERSION VERSION_LESS 4.2 AND CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NO
# - https://gitlab.kitware.com/cmake/cmake/-/issues/27069
# - https://gitlab.kitware.com/cmake/cmake/-/merge_requests/10955
# So disable this tool check in further enable_language() commands.
- set(CMAKE_PLATFORM_HAS_INSTALLNAME FALSE)
+ set(CMAKE_INSTALL_NAME_TOOL "${CMAKE_COMMAND} -E true")
endif()
enable_language(CXX)
set(CMAKE_CXX_STANDARD 20)
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.