arm/edk2-firmware: cherry pick gcc 12.x compatibility patches
PATCH 1/1 arm/edk2-firmware: cherry pick gcc 12.x compatibility patches
Cherry pick gcc 12.x compatibility patches from the upstream.
Signed-off-by Maciej Borzecki <[email protected]>
--- meta-arm/recipes-bsp/uefi/edk2-firmware.inc | 3 ++ ...001-Basetools-turn-off-gcc12-warning.patch | 39 +++++++++++++++ .../0002-BaseTools-fix-gcc12-warning.patch | 49 +++++++++++++++++++ .../0003-BaseTools-fix-gcc12-warning.patch | 47 ++++++++++++++++++ 4 files changed, 138 insertions(+) create mode 100644 meta-arm/recipes-bsp/uefi/files/0001-Basetools-turn-off-gcc12-warning.patch create mode 100644 meta-arm/recipes-bsp/uefi/files/0002-BaseTools-fix-gcc12-warning.patch create mode 100644 meta-arm/recipes-bsp/uefi/files/0003-BaseTools-fix-gcc12-warning.patch
meta-arm/recipes-bsp/uefi/edk2-firmware.inc +3 -0
@@ -18,6 +18,9 @@ SRC_URI = "\ ${EDK2_SRC_URI};name=edk2;destsuffix=edk2;nobranch=1 \ ${EDK2_PLATFORMS_SRC_URI};name=edk2-platforms;destsuffix=edk2/edk2-platforms;nobranch=1 \ file://unaligned.patch \ + file://0001-Basetools-turn-off-gcc12-warning.patch \ + file://0002-BaseTools-fix-gcc12-warning.patch \ + file://0003-BaseTools-fix-gcc12-warning.patch \ " SRCREV_FORMAT = "edk2_edk2-platforms"
meta-arm/recipes-bsp/uefi/files/0001-Basetools-turn-off-gcc12-warning.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 22130dcd98b4d4b76ac8d922adb4a2dbc86fa52c Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann <[email protected]> +Date: Thu, 24 Mar 2022 20:04:36 +0800 +Subject: [PATCH] Basetools: turn off gcc12 warning + +In function ?SetDevicePathEndNode?, + inlined from ?FileDevicePath? at DevicePathUtilities.c:857:5: +DevicePathUtilities.c:321:3: error: writing 4 bytes into a region of size 1 [-Werror=stringop-overflow=] + 321 | memcpy (Node, &mUefiDevicePathLibEndDevicePath, sizeof (mUefiDevicePathLibEndDevicePath)); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +In file included from UefiDevicePathLib.h:22, + from DevicePathUtilities.c:16: +../Include/Protocol/DevicePath.h: In function ?FileDevicePath?: +../Include/Protocol/DevicePath.h:51:9: note: destination object ?Type? of size 1 + 51 | UINT8 Type; ///< 0x01 Hardware Device Path. + | ^~~~ + +Upstream-Status: Backport +Signed-off-by: Gerd Hoffmann <[email protected]> +Reviewed-by: Bob Feng <[email protected]> +Signed-off-by: Maciej Borzecki <[email protected]> +--- + BaseTools/Source/C/DevicePath/GNUmakefile | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile +index 7ca08af9662d..b05d2bddfa68 100644 +--- a/BaseTools/Source/C/DevicePath/GNUmakefile ++++ b/BaseTools/Source/C/DevicePath/GNUmakefile +@@ -13,6 +13,9 @@ OBJECTS = DevicePath.o UefiDevicePathLib.o DevicePathFromText.o DevicePathUtili + + include $(MAKEROOT)/Makefiles/app.makefile + ++# gcc 12 trips over device path handling ++BUILD_CFLAGS += -Wno-error=stringop-overflow ++ + LIBS = -lCommon + ifeq ($(CYGWIN), CYGWIN) + LIBS += -L/lib/e2fsprogs -luuid
meta-arm/recipes-bsp/uefi/files/0002-BaseTools-fix-gcc12-warning.patch new file +49 -0
49 lines not on this page · raw message
meta-arm/recipes-bsp/uefi/files/0003-BaseTools-fix-gcc12-warning.patch new file +47 -0
47 lines not on this page · raw message
Signature · 1 line
2.37.1
Jon Mason
AppliedQuoted 1 line · Maciej Borzecki
Cherry pick gcc 12.x compatibility patches from the upstream.
Applied, thanks!
[1/1] arm/edk2-firmware: cherry pick gcc 12.x compatibility patches
commit: 29dc2147d755c4f8089404d6993546608616a966
Best regards,
Signature · 1 line
Jon Mason <[email protected]>