MFC r321256:

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
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D11633
This commit is contained in:
Brooks Davis 2017-10-15 22:45:25 +00:00
parent c8f2b71eae
commit f6d20b64f3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=324643
2 changed files with 2 additions and 1 deletions

View File

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

View File

@ -359,7 +359,7 @@ ${_src}:
.endif .endif
# Respect configuration-specific C flags. # 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 \ 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 \ dev/agp/agp_if.m dev/ata/ata_if.m dev/eisa/eisa_if.m \