From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from rn-mailsvcp-ppex-lapp24.apple.com (rn-mailsvcp-ppex-lapp24.apple.com [17.179.253.38]) by mx.groups.io with SMTP id smtpd.web11.2575.1648589897222107784 for ; Tue, 29 Mar 2022 14:38:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=iduamJXb; spf=pass (domain: apple.com, ip: 17.179.253.38, mailfrom: afish@apple.com) Received: from pps.filterd (rn-mailsvcp-ppex-lapp24.rno.apple.com [127.0.0.1]) by rn-mailsvcp-ppex-lapp24.rno.apple.com (8.16.1.2/8.16.1.2) with SMTP id 22TLZKDq032405; Tue, 29 Mar 2022 14:38:16 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=from : message-id : content-type : mime-version : subject : date : in-reply-to : cc : to : references; s=20180706; bh=9e769XK1fZ8LqNWHsDmLcfjPcH34W1RGLY28Sa4MFTw=; b=iduamJXb0OxkT5qaa3DVnLIieyszZtUmOWkKeUiptQTdGy9poBPVx5jWAvnmq8DU+6uJ b99l4qAiVFBr4yYeeP1CY2h4Grch/oUPsGHXrv6pk2XFTWFZ0WQg5xByOTaROspYEY+Z sEKoB4yFzMtvg+XsRIVmj8YhT8ao6JRo93n1JuR+PKEgkZZ1A2dVCa+l7yOcOkyig8Qy zQ9OLhNY6oCsiSW5B1VZFcjwl9qS5+QGlNzUpEUp/Zj+Wa4Mygp1ndAoF9ohLJw5ACdh m/WgiS/7nBio4FC/o9256OzK/FlKlj8448pYmW8aLDAD9D8ZefXy1W4s9fIdffog1Jka 3w== Received: from rn-mailsvcp-mta-lapp03.rno.apple.com (rn-mailsvcp-mta-lapp03.rno.apple.com [10.225.203.151]) by rn-mailsvcp-ppex-lapp24.rno.apple.com with ESMTP id 3f3qs1whps-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 29 Mar 2022 14:38:16 -0700 Received: from rn-mailsvcp-mmp-lapp02.rno.apple.com (rn-mailsvcp-mmp-lapp02.rno.apple.com [17.179.253.15]) by rn-mailsvcp-mta-lapp03.rno.apple.com (Oracle Communications Messaging Server 8.1.0.16.20220118 64bit (built Jan 18 2022)) with ESMTPS id <0R9J00IME03SG260@rn-mailsvcp-mta-lapp03.rno.apple.com>; Tue, 29 Mar 2022 14:38:16 -0700 (PDT) Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp02.rno.apple.com by rn-mailsvcp-mmp-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.16.20220118 64bit (built Jan 18 2022)) id <0R9I00100ZM96R00@rn-mailsvcp-mmp-lapp02.rno.apple.com>; Tue, 29 Mar 2022 14:38:16 -0700 (PDT) X-Va-A: X-Va-T-CD: 42e18372f56851c5d7faf5efd6630de9 X-Va-E-CD: 752c1a8c685a0afbbdbea70a80f59902 X-Va-R-CD: efb0292e60af3969baf341ee1b1c0614 X-Va-CD: 0 X-Va-ID: 81ee43f7-90cd-4fe3-8a96-81f26a2faf6a X-V-A: X-V-T-CD: 42e18372f56851c5d7faf5efd6630de9 X-V-E-CD: 752c1a8c685a0afbbdbea70a80f59902 X-V-R-CD: efb0292e60af3969baf341ee1b1c0614 X-V-CD: 0 X-V-ID: 0672bb83-6d86-4136-915b-040bc24f6f2d X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425,18.0.850 definitions=2022-03-29_09:2022-03-29,2022-03-29 signatures=0 Received: from smtpclient.apple (unknown [17.235.34.18]) by rn-mailsvcp-mmp-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.16.20220118 64bit (built Jan 18 2022)) with ESMTPSA id <0R9J008DT03R2Z00@rn-mailsvcp-mmp-lapp02.rno.apple.com>; Tue, 29 Mar 2022 14:38:16 -0700 (PDT) From: "Andrew Fish" Message-id: <5E43C0E3-E98D-4D90-8163-E452228F8759@apple.com> MIME-version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) Subject: Re: [edk2-devel] [PATCH 3/3] Basetools: turn off gcc12 warning Date: Tue, 29 Mar 2022 14:38:15 -0700 In-reply-to: <16977.1648577646804492712@groups.io> Cc: Bob Feng To: edk2-devel-groups-io , grant@grantlmul.xyz References: <16977.1648577646804492712@groups.io> X-Mailer: Apple Mail (2.3693.20.0.1.32) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425,18.0.850 definitions=2022-03-29_09:2022-03-29,2022-03-29 signatures=0 Content-type: multipart/alternative; boundary="Apple-Mail=_FC1E475F-8D54-42DD-8BB5-16EEFE0766CF" --Apple-Mail=_FC1E475F-8D54-42DD-8BB5-16EEFE0766CF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 29, 2022, at 11:14 AM, grant@grantlmul.xyz wrote: >=20 > While I can't test this myself, the following does appear to result in a = successful build using the same clang version: >=20 >=20 > 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 DevicePath= FromText.o DevicePathUtili > include $(MAKEROOT)/Makefiles/app.makefile > =20 > # gcc 12 trips over device path handling > -BUILD_CFLAGS +=3D -Wno-error=3Dstringop-overflow > +ifeq($(CC), gcc) > + BUILD_CFLAGS +=3D -Wno-error=3Dstringop-overflow > +endif > =20 Gerd, I=E2=80=99m not sure if this was caused by my email client but your fix did= not work for me. GNUmakefile:17: *** missing separator. Stop. I had to add a space after `ifeq` to get it to work. diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C= /DevicePath/GNUmakefile index b05d2bddfa68..ebab1d3e2617 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 DevicePathUtili include $(MAKEROOT)/Makefiles/app.makefile =20 # gcc 12 trips over device path handling -BUILD_CFLAGS +=3D -Wno-error=3Dstringop-overflow +ifeq ($(CC), gcc) + BUILD_CFLAGS +=3D -Wno-error=3Dstringop-overflow +endif =20 LIBS =3D -lCommon ifeq ($(CYGWIN), CYGWIN) I had been working around like this previously (I=E2=80=99m not sure about = the portability of -Wno-unknown-warning-option): diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C= /DevicePath/GNUmakefile index b05d2bddfa68..d08588a81f80 100644 --- a/BaseTools/Source/C/DevicePath/GNUmakefile +++ b/BaseTools/Source/C/DevicePath/GNUmakefile @@ -14,7 +14,7 @@ OBJECTS =3D DevicePath.o UefiDevicePathLib.o DevicePathFr= omText.o DevicePathUtili include $(MAKEROOT)/Makefiles/app.makefile =20 # gcc 12 trips over device path handling -BUILD_CFLAGS +=3D -Wno-error=3Dstringop-overflow +BUILD_CFLAGS +=3D -Wno-error=3Dstringop-overflow -Wno-unknown-warning-opti= on =20 LIBS =3D -lCommon ifeq ($(CYGWIN), CYGWIN) Thanks, Andrew Fish > LIBS =3D -lCommon > ifeq ($(CYGWIN), CYGWIN) >=20 --Apple-Mail=_FC1E475F-8D54-42DD-8BB5-16EEFE0766CF Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Mar 29, 20= 22, at 11:14 AM, grant@gr= antlmul.xyz wrote:

