diff options
author | emaste <emaste@FreeBSD.org> | 2016-09-15 17:30:01 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2016-09-15 17:30:01 +0000 |
commit | cc268b701b7b488c8ec38a2af2cf73beda65dc3a (patch) | |
tree | 418c54e6f712de125c4025c517c13c45d4a45357 /sys/boot | |
parent | 781d2e53732985932bcb1b7a462e95557a35f6ee (diff) | |
download | FreeBSD-src-cc268b701b7b488c8ec38a2af2cf73beda65dc3a.zip FreeBSD-src-cc268b701b7b488c8ec38a2af2cf73beda65dc3a.tar.gz |
MFC r305160: Set UEFI boot loader PE/COFF timestamps to known value for reproducible builds
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/efi/boot1/Makefile | 4 | ||||
-rw-r--r-- | sys/boot/efi/loader/Makefile | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/boot/efi/boot1/Makefile b/sys/boot/efi/boot1/Makefile index 0c23945..11d604d 100644 --- a/sys/boot/efi/boot1/Makefile +++ b/sys/boot/efi/boot1/Makefile @@ -84,11 +84,15 @@ EFI_TARGET= efi-app-ia32 EFI_TARGET= binary .endif +# Arbitrarily set the PE/COFF header timestamps to 1 Jan 2016 00:00:00 +# for build reproducibility. +SOURCE_DATE_EPOCH?=1451606400 boot1.efi: ${PROG} if ${NM} ${.ALLSRC} | grep ' U '; then \ echo "Undefined symbols in ${.ALLSRC}"; \ exit 1; \ fi + SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} \ ${OBJCOPY} -j .peheader -j .text -j .sdata -j .data \ -j .dynamic -j .dynsym -j .rel.dyn \ -j .rela.dyn -j .reloc -j .eh_frame \ diff --git a/sys/boot/efi/loader/Makefile b/sys/boot/efi/loader/Makefile index 2f54032..b36bfc1 100644 --- a/sys/boot/efi/loader/Makefile +++ b/sys/boot/efi/loader/Makefile @@ -128,11 +128,15 @@ EFI_TARGET= efi-app-ia32 EFI_TARGET= binary .endif +# Arbitrarily set the PE/COFF header timestamps to 1 Jan 2016 00:00:00 +# for build reproducibility. +SOURCE_DATE_EPOCH?=1451606400 loader.efi: ${PROG} if ${NM} ${.ALLSRC} | grep ' U '; then \ echo "Undefined symbols in ${.ALLSRC}"; \ exit 1; \ fi + SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} \ ${OBJCOPY} -j .peheader -j .text -j .sdata -j .data \ -j .dynamic -j .dynsym -j .rel.dyn \ -j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \ |