aboutsummaryrefslogtreecommitdiff
path: root/targets/pseudo
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2015-12-01 05:19:02 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2015-12-01 05:19:02 +0000
commit3bed45ab81b42ff4029368ec778cd8700723c535 (patch)
tree6552b1600053cd1af52553a0860a5413eaabc3e3 /targets/pseudo
parent0383be9bae2307b24ea5a02ee530a450508fb8c4 (diff)
downloadsrc-3bed45ab81b42ff4029368ec778cd8700723c535.tar.gz
src-3bed45ab81b42ff4029368ec778cd8700723c535.zip
META MODE: Rework [bootstrapped] tools PATH support.
- Support more of the toolchain from TOOLSDIR. - This also improves 'make bootstrap-tools' to pass, for example, AS=/usr/bin/as to Makefile.inc1, which will tell cross-tools to use external toolchain support and avoid building things we won't be using in the build. - Always set the PATH to contain the staged TOOLSDIR directories when not building the bootstrap targets. The previous version was only setting this at MAKE.LEVEL==0 and if the TOOLSDIR existed. Both of these prevented using staged tools that were built during the build though as DIRDEPS with .host dependencies, such as the fix for needing usr.bin/localedef.host in r291311. This is not a common tool so we must build and use it during the build, and need to be prepared to change PATH as soon as it appears. This should also fix the issue of host dependencies disappearing from Makefile.depend and then reappearing due to the start of the fresh build not having the directory yet, resulting in the tools that were built not actually being used. - Only use LEGACY_TOOLS while building in Makefile.inc1. After r291317 and r291546 there is no need to add LEGACY_TOOLS into the PATH for the pseudo/targets/toolchain build. - Because the pseudo/targets/toolchain will now build its own [clang-]tblgen, the special logic in clang.build.mk is no longer needed. - LEGACY_TOOLS is no longer used outside of targets/pseudo/bootstrap-tools so is no longer passed into the environment in its build. Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=291561
Diffstat (limited to 'targets/pseudo')
-rw-r--r--targets/pseudo/bootstrap-tools/Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/targets/pseudo/bootstrap-tools/Makefile b/targets/pseudo/bootstrap-tools/Makefile
index 30a5b894ecdc..2d38a70155a3 100644
--- a/targets/pseudo/bootstrap-tools/Makefile
+++ b/targets/pseudo/bootstrap-tools/Makefile
@@ -20,7 +20,7 @@ BSENV= \
MAKESYSPATH=${SRCTOP}/tools/build/mk:${SRCTOP}/share/mk \
TARGET=${HOST_MACHINE} TARGET_ARCH=${HOST_MACHINE_ARCH} \
WITHOUT_STAGING=1 STAGE_ROOT= BOOTSTRAPPING_TOOLS=1 \
- WORLDTMP=${BTOOLSDIR} LEGACY_TOOLS=${LEGACY_TOOLS} \
+ WORLDTMP=${BTOOLSDIR} \
INSTALL="sh ${SRCTOP}/tools/install.sh" \
PATH=${LEGACY_TOOLS}/usr/sbin:${LEGACY_TOOLS}/usr/bin:${LEGACY_TOOLS}/bin:${PATH}
@@ -67,14 +67,15 @@ cross-tools build-tools bootstrap-tools: .MAKE .META
touch $@
# MAKELEVEL=0 so that dirdeps.mk does its thing
-# LEGACY_TOOLS lets us use the bootstrapped stuff above
+# BSENV:MPATH=* lets us use the bootstrapped stuff in LEGACY_TOOLS above.
# TARGET* is so that MK_CLANG gets set correctly.
BSTCENV= \
MAKELEVEL=0 \
MACHINE=host \
- LEGACY_TOOLS=${LEGACY_TOOLS} \
+ BOOTSTRAPPING_TOOLS=1 \
TARGET=${HOST_MACHINE} \
- TARGET_ARCH=${HOST_MACHINE_ARCH}
+ TARGET_ARCH=${HOST_MACHINE_ARCH} \
+ ${BSENV:MPATH=*}
BSTCARGS= \
${BSARGS:NDESTDIR=*:NOBJTOP=*:NOBJROOT=*:NMK_CROSS_COMPILER=*:NMK_CLANG=*:NMK_GCC=*} \