Include opt_global.h in the modules build, when building from a normal
kernel build. This makes it possible for me not to get pissed off that random.ko crashes the system trying to rdtsc() when the i386/cpu.h support code decides it's okay to call that op when neither I386_CPU or I486_CPU is defined. I guess it also makes WITNESS/INVARIANTS defines get picked up by the modules.
This commit is contained in:
parent
b9e1262c4c
commit
0ab08e7b8b
@ -13,6 +13,7 @@
|
||||
.if defined(DESTDIR)
|
||||
MKMODULESENV+= DESTDIR="${DESTDIR}"
|
||||
.endif
|
||||
MKMODULESENV+= KERNBUILDDIR="${.CURDIR}"
|
||||
|
||||
.MAIN: all
|
||||
|
||||
|
@ -79,6 +79,9 @@ CFLAGS+= -DKLD_MODULE
|
||||
# add to the front of `make' variable.
|
||||
_ICFLAGS:= ${CFLAGS:M-I*}
|
||||
CFLAGS+= -nostdinc -I- ${INCLMAGIC} ${_ICFLAGS}
|
||||
.if defined(KERNBUILDDIR)
|
||||
CFLAGS+= -include ${KERNBUILDDIR}/opt_global.h
|
||||
.endif
|
||||
|
||||
# Add -I paths for system headers. Individual KLD makefiles don't
|
||||
# need any -I paths for this. Similar defaults for .PATH can't be
|
||||
|
Loading…
Reference in New Issue
Block a user