From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from rn-mailsvcp-ppex-lapp15.apple.com (rn-mailsvcp-ppex-lapp15.apple.com [17.179.253.34]) by mx.groups.io with SMTP id smtpd.web11.2592.1648589978200330537 for ; Tue, 29 Mar 2022 14:39:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=tFIwhXyj; spf=pass (domain: apple.com, ip: 17.179.253.34, mailfrom: afish@apple.com) Received: from pps.filterd (rn-mailsvcp-ppex-lapp15.rno.apple.com [127.0.0.1]) by rn-mailsvcp-ppex-lapp15.rno.apple.com (8.16.1.2/8.16.1.2) with SMTP id 22TLYmW6010354; Tue, 29 Mar 2022 14:39:37 -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=K9n7QH0kBYXZx0MxV7rugZuuBrVrqcz9LjvocX2bzOY=; b=tFIwhXyjtFDkHhcwrwdp4Nj8XeyeecPfIdEC/RJna/h0fsyJsTOADRWxsLJyC5ScCmqm E9tR3wKJudUWP6/aOGwpbo4LDr/+P1hspMJFmZz4zqQt5WwzDbu6APXDy/V6HwPL0/OR SB6Vk705mZxXpPOUDR3JGIU6BQQJY/rVLqxvoNsphZeQIixtMcdRcAD/r860Tn30ec5Z 9f7TiicB9QStUcb9p7rqCE3ayJ29+nC1dpftBX3kYnyq6RMWOO94lmwN+KFWfx/zDuZe CrtAicrDuHfUHJQ6FHZ4lQGOjpFOynoUC8PU7mTOVi4qoFX32v+gETOaiix5z26/dcOF iA== Received: from rn-mailsvcp-mta-lapp04.rno.apple.com (rn-mailsvcp-mta-lapp04.rno.apple.com [10.225.203.152]) by rn-mailsvcp-ppex-lapp15.rno.apple.com with ESMTP id 3f20dccarw-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 29 Mar 2022 14:39:37 -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-lapp04.rno.apple.com (Oracle Communications Messaging Server 8.1.0.16.20220118 64bit (built Jan 18 2022)) with ESMTPS id <0R9J00O4P061E6F0@rn-mailsvcp-mta-lapp04.rno.apple.com>; Tue, 29 Mar 2022 14:39:37 -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 <0R9J00R00003WV00@rn-mailsvcp-mmp-lapp02.rno.apple.com>; Tue, 29 Mar 2022 14:39:37 -0700 (PDT) X-Va-A: X-Va-T-CD: f900b3001c7ef03eb53e4f1f41858654 X-Va-E-CD: 752c1a8c685a0afbbdbea70a80f59902 X-Va-R-CD: efb0292e60af3969baf341ee1b1c0614 X-Va-CD: 0 X-Va-ID: cc5e36c2-1044-4c54-8003-8d4eab78a826 X-V-A: X-V-T-CD: f900b3001c7ef03eb53e4f1f41858654 X-V-E-CD: 752c1a8c685a0afbbdbea70a80f59902 X-V-R-CD: efb0292e60af3969baf341ee1b1c0614 X-V-CD: 0 X-V-ID: ea2b3f85-d2ce-40b6-b0e5-5d7ad0e6c521 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 <0R9J00S630606700@rn-mailsvcp-mmp-lapp02.rno.apple.com>; Tue, 29 Mar 2022 14:39:36 -0700 (PDT) From: "Andrew Fish" Message-id: <86705418-7193-4ADE-9B71-D32CC7345EC2@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:39:35 -0700 In-reply-to: <16E0F7C6F57A7FEC.28871@groups.io> Cc: grant@grantlmul.xyz, Bob Feng To: edk2-devel-groups-io , Andrew Fish References: <16977.1648577646804492712@groups.io> <16E0F7C6F57A7FEC.28871@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=_5E2E58C3-D362-4525-BC64-9CF9E021B376" --Apple-Mail=_5E2E58C3-D362-4525-BC64-9CF9E021B376 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 29, 2022, at 2:38 PM, Andrew Fish via groups.io wrote: >=20 >=20 >=20 >> 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/Sourc= e/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 DevicePat= hFromText.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 >=20 > Gerd, >=20 > I=E2=80=99m not sure if this was caused by my email client but your fix d= id not work for me. > GNUmakefile:17: *** missing separator. Stop. >=20 Sorry I forgot to mention I was using an Xcode clang on macOS.=20 Thanks, Andrew Fish > 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 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 > LIBS =3D -lCommon > ifeq ($(CYGWIN), CYGWIN) >=20 >=20 > I had been working around like this previously (I=E2=80=99m not sure abou= t the portability of -Wno-unknown-warning-option): >=20 > 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 DevicePath= FromText.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-op= tion > =20 > LIBS =3D -lCommon > ifeq ($(CYGWIN), CYGWIN) >=20 > Thanks, >=20 > Andrew Fish >> LIBS =3D -lCommon >> ifeq ($(CYGWIN), CYGWIN) >=20 >=20 --Apple-Mail=_5E2E58C3-D362-4525-BC64-9CF9E021B376 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Mar 29, 20= 22, at 2:38 PM, Andrew Fish via gro= ups.io <af= ish=3Dapple.com@groups.io> wrote:



