On Mon, Oct 28, 2013 at 09:10:08AM -0400, 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
Nothing against this... > the original --time value? (gcc -grecord-gcc-switches could emit > the then-current timestamp to enable this.) ... but this I'd find very unfortunate, because if it caused the DW_AT_producer to be different anytime the timestamp was different, then no sharing of the DW_AT_producer strings would be possible, eventhough 99.99% of sources doesn't really use these 3 macros. Unless the option would be added to -grecord-gcc-switches only if one of the 3 special macros wasn't overridden and actually expanded at least once in the compilation unit. But even then, if the macros would be used for something that really didn't affect the generated code (say used in an unused inline function), there would be no difference in the generated object file other than .debug_str, so that doesn't look too much desirable either. Jakub