From dc08ac951de277d4c601c715b1cb8c121f3eb2e0 Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Sun, 30 Jul 2023 18:10:02 +0200 Subject: [PATCH] package/bitcoin: fix build with gcc 13.x Fixes: http://autobuild.buildroot.net/results/8ac/8aceefdb71814c48163d7b171783172b6e1fdf27/ Signed-off-by: Bernd Kuhls Signed-off-by: Thomas Petazzoni --- ...includes-to-fix-gcc-13-compile-error.patch | 48 +++++++++++++++++++ ...efactor-add-most-of-src-util-to-iwyu.patch | 34 +++++++++++++ .../0004-src-util-string-h-fix-gcc13.patch | 23 +++++++++ 3 files changed, 105 insertions(+) create mode 100644 package/bitcoin/0002-Add-missing-includes-to-fix-gcc-13-compile-error.patch create mode 100644 package/bitcoin/0003-refactor-add-most-of-src-util-to-iwyu.patch create mode 100644 package/bitcoin/0004-src-util-string-h-fix-gcc13.patch diff --git a/package/bitcoin/0002-Add-missing-includes-to-fix-gcc-13-compile-error.patch b/package/bitcoin/0002-Add-missing-includes-to-fix-gcc-13-compile-error.patch new file mode 100644 index 0000000000..22c0ca2adf --- /dev/null +++ b/package/bitcoin/0002-Add-missing-includes-to-fix-gcc-13-compile-error.patch @@ -0,0 +1,48 @@ +From 339a95b7537b47e5d6b732c0633a00afd96e3ca0 Mon Sep 17 00:00:00 2001 +From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> +Date: Thu, 19 Jan 2023 19:35:43 +0100 +Subject: [PATCH] Add missing includes to fix gcc-13 compile error + +Upstream: https://github.com/bitcoin/bitcoin/commit/fadeb6b103cb441e0e91ef506ef29febabb10715 + +Signed-off-by: Bernd Kuhls +--- + src/support/lockedpool.cpp | 3 +++ + src/support/lockedpool.h | 4 ++-- + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/support/lockedpool.cpp b/src/support/lockedpool.cpp +index 26de780f2..11131d551 100644 +--- a/src/support/lockedpool.cpp ++++ b/src/support/lockedpool.cpp +@@ -22,6 +22,9 @@ + #endif + + #include ++#include ++#include ++#include + #ifdef ARENA_DEBUG + #include + #include +diff --git a/src/support/lockedpool.h b/src/support/lockedpool.h +index b9e2e99d1..25b4c0f36 100644 +--- a/src/support/lockedpool.h ++++ b/src/support/lockedpool.h +@@ -5,11 +5,11 @@ + #ifndef BITCOIN_SUPPORT_LOCKEDPOOL_H + #define BITCOIN_SUPPORT_LOCKEDPOOL_H + +-#include ++#include + #include + #include +-#include + #include ++#include + #include + + /** +-- +2.39.2 + diff --git a/package/bitcoin/0003-refactor-add-most-of-src-util-to-iwyu.patch b/package/bitcoin/0003-refactor-add-most-of-src-util-to-iwyu.patch new file mode 100644 index 0000000000..095fa648dd --- /dev/null +++ b/package/bitcoin/0003-refactor-add-most-of-src-util-to-iwyu.patch @@ -0,0 +1,34 @@ +From c187efa907fd64ea2c7b7d699c5c97f9d5b79960 Mon Sep 17 00:00:00 2001 +From: fanquake +Date: Thu, 9 Jun 2022 16:26:55 +0100 +Subject: [PATCH] refactor: add most of src/util to iwyu + +These files change infrequently, and not much header shuffling is required. + +We don't add everything in src/util/ yet, because IWYU makes some +dubious suggestions, which I'm going to follow up with upstream. + +Upstream: https://github.com/bitcoin/bitcoin/commit/07f2c25d04c39a0074e1d9ee1b24b3e359c8153f + +[Bernd: backported relevant part from upstream commit to version 0.21.2 + to fix build error with gcc 13.x] +Signed-off-by: Bernd Kuhls +--- + src/util/bip32.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/util/bip32.h b/src/util/bip32.h +index 347e83db9..6ef051c48 100644 +--- a/src/util/bip32.h ++++ b/src/util/bip32.h +@@ -6,6 +6,7 @@ + #define BITCOIN_UTIL_BIP32_H + + #include ++#include + #include + #include + +-- +2.39.2 + diff --git a/package/bitcoin/0004-src-util-string-h-fix-gcc13.patch b/package/bitcoin/0004-src-util-string-h-fix-gcc13.patch new file mode 100644 index 0000000000..00a9ef2b97 --- /dev/null +++ b/package/bitcoin/0004-src-util-string-h-fix-gcc13.patch @@ -0,0 +1,23 @@ +From fa2deae2a86417d7e0d4cd33fb933b1000d20313 Mon Sep 17 00:00:00 2001 +From: MacroFake +Date: Thu, 5 May 2022 08:28:29 +0200 +Subject: [PATCH] Wrap boost::replace_all + +Upstream: https://github.com/bitcoin/bitcoin/commit/fa2deae2a86417d7e0d4cd33fb933b1000d20313 + +[Bernd: backported relevant part from upstream commit to version 0.21.2 + to fix build error with gcc 13.x] +Signed-off-by: Bernd Kuhls +--- +diff --git a/src/util/string.h b/src/util/string.h +index 2e91347b27a10..df20e34ae9aaa 100644 +--- a/src/util/string.h ++++ b/src/util/string.h +@@ -9,6 +9,7 @@ + + #include + #include ++#include + #include + #include + #include