From 2e591bf658a46befce65db2ec17fd56a76027026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Iwanicki?= Date: Tue, 10 Dec 2024 19:28:54 +0100 Subject: [PATCH] cbfstool: add -Wno-error=stringop-overflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Needed to ignore `'memcpy' specified bound between 2147483648 and 4294967295 exceeds maximum object size 2147483647`. Signed-off-by: MichaƂ Iwanicki --- ...ile-Don-t-error-on-stringop-overflow.patch | 23 +++++++++++++++++++ .../coreboot-utils/cbfstool_%.bbappend | 5 ++++ 2 files changed, 28 insertions(+) create mode 100644 recipes-bsp/coreboot-utils/cbfstool/0001-Makefile-Don-t-error-on-stringop-overflow.patch create mode 100644 recipes-bsp/coreboot-utils/cbfstool_%.bbappend diff --git a/recipes-bsp/coreboot-utils/cbfstool/0001-Makefile-Don-t-error-on-stringop-overflow.patch b/recipes-bsp/coreboot-utils/cbfstool/0001-Makefile-Don-t-error-on-stringop-overflow.patch new file mode 100644 index 0000000..b6ee75c --- /dev/null +++ b/recipes-bsp/coreboot-utils/cbfstool/0001-Makefile-Don-t-error-on-stringop-overflow.patch @@ -0,0 +1,23 @@ +From d3d8ca3274e1b9cfbe64d618ccf7f452aab0634c Mon Sep 17 00:00:00 2001 +From: Kas User +Date: Tue, 10 Dec 2024 18:15:41 +0000 +Subject: [PATCH] Makefile: Don't error on stringop-overflow + +Signed-off-by: Kas User +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 5bbb0738..6db1187d 100644 +--- a/Makefile ++++ b/Makefile +@@ -125,7 +125,7 @@ endif + # Provide default CC and CFLAGS for firmware builds; if you have any -D flags, + # please add them after this point (e.g., -DVBOOT_DEBUG). + DEBUG_FLAGS := $(if $(filter-out 0,${DEBUG}),-g -Og,-g -Os) +-WERROR := -Werror ++WERROR := -Werror -Wno-error=stringop-overflow + FIRMWARE_FLAGS := -nostdinc -ffreestanding -fno-builtin -fno-stack-protector + COMMON_FLAGS := -pipe ${WERROR} -Wall -Wstrict-prototypes -Wtype-limits \ + -Wundef -Wmissing-prototypes -Wno-trigraphs -Wredundant-decls -Wshadow \ diff --git a/recipes-bsp/coreboot-utils/cbfstool_%.bbappend b/recipes-bsp/coreboot-utils/cbfstool_%.bbappend new file mode 100644 index 0000000..17d41ed --- /dev/null +++ b/recipes-bsp/coreboot-utils/cbfstool_%.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI += " \ + file://0001-Makefile-Don-t-error-on-stringop-overflow.patch;patchdir=3rdparty/vboot \ + "