Fix the build on both arm64 and when WITHOUT_FORTH is defined.
* On arm64 we need to use the ${MACHINE_CPUARCH} subdirectory. * env.c is only needed when using forth so only build it there. Sponsored by: ABT Systems Ltd
This commit is contained in:
parent
c018bde1b2
commit
ab6ceeb001
@ -1,10 +1,12 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
|
||||
LIB= efi
|
||||
INTERNALLIB=
|
||||
WARNS?= 2
|
||||
|
||||
SRCS= delay.c devpath.c efi_console.c efinet.c efipart.c env.c errno.c \
|
||||
SRCS= delay.c devpath.c efi_console.c efinet.c efipart.c errno.c \
|
||||
handles.c libefi.c
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
|
||||
@ -12,6 +14,11 @@ SRCS+= time.c
|
||||
.elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
|
||||
SRCS+= time_event.c
|
||||
.endif
|
||||
.if ${MK_FORTH} != "no"
|
||||
SRCS+= env.c
|
||||
CFLAGS+= -I${.CURDIR}/../../ficl
|
||||
CFLAGS+= -I${.CURDIR}/../../ficl/${MACHINE_CPUARCH}
|
||||
.endif
|
||||
|
||||
# We implement a slightly non-standard %S in that it always takes a
|
||||
# CHAR16 that's common in UEFI-land instead of a wchar_t. This only
|
||||
@ -26,7 +33,6 @@ CFLAGS+= -msoft-float -mgeneral-regs-only
|
||||
.if ${MACHINE_ARCH} == "amd64"
|
||||
CFLAGS+= -fPIC -mno-red-zone
|
||||
.endif
|
||||
CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/${MACHINE}
|
||||
CFLAGS+= -I${.CURDIR}/../include
|
||||
CFLAGS+= -I${.CURDIR}/../include/${MACHINE}
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
|
||||
|
@ -55,9 +55,11 @@ extern char bootprog_rev[];
|
||||
extern char bootprog_date[];
|
||||
extern char bootprog_maker[];
|
||||
|
||||
#ifdef BOOT_FORTH
|
||||
/* Force a reference to bring in EFI support from the library */
|
||||
extern int efi_variable_support;
|
||||
int *dummy1 = &efi_variable_support;
|
||||
#endif
|
||||
|
||||
struct arch_switch archsw; /* MI/MD interface boundary */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user