Include ARCH_FLAGS in CFLAGS when building modules.

Without this change, modules will match the default compiler
configuration which may not be the same as the kernel values.

Reviewed by:	imp
Obtained from:	CheriBSD
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D11633
This commit is contained in:
Brooks Davis 2017-07-19 22:06:35 +00:00
parent dcbc025ff1
commit 256054fd9e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=321256
2 changed files with 2 additions and 1 deletions

View File

@ -216,6 +216,7 @@ MKMODULESENV+= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR}
MKMODULESENV+= MACHINE_CPUARCH=${MACHINE_CPUARCH}
MKMODULESENV+= MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH}
MKMODULESENV+= MODULES_EXTRA="${MODULES_EXTRA}" WITHOUT_MODULES="${WITHOUT_MODULES}"
MKMODULESENV+= ARCH_FLAGS="${ARCH_FLAGS}"
.if (${KERN_IDENT} == LINT)
MKMODULESENV+= ALL_MODULES=LINT
.endif

View File

@ -366,7 +366,7 @@ ${_src}:
.endif
# Respect configuration-specific C flags.
CFLAGS+= ${CONF_CFLAGS}
CFLAGS+= ${ARCH_FLAGS} ${CONF_CFLAGS}
.if !empty(SRCS:Mvnode_if.c)
CLEANFILES+= vnode_if.c