This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 2/2] Allow to override build date with SOURCE_DATE_EPOCH
- From: "Bernhard M. Wiedemann" <bwiedemann at suse dot de>
- To: John Darrington <john at darrington dot wattle dot id dot au>
- Cc: binutils at sourceware dot org, Linda Zhang <lindasc at qq dot com>
- Date: Fri, 26 Oct 2018 13:10:23 +0200
- Subject: Re: [PATCH 2/2] Allow to override build date with SOURCE_DATE_EPOCH
- References: <20181026055927.23012-1-bwiedemann@suse.de> <20181026055927.23012-2-bwiedemann@suse.de> <20181026105405.rp226dfo72v2a5aw@jocasta.intra>
On 26/10/2018 12.54, John Darrington wrote:
> I don't agree that this is an elegant solution to the problem.
>
> SOURCE_DATE_EPOCH is a hack at best, to be used when there is no other
> practical way to solve the problem.
>
> Binutils already has a --enable-deterministic-archives option so we
> should use that instead.
Yes, there exists a --no-insert-timestamp CLI param in this case, but
the problem is that there exist 'ld' versions out there (that are
supported by xen), that do not support this parameter. So you cannot
always add it, because ld will (and probably should) error out on
unknown params.
Env-vars are much nicer in this regard, because older versions will just
ignore it, so it can always be set and help make results more
reproducible for everyone who wants it.
A different way to approach this, could be to adjust ld/emultempl/pep.em
and make the default of the insert_timestamp bool depend on if
SOURCE_DATE_EPOCH is set.
Ciao
Bernhard M.