[Buildroot] [PATCH v2 02/15] reproducible: fix DATE/TIME macros in toolchain-wrapper
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Fri Nov 18 11:37:04 UTC 2016
Hello,
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.
It would make all the quoting mess a bit simpler :)
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
More information about the buildroot
mailing list