From 634f5081b693a052078165576950a176a776cbff Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Wed, 11 Oct 2023 18:16:06 +0200 Subject: [PATCH] patches: add coreboot toolchain 4.16 compatibility Warnings stuff, Ada stuff, etc. --- src/coreboot/default.nix | 1 + .../0027-coreboot-toolchain-4_16_compat.patch | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 src/coreboot/patches/0027-coreboot-toolchain-4_16_compat.patch diff --git a/src/coreboot/default.nix b/src/coreboot/default.nix index 776d5f0..afb4a50 100644 --- a/src/coreboot/default.nix +++ b/src/coreboot/default.nix @@ -124,6 +124,7 @@ stdenv.mkDerivation { ./patches/0018-use_fallback-rk3399-gru-kevin-use-fallback-if-watchd.patch ./patches/0019-use_fallback-rk3399-gru-kevin-update-for-coreboot-4..patch ./patches/0020-use_fallback-kgpe-d16-implement-using-nvram-with-cmo.patch + ./patches/0027-coreboot-toolchain-4_16_compat.patch ]; postPatch = '' diff --git a/src/coreboot/patches/0027-coreboot-toolchain-4_16_compat.patch b/src/coreboot/patches/0027-coreboot-toolchain-4_16_compat.patch new file mode 100644 index 0000000..6955460 --- /dev/null +++ b/src/coreboot/patches/0027-coreboot-toolchain-4_16_compat.patch @@ -0,0 +1,22 @@ +diff --git c/Makefile.inc i/Makefile.inc +index b25ac6b426..73df96d31c 100644 +--- c/Makefile.inc ++++ i/Makefile.inc +@@ -439,14 +439,14 @@ ADAFLAGS_common += -ffunction-sections -fdata-sections + # .Y Disable information messages for why package spec needs body: + # Those messages are annoying. But don't forget to enable those, + # if you need the information. +-ADAFLAGS_common += -gnatwa.eeD.HHTU.U.W.Y ++ADAFLAGS_common += -gnatwa.eeD.HHTU.U.W.Y -gnatwR + # Disable style checks for now + ADAFLAGS_common += -gnatyN + +-LDFLAGS_common := --gc-sections -nostdlib -nostartfiles -static --emit-relocs ++LDFLAGS_common := --gc-sections -nostdlib --nmagic -static --emit-relocs + + ifeq ($(CONFIG_WARNINGS_ARE_ERRORS),y) +-CFLAGS_common += -Werror ++CFLAGS_common += -Werror -Wno-address-of-packed-member + endif + ifneq ($(GDB_DEBUG),) + CFLAGS_common += -Og