From 8e7c4a05220fe4ad352810647d1fb49237bce0e1 Mon Sep 17 00:00:00 2001 From: Nathan Whitehorn Date: Sat, 18 Dec 2010 14:34:05 +0000 Subject: [PATCH] Reconnect arm to the universe build, and connect big-endian MIPS and ARM and powerpc64 to universe for the first time. In general, provide (slightly hacky) knowledge of multi-architecture TARGETs to universe as well as the ability to distinguish the correct toolchain for a given kernel using config -m. --- Makefile | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 7826f0025f81..40445ac1c983 100644 --- a/Makefile +++ b/Makefile @@ -281,7 +281,15 @@ tinderbox: # existing system is. # .if make(universe) || make(universe_kernels) || make(tinderbox) -TARGETS?=amd64 i386 ia64 pc98 powerpc sparc64 sun4v mips +TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v +TARGET_ARCHES_arm?= arm armeb +TARGET_ARCHES_mips?= mipsel mipseb +TARGET_ARCHES_powerpc?= powerpc powerpc64 +TARGET_ARCHES_pc98?= i386 +TARGET_ARCHES_sun4v?= sparc64 +.for target in ${TARGETS} +TARGET_ARCHES_${target}?= ${target} +.endfor .if defined(DOING_TINDERBOX) FAILFILE=tinderbox.failed @@ -301,16 +309,24 @@ universe_prologue: .for target in ${TARGETS} universe: universe_${target} .ORDER: universe_prologue universe_${target} universe_epilogue -universe_${target}: -.if !defined(MAKE_JUST_KERNELS) +universe_${target}: universe_${target}_prologue +universe_${target}_prologue: @echo ">> ${target} started on `LC_ALL=C date`" +.if !defined(MAKE_JUST_KERNELS) +.for target_arch in ${TARGET_ARCHES_${target}} +universe_${target}: universe_${target}_${target_arch} +universe_${target}_${target_arch}: universe_${target}_prologue + @echo ">> ${target}.${target_arch} buildworld started on `LC_ALL=C date`" @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ ${MAKE} ${JFLAG} buildworld \ TARGET=${target} \ - > _.${target}.buildworld 2>&1 || \ - (echo "${target} world failed," \ - "check _.${target}.buildworld for details" | ${MAKEFAIL})) - @echo ">> ${target} buildworld completed on `LC_ALL=C date`" + TARGET_ARCH=${target_arch} \ + > _.${target}.${target_arch}.buildworld 2>&1 || \ + (echo "${target}.${target_arch} world failed," \ + "check _.${target}.${target_arch}.buildworld for details" | \ + ${MAKEFAIL})) + @echo ">> ${target}.${target_arch} buildworld completed on `LC_ALL=C date`" +.endfor .endif .if !defined(MAKE_JUST_WORLDS) .if exists(${.CURDIR}/sys/${target}/conf/NOTES) @@ -333,9 +349,15 @@ KERNCONFS!= cd ${.CURDIR}/sys/${TARGET}/conf && \ ! -name DEFAULTS ! -name NOTES universe_kernconfs: .for kernel in ${KERNCONFS} +TARGET_ARCH_${kernel}!= cd ${.CURDIR}/sys/${TARGET}/conf && \ + config -m ${.CURDIR}/sys/${TARGET}/conf/${kernel} | \ + cut -f 2 +universe_kernconfs: universe_kernconf_${TARGET}_${kernel} +universe_kernconf_${TARGET}_${kernel}: @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ ${MAKE} ${JFLAG} buildkernel \ TARGET=${TARGET} \ + TARGET_ARCH=${TARGET_ARCH_${kernel}} \ KERNCONF=${kernel} \ > _.${TARGET}.${kernel} 2>&1 || \ (echo "${TARGET} ${kernel} kernel failed," \