[PATCH v5] Makefile: Add build time and compiler info string
Bin Meng
bmeng.cn at gmail.com
Sun Oct 17 23:21:00 PDT 2021
On Mon, Oct 18, 2021 at 2:17 PM Anup Patel <anup at brainfault.org> wrote:
>
> On Mon, Oct 18, 2021 at 11:27 AM Bin Meng <bmeng.cn at gmail.com> wrote:
> >
> > 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.
>
> Yes, but BUILD_DATE_EPOCH is optional and generally people will not
> specify BUILD_DATE_EPOCH unless they want a reproducible build.
>
If this BUILD_DATE_EPOCH is not needed at all, I am not sure why do we
still keep
ifdef BUILD_DATE_EPOCH
OPENSBI_BUILD_TIME_STAMP ?= $(shell date -u -d "@$(BUILD_DATE_EPOCH)" \
"$(OPENSBI_BUILD_DATE_FMT)" 2>/dev/null || \
date -u -r "$(BUILD_DATE_EPOCH)" \
"$(OPENSBI_BUILD_DATE_FMT)" 2>/dev/null || \
date -u "$(OPENSBI_BUILD_DATE_FMT)")
else
> I will certainly update the "NOTE:" in the commit description to clearly
> state when reproducible builds are violated.
>
> >
> > 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.
>
> I think we should keep both BUILD_INFO and BUILD_DATA_EPOCH
> because of the reason I mentioned above.
>
Regards,
Bin
More information about the opensbi
mailing list