showconfig: Set MACHINE for src.opts.mk

Also set MACHINE and MACHINE_ARCH when reading config options from
src.opts.mk. This ensures any machine-dependent options are reported
correctly.

Reviewed by:	emaste, imp
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D44838
This commit is contained in:
Andrew Turner 2024-04-18 16:22:46 +01:00
parent 9d40492efa
commit 2c35c867ba

View File

@ -3598,7 +3598,8 @@ check-old: check-old-files check-old-libs check-old-dirs .PHONY
# #
showconfig: .PHONY showconfig: .PHONY
@(${MAKE} -n -f ${.CURDIR}/sys/conf/kern.opts.mk -V dummy -dg1 UPDATE_DEPENDFILE=no NO_OBJ=yes MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH}; \ @(${MAKE} -n -f ${.CURDIR}/sys/conf/kern.opts.mk -V dummy -dg1 UPDATE_DEPENDFILE=no NO_OBJ=yes MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH}; \
${MAKE} -n -f ${.CURDIR}/share/mk/src.opts.mk -V dummy -dg1 UPDATE_DEPENDFILE=no NO_OBJ=yes) 2>&1 | grep -E '^(MK|OPT)_[A-Z]' | sort -u ${MAKE} -n -f ${.CURDIR}/share/mk/src.opts.mk -V dummy -dg1 UPDATE_DEPENDFILE=no NO_OBJ=yes MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH}) 2>&1 | \
grep -E '^(MK|OPT)_[A-Z]' | sort -u
.if !empty(KRNLOBJDIR) && !empty(KERNCONF) .if !empty(KRNLOBJDIR) && !empty(KERNCONF)
DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF}/ DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF}/