From 4dc89c4d51cc6e82623e6bfb48718d9f7752312a Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Thu, 2 Nov 2017 18:08:36 +0000 Subject: [PATCH] Reduce MAKEOBJDIRPREFIX path spam by specifying a direct objdir to use. Sponsored by: Dell EMC Isilon --- Makefile.inc1 | 8 ++++++-- Makefile.libcompat | 6 ++++-- targets/pseudo/bootstrap-tools/Makefile | 6 +++--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index cebe4c446fbf..3c5e0188a813 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -521,6 +521,8 @@ BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" # need to keep this in sync with targets/pseudo/bootstrap-tools/Makefile BSARGS= DESTDIR= \ + OBJTOP='${WORLDTMP}/obj-$${BWPHASE}' \ + OBJROOT='$${OBJTOP}/' \ BOOTSTRAPPING=${OSRELDATE} \ BWPHASE=${.TARGET:C,^_,,} \ SSP_CFLAGS= \ @@ -531,7 +533,7 @@ BSARGS= DESTDIR= \ MK_LLDB=no MK_TESTS=no \ MK_INCLUDES=yes -BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ +BMAKE= \ ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ ${BSARGS} @@ -558,9 +560,11 @@ XMAKE= ${BMAKE} \ KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${BPATH}:${PATH} \ WORLDTMP=${WORLDTMP} -KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOBJDIRPREFIX=${WORLDTMP} \ +KTMAKE= TOOLS_PREFIX=${WORLDTMP} \ ${KTMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ DESTDIR= \ + OBJTOP='${WORLDTMP}/obj-kernel-tools' \ + OBJROOT='$${OBJTOP}/' \ BOOTSTRAPPING=${OSRELDATE} \ SSP_CFLAGS= \ MK_HTML=no -DNO_LINT MK_MAN=no \ diff --git a/Makefile.libcompat b/Makefile.libcompat index 5ec84fd42ca2..5bb455d0178f 100644 --- a/Makefile.libcompat +++ b/Makefile.libcompat @@ -108,7 +108,8 @@ LIBCOMPATCXXFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include/c++/v1 -std=c++11 \ # Yes, the flags are redundant. LIBCOMPATWMAKEENV+= \ - MAKEOBJDIRPREFIX=${LIBCOMPAT_OBJTOP} \ + OBJTOP=${LIBCOMPAT_OBJTOP} \ + OBJROOT='$${OBJTOP}/' \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} \ SYSROOT=${LIBCOMPATTMP} \ @@ -184,7 +185,8 @@ build${libcompat}: .PHONY ${_+_}cd ${.CURDIR}/${_dir}; \ WORLDTMP=${WORLDTMP} \ MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \ - MAKEOBJDIRPREFIX=${LIBCOMPAT_OBJTOP} \ + OBJTOP=${LIBCOMPAT_OBJTOP} \ + OBJROOT='$${OBJTOP}/' \ ${MAKE} SSP_CFLAGS= DESTDIR= \ DIRPRFX=${_dir}/ -DNO_LINT -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ build-tools diff --git a/targets/pseudo/bootstrap-tools/Makefile b/targets/pseudo/bootstrap-tools/Makefile index 95f16f0530a8..6d5b18d99247 100644 --- a/targets/pseudo/bootstrap-tools/Makefile +++ b/targets/pseudo/bootstrap-tools/Makefile @@ -13,10 +13,10 @@ TARGET_MACHINE= host HOST_MACHINE!= uname -m HOST_MACHINE_ARCH!= uname -p BTOOLSDIR?= ${HOST_OBJTOP}/tools +WORLDTMP= ${BTOOLSDIR} LEGACY_TOOLS?= ${BTOOLSDIR}/legacy BSENV= \ - unset MAKEOBJDIR; MAKEOBJDIRPREFIX=${BTOOLSDIR} \ MAKESYSPATH=${SRCTOP}/tools/build/mk:${SRCTOP}/share/mk \ TARGET=${HOST_MACHINE} TARGET_ARCH=${HOST_MACHINE_ARCH} \ WITHOUT_STAGING=1 STAGE_ROOT= BOOTSTRAPPING_TOOLS=1 \ @@ -34,6 +34,8 @@ OSRELDATE?= 0 # need to keep this in sync with src/Makefile.inc1 BSARGS= DESTDIR= \ + OBJTOP='${WORLDTMP}/obj-$${BWPHASE}' \ + OBJROOT='$${OBJTOP}/' \ BOOTSTRAPPING=${OSRELDATE} \ BWPHASE=${.TARGET} \ SSP_CFLAGS= \ @@ -44,8 +46,6 @@ BSARGS= DESTDIR= \ MK_LLDB=no MK_TESTS=no \ MK_INCLUDES=yes -# Need to override these so OBJTOP uses are proper in the non-meta build. -BSARGS+= OBJTOP=${BTOOLSDIR}${SRCTOP} OBJROOT='$${OBJTOP}/' # We will handle building the toolchain and cross-compiler. BSARGS+= MK_CROSS_COMPILER=no MK_CLANG=no MK_GCC=no