From nobody Sun May 19 12:26:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+92830+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+92830+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1661478834; cv=none; d=zohomail.com; s=zohoarc; b=EKqRzbcRazTT2vRQy27r2mDpdC43nWa2dxrWvp5aDHZ50Ybgq1iUsQN19ET/yzZl3BUAoY4wyenNja2RMa120sbHFDpuMd1LG2CtFcbiFUPW53+25uEYAAfloi22A197Vrfgd4KF6xlNR6ZrJj12quAa6TGgshd5i0GvptoeWyg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1661478834; h=Content-Type:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=6gRUMJYHhjjDK3JlxxZ3SkP1iUXg+AYin9mZM8g4icg=; b=APvOu+yfEH7ZQAj5kpYLBF9sLnwWXeU5hBvmLhLjC6CAIFTOgKH8+48b5dOs1AWzI5AflCezhZzm7E78OAZkQail4ca4NU4rQsM/Of02mq+I0KCdijzJMBXAImVjIEQO8S7JkSlUljnI19gzwjBSpLp+l5c22Gmh4REunmZVnJw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+92830+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1661478834121775.1560358656609; Thu, 25 Aug 2022 18:53:54 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id ynGZYY1788612x2PRcs0v8QB; Thu, 25 Aug 2022 18:53:53 -0700 X-Received: from walk.intel-email.com (walk.intel-email.com [101.227.64.242]) by mx.groups.io with SMTP id smtpd.web08.32548.1661478832604630416 for ; Thu, 25 Aug 2022 18:53:53 -0700 X-Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 7888ACD1F7D3 for ; Fri, 26 Aug 2022 09:53:49 +0800 (CST) X-Received: from localhost (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 73C25CD1F7F0 for ; Fri, 26 Aug 2022 09:53:49 +0800 (CST) X-Virus-Scanned: by SpamTitan at intel-email.com X-Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 27193CD1F7EC for ; Fri, 26 Aug 2022 09:53:49 +0800 (CST) X-Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by walk.intel-email.com (Postfix) with SMTP id D1306CD1F7B2 for ; Fri, 26 Aug 2022 09:53:45 +0800 (CST) X-Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Fri, 26 Aug 2022 09:53:36 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming via groups.io" To: , , "'Rebecca Cran'" , , "'Leif Lindholm'" References: <170EA793884203D0.22386@groups.io> <04d48cc6-a9da-ff39-3403-b1d0abd1f045@bsdio.com> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gQmFzZVRvb2xzIG5vIGxvbmdlciBidWlsZHMgb24gbWFjT1M6ICJlcnJvcjogdW5rbm93biB3YXJuaW5nIG9wdGlvbiAnLVdlcnJvcj1zdHJpbmdvcC1vdmVyZmxvdyci?= Date: Fri, 26 Aug 2022 09:53:39 +0800 Message-ID: <000e01d8b8ee$a98061c0$fc812540$@byosoft.com.cn> MIME-Version: 1.0 Thread-Index: AQJi9BNxpkyvyOW6+KtAJoYrr1d1mAJ2EwdnAasKVR4Br24pxgHmsSmvrG47M6A= Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,gaoliming@byosoft.com.cn X-Gm-Message-State: rnc0Bk9yjDx7586kmSIu4ygWx1787277AA= Content-Type: multipart/alternative; boundary="----=_NextPart_000_000F_01D8B931.B7A54F70" Content-Language: zh-cn DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1661478833; bh=PMrT/wbs4q6A+RS1N8H0dibJ0mvwDgM/XM8U1rM8lfs=; h=Content-Type:Date:From:Reply-To:Subject:To; b=WsS/9NvwQZjhmQdmPFWOF3C8+0/Hgc0dG1BG8sulo18v/+xGC+Z119u1wbl5RpXPQUn SHDgy7WwEW8frQm7GeWIsavfXKu/4TUzfagvm1CVo4AqjI5zFmnaiHxP9mJi266tGaGAn V++MFi6BHJUNvl+//prI6BcG3g5sxAzhwP4= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1661478836328100003 ------=_NextPart_000_000F_01D8B931.B7A54F70 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Mike: I agree with you.=20 =20 Thanks Liming =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 Michael D Kinney =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2022=E5=B9=B48=E6=9C=8826=E6=97=A5 7:= 51 =E6=94=B6=E4=BB=B6=E4=BA=BA: Rebecca Cran ; devel@edk2.g= roups.io; afish@apple.com; Gao, Liming ; Andrew F= ish (afish@apple.com) ; Leif Lindholm ; Kinney, Michael D =E4=B8=BB=E9=A2=98: Re: [edk2-devel] BaseTools no longer builds on macOS: "= error: unknown warning option '-Werror=3Dstringop-overflow'" =20 Hi Rebecca, =20 +Liming =20 This looks like a low risk change to me. But given that the release is sup= posed to occur tonight, we may need to delay the release 1-2 days to make s= ure there are no side effects. =20 Can you please prepare a patch with this change for review and make sure it= is marked for this stable tag. =20 There is one other revert being considered, so a delay of 1-2 days may be a= ppropriate for that issue as well. =20 Mike =20 From: Rebecca Cran >=20 Sent: Thursday, August 25, 2022 4:13 PM To: devel@edk2.groups.io ; afish@apple.com =20 Cc: Kinney, Michael D > Subject: Re: [edk2-devel] BaseTools no longer builds on macOS: "error: unkn= own warning option '-Werror=3Dstringop-overflow'" =20 Thanks, that patch works. Is it too late to get it in for the stable tag? =20 Reviewed-by: Rebecca Cran =20 On 8/25/22 11:49, Andrew Fish via groups.io wrote: Maybe having the check last would be cleaner. =20 =20 diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C= /DevicePath/GNUmakefile index c217674345b1..17f213879e82 100644 --- a/BaseTools/Source/C/DevicePath/GNUmakefile +++ b/BaseTools/Source/C/DevicePath/GNUmakefile @@ -16,10 +16,12 @@ include $(MAKEROOT)/Makefiles/app.makefile GCCVERSION =3D $(shell gcc -dumpversion | awk -F'.' '{print $$1}') ifneq ("$(GCCVERSION)", "5") ifneq ($(CXX), llvm) +ifneq ($(DARWIN),Darwin) # gcc 12 trips over device path handling BUILD_CFLAGS +=3D -Wno-error=3Dstringop-overflow endif endif +endif =20 LIBS =3D -lCommon ifeq ($(CYGWIN), CYGWIN) =20 Thanks, =20 Andrew Fish On Aug 25, 2022, at 10:45 AM, Andrew Fish via groups.io wrote: =20 Rebecca,=20 =20 FYI /usr/bin/gcc has been a redirector into clang for a lot of years.=20 =20 The build picks different default sets of complier flags based on build typ= e. There is already code that assumes gcc =3D=3D clang here [1] =20 I think the issue is the check that is wrapping "BUILD_CFLAGS +=3D -Wno-err= or=3Dstringop-overflow=E2=80=9D. It needs to skip the check on macOS.=20 =20 diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C= /DevicePath/GNUmakefile index c217674345b1..f3c9739617f2 100644 --- a/BaseTools/Source/C/DevicePath/GNUmakefile +++ b/BaseTools/Source/C/DevicePath/GNUmakefile @@ -14,12 +14,14 @@ OBJECTS =3D DevicePath.o UefiDevicePathLib.o DevicePath= FromText.o DevicePathUtili include $(MAKEROOT)/Makefiles/app.makefile =20 GCCVERSION =3D $(shell gcc -dumpversion | awk -F'.' '{print $$1}') +ifneq ($(DARWIN),Darwin) ifneq ("$(GCCVERSION)", "5") ifneq ($(CXX), llvm) # gcc 12 trips over device path handling BUILD_CFLAGS +=3D -Wno-error=3Dstringop-overflow endif endif +endif =20 LIBS =3D -lCommon ifeq ($(CYGWIN), CYGWIN) =20 [1] https://github.com/tianocore/edk2/blob/master/BaseTools/Source/C/Makefi= les/header.makefile#L83 =20 Thanks, =20 Andrew Fish On Aug 25, 2022, at 9:20 AM, Rebecca Cran wrote: =20 BaseTools no longer builds on macOS (12.5.1, Monterey), because 'gcc' in /u= sr/bin is really clang. I tried installing gcc 12 from Homebrew, but the build then failed saying i= t couldn't find _stdio.h. It appears the breakage might have been introduced in this commit back in M= arch: commit 22130dcd98b4d4b76ac8d922adb4a2dbc86fa52c Author: Gerd Hoffmann Date: Thu Mar 24 20:04:36 2022 +0800 Basetools: turn off gcc12 warning Running "make -C BaseTools" produces the following error: /Library/Developer/CommandLineTools/usr/bin/make -C DevicePath gcc -c -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustrySt= andard -I ../Common/ -I .. -I . -I ../Include/X64/ -MD -fshort-wchar -fno-s= trict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign = -Wno-unused-result -nostdlib -g -O2 -Wno-error=3Dstringop-overflow DeviceP= ath.c -o DevicePath.o error: unknown warning option '-Werror=3Dstringop-overflow'; did you mean '= -Werror=3Dshift-overflow'? [-Werror,-Wunknown-warning-option] make[2]: *** [DevicePath.o] Error 1 make[1]: *** [DevicePath] Error 2 make: *** [Source/C] Error 2 bcran@procan edk2 % gcc -v Configured with: --prefix=3D/Library/Developer/CommandLineTools/usr --with-= gxx-include-dir=3D/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/i= nclude/c++/4.2.1 Apple clang version 12.0.5 (clang-1205.0.22.9) Target: x86_64-apple-darwin21.6.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin bcran@procan edk2 % uname -a Darwin procan.int.bsdio.com 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10= 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64 x86_64 --=20 Rebecca Cran =20 =20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#92830): https://edk2.groups.io/g/devel/message/92830 Mute This Topic: https://groups.io/mt/93261986/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- ------=_NextPart_000_000F_01D8B931.B7A54F70 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Mike:

=C2=A0I= agree with you.

 

Thanks

Liming

=E5=8F=91=E4=BB=B6= =E4=BA=BA: devel@edk2.groups.io <devel@edk2.groups= .io> =E4=BB=A3= =E8=A1=A8 Michael D Kinney
=E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4:<= /span> 2022= =E5=B9=B48=E6=9C=8826=E6=97=A5 7:51
=E6=94=B6=E4=BB=B6=E4=BA=BA:= Rebecca Cran <rebecca@bsdio.com>; deve= l@edk2.groups.io; afish@apple.com; Gao, Liming <gaoliming@byosoft.com.cn= >; Andrew Fish (afish@apple.com) <afish@apple.com>; Leif Lindholm = <quic_llindhol@quicinc.com>; Kinney, Michael D <michael.d.kinney@i= ntel.com>
=E4=B8=BB=E9=A2=98:= Re: [edk2-devel] BaseTools no longer builds on macOS: &= quot;error: unknown warning option '-Werror=3Dstringop-overflow'"=

 

Hi Reb= ecca,

&nb= sp;

+Liming

 

This looks like a low risk c= hange to me.=C2=A0 But given that the release is supposed to occur tonight,= we may need to delay the release 1-2 days to make sure there are no side e= ffects.

&= nbsp;

Can you pleas= e prepare a patch with this change for review and make sure it is marked fo= r this stable tag.

 

Th= ere is one other revert being considered, so a delay of 1-2 days may be app= ropriate for that issue as well.

=  

Mike

 

From: Rebecca Cran <rebecca@bsdio.com>
Sent: Thursday, August 25, 2022 4:13 PM
To: devel@edk2.groups.io; afish@apple.com
Cc: Kinney, Michael D <michael.d.kinney@intel.com>
Subje= ct: Re: [edk2-devel] BaseTools no longer builds on macOS: "error: = unknown warning option '-Werror=3Dstringop-overflow'"

 <= /span>

Thanks, that patch works. Is it too late to= get it in for the stable tag?

<= o:p> 

Reviewed-by: Rebecca Cran = <rebecca@bsdio.com>

 

On 8/25/22 11:49, Andrew Fish via groups.i= o wrote:

Maybe having th= e check last would be cleaner. 

 

diff --git a/BaseTools/Source/C/Device= Path/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile

index c217674345b= 1..17f213879e82 100644

--- a/BaseTools/Source/C/DevicePath/GNUmakefile<= /b><= o:p>

+++ b/Base= Tools/Source/C/DevicePath/GNUmakefile

@@ -16,10 +16,12 @@ inclu= de $(MAKEROOT)/Makefiles/app.makefile

 GCCVERSION =3D $(shell gcc -dumpversion | aw= k -F'.' '{print $$1}')

 ifneq ("$(GCCVERSION)", "5")=

 ifneq ($(CXX), ll= vm)

+ifneq ($(DARWIN),Darwin)

 # gcc 12 trips over de= vice path handling

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

 endif

 endif

+endif

 

 LIBS =3D -lCommon

 ifeq ($(CYGWIN), CYGWIN)



 <= /o:p>

Thanks,<= o:p>

 

Andrew Fish



On Aug 25, 2= 022, at 10:45 AM, Andrew Fish via groups.io <afish=3Dapple.com@groups.io> wrote:

 

Rebecca,

 

FYI /usr/bin= /gcc has been a redirector into clang for a lot of years. <= /span>

 

The build = picks different default sets of complier flags based on build type. There i= s already code that assumes gcc =3D=3D clang here [1]

=

 =

I think the issue is= the check that is wrapping "BUILD_CFLAGS +=3D -Wno-error=3Dstringop-o= verflow=E2=80=9D. It needs to skip the check on macOS. 

 =

diff --git a/BaseTools/Sourc= e/C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile

index c217674345b1..= f3c9739617f2 100644

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

+++ b/BaseTools/Source/C/DevicePath/GNU= makefile

@@ -14,12 +14,14 @@ OBJECTS =3D DevicePath.o UefiDevicePathLib.o Dev= icePathFromText.o  DevicePathUtili

 include $(MAKEROOT)/Makefiles/app.makefile

&n= bsp;

 GCCVERSION =3D $(shel= l gcc -dumpversion | awk -F'.' '{print $$1}')

+ifneq ($(DARWIN),Darwin)

 ifneq ("$(GCCVERSION)", &= quot;5")

 ifneq = ($(CXX), llvm)

 # gcc= 12 trips over device path handling

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

 endif

 endif

+endif

 

=

 LIBS =3D -lCommon

 ifeq ($(CYGWIN), CYGWIN)



=

 

[1] https://github.com/tianocore/edk2/blob/master/Base= Tools/Source/C/Makefiles/header.makefile#L83

 

<= /div>

Thanks,=

 

Andrew Fish=



=

On Aug 25, 2022, at 9:20 AM, = Rebecca Cran <rebecca@bsdio.com>= wrote:

 

BaseTools no longer builds on macOS (= 12.5.1, Monterey), because 'gcc' in /usr/bin is really clang.

I trie= d installing gcc 12 from Homebrew, but the build then failed saying it coul= dn't find _stdio.h.

It appears the breakage might have been introduc= ed in this commit back in March:

commit 22130dcd98b4d4b76ac8d922adb4= a2dbc86fa52c
Author: Gerd Hoffmann = <kraxel@redhat.com>
Date:   Thu Mar 24 20:04:36 2022= +0800

    Basetools: turn off gcc12 warning

R= unning "make -C BaseTools" produces the following error:

<= br>/Library/Developer/CommandLineTools/usr/bin/make -C DevicePath
gcc&nb= sp; -c  -I .. -I ../Include/Common -I ../Include/ -I ../Include/Indust= ryStandard -I ../Common/ -I .. -I . -I ../Include/X64/ -MD -fshort-wchar -f= no-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-ass= ign -Wno-unused-result -nostdlib -g -O2  -Wno-error=3Dstringop-overflo= w DevicePath.c -o DevicePath.o
error: unknown warning option '-Werror=3D= stringop-overflow'; did you mean '-Werror=3Dshift-overflow'? [-Werror,-Wunk= nown-warning-option]
make[2]: *** [DevicePath.o] Error 1
make[1]: ***= [DevicePath] Error 2
make: *** [Source/C] Error 2


bcran@proc= an edk2 % gcc -v
Configured with: --prefix=3D/Library/Developer/CommandL= ineTools/usr --with-gxx-include-dir=3D/Library/Developer/CommandLineTools/S= DKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.5 (clang-1= 205.0.22.9)
Target: x86_64-apple-darwin21.6.0
Thread model: posix
= InstalledDir: /Library/Developer/CommandLineTools/usr/bin

bcran@proc= an edk2 % uname -a
Darwin procan.int.bsdio.com 21.6.0 Darwin Kernel Vers= ion 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86= _64 x86_64

--
Rebecca Cran

 

 

_._,_._,_

G= roups.io Links:

You receive all messages sent to this group.

Vi= ew/Reply Online (#92830) | | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [importer@patchew.org]
_._,_._,_=20 ------=_NextPart_000_000F_01D8B931.B7A54F70--