[PATCH 2/2] Allow to override build date with SOURCE_DATE_EPOCH

Bernhard M. Wiedemann bwiedemann@suse.de
Fri Oct 26 11:10:00 GMT 2018


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.



More information about the Binutils mailing list