aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2019-09-28 14:20:28 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2019-09-28 14:20:28 +0000
commitc6b00391b3af4dea7986bb06ab08d21e1abc3b51 (patch)
tree471d49afdee6068b33523c00498937d2dd76c12c
parent821a5738265e59ab589e71b606aaaba92407450d (diff)
downloadsrc-c6b00391b3af4dea7986bb06ab08d21e1abc3b51.tar.gz
src-c6b00391b3af4dea7986bb06ab08d21e1abc3b51.zip
Disable build of LOCAL_MODULES for cross-builds by default.
WITHOUT_LOCAL_MODULES can be set to disable LOCAL_MODULES for native builds. WITH_LOCAL_MODULES can be set to leave it enabled for cross builds. This does not use a knob in kern.opts.mk because the options framework does not currently support options whose default varies on the build type. I discussed a few options there with Warner (e.g. maybe having a tri-state where the default value is "auto" and having Makefile.inc1 apply logic when MK_LOCAL_MODULES is set to "auto"), but Warner ok'd this approach for now until a better solution is implemented. Requested by: many Reviewed by: imp (in person at EuroBSDCon) Differential Revision: https://reviews.freebsd.org/D21608
Notes
Notes: svn path=/head/; revision=352845
-rw-r--r--Makefile.inc14
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 3ca58b38e5ff..c4826cfb35cf 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -678,6 +678,10 @@ CROSSENV+= BUILD_TOOLS_META=.NOMETA
.if defined(TARGET_CFLAGS)
CROSSENV+= ${TARGET_CFLAGS}
.endif
+.if (${TARGET} != ${MACHINE} && !defined(WITH_LOCAL_MODULES)) || \
+ defined(WITHOUT_LOCAL_MODULES)
+CROSSENV+= LOCAL_MODULES=
+.endif
BOOTSTRAPPING_OSRELDATE?=${OSRELDATE}