Merge pull request #225 from smcv/reproducible-date
Pick up date from SOURCE_DATE_EPOCH, for reproducible builds
This commit is contained in:
commit
cce24668f7
5 changed files with 14 additions and 5 deletions
5
Makefile
5
Makefile
|
@ -1098,6 +1098,11 @@ else
|
|||
STRIP_FLAG = -s
|
||||
endif
|
||||
|
||||
# https://reproducible-builds.org/specs/source-date-epoch/
|
||||
ifdef SOURCE_DATE_EPOCH
|
||||
BASE_CFLAGS += -DPRODUCT_DATE=\\\"$(shell date --date="@$$SOURCE_DATE_EPOCH" "+%b %_d %Y" | sed -e 's/ /\\\ /'g)\\\"
|
||||
endif
|
||||
|
||||
BASE_CFLAGS += -DPRODUCT_VERSION=\\\"$(VERSION)\\\"
|
||||
BASE_CFLAGS += -Wformat=2 -Wno-format-zero-length -Wformat-security -Wno-format-nonliteral
|
||||
BASE_CFLAGS += -Wstrict-aliasing=2 -Wmissing-format-attribute
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue