From 30385347cffe83bddaefc7fd3231d3ad2c2cc39b Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sun, 29 Oct 2017 01:21:09 +0000 Subject: [PATCH] Rework r254951 to not reach into private OBJDIR areas. The original change was dealing with the build wanting to run a newer install(1) that was not yet installed. The solution to look into the private legacy directory of the existing build conflicts with 2 upcoming features: a changed OBJDIR format, and splitting the host tools into arch-dependent and arch-independent directories. Rather than hardcoding and changing the paths in this script, just let kernel-toolchain do the work, while disabling much of the meat. With -j15 this finishes in 25 seconds for me and 117 seconds with -j1. All that is really needed is bootstrap-tools, but the system is not currently written in a way that all previous dependent steps will have ran. The previous steps, such as _worldtmp, are being reworked and renamed and so cannot be relied upon to be right. Sponsored by: Dell EMC Isilon --- release/scripts/mm-mtree.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/release/scripts/mm-mtree.sh b/release/scripts/mm-mtree.sh index 620ab6dd962c..644f72ebb920 100755 --- a/release/scripts/mm-mtree.sh +++ b/release/scripts/mm-mtree.sh @@ -81,11 +81,6 @@ if [ ! -f ${SOURCEDIR}/Makefile.inc1 -a \ fi # Setup make to use system files from SOURCEDIR -objp=${MAKEOBJDIRPREFIX} -[ -z "${objp}" ] && objp=/usr/obj -legacydir=${objp}${SOURCEDIR}/tmp/legacy -legacypath=${legacydir}/usr/sbin:${legacydir}/usr/bin:${legacydir}/bin -MM_MAKE_ARGS="${MM_MAKE_ARGS} PATH=${legacypath}:${PATH}" MM_MAKE="make ${ARCHSTRING} ${MM_MAKE_ARGS} -m ${SOURCEDIR}/share/mk" delete_temproot () { @@ -121,6 +116,9 @@ echo '' esac od=${TEMPROOT}/usr/obj ${MM_MAKE} DESTDIR=${TEMPROOT} distrib-dirs && + MAKEOBJDIRPREFIX=$od ${MM_MAKE} kernel-toolchain \ + MK_TOOLCHAIN=no MK_CROSS_COMPILER=no \ + MK_CDDL=no MK_TESTS=no MK_RESCUE=no && MAKEOBJDIRPREFIX=$od ${MM_MAKE} _obj SUBDIR_OVERRIDE=etc && MAKEOBJDIRPREFIX=$od ${MM_MAKE} everything SUBDIR_OVERRIDE=etc && MAKEOBJDIRPREFIX=$od ${MM_MAKE} DESTDIR=${TEMPROOT} distribution;} ||