libopencm3
libopencm3 copied to clipboard
Makefile: Create library archives in deterministic mode
This commit adds the 'D' flag to 'ARFLAGS' variable. The flag makes archive builds deterministic, which will allow comparing archives built at different times and by different users (see ar manual for details). Without this flag, re-builds (without code changes) will not be comparable in a simple way.
To see how it works:
make && mkdir first_build && cp lib/*.a && make clean
make && mkdir seсond_build && cp lib/*.a && make clean
diff first_build second_build
Without 'D' flag 'diff' will show the difference because the timestamps in the archive index will be different.