From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id B45C37803CE for ; Thu, 10 Aug 2023 13:51:09 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=pmD795qx53u1XcdDxDzBhpBPZFLKZpr7ym17WgPcx8M=; c=relaxed/simple; d=groups.io; h=From:MIME-version:Subject:Date:References:To:In-reply-to:Message-id:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-type; s=20140610; t=1691675468; v=1; b=cOAfplWcRIrxivE7miMZE1ka3hjDqcTcWAnRylhbVjP8ElM9spfIMScGIJUwxPcN0C16E4sY VSVDj5USC2Yq2qrhP1Mfa5QsV0Ea6A72CR3rj5GeW1zNg6HqBFZcqSPo0g9Jt7cYmRWCeyHrsp6 Ud0wFjLjqOhEEgtDyPYdRtoA= X-Received: by 127.0.0.2 with SMTP id jTNMYY7687511xnRVQlopJFr; Thu, 10 Aug 2023 06:51:08 -0700 X-Received: from rn-mailsvcp-mx-lapp02.apple.com (rn-mailsvcp-mx-lapp02.apple.com [17.179.253.23]) by mx.groups.io with SMTP id smtpd.web11.17560.1691675467735106075 for ; Thu, 10 Aug 2023 06:51:07 -0700 X-Received: from ma-mailsvcp-mta-lapp03.corp.apple.com (ma-mailsvcp-mta-lapp03.corp.apple.com [10.226.18.135]) by rn-mailsvcp-mx-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.23.20230328 64bit (built Mar 28 2023)) with ESMTPS id <0RZ600QLYH564Q40@rn-mailsvcp-mx-lapp02.rno.apple.com> for devel@edk2.groups.io; Thu, 10 Aug 2023 06:51:07 -0700 (PDT) X-Proofpoint-ORIG-GUID: KXADsE8v1jB1y453QE6o_dcqxw9FXJmX X-Proofpoint-GUID: KXADsE8v1jB1y453QE6o_dcqxw9FXJmX X-Received: from ma-mailsvcp-mmp-lapp03.apple.com (ma-mailsvcp-mmp-lapp03.apple.com [17.32.222.16]) by ma-mailsvcp-mta-lapp03.corp.apple.com (Oracle Communications Messaging Server 8.1.0.23.20230328 64bit (built Mar 28 2023)) with ESMTPS id <0RZ601089H56P610@ma-mailsvcp-mta-lapp03.corp.apple.com>; Thu, 10 Aug 2023 06:51:06 -0700 (PDT) X-Received: from process_milters-daemon.ma-mailsvcp-mmp-lapp03.apple.com by ma-mailsvcp-mmp-lapp03.apple.com (Oracle Communications Messaging Server 8.1.0.23.20230328 64bit (built Mar 28 2023)) id <0RZ600900H510O00@ma-mailsvcp-mmp-lapp03.apple.com>; Thu, 10 Aug 2023 06:51:06 -0700 (PDT) X-Va-A: X-Va-T-CD: dd79189fad5b22423426c52c4ffde706 X-Va-E-CD: 81f81af75f72de43e63df40d8c881d19 X-Va-R-CD: 24cf420fcec2b9c8475fa14e52ebe880 X-Va-ID: 1f01b890-aa02-47b4-9814-31a6d5493e9c X-Va-CD: 0 X-V-A: X-V-T-CD: dd79189fad5b22423426c52c4ffde706 X-V-E-CD: 81f81af75f72de43e63df40d8c881d19 X-V-R-CD: 24cf420fcec2b9c8475fa14e52ebe880 X-V-ID: ff499692-08a5-4a55-be49-875d77def8da X-V-CD: 0 X-Received: from smtpclient.apple (unknown [17.10.174.147]) by ma-mailsvcp-mmp-lapp03.apple.com (Oracle Communications Messaging Server 8.1.0.23.20230328 64bit (built Mar 28 2023)) with ESMTPSA id <0RZ600V8MH551F00@ma-mailsvcp-mmp-lapp03.apple.com>; Thu, 10 Aug 2023 06:51:06 -0700 (PDT) From: "Andrew Fish via groups.io" MIME-version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) X-Priority: 3 Subject: =?UTF-8?B?UmU6IFtlZGsyLWRldmVsXSBDYW4gUkVMRUFTRSB0YXJnZXQgZGlzYWJsZSAtV2Vycm9yIENDX0ZMQUfvvJ8=?= Date: Thu, 10 Aug 2023 09:50:55 -0400 References: <6070b08a.ddbe.189df0c0736.Coremail.wangliu@iscas.ac.cn> To: edk2-devel-groups-io , wangliu@iscas.ac.cn In-reply-to: <6070b08a.ddbe.189df0c0736.Coremail.wangliu@iscas.ac.cn> Message-id: <3CAEAC07-F07D-4C4B-A5CB-CE2080C52411@apple.com> Precedence: Bulk 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,afish@apple.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: jKCmtB7Hm7Sof0idb7RC7pf1x7686176AA= Content-type: multipart/alternative; boundary="Apple-Mail=_19C57CCB-C553-4D48-8270-467E1A336D08" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=cOAfplWc; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io --Apple-Mail=_19C57CCB-C553-4D48-8270-467E1A336D08 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I think that you are advocating that since we have code that error checks o= n DEBUG and not RELEASE builds we should relax the RELEASE build compiler f= lags? /home/abuild/rpmbuild/BUILD/edk2-edk2-stable202305/MdeModulePkg/Core/Dxe/Ha= nd/Handle.c:1183:24: error: =E2=80=98Prot=E2=80=99 may be used uninitialize= d [-Werror=3Dmaybe-uninitialized] ASSERT (Prot !=3D NULL); // // EFI_ALREADY_STARTED is not an error for bus driver. // Return the corresponding protocol interface. // *Interface =3D Prot->Interface; A given platform can add ASSERT into release builds if it wants. I=E2=80=99= ve actually done that for power on before. If your compiler supports LTO yo= u are not required to set MDEPKG_NDEBUG on RELEASE builds, and you can used= a PCD to configure your debug level, per build type.=20 Maybe we should just have the error checks in all paths? Thanks, Andrew Fish > On Aug 10, 2023, at 6:44 AM, =E6=B1=AA=E6=B5=81 wro= te: >=20 > I want to build a rpm package for edk2-stable202305 on riscv64, however I= get some uninitialized variable error, I have found that the reason is -We= rror flag. > My build target was release. I think the flag should used in the debug ,n= ot in release. > My build command: build -t GCC5 -n $NCPUS -b RELEASE -a RISCV64 -p OvmfP= kg/RiscVVirt/RiscVVirtQemu.dsc -D SECURE_BOOT_ENABLE=3DTRUE -D TPM_ENABLE= =3DTRUE -D TPM_CONFIG_ENABLE=3DTRUE > This is my packet log: =20 >=20 > https://build.tarsier-infra.com/package/live_build_log/home:ouuleilei:bra= nches:home:ouuleilei:branches:openEuler:Mainline/edk2-test/openEuler_Mainli= ne_standard_riscv64_gcc/riscv64 >=20 > https://build.tarsier-infra.com/build/home:ouuleilei:branches:home:ouulei= lei:branches:openEuler:Mainline/openEuler_Mainline_standard_riscv64_gcc/ris= cv64/edk2-test/_log >=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 (#107692): https://edk2.groups.io/g/devel/message/107692 Mute This Topic: https://groups.io/mt/100663199/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --Apple-Mail=_19C57CCB-C553-4D48-8270-467E1A336D08 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
I think that you are advocat= ing that since we have code that error checks on DEBUG and not RELEASE buil= ds we should relax the RELEASE build compiler flags?

