From 0d77d99d23d843ee2c4449d244e0f4d8ada3dddf Mon Sep 17 00:00:00 2001 From: Adrien 'neox' Bourmault Date: Tue, 8 Aug 2023 15:33:51 +0200 Subject: [PATCH] coreboot/fam15h: fixing binutils not building properly Without that fix, if we build for a fam15h target on PureOS byzantium, we have a build failure: $ ./build boot roms kgpe-d16-udimm_2mb [...] Building MPC v1.1.0 for host ... ok Building BINUTILS v2.32 for target ... failed. Check 'build-i386-elf-BINUTILS/build.log make[2]: *** [Makefile:26: build_gcc] Error 1 make[1]: *** [Makefile:51: build-i386] Error 2 make: *** [util/crossgcc/Makefile.inc:48: crossgcc-i386] Error 2 Error: build/roms: something went wrong Then the build log (here) in available in coreboot/fam15h_udimm/util/crossgcc/build-i386-elf-BINUTILS/build.log has the following: In file included from ../../binutils-2.32/gold/debug.h:29, from ../../binutils-2.32/gold/descriptors.cc:31: ../../binutils-2.32/gold/errors.h:87:50: error: 'string' in namespace 'std' does not name a type 87 | undefined_symbol(const Symbol* sym, const std::string& location); | ^~~~~~ ../../binutils-2.32/gold/errors.h:29:1: note: 'std::string' is defined in header ''; did you forget to '#include '? 28 | #include "gold-threads.h" +++ |+#include 29 | Signed-off-by: Adrien Bourmault GNUtoo: commit message but not its title Acked-by: Denis 'GNUtoo' Carikli Acked-by: Adrien 'neox' Bourmault --- ...patch-binutils-2.32-for-newer-hostcc.patch | 29 +++++++++++++++++++ ...patch-binutils-2.32-for-newer-hostcc.patch | 29 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 resources/coreboot/fam15h_rdimm/patches/0008-crossgcc-patch-binutils-2.32-for-newer-hostcc.patch create mode 100644 resources/coreboot/fam15h_udimm/patches/0008-crossgcc-patch-binutils-2.32-for-newer-hostcc.patch diff --git a/resources/coreboot/fam15h_rdimm/patches/0008-crossgcc-patch-binutils-2.32-for-newer-hostcc.patch b/resources/coreboot/fam15h_rdimm/patches/0008-crossgcc-patch-binutils-2.32-for-newer-hostcc.patch new file mode 100644 index 0000000..ae11e40 --- /dev/null +++ b/resources/coreboot/fam15h_rdimm/patches/0008-crossgcc-patch-binutils-2.32-for-newer-hostcc.patch @@ -0,0 +1,29 @@ +From 4b4b2bdc2cedb3e219c6f90809e5684441b1dafa Mon Sep 17 00:00:00 2001 +From: Adrien 'neox' Bourmault +Date: Sun, 8 Aug 2023 15:31:32 +0200 +Subject: [PATCH 1/1] crossgcc: patch binutils 2.32 for newer hostcc + +Signed-off-by: Adrien 'neox' Bourmault +--- + util/crossgcc/patches/binutils-2.32_stringfix.patch | 11 +++++++++++ + 1 file changed, 11 insertions(+) + create mode 100644 util/crossgcc/patches/binutils-2.32_stringfix.patch + +diff --git a/util/crossgcc/patches/binutils-2.32_stringfix.patch b/util/crossgcc/patches/binutils-2.32_stringfix.patch +new file mode 100644 +index 0000000000..de27a2752a +--- /dev/null ++++ b/util/crossgcc/patches/binutils-2.32_stringfix.patch +@@ -0,0 +1,10 @@ ++diff -u binutils-2.32/gold/errors.h binutils-2.32.patched/gold/errors.h ++--- binutils-2.32/gold/errors.h +++++ binutils-2.32.patched/gold/errors.h ++@@ -24,6 +24,7 @@ ++ #define GOLD_ERRORS_H ++ ++ #include +++#include ++ ++ #include "gold-threads.h" +-- +2.40.1 diff --git a/resources/coreboot/fam15h_udimm/patches/0008-crossgcc-patch-binutils-2.32-for-newer-hostcc.patch b/resources/coreboot/fam15h_udimm/patches/0008-crossgcc-patch-binutils-2.32-for-newer-hostcc.patch new file mode 100644 index 0000000..ae11e40 --- /dev/null +++ b/resources/coreboot/fam15h_udimm/patches/0008-crossgcc-patch-binutils-2.32-for-newer-hostcc.patch @@ -0,0 +1,29 @@ +From 4b4b2bdc2cedb3e219c6f90809e5684441b1dafa Mon Sep 17 00:00:00 2001 +From: Adrien 'neox' Bourmault +Date: Sun, 8 Aug 2023 15:31:32 +0200 +Subject: [PATCH 1/1] crossgcc: patch binutils 2.32 for newer hostcc + +Signed-off-by: Adrien 'neox' Bourmault +--- + util/crossgcc/patches/binutils-2.32_stringfix.patch | 11 +++++++++++ + 1 file changed, 11 insertions(+) + create mode 100644 util/crossgcc/patches/binutils-2.32_stringfix.patch + +diff --git a/util/crossgcc/patches/binutils-2.32_stringfix.patch b/util/crossgcc/patches/binutils-2.32_stringfix.patch +new file mode 100644 +index 0000000000..de27a2752a +--- /dev/null ++++ b/util/crossgcc/patches/binutils-2.32_stringfix.patch +@@ -0,0 +1,10 @@ ++diff -u binutils-2.32/gold/errors.h binutils-2.32.patched/gold/errors.h ++--- binutils-2.32/gold/errors.h +++++ binutils-2.32.patched/gold/errors.h ++@@ -24,6 +24,7 @@ ++ #define GOLD_ERRORS_H ++ ++ #include +++#include ++ ++ #include "gold-threads.h" +-- +2.40.1