aboutsummaryrefslogtreecommitdiff
path: root/sys/conf/kmod.mk
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2020-01-29 18:50:55 +0000
committerKyle Evans <kevans@FreeBSD.org>2020-01-29 18:50:55 +0000
commit0c4c594841d9526a4979c665b925d486472da4f3 (patch)
treefbc185edafe281579f25da08dd4146a0a8de63a9 /sys/conf/kmod.mk
parentfbd46fe94ab7de664fd396144d03d6c6b5e22c19 (diff)
downloadsrc-0c4c594841d9526a4979c665b925d486472da4f3.tar.gz
src-0c4c594841d9526a4979c665b925d486472da4f3.zip
kmod build: start generating opt_global.h, include it
For untied module builds, we'll generate opt_foo headers if they're included in SRCS. However, options that would normally be represented in opt_global.h aren't properly represented. Start generating opt_global.h with #define VIMAGE for !mips since it's almost universally a project default and right now kmods must hack it in themselves in order to be properly compiled for the default kernel. For example, ^/sys/modules/pf/Makefile Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D23345
Notes
Notes: svn path=/head/; revision=357265
Diffstat (limited to 'sys/conf/kmod.mk')
-rw-r--r--sys/conf/kmod.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index 521bd4f78ada..ecf9f6b5fa22 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -106,6 +106,9 @@ NOSTDINC= -nostdinc
CFLAGS:= ${CFLAGS:N-I*} ${NOSTDINC} ${INCLMAGIC} ${CFLAGS:M-I*}
.if defined(KERNBUILDDIR)
CFLAGS+= -DHAVE_KERNEL_OPTION_HEADERS -include ${KERNBUILDDIR}/opt_global.h
+.else
+SRCS+= opt_global.h
+CFLAGS+= -include ${.OBJDIR}/opt_global.h
.endif
# Add -I paths for system headers. Individual module makefiles don't