diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index d23d531ced64..e68eb7968218 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -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 diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index da65f7117927..e2e63032ef19 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -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