package/bitcoin: fix build with gcc 13.x
PATCH 1/1 package/bitcoin: fix build with gcc 13.x
Fixes:
http://autobuild.buildroot.net/results/8ac/8aceefdb71814c48163d7b171783172b6e1fdf27/
Signed-off-by Bernd Kuhls <[email protected]>
--- ...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
package/bitcoin/0002-Add-missing-includes-to-fix-gcc-13-compile-error.patch new file +48 -0
@@ -0,0 +1,48 @@ +From 339a95b7537b47e5d6b732c0633a00afd96e3ca0 Mon Sep 17 00:00:00 2001 +From: MarcoFalke <*~=`'#}+{/-|&$^[email protected]> +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 <[email protected]> +--- + 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 <algorithm> ++#include <limits> ++#include <stdexcept> ++#include <utility> + #ifdef ARENA_DEBUG + #include <iomanip> + #include <iostream> +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 <stdint.h> ++#include <cstddef> + #include <list> + #include <map> +-#include <mutex> + #include <memory> ++#include <mutex> + #include <unordered_map> + + /** +-- +2.39.2 +
package/bitcoin/0003-refactor-add-most-of-src-util-to-iwyu.patch new file +34 -0
@@ -0,0 +1,34 @@ +From c187efa907fd64ea2c7b7d699c5c97f9d5b79960 Mon Sep 17 00:00:00 2001 +From: fanquake <[email protected]> +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 <[email protected]> +--- + 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 <attributes.h> ++#include <cstdint> + #include <string> + #include <vector> + +-- +2.39.2 +
package/bitcoin/0004-src-util-string-h-fix-gcc13.patch new file +23 -0
@@ -0,0 +1,23 @@ +From fa2deae2a86417d7e0d4cd33fb933b1000d20313 Mon Sep 17 00:00:00 2001 +From: MacroFake <[email protected]> +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 <[email protected]> +--- +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 <algorithm> + #include <array> ++#include <cstdint> + #include <cstring> + #include <locale> + #include <sstream>
Signature · 6 lines
2.39.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedQuoted 4 lines · On Sun, 30 Jul 2023 18:10:02 +0200 Bernd Kuhls <[email protected]> wrote:
Fixes:
http://autobuild.buildroot.net/results/8ac/8aceefdb71814c48163d7b171783172b6e1fdf27/Signed-off-by Bernd Kuhls <[email protected]>
Quoted 8 lines
--- ...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
Applied to master, thanks.
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot