diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 6725bf40d4b6..98495bcaf889 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -183,6 +183,7 @@ SYSTEM_DEP+= ${LDSCRIPT} MKMODULESENV+= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} MKMODULESENV+= MACHINE_CPUARCH=${MACHINE_CPUARCH} 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 3cbdc40a8209..1136efcd04a0 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -359,7 +359,7 @@ ${_src}: .endif # Respect configuration-specific C flags. -CFLAGS+= ${CONF_CFLAGS} +CFLAGS+= ${ARCH_FLAGS} ${CONF_CFLAGS} MFILES?= dev/acpica/acpi_if.m dev/acpi_support/acpi_wmi_if.m \ dev/agp/agp_if.m dev/ata/ata_if.m dev/eisa/eisa_if.m \