On Mon, 28 Oct 2013, Frank Ch. Eigler wrote: > Gerald Pfeifer <ger...@pfeifer.com> writes: > > > To make it easier to reproduce builds of software and entire GNU/Linux > > distributions, RMS had the idea of adding a warning to GCC that warns > > about the use of __DATE__ and __TIME__. [...] > > How about instead adding a --time=XXXXX option to gcc (cpp?) instead, > so that someone interested in reproducing a build can rerun gcc with > the original --time value? (gcc -grecord-gcc-switches could emit > the then-current timestamp to enable this.)
I think the general aim should be first to avoid embedding such data (timestamps, paths to build or source directories, hostname of the build system, username or numeric uid of the user doing the build, ...) in binaries at all, and only if there is a clear reason why a particular piece of software is special and needs this data when others don't should one then look at making a new build reproduce the embedded time or other such data. So an option to specify the time may be useful, but most applications should cease embedding timestamps instead of distribution builds starting to use the new option. I haven't worked out how best e.g. to fix the uses of __DATE__ and __TIME__ in nscd to make glibc builds more reproducible, but I suspect a checksum of source code plus selected configuration information would be better than using --time=. -- Joseph S. Myers jos...@codesourcery.com