summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2018-08-21 16:52:14 +0000
committerAlex Richardson <arichardson@FreeBSD.org>2018-08-21 16:52:14 +0000
commitcd4d034fd6b43cfad810b3834dedb75788b3791c (patch)
treeda1006385c4f946664b0a5c29e1214b84b0d29f8
parent44e1285c7b19e6d1cdb237b0948e89b4891ca5be (diff)
Notes
-rw-r--r--tools/build/mk/Makefile.boot6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/build/mk/Makefile.boot b/tools/build/mk/Makefile.boot
index b4f13c2fcaf0a..0b4c41b8d95fb 100644
--- a/tools/build/mk/Makefile.boot
+++ b/tools/build/mk/Makefile.boot
@@ -8,12 +8,14 @@ LDFLAGS+= -L${WORLDTMP}/legacy/usr/lib
# we do not want to capture dependencies referring to the above
UPDATE_DEPENDFILE= no
-.if !make(obj)
# When building host tools we should never pull in headers from the source sys
# directory to avoid any ABI issues that might cause the built binary to crash.
# The only exceptions to this are sys/cddl/compat for dtrace bootstrap tools and
# sys/crypto for libmd bootstrap.
-.if !empty(CFLAGS:M*${SRCTOP}/sys*:N*${SRCTOP}/sys/cddl/compat*:N*${SRCTOP}/sys/crypto*)
+# We have to skip this check during make obj since bsd.crunchgen.mk will run
+# make obj on every directory during the build-tools phase.
+.if !make(obj)
+.if !empty(CFLAGS:M*${SRCTOP}/sys)
.error Do not include $${SRCTOP}/sys when building bootstrap tools. \
Copy the header to $${WORLDTMP}/legacy in tools/build/Makefile instead. \
Error was caused by Makefile in ${.CURDIR}