https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61371

            Bug ID: 61371
           Summary: cpp: Implement -fno-date-time/-freproducible-dates or
                    similar
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: crrodriguez at opensuse dot org

Hi:

Current releases have the option to warn/err on the use of __DATE__ , __TIME__
and __TIMESTAMP__, first thanks for implementing this as it is a good step to
aid reproducible builds. That said, it is unfortunately still quite
inconvenient for large scale projects such as distributions because it requires
going through hundreds or thousands of packages.

I suggest a command line option to be implemented such as 

-fno-date-time
-freproducible-dates

Or whatever other appropriate name that behaves in one of this ways:

Either:

- __DATE__, __TIME__ and __TIMESTAMP__ expand as  "If GCC cannot determine the
current date" (that is ???...)

- __DATE__ and __TIME__ expand to the file 's  last modification time

- Whatever other sane alternative that ensures different builds of the same
source code and same preprocessor/compiler/linker options result in identical
builds.

Reply via email to