[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[for 0.1 release 01/11] crossgcc/default: fix build errors on host gcc 1
From: |
Leah Rowe |
Subject: |
[for 0.1 release 01/11] crossgcc/default: fix build errors on host gcc 13.x |
Date: |
Tue, 16 Jan 2024 01:24:41 +0000 |
From: Leah Rowe <leah@libreboot.org>
import a workaround from upstream for gnat builds, and
disable treating warnings as errors. i've pretty much
taken the bazooka approach here.
tested on a bleeding edge gnu+linux distro. boards
using coreboot/default should now compile on parabola,
for example.
Signed-off-by: Leah Rowe <leah@libreboot.org>
---
.../0017-fix-crossgcc-build-error.patch | 55 +++++++++++++++++++
...18-another-fix-not-sure-if-necessary.patch | 47 ++++++++++++++++
2 files changed, 102 insertions(+)
create mode 100644
resources/coreboot/default/patches/0017-fix-crossgcc-build-error.patch
create mode 100644
resources/coreboot/default/patches/0018-another-fix-not-sure-if-necessary.patch
diff --git
a/resources/coreboot/default/patches/0017-fix-crossgcc-build-error.patch
b/resources/coreboot/default/patches/0017-fix-crossgcc-build-error.patch
new file mode 100644
index 0000000..6ada889
--- /dev/null
+++ b/resources/coreboot/default/patches/0017-fix-crossgcc-build-error.patch
@@ -0,0 +1,55 @@
+From dd18c05e6cd1c9de8b1167f89eef40fe8d799aa4 Mon Sep 17 00:00:00 2001
+From: Leah Rowe <leah@libreboot.org>
+Date: Sat, 19 Nov 2022 14:55:01 +0000
+Subject: [PATCH 1/2] fix crossgcc build error
+
+---
+ util/crossgcc/patches/gcc-11.2.0_gnat.patch | 32 ++++++++++++++++++++-
+ 1 file changed, 31 insertions(+), 1 deletion(-)
+
+diff --git a/util/crossgcc/patches/gcc-11.2.0_gnat.patch
b/util/crossgcc/patches/gcc-11.2.0_gnat.patch
+index 2d7cecee24..c22cec45d0 100644
+--- a/util/crossgcc/patches/gcc-11.2.0_gnat.patch
++++ b/util/crossgcc/patches/gcc-11.2.0_gnat.patch
+@@ -5,7 +5,37 @@
+
+ # Extra flags to pass to recursive makes.
+ -COMMON_ADAFLAGS= -gnatpg
+-+COMMON_ADAFLAGS= -gnatpg -gnatwGUR
+++COMMON_ADAFLAGS= -gnatpg -gnatwn
+ ifeq ($(TREECHECKING),)
+ CHECKING_ADAFLAGS=
+ else
++diff -Nurp gcc-11.2.0/gcc/ada/gcc-interface/Make-lang.in
gcc-11.2.0.new/gcc/ada/gcc-interface/Make-lang.in
++--- gcc-11.2.0/gcc/ada/gcc-interface/Make-lang.in 2022-06-03
00:31:57.993273717 +0200
+++++ gcc-11.2.0.new/gcc/ada/gcc-interface/Make-lang.in 2022-06-03
00:30:50.214166847 +0200
++@@ -334,6 +334,7 @@ GNAT_ADA_OBJS = \
++ ada/hostparm.o \
++ ada/impunit.o \
++ ada/inline.o \
+++ ada/libgnat/i-c.o \
++ ada/libgnat/interfac.o \
++ ada/itypes.o \
++ ada/krunch.o \
++@@ -364,7 +365,10 @@ GNAT_ADA_OBJS = \
++ ada/rtsfind.o \
++ ada/libgnat/s-addope.o \
++ ada/libgnat/s-addima.o \
+++ ada/libgnat/s-aotase.o \
++ ada/libgnat/s-assert.o \
+++ ada/libgnat/s-atoope.o \
+++ ada/libgnat/s-atopri.o \
++ ada/libgnat/s-bitops.o \
++ ada/libgnat/s-carun8.o \
++ ada/libgnat/s-casuti.o \
++@@ -548,6 +552,7 @@ GNATBIND_OBJS = \
++ ada/hostparm.o \
++ ada/init.o \
++ ada/initialize.o \
+++ ada/libgnat/i-c.o \
++ ada/libgnat/interfac.o \
++ ada/krunch.o \
++ ada/lib.o \
+--
+2.43.0
+
diff --git
a/resources/coreboot/default/patches/0018-another-fix-not-sure-if-necessary.patch
b/resources/coreboot/default/patches/0018-another-fix-not-sure-if-necessary.patch
new file mode 100644
index 0000000..18aaeab
--- /dev/null
+++
b/resources/coreboot/default/patches/0018-another-fix-not-sure-if-necessary.patch
@@ -0,0 +1,47 @@
+From c5e4d39fd6495f5d07128dfb5db2c80732da1dbd Mon Sep 17 00:00:00 2001
+From: Leah Rowe <leah@libreboot.org>
+Date: Mon, 15 Jan 2024 22:39:12 +0000
+Subject: [PATCH 2/2] another fix (not sure if necessary)
+
+Signed-off-by: Leah Rowe <leah@libreboot.org>
+---
+ util/crossgcc/buildgcc | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
+index dd32ee6ba8..78af60e971 100755
+--- a/util/crossgcc/buildgcc
++++ b/util/crossgcc/buildgcc
+@@ -698,13 +698,13 @@ build_BINUTILS() {
+
+ bootstrap_GCC() {
+ # shellcheck disable=SC2086
+- CC="$(hostcc host)" CXX="$(hostcxx host)" \
+- CFLAGS="$HOSTCFLAGS" \
+- CFLAGS_FOR_BUILD="$HOSTCFLAGS" \
+- CFLAGS_FOR_TARGET="$HOSTCFLAGS -fPIC" \
+- CXXFLAGS="$HOSTCFLAGS" \
+- CXXFLAGS_FOR_BUILD="$HOSTCFLAGS" \
+- CXXFLAGS_FOR_TARGET="$HOSTCFLAGS -fPIC" \
++ CC="$(hostcc host) -Wno-error -w" CXX="$(hostcxx host) -Wno-error -w" \
++ CFLAGS="$HOSTCFLAGS -Wno-error -w" \
++ CFLAGS_FOR_BUILD="$HOSTCFLAGS -Wno-error -w" \
++ CFLAGS_FOR_TARGET="$HOSTCFLAGS -fPIC -Wno-error -w" \
++ CXXFLAGS="$HOSTCFLAGS -Wno-error -w" \
++ CXXFLAGS_FOR_BUILD="$HOSTCFLAGS -Wno-error -w" \
++ CXXFLAGS_FOR_TARGET="$HOSTCFLAGS -fPIC -Wno-error -w" \
+ ../gcc-${GCC_VERSION}/configure \
+ --prefix="$TARGETDIR" --libexecdir="$TARGETDIR/lib" \
+ --enable-bootstrap \
+@@ -1021,7 +1021,7 @@ if [ -n "$CC" ]; then
+ fi
+ else
+ if searchtool gnatgcc "Free Software Foundation" nofail > /dev/null;
then
+- CC=gnatgcc
++ CC="gnatgcc"
+ elif searchtool gcc "Free Software Foundation" nofail > /dev/null; then
+ CC=gcc
+ else
+--
+2.43.0
+
--
2.39.2
- [for 0.1 release 01/11] crossgcc/default: fix build errors on host gcc 13.x,
Leah Rowe <=
- [for 0.1 release 02/11] grub.cfg: support ESP, btrfs subvols and extlinux, Leah Rowe, 2024/01/15
- [for 0.1 release 04/11] cache cbfstool and ifdtool builds, Leah Rowe, 2024/01/15
- [for 0.1 release 07/11] GRUB: Force scancode set 2 with translation, Leah Rowe, 2024/01/15
- [for 0.1 release 05/11] build/module/grub: disable -Werror on builds, Leah Rowe, 2024/01/15
- [for 0.1 release 03/11] build/boot/roms: skip building gnat on fam15h, Leah Rowe, 2024/01/15
- [for 0.1 release 06/11] coreboot/fam15h: fix binutils build error on gcc13, Leah Rowe, 2024/01/15
- [for 0.1 release 08/11] GRUB: Don't spew "Unknown key 0xFF", Leah Rowe, 2024/01/15
- [for 0.1 release 09/11] NEW MAINBOARD: Dell Latitude E6400, Leah Rowe, 2024/01/15
- [for 0.1 release 11/11] add .log files to .gitignore, Leah Rowe, 2024/01/15