diff options
author | Felix Singer <felixsinger@posteo.net> | 2024-04-06 05:32:25 +0000 |
---|---|---|
committer | Felix Singer <service+coreboot-gerrit@felixsinger.de> | 2024-05-15 01:53:34 +0000 |
commit | acdd8dd14d498834589d5e5bda6c9f3d5f5860d8 (patch) | |
tree | 0b15d221c6c46fda728b2550630f95e2d7aabf33 /util/crossgcc/patches/gcc-14.1.0_gnat.patch | |
parent | e885aa5a05a24dc3bd3f1fffc0d55aa08ed43d5a (diff) |
util/crossgcc: Update GCC from 13.2 to 14.1.0
Change-Id: Idf5912d1fcdfabab7fe006b7e0cd4ebd25c07d09
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81683
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Diffstat (limited to 'util/crossgcc/patches/gcc-14.1.0_gnat.patch')
-rw-r--r-- | util/crossgcc/patches/gcc-14.1.0_gnat.patch | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/util/crossgcc/patches/gcc-14.1.0_gnat.patch b/util/crossgcc/patches/gcc-14.1.0_gnat.patch new file mode 100644 index 0000000000..2a37b155c4 --- /dev/null +++ b/util/crossgcc/patches/gcc-14.1.0_gnat.patch @@ -0,0 +1,108 @@ +From b1b16478729aea709e7ef81224995b6d26b38a87 Mon Sep 17 00:00:00 2001 +From: Nico Huber <nico.h@gmx.de> +Date: Sun, 16 Jul 2023 00:30:03 +0200 +Subject: [PATCH] GNAT: Build cross compilers with host runtime + +When building with an older host toolchain, the shipped libgnat +sources may not be compatible. So rely on the host runtime just +like we do for a stage1 build. + +Signed-off-by: Nico Huber <nico.h@gmx.de> +--- + gcc/ada/gcc-interface/Make-lang.in | 16 +++++++++++++--- + gcc/ada/init.c | 4 ++++ + 2 files changed, 17 insertions(+), 3 deletions(-) + +diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in +index 9507f2f09203..cf7ec4cc1662 100644 +--- a/gcc/ada/gcc-interface/Make-lang.in ++++ b/gcc/ada/gcc-interface/Make-lang.in +@@ -57,18 +57,21 @@ WARN_ADAFLAGS= -W -Wall + # checks fully active. + + STAGE1=False ++HOST_RT=False + GNATBIND_FLAGS= + GNATLIB= + ++ADAFLAGS=$(COMMON_ADAFLAGS) -gnatwns + ifeq ($(CROSS),) +- ADAFLAGS=$(COMMON_ADAFLAGS) -gnatwns + + ifeq ($(if $(wildcard ../stage_current),$(shell cat ../stage_current),stage1),stage1) + STAGE1=True + GNATBIND_FLAGS=-t ++ HOST_RT=True + endif + else +- ADAFLAGS=$(COMMON_ADAFLAGS) ++ GNATBIND_FLAGS=-t ++ HOST_RT=True + endif + + ALL_ADAFLAGS = \ +@@ -87,7 +89,7 @@ ifeq ($(strip $(filter-out hpux%,$(host_os))),) + STAGE1_LIBS=/usr/lib/libcl.a + endif + +-ifeq ($(STAGE1),True) ++ifeq ($(HOST_RT),True) + ADA_INCLUDES=$(COMMON_ADA_INCLUDES) + adalib=$(dir $(shell $(CC) -print-libgcc-file-name))adalib + GNATLIB=$(adalib)/$(if $(wildcard $(adalib)/libgnat.a),libgnat.a,libgnat.so) $(STAGE1_LIBS) +@@ -485,6 +487,7 @@ GNAT1_C_OBJS+= \ + ada/rtinit.o \ + ada/seh_init.o + ++ifeq ($(HOST_RT),False) + GNAT_ADA_OBJS+= \ + ada/gcc-interface/system.o \ + ada/libgnat/a-assert.o \ +@@ -555,6 +558,7 @@ GNAT_ADA_OBJS+= \ + ada/libgnat/s-wchstw.o \ + ada/libgnat/s-widuns.o + endif ++endif + + # Object files for gnat executables + GNAT1_ADA_OBJS = $(GNAT_ADA_OBJS) ada/back_end.o ada/gnat1drv.o +@@ -656,6 +660,9 @@ GNATBIND_OBJS += \ + ada/rtfinal.o \ + ada/rtinit.o \ + ada/seh_init.o \ ++ ++ifeq ($(HOST_RT),False) ++GNATBIND_OBJS += \ + ada/gcc-interface/system.o \ + ada/libgnat/a-assert.o \ + ada/libgnat/a-elchha.o \ +@@ -707,6 +714,9 @@ GNATBIND_OBJS += \ + ada/libgnat/s-wchjis.o \ + ada/libgnat/s-wchstw.o \ + ada/libgnat/s-widuns.o \ ++ ++endif ++GNATBIND_OBJS += \ + ada/adaint.o \ + ada/argv.o \ + ada/cio.o \ +diff --git a/gcc/ada/init.c b/gcc/ada/init.c +index 5212a38490d3..5ae2efd32ef3 100644 +--- a/gcc/ada/init.c ++++ b/gcc/ada/init.c +@@ -93,8 +93,12 @@ extern struct Exception_Data storage_error; + #ifdef CERT + #define Raise_From_Signal_Handler __gnat_raise_exception + #else ++#if __GNUC__ < 12 ++#define Raise_From_Signal_Handler ada__exceptions__raise_from_signal_handler ++#else + #define Raise_From_Signal_Handler __gnat_raise_from_signal_handler + #endif ++#endif + + extern void Raise_From_Signal_Handler (struct Exception_Data *, const void *) + ATTRIBUTE_NORETURN; +-- +2.39.0 + |