Index: Makefile.inc1 =================================================================== --- Makefile.inc1 +++ Makefile.inc1 @@ -589,7 +589,7 @@ .endif .endif WORLDTMP?= ${OBJTOP}/tmp -BPATH= ${CCACHE_WRAPPER_PATH_PFX}${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin +BPATH= ${CCACHE_WRAPPER_PATH_PFX}${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin:${WORLDTMP}/legacy/usr/libexec XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin # When building we want to find the cross tools before the host tools in ${BPATH}. @@ -608,7 +608,7 @@ .if ${BUILD_WITH_STRICT_TMPPATH} != 0 TMPPATH= ${STRICTTMPPATH} .else -TMPPATH= ${STRICTTMPPATH}:${PATH} +TMPPATH= ${STRICTTMPPATH}:${PATH}:/usr/libexec .endif # @@ -1499,11 +1499,11 @@ ${_+_}cd ${.CURDIR}/tools/build/options; sh makeman > \ ${.CURDIR}/share/man/man5/src.conf.5 -.if make(sysent) -.include -.endif - -_sysent_PATH= ${WORLDTMP}/legacy/usr/libexec:/usr/libexec:${PATH} +# We can't assume here that ${TMPPATH} will include ${PATH} or /usr/libexec +# because we may be building with a STRICTTMPPATH, so we explicitly include +# /usr/libexec here for flua. ${TMPPATH} still usefully includes anything else +# we may need to function. +_sysent_PATH= ${TMPPATH}:/usr/libexec _sysent_dirs= sys/kern _sysent_dirs+= sys/compat/freebsd32 _sysent_dirs+= sys/compat/cloudabi32 \ @@ -1515,8 +1515,7 @@ sysent: .PHONY .for _dir in ${_sysent_dirs} @echo "${MAKE} -C ${.CURDIR}/${_dir} sysent" - ${_+_}@env PATH=${_sysent_PATH} LUA=${LUA_CMD} \ - ${MAKE} -C ${.CURDIR}/${_dir} sysent + ${_+_}@env PATH=${_sysent_PATH} ${MAKE} -C ${.CURDIR}/${_dir} sysent .endfor #