summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2013-03-31 02:03:34 +0000
committerandrew <andrew@FreeBSD.org>2013-03-31 02:03:34 +0000
commit0e1ccb44c5da7e180fb05c8e7eac0aeee41cb7f6 (patch)
tree94b73e84955e9006d59be484314eb42adce09388 /Makefile
parent9282fffb3024139ffaf2480ed86ab04bd1471813 (diff)
downloadFreeBSD-src-0e1ccb44c5da7e180fb05c8e7eac0aeee41cb7f6.zip
FreeBSD-src-0e1ccb44c5da7e180fb05c8e7eac0aeee41cb7f6.tar.gz
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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 412b902..6f240ec 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 || \
OpenPOWER on IntegriCloud