svn commit: r356418 - head
John Baldwin
jhb at FreeBSD.org
Mon Jan 6 17:34:18 UTC 2020
Author: jhb
Date: Mon Jan 6 17:34:17 2020
New Revision: 356418
URL: https://svnweb.freebsd.org/changeset/base/356418
Log:
Only build kernels for enabled TARGET_ARCHes in make universe/tinderbox.
Previously, all of the kernels for a given TARGET were built if that
target was enabled. This was implemented by having each kernel built
via a universe_kernconf_<KERNEL> target that was depended on by a
universe_kernconfs target. However, this meant that if one did a
build with a limited set of TARGET_ARCH values for a given TARGET,
kernels could be built for which we hadn't built a world or toolchain.
For example, 'make TARGETS=mips TARGET_ARCHES_mips=mips64' would build
mips32 kernels.
Fix this by adding an extra layer of indirection in the kernel make
targets. universe_kernconf_<KERNEL> is now a dependency of a new
universe_kernconfs_<TARGET_ARCH>. universe_kernconfs in turn depends
on a list of universe_kernconfs_<target_arch> values, but only the
values enabled in TARGET_ARCHES_<TARGET>.
Reviewed by: imp
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D23031
Modified:
head/Makefile
Modified: head/Makefile
==============================================================================
--- head/Makefile Mon Jan 6 15:29:14 2020 (r356417)
+++ head/Makefile Mon Jan 6 17:34:17 2020 (r356418)
@@ -724,7 +724,7 @@ TARGET_ARCH_${kernel}!= cd ${KERNSRCDIR}/${TARGET}/con
.if empty(TARGET_ARCH_${kernel})
.error "Target architecture for ${TARGET}/conf/${kernel} unknown. config(8) likely too old."
.endif
-universe_kernconfs: universe_kernconf_${TARGET}_${kernel}
+universe_kernconfs_${TARGET_ARCH_${kernel}}: universe_kernconf_${TARGET}_${kernel}
universe_kernconf_${TARGET}_${kernel}: .MAKE
@echo ">> ${TARGET}.${TARGET_ARCH_${kernel}} ${kernel} kernel started on `LC_ALL=C date`"
@(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \
@@ -737,6 +737,9 @@ universe_kernconf_${TARGET}_${kernel}: .MAKE
(echo "${TARGET} ${kernel} kernel failed," \
"check _.${TARGET}.${kernel} for details"| ${MAKEFAIL}))
@echo ">> ${TARGET}.${TARGET_ARCH_${kernel}} ${kernel} kernel completed on `LC_ALL=C date`"
+.endfor
+.for target_arch in ${TARGET_ARCHES_${TARGET}}
+universe_kernconfs: universe_kernconfs_${target_arch} .PHONY
.endfor
.endif # make(universe_kernels)
universe: universe_epilogue
More information about the svn-src-head
mailing list