Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Oct 2016 14:01:14 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r307908 - in head/sys/boot/efi: libefi loader
Message-ID:  <201610251401.u9PE1E41000783@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610251401.u9PE1E41000783>