<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:等线;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Menlo;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"\@等线";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:等线;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=ZH-CN link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:等线'>Mike:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:等线'>  I agree with you. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:等线'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:等线'>Thanks<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:等线'>Liming<o:p></o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-family:等线'>发件人<span lang=EN-US>:</span></span></b><span lang=EN-US style='font-family:等线'> devel@edk2.groups.io <devel@edk2.groups.io> </span><b><span style='font-family:等线'>代表 </span></b><span lang=EN-US style='font-family:等线'>Michael D Kinney<br></span><b><span style='font-family:等线'>发送时间<span lang=EN-US>:</span></span></b><span lang=EN-US style='font-family:等线'> 2022</span><span style='font-family:等线'>年<span lang=EN-US>8</span>月<span lang=EN-US>26</span>日<span lang=EN-US> 7:51<br></span><b>收件人<span lang=EN-US>:</span></b><span lang=EN-US> Rebecca Cran <rebecca@bsdio.com>; devel@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@intel.com><br></span><b>主题<span lang=EN-US>:</span></b><span lang=EN-US> Re: [edk2-devel] BaseTools no longer builds on macOS: "error: unknown warning option '-Werror=stringop-overflow'"<o:p></o:p></span></span></p></div></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Hi Rebecca,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>+Liming<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>This looks like a low risk change to me.  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 effects.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Can you please prepare a patch with this change for review and make sure it is marked for this stable tag.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>There is one other revert being considered, so a delay of 1-2 days may be appropriate for that issue as well.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Mike<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> Rebecca Cran <<a href="mailto:rebecca@bsdio.com">rebecca@bsdio.com</a>> <br><b>Sent:</b> Thursday, August 25, 2022 4:13 PM<br><b>To:</b> <a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>; <a href="mailto:afish@apple.com">afish@apple.com</a><br><b>Cc:</b> Kinney, Michael D <<a href="mailto:michael.d.kinney@intel.com">michael.d.kinney@intel.com</a>><br><b>Subject:</b> Re: [edk2-devel] BaseTools no longer builds on macOS: "error: unknown warning option '-Werror=stringop-overflow'"<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p><span lang=EN-US>Thanks, that patch works. Is it too late to get it in for the stable tag?<o:p></o:p></span></p><p><span lang=EN-US><o:p> </o:p></span></p><p><span lang=EN-US>Reviewed-by: Rebecca Cran <a href="mailto:rebecca@bsdio.com"><rebecca@bsdio.com></a><o:p></o:p></span></p><p><span lang=EN-US><o:p> </o:p></span></p><div><p class=MsoNormal><span lang=EN-US>On 8/25/22 11:49, Andrew Fish via groups.io wrote:<o:p></o:p></span></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span lang=EN-US>Maybe having the check last would be cleaner.  <o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><p style='margin:0cm;font-stretch: normal'><b><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'>diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile</span></b><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'><o:p></o:p></span></p><p style='margin:0cm;font-stretch: normal'><b><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'>index c217674345b1..17f213879e82 100644</span></b><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'><o:p></o:p></span></p><p style='margin:0cm;font-stretch: normal'><b><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'>--- a/BaseTools/Source/C/DevicePath/GNUmakefile</span></b><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'><o:p></o:p></span></p><p style='margin:0cm;font-stretch: normal'><b><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'>+++ b/BaseTools/Source/C/DevicePath/GNUmakefile</span></b><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'><o:p></o:p></span></p><p style='margin:0cm;font-stretch: normal'><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif;color:#2EAEBB'>@@ -16,10 +16,12 @@</span><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> include $(MAKEROOT)/Makefiles/app.makefile<o:p></o:p></span></p><p style='margin:0cm;font-stretch: normal'><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> GCCVERSION = $(shell gcc -dumpversion | awk -F'.' '{print $$1}')<o:p></o:p></span></p><p style='margin:0cm;font-stretch: normal'><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> ifneq ("$(GCCVERSION)", "5")<o:p></o:p></span></p><p style='margin:0cm;font-stretch: normal'><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> ifneq ($(CXX), llvm)<o:p></o:p></span></p><p style='margin:0cm;font-stretch: normal;color:rgb(47, 180,           29)'><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'>+ifneq ($(DARWIN),Darwin)<o:p></o:p></span></p><p style='margin:0cm;font-stretch: normal'><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> # gcc 12 trips over device path handling<o:p></o:p></span></p><p style='margin:0cm;font-stretch: normal'><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> BUILD_CFLAGS += -Wno-error=stringop-overflow<o:p></o:p></span></p><p style='margin:0cm;font-stretch: normal'><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> endif<o:p></o:p></span></p><p style='margin:0cm;font-stretch: normal'><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> endif<o:p></o:p></span></p><p style='margin:0cm;font-stretch: normal;color:rgb(47, 180,           29)'><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'>+endif<o:p></o:p></span></p><p style='margin:0cm;font-stretch: normal;min-height: 13px'><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> <o:p></o:p></span></p><p style='margin:0cm;font-stretch: normal'><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> LIBS = -lCommon<o:p></o:p></span></p><p style='margin:0cm;font-stretch: normal'><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> ifeq ($(CYGWIN), CYGWIN)<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><br><br><o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>Thanks,<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>Andrew Fish<o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN-US><br><br><o:p></o:p></span></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal><span lang=EN-US>On Aug 25, 2022, at 10:45 AM, Andrew Fish via groups.io <a href="mailto:afish=apple.com@groups.io"><afish=apple.com@groups.io></a> wrote:<o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><div><div><p class=MsoNormal><span lang=EN-US>Rebecca, <o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>FYI /usr/bin/gcc has been a redirector into clang for a lot of years. <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>The build picks different default sets of complier flags based on build type. There is already code that assumes gcc == clang here [1]<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>I think the issue is the check that is wrapping "BUILD_CFLAGS += -Wno-error=stringop-overflow”. It needs to skip the check on macOS. <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><div><p class=MsoNormal><b><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'>diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile</span></b><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'><o:p></o:p></span></p></div><div><p class=MsoNormal><b><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'>index c217674345b1..f3c9739617f2 100644</span></b><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'><o:p></o:p></span></p></div><div><p class=MsoNormal><b><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'>--- a/BaseTools/Source/C/DevicePath/GNUmakefile</span></b><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'><o:p></o:p></span></p></div><div><p class=MsoNormal><b><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'>+++ b/BaseTools/Source/C/DevicePath/GNUmakefile</span></b><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'><o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif;color:#2EAEBB'>@@ -14,12 +14,14 @@</span><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> OBJECTS = DevicePath.o UefiDevicePathLib.o DevicePathFromText.o  DevicePathUtili<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> include $(MAKEROOT)/Makefiles/app.makefile<o:p></o:p></span></p></div><p style='margin:0cm;font-stretch: normal;min-height: 13px'><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> <o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> GCCVERSION = $(shell gcc -dumpversion | awk -F'.' '{print $$1}')<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif;color:#2FB41D'>+ifneq ($(DARWIN),Darwin)<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> ifneq ("$(GCCVERSION)", "5")<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> ifneq ($(CXX), llvm)<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> # gcc 12 trips over device path handling<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> BUILD_CFLAGS += -Wno-error=stringop-overflow<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> endif<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> endif<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif;color:#2FB41D'>+endif<o:p></o:p></span></p></div><p style='margin:0cm;font-stretch: normal;min-height: 13px'><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> <o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> LIBS = -lCommon<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:8.5pt;font-family:"Menlo",serif'> ifeq ($(CYGWIN), CYGWIN)<o:p></o:p></span></p></div></div><div><p class=MsoNormal><span lang=EN-US><br><br><o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>[1] <a href="https://github.com/tianocore/edk2/blob/master/BaseTools/Source/C/Makefiles/header.makefile#L83">https://github.com/tianocore/edk2/blob/master/BaseTools/Source/C/Makefiles/header.makefile#L83</a><o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>Thanks,<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>Andrew Fish<o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN-US><br><br><o:p></o:p></span></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal><span lang=EN-US>On Aug 25, 2022, at 9:20 AM, Rebecca Cran <a href="mailto:rebecca@bsdio.com"><rebecca@bsdio.com></a> wrote:<o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><div><div><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US>BaseTools no longer builds on macOS (12.5.1, Monterey), because 'gcc' in /usr/bin is really clang.<br><br>I tried installing gcc 12 from Homebrew, but the build then failed saying it couldn't find _stdio.h.<br><br>It appears the breakage might have been introduced in this commit back in March:<br><br>commit 22130dcd98b4d4b76ac8d922adb4a2dbc86fa52c<br>Author: Gerd Hoffmann <a href="mailto:kraxel@redhat.com"><kraxel@redhat.com></a><br>Date:   Thu Mar 24 20:04:36 2022 +0800<br><br>    Basetools: turn off gcc12 warning<br><br>Running "make -C BaseTools" produces the following error:<br><br><br>/Library/Developer/CommandLineTools/usr/bin/make -C DevicePath<br>gcc  -c  -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/ -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<br>error: unknown warning option '-Werror=stringop-overflow'; did you mean '-Werror=shift-overflow'? [-Werror,-Wunknown-warning-option]<br>make[2]: *** [DevicePath.o] Error 1<br>make[1]: *** [DevicePath] Error 2<br>make: *** [Source/C] Error 2<br><br><br>bcran@procan edk2 % gcc -v<br>Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1<br>Apple clang version 12.0.5 (clang-1205.0.22.9)<br>Target: x86_64-apple-darwin21.6.0<br>Thread model: posix<br>InstalledDir: /Library/Developer/CommandLineTools/usr/bin<br><br>bcran@procan edk2 % uname -a<br>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<br><br>-- <br>Rebecca Cran<o:p></o:p></span></p></div></div></blockquote></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></div></div></blockquote></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></blockquote></div><div><p class=MsoNormal></o:p></span></p></div></div></body></html>


 <div width="1" style="color:white;clear:both">_._,_._,_</div> <hr>   Groups.io Links:<p>   You receive all messages sent to this group.    <p> <a target="_blank" href="https://edk2.groups.io/g/devel/message/92830">View/Reply Online (#92830)</a> |    |  <a target="_blank" href="https://groups.io/mt/93261986/1813853">Mute This Topic</a>  | <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>    <a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> | <a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |  <a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>  [edk2-devel-archive@redhat.com]<br> <div width="1" style="color:white;clear:both">_._,_._,_</div>