While I can't test this myself, the following does appear to resul= t in a successful build using the same clang version:


diff -= -git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/Devic= ePath/GNUmakefile

i= ndex b05d2bddfa..81aa35aa31 100644

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

<= p style=3D"margin-bottom: 0px; font-stretch: normal; font-size: 11px; line-= height: normal; font-family: Menlo;" class=3D"">+++ b/BaseTools/Source/C/Devic= ePath/GNUmakefile

@= @ -14,7 +14,9 @@ OBJECTS =3D DevicePath.o UefiDevicePathLib.o DevicePathFro= mText.o  DevicePathUtili

 include $(MAKEROOT)/Makefiles/app.makefile

 <= br class=3D"webkit-block-placeholder">

 # gcc 12 trips over device path handling

-BUILD_CFLAGS +=3D -Wno-error=3D= stringop-overflow

+= ifeq($(CC), gcc)

+&= nbsp; BUILD_CFLAGS +=3D -Wno-error=3Dstringop-overflow

+endif

 

<= div>Gerd,

I=E2=80=99m not sure if this = was caused by my email client but your fix did not work for me.
<= div style=3D"margin: 0px; font-stretch: normal; font-size: 11px; line-heigh= t: normal; font-family: Menlo;" class=3D"">GNUmakefile:17: *** missing separato= r.  Stop.

I had to add a space after `ifeq` to get it to work.
diff --git a/BaseTools/Source/= C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile
index b05d2= bddfa68..ebab1d3e2617 100644
--- a/BaseTools/Source/C/DevicePath/GNUmakefile=
+++ b/Ba= seTools/Source/C/DevicePath/GNUmakefile
@@ -14,7 +14,9 @@ OBJECTS =3D Devic= ePath.o UefiDevicePathLib.o DevicePathFromText.o  DevicePathUtili
 include $(MAKEROOT)/M= akefiles/app.makefile

 

 # gcc 12 trips over device path h= andling
-BUILD_CFLAGS +=3D -Wno-error=3Dstringop-overflow
+ifeq ($(CC),= gcc)
+  BUILD_CFLAGS +=3D -Wno-error=3Dstringop-overflow
+endif

 

 LIBS =3D -lCommon
 ifeq ($(CYGWIN), CYGWIN)


I had been worki= ng around like this previously (I=E2=80=99m not sure about the portability = of -Wno-unknown-warning-option):

diff --git a/BaseTools/Source/C= /DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile
index b05d2b= ddfa68..d08588a81f80 100644
--- a/BaseTools/Source/C/DevicePath/GNUmakefile<= /span>
+++ b/Bas= eTools/Source/C/DevicePath/GNUmakefile
@@ -14,7 +14,7 @@ OBJECTS =3D Device= Path.o UefiDevicePathLib.o DevicePathFromText.o  DevicePathUtili
 include $(MAKEROOT)/Ma= kefiles/app.makefile

 

 # gcc 12 trips over device path ha= ndling
-BUILD_CFLAGS +=3D -Wno-error=3Dstringop-overflow
+BUILD_CFLAGS = +=3D -Wno-error=3Dstringop-overflow -Wno-unknown-warning-option

 

 LIBS =3D -lCommon
 ifeq ($(CYGWIN), CYGWIN)

Thanks,

=
Andrew Fish

&n= bsp;LIBS =3D -lCommon

 ifeq ($(CYGWIN), CYGWIN)

=20

--Apple-Mail=_FC1E475F-8D54-42DD-8BB5-16EEFE0766CF--