[rb-general] __DATE__ and other toolchain patches

Daniel Shahaf danielsh at apache.org
Wed Dec 26 19:34:48 CET 2018

Eli Schwartz wrote on Tue, 25 Dec 2018 15:52 -0500:
> Eh, it's hardly harmful either way. I don't believe there was any
> explicit desire to avoid relying on toolchain fixes though. Especially
> since the patch is definitely in Arch Linux's toolchain (we have gcc 8)
> so in the ordinary way of things we would never notice any issues with
> packages using __DATE__ at all.

Personally, this reminds me of the discussion about tar a few weeks ago,
about some packages being reproducible using GNU tar but not reproducible
using other tar implementations, so GNU tar becomes a non-interchangeable
dependency for those packages.  Letting a package use __DATE__ because
gcc DTRT's with that is exactly the same kind of dependency.

Avoiding use of __DATE__ in a specific package will make that package
reproducible regardless of what compiler it is built with.  However, the
80/20 rule applies: 80% of builds will use the most common 20% of
compiler configurations, so getting those right should be the higher
priority.  Thus, I think teaching clang to set __DATE__ from
SOURCE_DATE_EPOCH should be higher priority than fixing use of __DATE__
in a particular package, though both of these changes have merit.

After all, people will use compilers other than gcc and clang.  (The
entire point of open source is that people can take the code and use it
in places the original author never expected.)



More information about the rb-general mailing list