diff --git a/Makefile b/Makefile index 5c4d301fd..15d859fdd 100644 --- a/Makefile +++ b/Makefile @@ -131,9 +131,10 @@ test: | build deps # primitive reproducibility test test-reproducibility: + [ -e build/nimbus ] || $(MAKE) V=0 nimbus; \ - MD5SUM1=$$($(MD5SUM) build/nimbus | cut -d ' ' -f 1); \ - $(MAKE) V=0 nimbus; \ - MD5SUM2=$$($(MD5SUM) build/nimbus | cut -d ' ' -f 1); \ + MD5SUM1=$$($(MD5SUM) build/nimbus | cut -d ' ' -f 1) && \ + rm -rf nimcache/*/nimbus && \ + $(MAKE) V=0 nimbus && \ + MD5SUM2=$$($(MD5SUM) build/nimbus | cut -d ' ' -f 1) && \ [ "$$MD5SUM1" = "$$MD5SUM2" ] && echo "Success: identical binaries." || \ { echo "Failure: the binary changed between builds."; exit 1; } diff --git a/nim.cfg b/nim.cfg index 70a06f8f3..10754d256 100644 --- a/nim.cfg +++ b/nim.cfg @@ -4,3 +4,8 @@ nimcache = "nimcache/debug/$projectName" @end +# disable timestamps in Windows PE headers - https://wiki.debian.org/ReproducibleBuilds/TimestampsInPEBinaries +@if windows: + passL = "-Wl,--no-insert-timestamp" +@end +