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
This commit is contained in:
parent
4ad2473790
commit
0b2b53a2ea
5
Makefile
5
Makefile
@ -724,7 +724,7 @@ TARGET_ARCH_${kernel}!= cd ${KERNSRCDIR}/${TARGET}/conf && \
|
||||
.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 \
|
||||
@ -738,6 +738,9 @@ universe_kernconf_${TARGET}_${kernel}: .MAKE
|
||||
"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
|
||||
universe_epilogue: .PHONY
|
||||
|
Loading…
Reference in New Issue
Block a user