From 98551a0efdccd27d9e4c1e45a9b3d02f02aaf8bf Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 25 Mar 2026 12:25:44 +0100 Subject: [PATCH 1/5] fuzz: Remove unused g_setup pointers These are unused and removing them avoids clang warnings like: src/test/fuzz/deserialize.cpp:42:26: error: variable g_setup set but not used [-Werror,-Wunused-but-set-variable] Github-Pull: #34918 Rebased-From: fabbfec3b00c138a28034a4f5594305d2220b9bb --- src/test/fuzz/deserialize.cpp | 7 +------ src/test/fuzz/mini_miner.cpp | 2 -- src/wallet/test/fuzz/crypter.cpp | 2 -- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/test/fuzz/deserialize.cpp b/src/test/fuzz/deserialize.cpp index 70cad07d69d..1329f471c70 100644 --- a/src/test/fuzz/deserialize.cpp +++ b/src/test/fuzz/deserialize.cpp @@ -38,18 +38,13 @@ using kernel::CBlockFileInfo; using node::SnapshotMetadata; -namespace { -const BasicTestingSetup* g_setup; -} // namespace - void initialize_deserialize() { static const auto testing_setup = MakeNoLogFileContext<>(); - g_setup = testing_setup.get(); } #define FUZZ_TARGET_DESERIALIZE(name, code) \ - FUZZ_TARGET(name, .init = initialize_deserialize) \ + FUZZ_TARGET(name, .init = initialize_deserialize) \ { \ try { \ code \ diff --git a/src/test/fuzz/mini_miner.cpp b/src/test/fuzz/mini_miner.cpp index 6a5c164985a..3575a8656bd 100644 --- a/src/test/fuzz/mini_miner.cpp +++ b/src/test/fuzz/mini_miner.cpp @@ -26,12 +26,10 @@ namespace { -const TestingSetup* g_setup; std::deque g_available_coins; void initialize_miner() { static const auto testing_setup = MakeNoLogFileContext(); - g_setup = testing_setup.get(); for (uint32_t i = 0; i < uint32_t{100}; ++i) { g_available_coins.emplace_back(Txid::FromUint256(uint256::ZERO), i); } diff --git a/src/wallet/test/fuzz/crypter.cpp b/src/wallet/test/fuzz/crypter.cpp index f8f5935416e..81f8240333e 100644 --- a/src/wallet/test/fuzz/crypter.cpp +++ b/src/wallet/test/fuzz/crypter.cpp @@ -11,11 +11,9 @@ namespace wallet { namespace { -const TestingSetup* g_setup; void initialize_crypter() { static const auto testing_setup = MakeNoLogFileContext(); - g_setup = testing_setup.get(); } FUZZ_TARGET(crypter, .init = initialize_crypter) From f3b64aa405369a92ecafcf2e08c6ac659d5a4da0 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Fri, 27 Mar 2026 17:31:02 -0700 Subject: [PATCH 2/5] fuzz: Use CAmount for storing best_waste Waste is a CAmount, which is an int64_t. This will overflow an int, so `best_waste` should also be a `CAmount`. Github-Pull: #34939 Rebased-From: 890a09b1e49925315a5636f29cc5af36928fe092 --- src/wallet/test/fuzz/coinselection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/test/fuzz/coinselection.cpp b/src/wallet/test/fuzz/coinselection.cpp index 8b30423c6f2..42a53a83c34 100644 --- a/src/wallet/test/fuzz/coinselection.cpp +++ b/src/wallet/test/fuzz/coinselection.cpp @@ -275,7 +275,7 @@ FUZZ_TARGET(bnb_finds_min_waste) // Brute force optimal solution (lowest waste, but cannot be superset of another solution) std::vector solutions; - int best_waste{std::numeric_limits::max()}; + CAmount best_waste{std::numeric_limits::max()}; int best_weight{std::numeric_limits::max()}; for (uint32_t pattern = 1; (pattern >> num_groups) == 0; ++pattern) { // BnB does not permit adding more inputs to a solution, i.e. a superset of a solution cannot ever be a solution. From 56cdeab8b548d6ab09660e239b6d1c12177340eb Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Mon, 30 Mar 2026 13:26:22 +0100 Subject: [PATCH 3/5] depends, qt: Fix build on aarch64 macOS 26.4 Github-Pull: #34956 Rebased-From: 3aeccb7d739c7e9a82c95fbc8f5647ea85a79635 --- depends/packages/native_qt.mk | 4 +- depends/packages/qt.mk | 2 + depends/patches/qt/fix-macos26-qyield.patch | 44 +++++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 depends/patches/qt/fix-macos26-qyield.patch diff --git a/depends/packages/native_qt.mk b/depends/packages/native_qt.mk index 3e1e5626667..2bf088c10ac 100644 --- a/depends/packages/native_qt.mk +++ b/depends/packages/native_qt.mk @@ -9,6 +9,7 @@ $(package)_patches := dont_hardcode_pwd.patch $(package)_patches += qtbase_skip_tools.patch $(package)_patches += rcc_hardcode_timestamp.patch $(package)_patches += qttools_skip_dependencies.patch +$(package)_patches += fix-macos26-qyield.patch $(package)_qttranslations_file_name=$(qt_details_qttranslations_file_name) $(package)_qttranslations_sha256_hash=$(qt_details_qttranslations_sha256_hash) @@ -137,7 +138,8 @@ define $(package)_preprocess_cmds patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \ patch -p1 -i $($(package)_patch_dir)/qtbase_skip_tools.patch && \ patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \ - patch -p1 -i $($(package)_patch_dir)/qttools_skip_dependencies.patch + patch -p1 -i $($(package)_patch_dir)/qttools_skip_dependencies.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix-macos26-qyield.patch endef define $(package)_config_cmds diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 48f7e038bd9..d5ea16e9f77 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -24,6 +24,7 @@ $(package)_patches += fix-gcc16-sfinae-qregularexpression.patch $(package)_patches += fix-gcc16-sfinae-qchar.patch $(package)_patches += fix-gcc16-sfinae-qbitarray.patch $(package)_patches += fix-gcc16-sfinae-qanystringview.patch +$(package)_patches += fix-macos26-qyield.patch $(package)_patches += fix-qbytearray-include.patch $(package)_qttranslations_file_name=$(qt_details_qttranslations_file_name) @@ -281,6 +282,7 @@ define $(package)_preprocess_cmds patch -p1 -i $($(package)_patch_dir)/fix-gcc16-sfinae-qchar.patch && \ patch -p1 -i $($(package)_patch_dir)/fix-gcc16-sfinae-qbitarray.patch && \ patch -p1 -i $($(package)_patch_dir)/fix-gcc16-sfinae-qanystringview.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix-macos26-qyield.patch && \ patch -p1 -i $($(package)_patch_dir)/fix-qbytearray-include.patch endef ifeq ($(host),$(build)) diff --git a/depends/patches/qt/fix-macos26-qyield.patch b/depends/patches/qt/fix-macos26-qyield.patch new file mode 100644 index 00000000000..65514a01cc8 --- /dev/null +++ b/depends/patches/qt/fix-macos26-qyield.patch @@ -0,0 +1,44 @@ +commit a76004f16fdc43e1b7af83bfdf3f1a613491b234 +Author: Paul Wicking +Date: Thu Mar 26 07:09:43 2026 +0100 + + qyieldcpu: Fix compilation with macOS 26.4 SDK + + After updating to the macOS 26.4 SDK, qtbase fails to compile on + Apple Silicon with an implicit function declaration error for + __yield() in qyieldcpu.h. It appears that the SDK's Clang now + reports __has_builtin(__yield) as true, but __yield() requires + for its declaration. + + The compiler's own __builtin_arm_yield intrinsic was already checked + further down in the cascade. Moving it above the __yield check resolves + the build failure, without unnecessarily pulling in the header. + + Fixes: QTBUG-145239 + Change-Id: I94b4d8f72385a4944c272ed7a66d249537a82e7d + Reviewed-by: Tor Arne Vestbø + Reviewed-by: Fabian Kosmale + +--- a/qtbase/src/corelib/thread/qyieldcpu.h ++++ b/qtbase/src/corelib/thread/qyieldcpu.h +@@ -31,7 +31,9 @@ void qYieldCpu(void) + noexcept + #endif + { +-#if __has_builtin(__yield) ++#if __has_builtin(__builtin_arm_yield) ++ __builtin_arm_yield(); ++#elif __has_builtin(__yield) + __yield(); // Generic + #elif defined(_YIELD_PROCESSOR) && defined(Q_CC_MSVC) + _YIELD_PROCESSOR(); // Generic; MSVC's +@@ -45,9 +47,6 @@ void qYieldCpu(void) + _mm_pause(); + #elif defined(Q_PROCESSOR_X86) + __asm__("pause"); // hopefully asm() works in this compiler +- +-#elif __has_builtin(__builtin_arm_yield) +- __builtin_arm_yield(); + #elif defined(Q_PROCESSOR_ARM) && Q_PROCESSOR_ARM >= 7 && defined(Q_CC_GNU) + __asm__("yield"); // this works everywhere + From f0e1014c396c80cc946beff719af04ebfd482f82 Mon Sep 17 00:00:00 2001 From: Alexander Wiederin Date: Wed, 1 Apr 2026 13:23:54 +0200 Subject: [PATCH 4/5] kernel: Remove NONNULL annotation from destroy method No other *_destroy function in the Kernel API carries this annotation. Following the convention set by free(), destroy functions should accept null pointers. Github-Pull: #34982 Rebased-From: 75608547b469b72caa890c8b356d0d3284998701 --- src/kernel/bitcoinkernel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/bitcoinkernel.h b/src/kernel/bitcoinkernel.h index 5427e776177..00bab4a0f9d 100644 --- a/src/kernel/bitcoinkernel.h +++ b/src/kernel/bitcoinkernel.h @@ -1333,7 +1333,7 @@ BITCOINKERNEL_API btck_BlockValidationState* BITCOINKERNEL_WARN_UNUSED_RESULT bt * Destroy the btck_BlockValidationState. */ BITCOINKERNEL_API void btck_block_validation_state_destroy( - btck_BlockValidationState* block_validation_state) BITCOINKERNEL_ARG_NONNULL(1); + btck_BlockValidationState* block_validation_state); ///@} From ef10b2ec6573a35f5ef71133ae444b09b3040e33 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Mon, 30 Mar 2026 11:29:43 +0100 Subject: [PATCH 5/5] guix: Clean up module list in manifest These modules are no longer in use: 1. `cmake-build-system` since bitcoin/bitcoin#34550. 2. `gnu-build-system` since bitcoin/bitcoin#34627. 3. `download` since bitcoin/bitcoin#34550. 4. `cc-for-target` from `utils` since bitcoin/bitcoin#34627. Github-Pull: #34944 Rebased-From: 325f743eedd25be268f74b9cf91198f50d2b3cf0 --- contrib/guix/manifest.scm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm index 9cadd410537..927aa30f077 100644 --- a/contrib/guix/manifest.scm +++ b/contrib/guix/manifest.scm @@ -22,17 +22,14 @@ ((gnu packages python-xyz) #:select (python-pydantic-2)) ((gnu packages tls) #:select (openssl)) ((gnu packages version-control) #:select (git-minimal)) - (guix build-system cmake) - (guix build-system gnu) (guix build-system python) (guix build-system pyproject) (guix build-system trivial) - (guix download) (guix gexp) (guix git-download) ((guix licenses) #:prefix license:) (guix packages) - ((guix utils) #:select (cc-for-target substitute-keyword-arguments))) + ((guix utils) #:select (substitute-keyword-arguments))) (define-syntax-rule (search-our-patches file-name ...) "Return the list of absolute file names corresponding to each