/home/ab=
uild/rpmbuild/BUILD/edk2-edk2-stable202305/MdeModulePkg/Core/Dxe/Hand/Handl=
e.c:1183:24: error: =E2=80=98Prot=E2=80=99 may be used uninitialized [-Werr=
or=3Dmaybe-uninitialized]
      ASSERT (Prot= !=3D NULL);
      //
    &nbs= p; // EFI_ALREADY_STARTED is not an error for bus driver.
  =     // Return the corresponding protocol interface.
&nb= sp;     //
      *Interface =3D Prot->= ;Interface;

A given platform can add ASSERT into r= elease builds if it wants. I=E2=80=99ve actually done that for power on bef= ore. If your compiler supports LTO you are not required to set MDEPKG_NDEBU= G on RELEASE builds, and you can used a PCD to configure your debug level, = per build type. 

Maybe we should just have th= e error checks in all paths?

Thanks,
Andrew Fish

On Aug= 10, 2023, at 6:44 AM, =E6=B1=AA=E6=B5=81 <wangliu@iscas.ac.cn> wrote= :

I want to build a rpm package for edk2-stable202305 on riscv6= 4, however I get some uninitialized variable error, I have found that the r= eason is -Werror flag.
My build target was release. I think the flag should used in the debug ,not= in release.
My build command:  build -t GCC5 -n $NCPUS -b RELEASE -a RISCV64 -p Ov= mfPkg/RiscVVirt/RiscVVirtQemu.dsc -D SECURE_BOOT_ENABLE=3DTRUE -D TPM_ENABL= E=3DTRUE -D TPM_CONFIG_ENABLE=3DTRUE

This is my packet log:   

https://build.tarsier-infra.com/packa= ge/live_build_log/home:ouuleilei:branches:home:ouuleilei:branches:openEuler= :Mainline/edk2-test/openEuler_Mainline_standard_riscv64_gcc/riscv64

https://build.tarsier-infra.com/build/= home:ouuleilei:branches:home:ouuleilei:branches:openEuler:Mainline/openEule= r_Mainline_standard_riscv64_gcc/riscv64/edk2-test/_log

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#107692) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--Apple-Mail=_19C57CCB-C553-4D48-8270-467E1A336D08--