diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass
index 9553f004325..3163db55195 100644
--- a/meta/classes-global/base.bbclass
+++ b/meta/classes-global/base.bbclass
@@ -153,7 +153,7 @@ def setup_hosttools_dir(dest, toolsvar, d, fatal=True):
                 notfound.append(tool)
 
     if notfound and fatal:
-        bb.fatal("The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:\n  %s" % " ".join(notfound))
+        bb.fatal("The following required tools (as specified by %s) appear to be unavailable in PATH, please install them in order to proceed:\n  %s" % (toolsvar, " ".join(notfound)))
 
 # We can't use vardepvalue against do_fetch directly since that would overwrite
 # the other task dependencies so we use an indirect function.
@@ -289,6 +289,15 @@ def buildcfg_neededvars(d):
     if pesteruser:
         bb.fatal('The following variable(s) were not set: %s\nPlease set them directly, or choose a MACHINE or DISTRO that sets them.' % ', '.join(pesteruser))
 
+addhandler base_task_eventhandler
+base_task_eventhandler[eventmask] = "bb.build.TaskStarted"
+python base_task_eventhandler() {
+    if d.getVar('RECIPE_HOSTTOOLS'):
+        toolsdir = d.getVar('RECIPE_HOSTTOOLS_DIR')
+        with bb.utils.fileslocked([toolsdir + ".lock"]):
+            setup_hosttools_dir(toolsdir, 'RECIPE_HOSTTOOLS', d)
+}
+
 addhandler base_eventhandler
 base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.MultiConfigParsed bb.event.BuildStarted bb.event.RecipePreFinalise bb.event.RecipeParsed bb.event.RecipePreDeferredInherits"
 python base_eventhandler() {
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index d353a7cd2c3..31b3f6243b6 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -524,6 +524,7 @@ export PATH
 
 # Directory with symlinks to host tools used by build
 HOSTTOOLS_DIR = "${TMPDIR}/hosttools"
+RECIPE_HOSTTOOLS_DIR = "${WORKDIR}/recipe-hosttools"
 
 # Tools needed to run builds with OE-Core
 HOSTTOOLS += " \
diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index 67fef791545..04bceadddee 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -138,7 +138,7 @@ DUMMY_PACKAGE_ARCHS_TARGET += "sdk-provides-dummy-target"
 # We need to keep bitbake tools in PATH
 # Avoid empty path entries
 BITBAKEPATH := "${@os.path.dirname(bb.utils.which(d.getVar('PATH'),'bitbake'))}"
-PATH := "${@'${BITBAKEPATH}:' if '${BITBAKEPATH}' != '' else ''}${HOSTTOOLS_DIR}"
+PATH := "${@'${BITBAKEPATH}:' if '${BITBAKEPATH}' != '' else ''}${RECIPE_HOSTTOOLS_DIR}:${HOSTTOOLS_DIR}"
 
 # Only OE-Core should set/change this
 BB_GLOBAL_PYMODULES = "os sys time"
