diff options
author | Steve Sakoman <steve@sakoman.com> | 2023-01-10 07:09:03 -1000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-13 18:11:19 +0000 |
commit | f1292a552f33a329ff27bbdea4c90250908d6301 (patch) | |
tree | fb9c2673568652c25f0c6eeded28259f646e7a1e /meta/recipes-core/ovmf | |
parent | 2e0077aeb8cf58d83ea55542e3a3adfb3c287f17 (diff) | |
download | poky-f1292a552f33a329ff27bbdea4c90250908d6301.tar.gz |
ovmf: fix gcc12 warning for device path handling
Backport [https://github.com/tianocore/edk2/commit/22130dcd98b4d4b76ac8d922adb4a2dbc86fa52c]
Fixes:
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.
| ^~~~
(From OE-Core rev: a33abd759e2e9f41e056f87024de3b333e9b948b)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/ovmf')
-rw-r--r-- | meta/recipes-core/ovmf/ovmf/0001-Basetools-turn-off-gcc12-warning.patch | 41 | ||||
-rw-r--r-- | meta/recipes-core/ovmf/ovmf_git.bb | 1 |
2 files changed, 42 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 @@ | |||
1 | From 22130dcd98b4d4b76ac8d922adb4a2dbc86fa52c Mon Sep 17 00:00:00 2001 | ||
2 | From: Gerd Hoffmann <kraxel@redhat.com> | ||
3 | Date: Thu, 24 Mar 2022 20:04:36 +0800 | ||
4 | Subject: [PATCH] Basetools: turn off gcc12 warning | ||
5 | |||
6 | In function ?SetDevicePathEndNode?, | ||
7 | inlined from ?FileDevicePath? at DevicePathUtilities.c:857:5: | ||
8 | DevicePathUtilities.c:321:3: error: writing 4 bytes into a region of size 1 [-Werror=stringop-overflow=] | ||
9 | 321 | memcpy (Node, &mUefiDevicePathLibEndDevicePath, sizeof (mUefiDevicePathLibEndDevicePath)); | ||
10 | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
11 | In 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 | |||
18 | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> | ||
19 | Reviewed-by: Bob Feng <bob.c.feng@intel.com> | ||
20 | |||
21 | Upstream-Status: Backport [https://github.com/tianocore/edk2/commit/22130dcd98b4d4b76ac8d922adb4a2dbc86fa52c] | ||
22 | Signed-off-by: Steve Sakoman <steve@sakoman.com> | ||
23 | |||
24 | --- | ||
25 | BaseTools/Source/C/DevicePath/GNUmakefile | 3 +++ | ||
26 | 1 file changed, 3 insertions(+) | ||
27 | |||
28 | diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile | ||
29 | index 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 | ||
diff --git a/meta/recipes-core/ovmf/ovmf_git.bb b/meta/recipes-core/ovmf/ovmf_git.bb index ddadbac4b7..a487f77e3c 100644 --- a/meta/recipes-core/ovmf/ovmf_git.bb +++ b/meta/recipes-core/ovmf/ovmf_git.bb | |||
@@ -20,6 +20,7 @@ SRC_URI = "gitsm://github.com/tianocore/edk2.git;branch=master;protocol=https \ | |||
20 | file://0001-Fix-VLA-parameter-warning.patch \ | 20 | file://0001-Fix-VLA-parameter-warning.patch \ |
21 | file://0001-Basetools-genffs-fix-gcc12-warning.patch \ | 21 | file://0001-Basetools-genffs-fix-gcc12-warning.patch \ |
22 | file://0001-Basetools-lzmaenc-fix-gcc12-warning.patch \ | 22 | file://0001-Basetools-lzmaenc-fix-gcc12-warning.patch \ |
23 | file://0001-Basetools-turn-off-gcc12-warning.patch \ | ||
23 | " | 24 | " |
24 | 25 | ||
25 | PV = "edk2-stable202008" | 26 | PV = "edk2-stable202008" |