[Buildroot] [PATCH v2 02/15] reproducible: fix DATE/TIME macros in toolchain-wrapper

Jérôme Pouiller jezz at sysmic.org
Fri Nov 18 13:46:21 UTC 2016


On 2016-11-18 12:37, Thomas Petazzoni wrote:
> On Fri, 18 Nov 2016 10:10:11 +0100, Jérôme Pouiller wrote:
> 
>> +ifeq ($(BR2_REPRODUCIBLE),y)
>> +TOOLCHAIN_WRAPPER_ARGS += -DBR_REPRODUCIBLE_TIME="\"\\\"`date -d 
>> @$(SOURCE_DATE_EPOCH) "+%T"`\\\"\""
>> +TOOLCHAIN_WRAPPER_ARGS += -DBR_REPRODUCIBLE_DATE="\"\\\"`date -d 
>> @$(SOURCE_DATE_EPOCH) "+%b %e %Y"`\\\"\""
>> +endif
> 
> Do we need to encode the dates in the wrapper, or should we have the
> wrapper read at runtime the SOURCE_DATE_EPOCH environment variable?
> 
> I believe the latter is simpler, and matches better what future gcc
> versions will do.
> 
> The only drawback is that people using the toolchain (through the
> wrapper) outside of Buildroot will not benefit from the "fixed" date,
> unless they define SOURCE_DATE_EPOCH in their environment. But I
> believe this is OK, because this is anyway the behavior that they would
> get by using the newest gcc versions that have this feature.

Agreed.

--
Jérôme Pouiller



More information about the buildroot mailing list