develooper Front page | perl.perl5.porters | Postings from July 2015

Building perl reproducibly: __DATE__ and __TIME__ usage in perl.c

Thread Next
Niko Tyni
July 4, 2015 08:11
Building perl reproducibly: __DATE__ and __TIME__ usage in perl.c
Message ID:
There's quite some momentum in the Debian project and elsewhere
to make package builds reproducible binary-wise, so that a
given source would always yield the same compiled binaries (and
other generated files) when built with the same toolchain. See for some background, including
current status and rationale.

Lunar <> has looked at the perl package [1], and
identified a few places where the build system embeds information
about the build environment. This mainly includes the build
time ($Config{cf_time} and other places) and the build platform
($Config{myuname}, $Config{osvers}).

Most of these are overridable, either with Configure arguments or the
config.over mechanism, and we can use those to set sensible deterministic
values. However, there's at least one place that's not currently
overridable: perl.c embeds the build time in the perl binary with the
__DATE__ and __TIME__ cpp macros, for the "Compiled at ..." information in
"perl -V" output

Would you be willing to accept a patch that makes this __DATE__/__TIME__
usage configurable?  Or would it make sense to just unconditionally
replace the message with $Config{cf_time} information, either at build
or run time?

Please note that the feature is currently conditional with the macros
existing in the first place, so at least theoretically there are already
perls out there lacking the 'Compiled at' line.


Many thanks for your work on Perl,
Niko Tyni

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About