Inside Bitcoin
Opening the selected file…
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1package=qt2include packages/qt_details.mk3$(package)_version=$(qt_details_version)4$(package)_download_path=$(qt_details_download_path)5$(package)_file_name=$(qt_details_qtbase_file_name)6$(package)_sha256_hash=$(qt_details_qtbase_sha256_hash)7ifneq ($(host),$(build))8$(package)_dependencies := native_$(package)9endif10$(package)_linux_dependencies := freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_cursor libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm11$(package)_freebsd_dependencies := $($(package)_linux_dependencies)12$(package)_openbsd_dependencies := $($(package)_linux_dependencies)13$(package)_patches_path := $(qt_details_patches_path)14$(package)_patches := cocoa_compat.patch15$(package)_patches += dont_hardcode_pwd.patch16$(package)_patches += qtbase_avoid_qmain.patch17$(package)_patches += qtbase_plugins_cocoa.patch18$(package)_patches += qtbase_skip_tools.patch19$(package)_patches += rcc_hardcode_timestamp.patch20$(package)_patches += qttools_skip_dependencies.patch21$(package)_patches += static_fixes.patch22$(package)_patches += fix-gcc16-qcompare.patch23$(package)_patches += fix-gcc16-sfinae-qregularexpression.patch24$(package)_patches += fix-gcc16-sfinae-qchar.patch25$(package)_patches += fix-gcc16-sfinae-qbitarray.patch26$(package)_patches += fix-gcc16-sfinae-qanystringview.patch27$(package)_patches += fix-macos26-qyield.patch28$(package)_patches += fix-qbytearray-include.patch29$(package)_patches += fix_openbsd_network_kernel.patch30$(package)_patches += fix_openbsd_plugin_qelfparser.patch31$(package)_patches += fix_missed_headers.patch33$(package)_qttranslations_file_name=$(qt_details_qttranslations_file_name)34$(package)_qttranslations_sha256_hash=$(qt_details_qttranslations_sha256_hash)36$(package)_qttools_file_name=$(qt_details_qttools_file_name)37$(package)_qttools_sha256_hash=$(qt_details_qttools_sha256_hash)39$(package)_extra_sources := $($(package)_qttranslations_file_name)40$(package)_extra_sources += $($(package)_qttools_file_name)42$(package)_top_download_path=$(qt_details_top_download_path)43$(package)_top_cmakelists_file_name=$(qt_details_top_cmakelists_file_name)44$(package)_top_cmakelists_download_file=$(qt_details_top_cmakelists_download_file)45$(package)_top_cmakelists_sha256_hash=$(qt_details_top_cmakelists_sha256_hash)46$(package)_top_cmake_download_path=$(qt_details_top_cmake_download_path)47$(package)_top_cmake_ecmoptionaladdsubdirectory_file_name=$(qt_details_top_cmake_ecmoptionaladdsubdirectory_file_name)48$(package)_top_cmake_ecmoptionaladdsubdirectory_download_file=$(qt_details_top_cmake_ecmoptionaladdsubdirectory_download_file)49$(package)_top_cmake_ecmoptionaladdsubdirectory_sha256_hash=$(qt_details_top_cmake_ecmoptionaladdsubdirectory_sha256_hash)50$(package)_top_cmake_qttoplevelhelpers_file_name=$(qt_details_top_cmake_qttoplevelhelpers_file_name)51$(package)_top_cmake_qttoplevelhelpers_download_file=$(qt_details_top_cmake_qttoplevelhelpers_download_file)52$(package)_top_cmake_qttoplevelhelpers_sha256_hash=$(qt_details_top_cmake_qttoplevelhelpers_sha256_hash)54$(package)_extra_sources += $($(package)_top_cmakelists_file_name)-$($(package)_version)55$(package)_extra_sources += $($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version)56$(package)_extra_sources += $($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version)58define $(package)_set_vars59$(package)_config_opts_release := -release60$(package)_config_opts_debug := -debug61$(package)_config_opts := -no-egl62$(package)_config_opts += -no-eglfs63$(package)_config_opts += -no-evdev64$(package)_config_opts += -no-gif65$(package)_config_opts += -no-glib66$(package)_config_opts += -no-icu67$(package)_config_opts += -no-ico68$(package)_config_opts += -no-kms69$(package)_config_opts += -no-linuxfb70$(package)_config_opts += -no-libjpeg71$(package)_config_opts += -no-libproxy72$(package)_config_opts += -no-libudev73$(package)_config_opts += -no-mtdev74$(package)_config_opts += -no-opengl75$(package)_config_opts += -no-openssl76$(package)_config_opts += -no-openvg77$(package)_config_opts += -no-reduce-relocations78$(package)_config_opts += -no-schannel79$(package)_config_opts += -no-sctp80$(package)_config_opts += -no-securetransport81$(package)_config_opts += -no-system-proxies82$(package)_config_opts += -no-use-gold-linker83$(package)_config_opts += -no-zstd84$(package)_config_opts += -nomake examples85$(package)_config_opts += -nomake tests86$(package)_config_opts += -prefix $(host_prefix)87$(package)_config_opts += -qt-doubleconversion88$(package)_config_opts += -qt-harfbuzz89ifneq ($(host),$(build))90$(package)_config_opts += -qt-host-path $(build_prefix)91endif92$(package)_config_opts += -qt-libpng93$(package)_config_opts += -qt-pcre94$(package)_config_opts += -qt-zlib95$(package)_config_opts += -static96$(package)_config_opts += -no-feature-backtrace97$(package)_config_opts += -no-feature-colordialog98$(package)_config_opts += -no-feature-concurrent99$(package)_config_opts += -no-feature-dial100$(package)_config_opts += -no-feature-gssapi101$(package)_config_opts += -no-feature-http102$(package)_config_opts += -no-feature-image_heuristic_mask103$(package)_config_opts += -no-feature-keysequenceedit104$(package)_config_opts += -no-feature-lcdnumber105$(package)_config_opts += -no-feature-libresolv106# Disable libstdcpp_assertions (_GLIBCXX_ASSERTIONS) to prevent embedding absolute107# C++ standard library paths into object files, which breaks reproducible builds.108$(package)_config_opts += -no-feature-libstdcpp_assertions109$(package)_config_opts += -no-feature-networkdiskcache110$(package)_config_opts += -no-feature-networkproxy111$(package)_config_opts += -no-feature-printsupport112$(package)_config_opts += -no-feature-sessionmanager113$(package)_config_opts += -no-feature-socks5114$(package)_config_opts += -no-feature-sql115$(package)_config_opts += -no-feature-textmarkdownreader116$(package)_config_opts += -no-feature-textmarkdownwriter117$(package)_config_opts += -no-feature-textodfwriter118$(package)_config_opts += -no-feature-topleveldomain119$(package)_config_opts += -no-feature-udpsocket120$(package)_config_opts += -no-feature-undocommand121$(package)_config_opts += -no-feature-undogroup122$(package)_config_opts += -no-feature-undostack123$(package)_config_opts += -no-feature-undoview124$(package)_config_opts += -no-feature-vnc125$(package)_config_opts += -no-feature-vulkan127# Core tools.128$(package)_config_opts += -no-feature-androiddeployqt129$(package)_config_opts += -no-feature-macdeployqt130$(package)_config_opts += -no-feature-qmake131$(package)_config_opts += -no-feature-windeployqt133ifeq ($(host),$(build))134# Qt Tools module.135$(package)_config_opts += -feature-linguist136$(package)_config_opts += -no-feature-assistant137$(package)_config_opts += -no-feature-clang138$(package)_config_opts += -no-feature-clangcpp139$(package)_config_opts += -no-feature-designer140$(package)_config_opts += -no-feature-pixeltool141$(package)_config_opts += -no-feature-qdoc142$(package)_config_opts += -no-feature-qtattributionsscanner143$(package)_config_opts += -no-feature-qtdiag144$(package)_config_opts += -no-feature-qtplugininfo145endif147$(package)_config_opts_darwin := -no-dbus148$(package)_config_opts_darwin += -no-feature-printsupport149$(package)_config_opts_darwin += -no-feature-freetype150$(package)_config_opts_darwin += -no-pkg-config152$(package)_config_opts_linux := -fontconfig153$(package)_config_opts_linux += -no-feature-process154$(package)_config_opts_linux += -no-feature-xlib155$(package)_config_opts_linux += -no-xcb-xlib156$(package)_config_opts_linux += -pkg-config157$(package)_config_opts_linux += -system-freetype158$(package)_config_opts_linux += -xcb159ifneq ($(LTO),)160$(package)_config_opts_linux += -ltcg161endif162$(package)_config_opts_freebsd := $$($(package)_config_opts_linux)163$(package)_config_opts_freebsd += -no-feature-inotify164$(package)_config_opts_openbsd := $$($(package)_config_opts_linux)166$(package)_config_opts_mingw32 := -no-dbus167$(package)_config_opts_mingw32 += -no-feature-freetype168$(package)_config_opts_mingw32 += -no-pkg-config170# CMake build options.171$(package)_config_env := CC="$$($(package)_cc)"172$(package)_config_env += CXX="$$($(package)_cxx)"173$(package)_config_env_darwin := OBJC="$$($(package)_cc)"174$(package)_config_env_darwin += OBJCXX="$$($(package)_cxx)"176$(package)_cmake_opts := -DCMAKE_PREFIX_PATH=$(host_prefix)177$(package)_cmake_opts += -DQT_FEATURE_cxx20=ON178$(package)_cmake_opts += -DQT_GENERATE_SBOM=OFF179ifneq ($(V),)180$(package)_cmake_opts += --log-level=STATUS181endif183$(package)_cmake_opts += -DQT_USE_DEFAULT_CMAKE_OPTIMIZATION_FLAGS=ON184# The bundled libpng 1.6.49 in Qt 6.8.4 introduced support for185# the RISC-V Vector Extension (RVV). However, the resulting library186# fails to link when cross-compiling for riscv64-linux-gnu.187# Disable this feature for now.188$(package)_cmake_opts += -DCMAKE_C_FLAGS="$$($(package)_cppflags) -DPNG_RISCV_RVV_OPT=0 $$($$($(package)_type)_CFLAGS) -ffile-prefix-map=$$($(package)_extract_dir)=/usr"189$(package)_cmake_opts += -DCMAKE_C_FLAGS_RELEASE="$$($$($(package)_type)_release_CFLAGS)"190$(package)_cmake_opts += -DCMAKE_C_FLAGS_DEBUG="$$($$($(package)_type)_debug_CFLAGS)"191$(package)_cmake_opts += -DCMAKE_CXX_FLAGS="$$($(package)_cppflags) $$($$($(package)_type)_CXXFLAGS) -ffile-prefix-map=$$($(package)_extract_dir)=/usr"192$(package)_cmake_opts += -DCMAKE_CXX_FLAGS_RELEASE="$$($$($(package)_type)_release_CXXFLAGS)"193$(package)_cmake_opts += -DCMAKE_CXX_FLAGS_DEBUG="$$($$($(package)_type)_debug_CXXFLAGS)"194ifeq ($(host_os),darwin)195$(package)_cmake_opts += -DCMAKE_OBJC_FLAGS="$$($(package)_cppflags) $$($$($(package)_type)_CFLAGS) -ffile-prefix-map=$$($(package)_extract_dir)=/usr"196$(package)_cmake_opts += -DCMAKE_OBJC_FLAGS_RELEASE="$$($$($(package)_type)_release_CFLAGS)"197$(package)_cmake_opts += -DCMAKE_OBJC_FLAGS_DEBUG="$$($$($(package)_type)_debug_CFLAGS)"198$(package)_cmake_opts += -DCMAKE_OBJCXX_FLAGS="$$($(package)_cppflags) $$($$($(package)_type)_CXXFLAGS) -ffile-prefix-map=$$($(package)_extract_dir)=/usr"199$(package)_cmake_opts += -DCMAKE_OBJCXX_FLAGS_RELEASE="$$($$($(package)_type)_release_CXXFLAGS)"200$(package)_cmake_opts += -DCMAKE_OBJCXX_FLAGS_DEBUG="$$($$($(package)_type)_debug_CXXFLAGS)"201endif202$(package)_cmake_opts += -DCMAKE_EXE_LINKER_FLAGS="$$($$($(package)_type)_LDFLAGS)"203$(package)_cmake_opts += -DCMAKE_EXE_LINKER_FLAGS_RELEASE="$$($$($(package)_type)_release_LDFLAGS)"204$(package)_cmake_opts += -DCMAKE_EXE_LINKER_FLAGS_DEBUG="$$($$($(package)_type)_debug_LDFLAGS)"205$(package)_cmake_opts += -DCMAKE_AR="$$($(package)_ar)"207ifneq ($(host),$(build))208$(package)_cmake_opts += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system_name)209$(package)_cmake_opts += -DCMAKE_SYSTEM_VERSION=$($(host_os)_cmake_system_version)210$(package)_cmake_opts += -DCMAKE_SYSTEM_PROCESSOR=$(host_arch)211# Native packages cannot be used during cross-compiling. However,212# Qt still unconditionally tries to find them, which causes issues213# in some cases, such as when cross-compiling from macOS to Windows.214# Explicitly disable this unnecessary Qt behaviour.215$(package)_cmake_opts += -DCMAKE_DISABLE_FIND_PACKAGE_Libb2=TRUE216$(package)_cmake_opts += -DCMAKE_DISABLE_FIND_PACKAGE_WrapSystemDoubleConversion=TRUE217$(package)_cmake_opts += -DCMAKE_DISABLE_FIND_PACKAGE_WrapSystemMd4c=TRUE218$(package)_cmake_opts += -DCMAKE_DISABLE_FIND_PACKAGE_WrapZSTD=TRUE219endif220ifneq (,$(filter linux openbsd,$(host_os)))221# The `-dbus-runtime` configure option does not work222# https://qt-project.atlassian.net/browse/QTBUG-144864223$(package)_cmake_opts += -DINPUT_dbus=runtime224endif225ifeq ($(host_os),darwin)226$(package)_cmake_opts += -DCMAKE_INSTALL_NAME_TOOL=true227$(package)_cmake_opts += -DCMAKE_FRAMEWORK_PATH=$(OSX_SDK)/System/Library/Frameworks228$(package)_cmake_opts += -DQT_INTERNAL_APPLE_SDK_VERSION=$(OSX_SDK_VERSION)229$(package)_cmake_opts += -DQT_INTERNAL_XCODE_VERSION=$(XCODE_VERSION)230$(package)_cmake_opts += -DQT_NO_APPLE_SDK_MAX_VERSION_CHECK=ON231endif232endef234define $(package)_fetch_cmds235$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \236$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttranslations_file_name),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_hash)) && \237$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash)) && \238$(call fetch_file,$(package),$($(package)_top_download_path),$($(package)_top_cmakelists_download_file),$($(package)_top_cmakelists_file_name)-$($(package)_version),$($(package)_top_cmakelists_sha256_hash)) && \239$(call fetch_file,$(package),$($(package)_top_cmake_download_path),$($(package)_top_cmake_ecmoptionaladdsubdirectory_download_file),$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version),$($(package)_top_cmake_ecmoptionaladdsubdirectory_sha256_hash)) && \240$(call fetch_file,$(package),$($(package)_top_cmake_download_path),$($(package)_top_cmake_qttoplevelhelpers_download_file),$($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version),$($(package)_top_cmake_qttoplevelhelpers_sha256_hash))241endef243ifeq ($(host),$(build))244define $(package)_extract_cmds245mkdir -p $($(package)_extract_dir) && \246echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \247echo "$($(package)_qttranslations_sha256_hash) $($(package)_source_dir)/$($(package)_qttranslations_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \248echo "$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \249echo "$($(package)_top_cmakelists_sha256_hash) $($(package)_source_dir)/$($(package)_top_cmakelists_file_name)-$($(package)_version)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \250echo "$($(package)_top_cmake_ecmoptionaladdsubdirectory_sha256_hash) $($(package)_source_dir)/$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.