[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 18/20] coreboot/fam15h: fix binutils build error on gcc13
From: |
Leah Rowe |
Subject: |
[PATCH 18/20] coreboot/fam15h: fix binutils build error on gcc13 |
Date: |
Sun, 14 Jan 2024 15:55:35 +0000 |
From: Leah Rowe <leah@libreboot.org>
newer gcc treats warnings as errors by default. a user on gnuboot
irc had issues compiling kgpe-d16 images on current gentoo as
of 13 january 2024. the kgpe-d16 boards use coreboot 4.11_branch,
on which coreboot's crossgcc toolchain uses binutils 2.32.
instead of endlessly patching binutils, modify coreboot's build
system to disable warnings-as-errors when building binutils.
with this patch, it will now be possible to compile images for
kgpe-d16, kcma-d8 and kfsn4-dre mainboards on modern distros.
Signed-off-by: Leah Rowe <leah@libreboot.org>
---
...n-t-treat-binutil-warnings-as-errors.patch | 35 +++++++++++++++++++
...n-t-treat-binutil-warnings-as-errors.patch | 35 +++++++++++++++++++
2 files changed, 70 insertions(+)
create mode 100644
resources/coreboot/fam15h_rdimm/patches/0012-buildgcc-don-t-treat-binutil-warnings-as-errors.patch
create mode 100644
resources/coreboot/fam15h_udimm/patches/0012-buildgcc-don-t-treat-binutil-warnings-as-errors.patch
diff --git
a/resources/coreboot/fam15h_rdimm/patches/0012-buildgcc-don-t-treat-binutil-warnings-as-errors.patch
b/resources/coreboot/fam15h_rdimm/patches/0012-buildgcc-don-t-treat-binutil-warnings-as-errors.patch
new file mode 100644
index 0000000..c767968
--- /dev/null
+++
b/resources/coreboot/fam15h_rdimm/patches/0012-buildgcc-don-t-treat-binutil-warnings-as-errors.patch
@@ -0,0 +1,35 @@
+From 5ec265deac0da077c9b1e23fc52abe1b5f0696b5 Mon Sep 17 00:00:00 2001
+From: Leah Rowe <leah@libreboot.org>
+Date: Sat, 13 Jan 2024 14:57:46 +0000
+Subject: [PATCH 1/1] buildgcc: don't treat binutil warnings as errors
+
+binutils 2.32 has too many build warnings on modern toolchains,
+and newer gcc versions are much more pedantic about warnings,
+treating them as errors by default.
+
+instead of patching binutils like before, just let the warnings
+persist. the warnings are benign. a user on gnuboot irc had serious
+issues building binutils 2.32 specifically, on current gentoo as
+of 13 January 2024. this patch mitigates those warning messages.
+
+Signed-off-by: Leah Rowe <leah@libreboot.org>
+---
+ util/crossgcc/buildgcc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
+index 505cd7484c..6f1953e68d 100755
+--- a/util/crossgcc/buildgcc
++++ b/util/crossgcc/buildgcc
+@@ -719,7 +719,7 @@ build_BINUTILS() {
+ --disable-werror --disable-nls --enable-lto --enable-gold \
+ --enable-interwork --enable-multilib \
+ --enable-plugins --enable-multilibs \
+- CFLAGS="$HOSTCFLAGS" \
++ CFLAGS="$HOSTCFLAGS -Wno-error -w" \
+ CXXFLAGS="$HOSTCFLAGS" \
+ || touch .failed
+ # shellcheck disable=SC2086
+--
+2.39.2
+
diff --git
a/resources/coreboot/fam15h_udimm/patches/0012-buildgcc-don-t-treat-binutil-warnings-as-errors.patch
b/resources/coreboot/fam15h_udimm/patches/0012-buildgcc-don-t-treat-binutil-warnings-as-errors.patch
new file mode 100644
index 0000000..c767968
--- /dev/null
+++
b/resources/coreboot/fam15h_udimm/patches/0012-buildgcc-don-t-treat-binutil-warnings-as-errors.patch
@@ -0,0 +1,35 @@
+From 5ec265deac0da077c9b1e23fc52abe1b5f0696b5 Mon Sep 17 00:00:00 2001
+From: Leah Rowe <leah@libreboot.org>
+Date: Sat, 13 Jan 2024 14:57:46 +0000
+Subject: [PATCH 1/1] buildgcc: don't treat binutil warnings as errors
+
+binutils 2.32 has too many build warnings on modern toolchains,
+and newer gcc versions are much more pedantic about warnings,
+treating them as errors by default.
+
+instead of patching binutils like before, just let the warnings
+persist. the warnings are benign. a user on gnuboot irc had serious
+issues building binutils 2.32 specifically, on current gentoo as
+of 13 January 2024. this patch mitigates those warning messages.
+
+Signed-off-by: Leah Rowe <leah@libreboot.org>
+---
+ util/crossgcc/buildgcc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
+index 505cd7484c..6f1953e68d 100755
+--- a/util/crossgcc/buildgcc
++++ b/util/crossgcc/buildgcc
+@@ -719,7 +719,7 @@ build_BINUTILS() {
+ --disable-werror --disable-nls --enable-lto --enable-gold \
+ --enable-interwork --enable-multilib \
+ --enable-plugins --enable-multilibs \
+- CFLAGS="$HOSTCFLAGS" \
++ CFLAGS="$HOSTCFLAGS -Wno-error -w" \
+ CXXFLAGS="$HOSTCFLAGS" \
+ || touch .failed
+ # shellcheck disable=SC2086
+--
+2.39.2
+
--
2.39.2
- [PATCH 07/20] grub.cfg: support ESP, btrfs subvols and extlinux, (continued)
- [PATCH 07/20] grub.cfg: support ESP, btrfs subvols and extlinux, Leah Rowe, 2024/01/14
- [PATCH 09/20] build/boot/roms: skip building gnat on fam15h, Leah Rowe, 2024/01/14
- [PATCH 11/20] import util/dell-flash-unlock from lbmk 09bed9a4, Leah Rowe, 2024/01/14
- [PATCH 10/20] NEW MAINBOARD: Dell Latitude E6400, Leah Rowe, 2024/01/14
- [PATCH 14/20] build/boot/roms: support "normal" seabios configs, Leah Rowe, 2024/01/14
- [PATCH 13/20] use seabios revision from canoeboot 20231103, Leah Rowe, 2024/01/14
- [PATCH 12/20] import util/nvmutil from lbmk 09bed9a4, Leah Rowe, 2024/01/14
- [PATCH 15/20] coreboot/e6400_4mb: enable the grub payload, Leah Rowe, 2024/01/14
- [PATCH 08/20] Use newer coreboot revision from canoeboot 102ce12, Leah Rowe, 2024/01/14
- [PATCH 17/20] build/module/grub: disable -Werror on builds, Leah Rowe, 2024/01/14
- [PATCH 18/20] coreboot/fam15h: fix binutils build error on gcc13,
Leah Rowe <=
- [PATCH 16/20] cache cbfstool and ifdtool builds, Leah Rowe, 2024/01/14
- [PATCH 19/20] use memtest86plus 6.x instead of 5.x, Leah Rowe, 2024/01/14
- [PATCH 20/20] Add support for google gru_bob and gru_kevin, Leah Rowe, 2024/01/14