[PATCH v5] Makefile: Add build time and compiler info string
From: Anup Patel <anup@brainfault.org>
Date: 2021-10-18 10:19:09
On Mon, Oct 18, 2021 at 3:41 PM Bin Meng [off-list ref] wrote:
On Mon, Oct 18, 2021 at 6:08 PM Anup Patel [off-list ref] wrote:quoted
On Mon, Oct 18, 2021 at 1:42 PM Bin Meng [off-list ref] wrote:quoted
On Mon, Oct 18, 2021 at 3:44 PM Andreas Schwab [off-list ref] wrote:quoted
On Okt 18 2021, Bin Meng wrote:quoted
If this BUILD_DATE_EPOCH is not needed at all, I am not sure why do we still keepBUILD_DATE_EPOCH is also non-standard. The standard variable is SOURCE_DATE_EPOCH.Yep, it's SOURCE_DATE_EPOCH in v4, not sure why Anup changed the name in v5.Yes, I changed it to BUILD_DATE_EPOCH to imply that it is related to BUILD_INFO. I was not aware that SOURCE_DATE_EPOCH is a standard name. I will rename it to SOURCE_DATE_EPOCH in v6.quoted
SOURCE_DATE_EPOCH is well documented and is the way for distros to generate "reproducible builds". I would vote to completely drop the "BUILD_INFO=y" as it is not necessary.I don't agree with this. The BUILD_INFO helps us totally disable build information whereas SOURCE_DATE_EPOCH helps us override the build date/time when BUILD_INFO=y.But what benefits us to provide the capability to conditionally disable the build information? I think that is useful and can be turned on unconditionally, and we can still generate reproducible builds with SOURCE_DATE_EPOCH.
Users will have to figure-out/remember a fixed build date when using SOURCE_DATA_EPOCH for reproducible builds whereas users don't need to do anything when BUILD_INFO is not defined. BUILD_INFO being not defined is easy/convenient for users creating reproducible builds by default. This is also reflected by the "BUILD_INFO ?= n" line. Regards, Anup