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
ce9fa35b35
commit
3ad9f8d024
@ -1,10 +1,12 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
|
.include <src.opts.mk>
|
||||||
|
|
||||||
LIB= efi
|
LIB= efi
|
||||||
INTERNALLIB=
|
INTERNALLIB=
|
||||||
WARNS?= 2
|
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
|
handles.c libefi.c
|
||||||
|
|
||||||
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
|
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
|
||||||
@ -12,6 +14,11 @@ SRCS+= time.c
|
|||||||
.elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
|
.elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
|
||||||
SRCS+= time_event.c
|
SRCS+= time_event.c
|
||||||
.endif
|
.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
|
# 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
|
# 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"
|
.if ${MACHINE_ARCH} == "amd64"
|
||||||
CFLAGS+= -fPIC -mno-red-zone
|
CFLAGS+= -fPIC -mno-red-zone
|
||||||
.endif
|
.endif
|
||||||
CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/${MACHINE}
|
|
||||||
CFLAGS+= -I${.CURDIR}/../include
|
CFLAGS+= -I${.CURDIR}/../include
|
||||||
CFLAGS+= -I${.CURDIR}/../include/${MACHINE}
|
CFLAGS+= -I${.CURDIR}/../include/${MACHINE}
|
||||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
|
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
|
||||||
|
@ -55,9 +55,11 @@ extern char bootprog_rev[];
|
|||||||
extern char bootprog_date[];
|
extern char bootprog_date[];
|
||||||
extern char bootprog_maker[];
|
extern char bootprog_maker[];
|
||||||
|
|
||||||
|
#ifdef BOOT_FORTH
|
||||||
/* Force a reference to bring in EFI support from the library */
|
/* Force a reference to bring in EFI support from the library */
|
||||||
extern int efi_variable_support;
|
extern int efi_variable_support;
|
||||||
int *dummy1 = &efi_variable_support;
|
int *dummy1 = &efi_variable_support;
|
||||||
|
#endif
|
||||||
|
|
||||||
struct arch_switch archsw; /* MI/MD interface boundary */
|
struct arch_switch archsw; /* MI/MD interface boundary */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user