From f97e406c3f078e813bb32bf95a89a4b69cb1ed55 Mon Sep 17 00:00:00 2001 From: kevans Date: Thu, 21 Feb 2019 02:32:30 +0000 Subject: [PATCH] MFC r336535: Hoist EFI_TARGET and SOURCE_DATE_EPOCH up into efi/Makefile.inc --- stand/efi/Makefile.inc | 12 ++++++++++++ stand/efi/boot1/Makefile | 11 ----------- stand/efi/loader/Makefile | 11 ----------- 3 files changed, 12 insertions(+), 22 deletions(-) diff --git a/stand/efi/Makefile.inc b/stand/efi/Makefile.inc index 704a77c6c39..c2d803ddc1a 100644 --- a/stand/efi/Makefile.inc +++ b/stand/efi/Makefile.inc @@ -19,4 +19,16 @@ CFLAGS+= -fPIC CFLAGS+= -fPIC .endif +.if ${MACHINE_CPUARCH} == "amd64" +EFI_TARGET= efi-app-x86_64 +.elif ${MACHINE_CPUARCH} == "i386" +EFI_TARGET= efi-app-ia32 +.else +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 + .include "../Makefile.inc" diff --git a/stand/efi/boot1/Makefile b/stand/efi/boot1/Makefile index ea1d1802100..32cbf75006c 100644 --- a/stand/efi/boot1/Makefile +++ b/stand/efi/boot1/Makefile @@ -76,17 +76,6 @@ LDADD+= ${LIBEFI} ${LIBSA} DPADD+= ${LDSCRIPT} -.if ${MACHINE_CPUARCH} == "amd64" -EFI_TARGET= efi-app-x86_64 -.elif ${MACHINE_CPUARCH} == "i386" -EFI_TARGET= efi-app-ia32 -.else -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}"; \ diff --git a/stand/efi/loader/Makefile b/stand/efi/loader/Makefile index d11964eb0fd..07a6fca6221 100644 --- a/stand/efi/loader/Makefile +++ b/stand/efi/loader/Makefile @@ -91,17 +91,6 @@ CLEANFILES+= loader.efi NEWVERSWHAT= "EFI loader" ${MACHINE} -.if ${MACHINE_CPUARCH} == "amd64" -EFI_TARGET= efi-app-x86_64 -.elif ${MACHINE_CPUARCH} == "i386" -EFI_TARGET= efi-app-ia32 -.else -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}"; \ -- 2.45.0