NOOPT builds can be very valuable to find these types of issues. Mike
> -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ard Biesheuvel > Sent: Sunday, April 2, 2023 9:37 AM > To: Rebecca Cran <rebe...@bsdio.com> > Cc: Gao, Liming <gaolim...@byosoft.com.cn>; devel@edk2.groups.io; Oliver > Smith-Denny <o...@smith-denny.com>; Jiang, Guomin > <guomin.ji...@intel.com>; Lu, Xiaoyu1 <xiaoyu1...@intel.com>; Wang, Jian J > <jian.j.w...@intel.com>; Yao, Jiewen > <jiewen....@intel.com>; Ard Biesheuvel <ardb+tianoc...@kernel.org>; Justen, > Jordan L <jordan.l.jus...@intel.com>; Gerd > Hoffmann <kra...@redhat.com>; Feng, Bob C <bob.c.f...@intel.com>; Andrew Fish > <af...@apple.com>; Leif Lindholm > <quic_llind...@quicinc.com>; Kinney, Michael D <michael.d.kin...@intel.com> > Subject: Re: 回复: [edk2-devel] [PATCH v2 00/13] > BaseTools,CryptoPkg,MdePkg,OvmfPkg: Delete CLANG35,CLANG38,GCC48,GCC49, > rename GCC5 to GCC, update CLANGDWARF, delete VS 2008-2013, EBC > > On Sun, 2 Apr 2023 at 17:41, Rebecca Cran <rebe...@bsdio.com> wrote: > > > > On 3/28/23 7:19 PM, gaoliming wrote: > > > > > GCC49 is one GCC tool chain without LTO enable option. GCC5 is another > > > GCC tool chain with LTO enable option. > > > > > > They have the different usage. I suggest to keep GCC49 and GCC5 both, and > > > also keep their name as is. > > > > Is anything still _using_ GCC49 though? Since I strongly suspect nobody > > is using gcc 4.9, I'll rename it to GCCNOLTO. > > > > When I try and build OVMF with it, I get the following error: > > > > > > /UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > > /home/bcran/src/uefi/edk2/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInternal.c: > > In function ‘InternalSetPageState’: > > /home/bcran/src/uefi/edk2/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInternal.c:166:37: > > error: ‘Cmd’ may be used uninitialized in this function > > [-Werror=maybe-uninitialized] > > 166 | Info->Entry[i].CurrentPage = 0; > > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ > > /home/bcran/src/uefi/edk2/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInternal.c:32:10: > > note: ‘Cmd’ was declared here > > 32 | UINTN Cmd; > > | ^~~ > > rm -f > > /home/bcran/src/uefi/edk2/Build/OvmfX64/RELEASE_GCC49/X64/NetworkPkg/Library/DxeIpIoLib/DxeIpIoLib/OUTPUT/DxeIpIoLib.lib > > "ar" cr > > /home/bcran/src/uefi/edk2/Build/OvmfX64/RELEASE_GCC49/X64/NetworkPkg/Library/DxeIpIoLib/DxeIpIoLib/OUTPUT/DxeIpIoLib.lib > > > @/home/bcran/src/uefi/edk2/Build/OvmfX64/RELEASE_GCC49/X64/NetworkPkg/Library/DxeIpIoLib/DxeIpIoLib/OUTPUT/object_files.ls > t > > cc1: all warnings being treated as errors > > make: *** [GNUmakefile:304: > > > /home/bcran/src/uefi/edk2/Build/OvmfX64/RELEASE_GCC49/X64/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib/OUTPUT/ > X64/SnpPageStateChangeInternal.obj] > > Error 1 > > > > > > build.py... > > : error 7000: Failed to execute command > > make tbuild > > [/home/bcran/src/uefi/edk2/Build/OvmfX64/RELEASE_GCC49/X64/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib] > > > > > > build.py... > > : error F002: Failed to build module > > > > /home/bcran/src/uefi/edk2/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf > > [X64, GCC49, RELEASE] > > > > - Failed - > > Build end time: 09:38:34, Apr.02 2023 > > Build total time: 00:00:14 > > > > That warning seems reasonable to me: Cmd may be uninitialized, and > only under LTO do we get sufficient optimization and inlining for the > code generator to be able to infer that the 'default' case is > unreachable. > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#102363): https://edk2.groups.io/g/devel/message/102363 Mute This Topic: https://groups.io/mt/97919856/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-