Author: andrew
Date: Tue Oct 25 14:01:13 2016
New Revision: 307908
URL: https://svnweb.freebsd.org/changeset/base/307908

Log:
  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

Modified:
  head/sys/boot/efi/libefi/Makefile
  head/sys/boot/efi/loader/main.c

Modified: head/sys/boot/efi/libefi/Makefile
==============================================================================
--- head/sys/boot/efi/libefi/Makefile   Tue Oct 25 13:45:59 2016        
(r307907)
+++ head/sys/boot/efi/libefi/Makefile   Tue Oct 25 14:01:13 2016        
(r307908)
@@ -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-onl
 .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

Modified: head/sys/boot/efi/loader/main.c
==============================================================================
--- head/sys/boot/efi/loader/main.c     Tue Oct 25 13:45:59 2016        
(r307907)
+++ head/sys/boot/efi/loader/main.c     Tue Oct 25 14:01:13 2016        
(r307908)
@@ -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 */
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to