From: "Rebecca Cran" <rebecca@bsdio.com>
To: devel@edk2.groups.io, kraxel@redhat.com
Cc: Pawel Polawski <ppolawsk@redhat.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
Yuwei Chen <yuwei.chen@intel.com>,
Oliver Steffen <osteffen@redhat.com>,
Bob Feng <bob.c.feng@intel.com>
Subject: Re: [edk2-devel] [PATCH 3/3] Basetools: turn off gcc12 warning
Date: Mon, 28 Mar 2022 15:29:53 -0600 [thread overview]
Message-ID: <569673d3-b0b7-2857-45c6-8623b3762fd5@bsdio.com> (raw)
In-Reply-To: <20220324120436.939688-4-kraxel@redhat.com>
This breaks building BaseTools with clang 13.1.6 on macOS:
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C DevicePath
gcc -c -I .. -I ../Include/Common -I ../Include/ -I
../Include/IndustryStandard -I ../Common/ -I .. -I . -I
../Include/AArch64/ -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror
-Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result
-nostdlib -g -O2 -Wno-error=stringop-overflow DevicePath.c -o DevicePath.o
error: unknown warning option '-Werror=stringop-overflow'; did you mean
'-Werror=shift-overflow'? [-Werror,-Wunknown-warning-option]
--
Rebecca Cran
On 3/24/22 6:04 AM, Gerd Hoffmann wrote:
> 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.
> | ^~~~
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> 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
next prev parent reply other threads:[~2022-03-28 21:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-24 12:04 [PATCH 0/3] BaseTools: patches to build with gcc12 Gerd Hoffmann
2022-03-24 12:04 ` [PATCH 1/3] BaseTools: fix gcc12 warning Gerd Hoffmann
2022-03-24 12:04 ` [PATCH 2/3] " Gerd Hoffmann
2022-03-24 12:04 ` [PATCH 3/3] Basetools: turn off " Gerd Hoffmann
2022-03-28 21:29 ` Rebecca Cran [this message]
2022-03-29 4:00 ` [edk2-devel] " Bob Feng
2022-03-29 18:14 ` grant
2022-03-29 21:38 ` Andrew Fish
[not found] ` <16E0F7C6F57A7FEC.28871@groups.io>
2022-03-29 21:39 ` Andrew Fish
2022-03-26 13:57 ` [edk2-devel] [PATCH 0/3] BaseTools: patches to build with gcc12 Bob Feng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=569673d3-b0b7-2857-45c6-8623b3762fd5@bsdio.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox