Index: Makefile.inc1 =================================================================== --- Makefile.inc1 +++ Makefile.inc1 @@ -1334,20 +1334,6 @@ ${_bt}-usr.bin/clang/tblgen: ${_bt}-lib/clang/libllvmtablegen ${_bt}-lib/clang/libllvmsupport .endif -# ELF Tool Chain libraries are needed for ELF tools and dtrace tools. -# dtrace tools are required for older bootstrap env and cross-build -# pre libdwarf -.if ${BOOTSTRAPPING} < 1100006 || (${MACHINE} != ${TARGET} || \ - ${MACHINE_ARCH} != ${TARGET_ARCH}) -.if ${MK_CDDL} != "no" -_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf cddl/usr.bin/ctfconvert \ - cddl/usr.bin/ctfmerge - -${_bt}-cddl/usr.bin/ctfconvert: ${_bt}-cddl/lib/libctf -${_bt}-cddl/usr.bin/ctfmerge: ${_bt}-cddl/lib/libctf -.endif -.endif - # Default to building the GPL DTC, but build the BSDL one if users explicitly # request it. _dtc= usr.bin/dtc @@ -1482,6 +1468,14 @@ .endif .endif +# DTrace tools are required when the host's tools are too old or we're +# cross-compiling. +.if ${MK_CDDL} != "no" && \ + (${BOOTSTRAPPING} < 1100006 || (${MACHINE} != ${TARGET})) +_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf cddl/usr.bin/ctfconvert \ + cddl/usr.bin/ctfmerge +.endif + # If we're given an XAS, don't build binutils. .if ${XAS:M/*} == "" .if ${MK_BINUTILS_BOOTSTRAP} != "no" @@ -1525,6 +1519,7 @@ ${_clang} \ ${_binutils} \ ${_elftctools} \ + ${_dtrace_tools} \ ${_cc} \ ${_btxld} \ ${_crunchide} \