From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [edk2-devel] [PATCH 3/3] Basetools: turn off gcc12 warning To: Bob Feng ,devel@edk2.groups.io From: grant@grantlmul.xyz X-Originating-Location: Denton, Texas, US (104.28.50.129) X-Originating-Platform: Mac Safari 15.4 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Tue, 29 Mar 2022 11:14:06 -0700 References: In-Reply-To: Message-ID: <16977.1648577646804492712@groups.io> Content-Type: multipart/alternative; boundary="Mwoe82WtPLcgzS5onvrf" --Mwoe82WtPLcgzS5onvrf Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable While I can't test this myself, the following does appear to result in a su= ccessful build using the same clang version: diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C= /DevicePath/GNUmakefile index b05d2bddfa..81aa35aa31 100644 --- a/BaseTools/Source/C/DevicePath/GNUmakefile +++ b/BaseTools/Source/C/DevicePath/GNUmakefile @@ -14,7 +14,9 @@ OBJECTS =3D DevicePath.o UefiDevicePathLib.o DevicePathFr= omText.o=C2=A0 DevicePathUtili include $(MAKEROOT)/Makefiles/app.makefile # gcc 12 trips over device path handling -BUILD_CFLAGS +=3D -Wno-error=3Dstringop-overflow +ifeq($(CC), gcc) +=C2=A0 BUILD_CFLAGS +=3D -Wno-error=3Dstringop-overflow +endif LIBS =3D -lCommon ifeq ($(CYGWIN), CYGWIN) --Mwoe82WtPLcgzS5onvrf Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable While I can't test this myself, the following does appear to result in a su= ccessful build using the same clang version:


diff --git a/BaseTools/Source/C/Dev= icePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile

index b05d2bddfa..81aa35aa31 100644=

--- a/BaseTools/Source/C/DevicePath= /GNUmakefile

+++ b/BaseTools/Source/C/DevicePath= /GNUmakefile

@@ -14,7 +14,9 @@ OBJECTS =3D Devic= ePath.o UefiDevicePathLib.o DevicePathFromText.o  DevicePathUtili

 include $(MAKEROOT)/Makefiles= /app.makefile

 

 # gcc 12 trips over device pa= th handling

-BUILD_CFLAGS +=3D -Wno-error=3Dstr= ingop-overflow

+ifeq($(CC), gcc)

+  BUILD_CFLAGS +=3D -Wno-erro= r=3Dstringop-overflow

+endif

 

 LIBS =3D -lCommon

 ifeq ($(CYGWIN), CYGWIN)

--Mwoe82WtPLcgzS5onvrf--