Comment by mgaunard
2 years ago
Don't you have to fake the system time to do this? The time often ends up inside the binaries one way or another.
2 years ago
Don't you have to fake the system time to do this? The time often ends up inside the binaries one way or another.
Indeed time stamps are probably the most common sources of indeterminism. So common that a de-facto standard variable to fake a timestamp has been implemented in many compilers:
https://reproducible-builds.org/docs/source-date-epoch/
Could you name an example of how (and for what reason) this might happen?
Typically part of a "version string":
Perhaps a relic from when software had to be manually updated?
On NixOS, I think the release time or commit time is used:
That is more useful than the build time.
5 replies →
GCC embeds timestamps in o/gcno/gcda files to check they match.
It's mostly annoying as gcov will actively prevent you from using gcda files from a different but equivalent binary than what generated the gcno.
You would just either not include the timestamp at all in all builds, or set 0, so the build date is 1970 everywhere.