svn commit: r332144 - in stable/11: share/mk stand stand/efi

Kyle Evans kevans at FreeBSD.org
Fri Apr 6 19:47:08 UTC 2018


Author: kevans
Date: Fri Apr  6 19:47:07 2018
New Revision: 332144
URL: https://svnweb.freebsd.org/changeset/base/332144

Log:
  MFC r330077, r330248
  
  r330077:
  Move EFI up to common makefile. There's no need for all these .if's
  based on architecture.
  
  Sponsored by: Netflix
  
  r330248:
  Create LOADER_UBOOT, and LOADER_OFW. Move these options out of
  Makefile.${MACHINE_ARCH} and remove the now-empty files. Generate the
  *32 directories on the necessary architectures (well, currently only
  amd64) on the fly. Remove LOADER_EFI variable and co-locate it with
  EFI.

Deleted:
  stable/11/stand/Makefile.arm
  stable/11/stand/Makefile.arm64
  stable/11/stand/Makefile.i386
  stable/11/stand/Makefile.mips
  stable/11/stand/Makefile.powerpc
  stable/11/stand/Makefile.sparc64
Modified:
  stable/11/share/mk/src.opts.mk
  stable/11/stand/Makefile
  stable/11/stand/Makefile.amd64
  stable/11/stand/efi/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/mk/src.opts.mk
==============================================================================
--- stable/11/share/mk/src.opts.mk	Fri Apr  6 19:37:15 2018	(r332143)
+++ stable/11/share/mk/src.opts.mk	Fri Apr  6 19:47:07 2018	(r332144)
@@ -131,6 +131,8 @@ __DEFAULT_YES_OPTIONS = \
     LPR \
     LS_COLORS \
     LZMA_SUPPORT \
+    LOADER_OFW \
+    LOADER_UBOOT \
     MAIL \
     MAILWRAPPER \
     MAKE \
@@ -276,9 +278,23 @@ BROKEN_OPTIONS+=LLDB
 .if ${__T} != "armv6"
 BROKEN_OPTIONS+=LIBSOFT
 .endif
+# EFI doesn't exist on mips, powerpc, sparc or riscv.
 .if ${__T:Mmips*} || ${__T:Mpowerpc*} || ${__T:Msparc64} || ${__T:Mriscv*}
 BROKEN_OPTIONS+=EFI
 .endif
+# GELI isn't supported on !x86
+.if ${__T} != "i386" && ${__T} != "amd64"
+BROKEN_OPTIONS+=LOADER_GELI
+.endif
+# OFW is only for powerpc and sparc64, exclude others
+.if ${__T:Mpowerpc*} == "" && ${__T:Msparc64} == ""
+BROKEN_OPTIONS+=LOADER_OFW
+.endif
+# UBOOT is only for arm, mips and powerpc, exclude others
+.if ${__T:Marm*} == "" && ${__T:Mmips*} == "" && ${__T:Mpowerpc*} == ""
+BROKEN_OPTIONS+=LOADER_UBOOT
+.endif
+
 .if ${__T:Mmips64*}
 # profiling won't work on MIPS64 because there is only assembly for o32
 BROKEN_OPTIONS+=PROFILE

Modified: stable/11/stand/Makefile
==============================================================================
--- stable/11/stand/Makefile	Fri Apr  6 19:37:15 2018	(r332143)
+++ stable/11/stand/Makefile	Fri Apr  6 19:47:07 2018	(r332144)
@@ -2,20 +2,43 @@
 
 .include <src.opts.mk>
 
-SUBDIR+=		libsa
-.if ${MK_FORTH} != "no"
-# Build the add-in FORTH interpreter.
-SUBDIR+=		ficl
-SUBDIR+=		forth
+# For amd64 we have to build 32 and 64 bit versions of things. For
+# others we don't. LIB32LIST is a list of libraries, which if
+# included, need to be built 32-bit as well.
+.if ${MACHINE_ARCH} == "amd64"
+LIB32LIST=libsa ficl liblua zfs
 .endif
 
-SUBDIR+=		defaults
-SUBDIR+=		man
+S.yes+=			libsa
 
+S.${MK_FORTH}+=		ficl
+S.${MK_FORTH}+=		forth
+S.${MK_LOADER_LUA}+=	liblua
+S.${MK_LOADER_LUA}+=	lua
+S.${MK_FDT}+=		fdt
+S.${MK_LOADER_OFW}+=	ofw
+S.${MK_ZFS}+=		zfs
+S.yes+=			defaults
+S.yes+=			man
+
+S.${MK_LOADER_GELI}+=	geli
+
 .include <bsd.arch.inc.mk>
 
+S.${MK_EFI}+=		efi
+S.${MK_LOADER_UBOOT}+=	uboot
+
 .if exists(${.CURDIR}/${MACHINE}/.)
-SUBDIR+=		${MACHINE}
+S.yes+=         ${MACHINE}
 .endif
+
+# Build the actual subdir list from S.yes, adding in the 32-bit
+# variant if necessary.
+.for _x in ${S.yes}
+SUBDIR+=${_x}
+.if defined(LIB32LIST) && ${LIB32LIST:M${_x}}
+SUBDIR+=${_x}32
+.endif
+.endfor
 
 .include <bsd.subdir.mk>

Modified: stable/11/stand/Makefile.amd64
==============================================================================
--- stable/11/stand/Makefile.amd64	Fri Apr  6 19:37:15 2018	(r332143)
+++ stable/11/stand/Makefile.amd64	Fri Apr  6 19:47:07 2018	(r332144)
@@ -1,18 +1,4 @@
 # $FreeBSD$
 
-SUBDIR+=		libsa32
-.if ${MK_ZFS} != "no"
-SUBDIR+=		zfs zfs32
-.endif
-.if ${MK_FORTH} != "no"
-SUBDIR+=		ficl32
-.endif
-
-SUBDIR+=		efi
-SUBDIR+=		userboot
-
-.if ${MK_LOADER_GELI} == "yes"
-SUBDIR+=		geli
-.endif
-
-SUBDIR+=		i386
+S.yes+=		userboot
+S.yes+=		i386

Modified: stable/11/stand/efi/Makefile
==============================================================================
--- stable/11/stand/efi/Makefile	Fri Apr  6 19:37:15 2018	(r332143)
+++ stable/11/stand/efi/Makefile	Fri Apr  6 19:47:07 2018	(r332144)
@@ -8,17 +8,11 @@ NO_OBJ=t
 # than 4.5 supports it.
 .if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40500
 
-.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
 .if ${MK_FDT} != "no"
 SUBDIR+=	fdt
 .endif
-.endif
 
-.if ${MACHINE_CPUARCH} == "aarch64" || \
-    ${MACHINE_CPUARCH} == "amd64" || \
-    ${MACHINE_CPUARCH} == "arm"
 SUBDIR+=	libefi loader boot1
-.endif
 
 .endif # ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 40500
 


More information about the svn-src-all mailing list