On Mar 29, 2022= , at 11:14 AM, grant@grantlmul.xyz wrote:

While I can't test this myself, the follow= ing does appear to result in a successful build using the same clang versio= n:


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 UefiDevic= ePathLib.o DevicePathFromText.o  DevicePathUtili

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

 

 # gcc 12 trips over device pat= h handling

-BUILD_C= FLAGS +=3D -Wno-error=3Dstringop-overflow

+ifeq($(CC), gcc)

+  BUILD_CFLAGS +=3D -Wno-error=3Dstringop-overf= low

+endif<= /p>

 =

Gerd,

I=E2=80=99m not sure if this was caus= ed by my email client but your fix did not work for me.
GNUmakefile:17: *** missing sepa= rator.  Stop.


Sorry I forgot t= o mention I was using an Xcode clang on macOS. 

Thanks,

Andrew Fish
=
I had to add a space after= `ifeq` to get it to work.
diff --git a/BaseTools/Source/C/DevicePath/GNUm= akefile b/BaseTools/Source/C/DevicePath/GNUmakefile
index b05d2bddfa68..ebab1d3= e2617 100644
--- a/BaseTools/Source/C/DevicePath/GNUmakefile
+++ b/BaseTools/Source= /C/DevicePath/GNUmakefile
@@ -14,7 +14,9 @@ OBJECTS =3D DevicePath.o UefiDevicePathLib.o= DevicePathFromText.o  DevicePathUtili
 include $(MAKEROOT)/Makefiles/app.makefile
 
 # gcc 12 trips over device path handling
=
-BUILD_CF= LAGS +=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 working around like this previously (I=E2=80=99m not sure about t= he portability of -Wno-unknown-warning-option):

diff = --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/Devi= cePath/GNUmakefile
index b05d2bddfa68..d08588a81f80 100644
--- a/BaseTools/Source/C= /DevicePath/GNUmakefile
+++ b/BaseTools/Source/C/DevicePath/GNUmakefile
@@ -14,7 +14,7 @@ OB= JECTS =3D DevicePath.o UefiDevicePathLib.o DevicePathFromText.o  Devic= ePathUtili
 inclu= de $(MAKEROOT)/Makefiles/app.makefile
 
 # gcc 12 tr= ips over device path handling
-BUILD_CFLAGS +=3D -Wno-error=3Dstringop-o= verflow
+BUILD_CFLAGS +=3D -Wno-error=3Dstringop-overflow -Wno-unknown-w= arning-option
 
 LIBS =3D -lCommon
 ifeq ($(CYGWIN), CYGWIN)

Thanks,

Andrew Fish=

 LIBS =3D -lCommon

 ifeq ($(CYGWIN), CYGWIN)



--Apple-Mail=_5E2E58C3-D362-4525-BC64-9CF9E021B376--