From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web08.770.1635793413096389193 for ; Mon, 01 Nov 2021 12:03:33 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=iXDhHK8C; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from [10.0.0.19] (c-73-27-179-174.hsd1.fl.comcast.net [73.27.179.174]) by linux.microsoft.com (Postfix) with ESMTPSA id 36A5F20A7054; Mon, 1 Nov 2021 12:03:32 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 36A5F20A7054 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1635793412; bh=EaDarKnucQeL3tg4BjIWyzc/q6N9US/PuwNeCfksZ2A=; h=Date:Subject:To:References:From:In-Reply-To:From; b=iXDhHK8CyJxRKTAO7LiesmPQDTkYTfRtN37+pIwW6Hz6an6nOm4gYRIXQTnl3FIFb AO7zBDL/gUr8CJWSBo3XVhpOMWLQ6K/sT35mZ/ijBKyHplnUxHmuETVjzVdp9kBmjJ KRs9BpvMk9Ee3cbfhPhNxYTgEAq/aZLvcVLh0Dm0= Message-ID: <199c2d6f-c9d9-09e9-5135-821ed70698d6@linux.microsoft.com> Date: Mon, 1 Nov 2021 15:03:31 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: [edk2-devel] [Patch 0/6] Reproduce builds across source format changes To: devel@edk2.groups.io, michael.d.kinney@intel.com References: <20211101182942.321-1-michael.d.kinney@intel.com> From: "Michael Kubacki" In-Reply-To: <20211101182942.321-1-michael.d.kinney@intel.com> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit For the series: Tested-by: Michael Kubacki On 11/1/2021 2:29 PM, Michael D Kinney wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3688 > > This change is required to help verify that source code formatting > changes such as the use of uncrustify and line ending corrections > do not have any functional differences. Source format changes may > add or remove line endings that change the source file line numbers > of C statements or may change the use of spaces in C expressions > used in an ASSERT() statements. These types of changes can impact > the generated binaries when DEBUG() and ASSERT() macros are > enabled. The following set of changes adds 2 defines that can be used > to override the use of __LINE__ in DEBUG() macros and the use of > #Expression in ASSERT() macros. > > * Add DEBUG_LINE_NUMBER define to DebugLib.h that is > by default mapped to __LINE__. A build can pre-define > DEBUG_LINE_NUMBER to use a fixed value. > * Add DEBUG_EXPRESSION_STRING(Expression) macros to > DebugLib.h that is by default mapped to #Expression. > A build can define DEBUG_EXPRESSION_STRING_VALUE to > set all expression strings to a fixed string value. > * Use DEBUG_LINE_NUMBER instead of __LINE__. > * Use DEBUG_EXPRESSION_STRING instead of #Expression. > > Submodules that use __LINE__ are not updated. These do not > currently impact build reproducibility unless the debug features > of those submodules are enabled. > > The one exception is the UnitTestFrameworkPkg cmocka submodule > that uses `__LINE__`. This means that the binaries generated by host > based unit tests that use cmocka features may not be identical across > a source format change. > > Cc: Ard Biesheuvel ardb+tianocore@kernel.org > Cc: Jiewen Yao jiewen.yao@intel.com > Cc: Jordan Justen jordan.l.justen@intel.com > Cc: Gerd Hoffmann kraxel@redhat.com > Cc: Michael Kubacki michael.kubacki@microsoft.com > Cc: Jian J Wang jian.j.wang@intel.com > Cc: Maciej Rabeda maciej.rabeda@linux.intel.com > Cc: Jiaxin Wu jiaxin.wu@intel.com > Cc: Siyuan Fu siyuan.fu@intel.com > Cc: Liming Gao gaoliming@byosoft.com.cn > Cc: Leif Lindholm leif@nuviainc.com > Cc: Zhiguang Liu zhiguang.liu@intel.com > Signed-off-by: Michael D Kinney michael.d.kinney@intel.com > > Michael D Kinney (6): > MdePkg: Reproduce builds across source format changes > ArmPkg: Reproduce builds across source format changes > MdeModulePkg: Reproduce builds across source format changes > NetworkPkg: Reproduce builds across source format changes > SecurityPkg: Reproduce builds across source format changes > OvmfPkg: Reproduce builds across source format changes > > .../ProcessorSubClassDxe/ProcessorSubClass.c | 2 +- > .../Type00/MiscBiosVendorFunction.c | 2 +- > .../Type01/MiscSystemManufacturerFunction.c | 2 +- > .../MiscBaseBoardManufacturerFunction.c | 2 +- > .../Type03/MiscChassisManufacturerFunction.c | 2 +- > ...MiscNumberOfInstallableLanguagesFunction.c | 2 +- > .../Type32/MiscBootInformationFunction.c | 2 +- > .../Bus/Pci/PciHostBridgeDxe/PciHostBridge.c | 2 +- > .../UefiBootManagerLib/BmDriverHealth.c | 2 +- > MdePkg/Include/Library/DebugLib.h | 42 +++++++++++++++++-- > MdePkg/Include/Library/UnitTestLib.h | 18 ++++---- > MdePkg/Library/BaseLib/SafeString.c | 2 +- > NetworkPkg/Include/Library/NetLib.h | 8 ++-- > NetworkPkg/Library/DxeNetLib/DxeNetLib.c | 2 +- > OvmfPkg/Csm/LegacyBiosDxe/LegacyPci.c | 6 +-- > .../PlatformBootManagerLib/BdsPlatform.c | 4 +- > .../PlatformBootManagerLibBhyve/BdsPlatform.c | 2 +- > .../PlatformBootManagerLibGrub/BdsPlatform.c | 4 +- > .../Include/Library/TcgStorageCoreLib.h | 4 +- > 19 files changed, 72 insertions(+), 38 deletions(-) >