From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web11.48684.1680453410527309693 for ; Sun, 02 Apr 2023 09:36:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cxuA4ysQ; spf=pass (domain: kernel.org, ip: 139.178.84.217, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EA4B160A0A for ; Sun, 2 Apr 2023 16:36:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 519B2C433D2 for ; Sun, 2 Apr 2023 16:36:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680453409; bh=+f/7a+fxOHbPadu0izgUzQU6QW6oJd74yHhQbThEsx8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=cxuA4ysQl8kRqkmrw0V+QeUjjtiyJ2BOcqGHPVt1vGO3scc+d7q0ggujiLMLHKsuE 3T1Pgc4scS42B0DEaV19cflbbuoq6l699uWukelw+ydJnE1aGoDYIH2WToGMmUqUqp hwplQj7N2DZjdxNzi5tF110TIfsav7dUFIW4Tu+gSgdsrwATC6aUpeAMhzij5l1XSB xx3gSt+Bq7OvM52oHujYL3j+aPV1aMxvMz751x3xIyZNPoey0kL/xqlxmOgAaxDhci PzLqDwS2qAZOdQ7jv7dZ3TTzzyBqTCeN+j1G8fS6eCYSlA+5aWxz0EgE0XJVU3mULm MeCPHidF6SOMQ== Received: by mail-lj1-f178.google.com with SMTP id a11so27966504lji.6 for ; Sun, 02 Apr 2023 09:36:49 -0700 (PDT) X-Gm-Message-State: AAQBX9dKW4Pz/z+hUICCsckPiPDKvPXsXLKB0q3eOPJ3JYtBM/F+yoae vGms1bcWck0jQDUtZlcX4TaNgU40UxUcdY4cMZI= X-Google-Smtp-Source: AKy350bkyroc5D1vL+yGegx0cNfOOAmJ5KU3+Deou1RQHKv+cTAQDUKG1KEPfZPoHjexE+acBFX2RRskFPT53tT1tQ8= X-Received: by 2002:a2e:9c11:0:b0:298:bddc:dbbf with SMTP id s17-20020a2e9c11000000b00298bddcdbbfmr9772322lji.2.1680453407266; Sun, 02 Apr 2023 09:36:47 -0700 (PDT) MIME-Version: 1.0 References: <20230328173111.759017-1-rebecca@bsdio.com> <02fb01d961dc$88d6acd0$9a840670$@byosoft.com.cn> In-Reply-To: From: "Ard Biesheuvel" Date: Sun, 2 Apr 2023 18:36:35 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: =?UTF-8?B?UmU6IOWbnuWkjTogW2VkazItZGV2ZWxdIFtQQVRDSCB2MiAwMC8xM10gQmFzZVRvb2xzLENyeXB0b1BrZyxNZGVQa2csT3ZtZlBrZzogRGVsZXRlIENMQU5HMzUsQ0xBTkczOCxHQ0M0OCxHQ0M0OSwgcmVuYW1lIEdDQzUgdG8gR0NDLCB1cGRhdGUgQ0xBTkdEV0FSRiwgZGVsZXRlIFZTIDIwMDgtMjAxMywgRUJD?= To: Rebecca Cran Cc: gaoliming , devel@edk2.groups.io, Oliver Smith-Denny , Guomin Jiang , Xiaoyu Lu , Jian J Wang , Jiewen Yao , Ard Biesheuvel , Jordan Justen , Gerd Hoffmann , Bob Feng , Andrew Fish , Leif Lindholm , Michael D Kinney Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, 2 Apr 2023 at 17:41, Rebecca Cran 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, a= nd 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/SnpPag= eStateChangeInternal.c: > In function =E2=80=98InternalSetPageState=E2=80=99: > /home/bcran/src/uefi/edk2/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPag= eStateChangeInternal.c:166:37: > error: =E2=80=98Cmd=E2=80=99 may be used uninitialized in this function > [-Werror=3Dmaybe-uninitialized] > 166 | Info->Entry[i].CurrentPage =3D 0; > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ > /home/bcran/src/uefi/edk2/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPag= eStateChangeInternal.c:32:10: > note: =E2=80=98Cmd=E2=80=99 was declared here > 32 | UINTN Cmd; > | ^~~ > rm -f > /home/bcran/src/uefi/edk2/Build/OvmfX64/RELEASE_GCC49/X64/NetworkPkg/Libr= ary/DxeIpIoLib/DxeIpIoLib/OUTPUT/DxeIpIoLib.lib > "ar" cr > /home/bcran/src/uefi/edk2/Build/OvmfX64/RELEASE_GCC49/X64/NetworkPkg/Libr= ary/DxeIpIoLib/DxeIpIoLib/OUTPUT/DxeIpIoLib.lib > @/home/bcran/src/uefi/edk2/Build/OvmfX64/RELEASE_GCC49/X64/NetworkPkg/Lib= rary/DxeIpIoLib/DxeIpIoLib/OUTPUT/object_files.lst > 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/SnpPageStateChangeInte= rnal.obj] > Error 1 > > > build.py... > : error 7000: Failed to execute command > make tbuild > [/home/bcran/src/uefi/edk2/Build/OvmfX64/RELEASE_GCC49/X64/OvmfPkg/Librar= y/BaseMemEncryptSevLib/PeiMemEncryptSevLib] > > > build.py... > : error F002: Failed to build module > /home/bcran/src/uefi/edk2/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEn= cryptSevLib.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.