summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/ovmf/ovmf/0001-Basetools-turn-off-gcc12-warning.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/ovmf/ovmf/0001-Basetools-turn-off-gcc12-warning.patch')
-rw-r--r--meta/recipes-core/ovmf/ovmf/0001-Basetools-turn-off-gcc12-warning.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-core/ovmf/ovmf/0001-Basetools-turn-off-gcc12-warning.patch b/meta/recipes-core/ovmf/ovmf/0001-Basetools-turn-off-gcc12-warning.patch
new file mode 100644
index 0000000000..73a432684c
--- /dev/null
+++ b/meta/recipes-core/ovmf/ovmf/0001-Basetools-turn-off-gcc12-warning.patch
@@ -0,0 +1,41 @@
1From 22130dcd98b4d4b76ac8d922adb4a2dbc86fa52c Mon Sep 17 00:00:00 2001
2From: Gerd Hoffmann <kraxel@redhat.com>
3Date: Thu, 24 Mar 2022 20:04:36 +0800
4Subject: [PATCH] Basetools: turn off gcc12 warning
5
6In function ?SetDevicePathEndNode?,
7 inlined from ?FileDevicePath? at DevicePathUtilities.c:857:5:
8DevicePathUtilities.c:321:3: error: writing 4 bytes into a region of size 1 [-Werror=stringop-overflow=]
9 321 | memcpy (Node, &mUefiDevicePathLibEndDevicePath, sizeof (mUefiDevicePathLibEndDevicePath));
10 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11In file included from UefiDevicePathLib.h:22,
12 from DevicePathUtilities.c:16:
13../Include/Protocol/DevicePath.h: In function ?FileDevicePath?:
14../Include/Protocol/DevicePath.h:51:9: note: destination object ?Type? of size 1
15 51 | UINT8 Type; ///< 0x01 Hardware Device Path.
16 | ^~~~
17
18Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
19Reviewed-by: Bob Feng <bob.c.feng@intel.com>
20
21Upstream-Status: Backport [https://github.com/tianocore/edk2/commit/22130dcd98b4d4b76ac8d922adb4a2dbc86fa52c]
22Signed-off-by: Steve Sakoman <steve@sakoman.com>
23
24---
25 BaseTools/Source/C/DevicePath/GNUmakefile | 3 +++
26 1 file changed, 3 insertions(+)
27
28diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile
29index 7ca08af9662d..b05d2bddfa68 100644
30--- a/BaseTools/Source/C/DevicePath/GNUmakefile
31+++ b/BaseTools/Source/C/DevicePath/GNUmakefile
32@@ -13,6 +13,9 @@ OBJECTS = DevicePath.o UefiDevicePathLib.o DevicePathFromText.o DevicePathUtili
33
34 include $(MAKEROOT)/Makefiles/app.makefile
35
36+# gcc 12 trips over device path handling
37+BUILD_CFLAGS += -Wno-error=stringop-overflow
38+
39 LIBS = -lCommon
40 ifeq ($(CYGWIN), CYGWIN)
41 LIBS += -L/lib/e2fsprogs -luuid