diff options
Diffstat (limited to 'stand/efi/Makefile.inc')
| -rw-r--r-- | stand/efi/Makefile.inc | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/stand/efi/Makefile.inc b/stand/efi/Makefile.inc index c2d803ddc1ab..6bb0af1d84f3 100644 --- a/stand/efi/Makefile.inc +++ b/stand/efi/Makefile.inc @@ -1,4 +1,4 @@ -# $FreeBSD$ +.include <src.opts.mk> # Options used when building app-specific efi components # See conf/kern.mk for the correct set of these @@ -20,15 +20,31 @@ CFLAGS+= -fPIC .endif .if ${MACHINE_CPUARCH} == "amd64" -EFI_TARGET= efi-app-x86_64 -.elif ${MACHINE_CPUARCH} == "i386" +.if ${DO32:U0} == 1 EFI_TARGET= efi-app-ia32 .else +EFI_TARGET= efi-app-x86_64 +.endif +.else EFI_TARGET= binary .endif -# Arbitrarily set the PE/COFF header timestamps to 1 Jan 2016 00:00:00 +# GNU or ELF Tool Chain objcopy is usable for building EFI objects. +# LLVM objcopy is not. Use elfcopy if we've bootstrapped it (and thus +# known to be available) or objcopy is LLVM's. +.if ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no" +EFI_OBJCOPY?= elfcopy +.else +_v!= ${OBJCOPY} --version +.if ${_v:Mllvm-objcopy*} == "" +EFI_OBJCOPY?= ${OBJCOPY} +.else +EFI_OBJCOPY?= elfcopy +.endif +.endif + +# Arbitrarily set the PE/COFF header timestamps to 1 Jan 2024 00:00:00 # for build reproducibility. -SOURCE_DATE_EPOCH?=1451606400 +SOURCE_DATE_EPOCH?=1704067200 .include "../Makefile.inc" |
