The SOURCE_DATE_EPOCH -> date conversion previously relied on a runtime `date -u -d @EPOCH 2>/dev/null || date -u -r EPOCH` fallback. That is unreliable on macOS/*BSD: BSD `date -d` reads -d as a DST flag and silently prints the wrong time (exit 0), so the `-r` fallback is never reached. Decide at configure time instead: prefer coreutils `gdate` (GNU date, e.g. installed on macOS), else a native `date` that really is GNU (verified by the epoch-0 output containing 1970), else BSD `date -r`. configure substitutes the chosen invocation as @SOURCE_DATE_CMD@ and defs.mak appends the epoch. Verified on Linux (no gdate -> GNU `date -u -d @`): a fixed SOURCE_DATE_EPOCH yields a byte-identical buildinfo.o across builds; the no-epoch path still stamps the current local time. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| config.guess | ||
| config.sub | ||
| configure | ||
| configure.in | ||
| configure_mac | ||
| defs.mak.in | ||
| install-sh | ||
| magic.spec.in | ||
| makedbh.in | ||
| missing | ||
| mkdirs | ||
| mkinstalldirs | ||
| preproc.py | ||
| printmans | ||