On 8/2/26 00:59, Gioele Barabucci wrote:
Package: gcc
Version: 4:16.1.0-2
User: [email protected]
Usertag: timestamps toolchain
Debbugs-Cc: [email protected]

Dear gcc maintainers,

the gcc option `-Wdate-time` makes gcc produce a warning whenever the macros `__DATE__`, `__TIME__`, or `__TIMESTAMP__` are used. This is done because «‘__DATE__’ might prevent reproducible builds».

This warning is, however, moot when `SOURCE_DATE_EPOCH` is used. In that case all these macros will be set to whatever S_D_E says, making the build reproducible even in the presence of __DATE__ & Co.

At the same time, `-Wdate-time` becomes an hindrance when `-Werror` is set: The build will fail, even though it is, in fact, reproducible.

Could you please make gcc ignore `-Wdate-time`, or at least not fail when `-Werror` is active, if `SOURCE_DATE_EPOCH` is set?

sure, please prepare a patch and get it approved upstream. I won't carry something like that locally.

Reply via email to