From 10098a6ec22715f3ba2fbfd34860f330add1c3e4 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Sun, 31 Mar 2013 02:03:34 +0000 Subject: [PATCH] When building universe ensure the required worlds are finished before starting the kernels. Before this the kernels would be built as part of the last architecture universe target. There can cause problems when this world finishes before the other worlds as the host compiler may be picked up rather than the target compiler. The solution is to add a target to build the universe kernels that depends on all the world targets finishing. As we may not be building a world only depend on it when MAKE_JUST_KERNELS is undefined. --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 412b90243092..6f240ec30b71 100644 --- a/Makefile +++ b/Makefile @@ -392,6 +392,14 @@ universe_${target}_${target_arch}: universe_${target}_prologue .endfor .endif .if !defined(MAKE_JUST_WORLDS) +# If we are building world and kernels wait for the required worlds to finish +.if !defined(MAKE_JUST_KERNELS) +.for target_arch in ${TARGET_ARCHES_${target}} +universe_${target}_kernels: universe_${target}_${target_arch} +.endfor +.endif +universe_${target}: universe_${target}_kernels +universe_${target}_kernels: universe_${target}_prologue .if exists(${KERNSRCDIR}/${target}/conf/NOTES) @(cd ${KERNSRCDIR}/${target}/conf && env __MAKE_CONF=/dev/null \ ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \