[PATCH v5] Makefile: Add build time and compiler info string

Peter Korsgaard peter at korsgaard.com
Sun Oct 17 23:18:09 PDT 2021


>>>>> "Bin" == Bin Meng <bmeng.cn at gmail.com> writes:

 > Hi Anup,
 > On Mon, Oct 18, 2021 at 12:13 PM Anup Patel <anup.patel at wdc.com> wrote:
 >> 
 >> From: Wei Fu <wefu at redhat.com>
 >> 
 >> When we are doing opensbi development, we want to know the build time and
 >> compiler info for debug purpose.
 >> To enable this message, please add "BUILD_INFO=y", like:
 >> 
 >> ```
 >> make BUILD_INFO=y
 >> ```
 >> 
 >> NOTE: `BUILD_INFO=y` will violate "reproducible builds".
 >> So it's ONLY for development and debug purpose, and should NOT be used
 >> in a product which follows "reproducible builds".

 > As I pointed out in v4, with BUILD_INFO=y we can still achieve
 > reproducible builds with BUILD_DATE_EPOCH, so this statement is not
 > entirely true.

 > The question is whether we should just drop introducing BUILD_INFO and
 > turn this on for all builds. If reproducible builds is required,
 > define BUILD_DATE_EPOCH.

Agreed, though BUILD_DATE_EPOCH seems to be specific to opensbi. Why was
this changed from SOURCE_DATE_EPOCH? In Buildroot at least, we only set
SOURCE_DATE_EPOCH when we want reproducible builds and the spec has
explicit examples where it is used for the build timestamp:

https://reproducible-builds.org/docs/source-date-epoch/

-- 
Bye, Peter Korsgaard



More information about the opensbi mailing list