Guard CROSS_TARGET_FLAGS from buildworld

Until a better arrangment is worked out, guard the setting of
CROSS_TARGET_FLAGS in local.sys.mk with check for DIRDEPS_BUILD.

Using a separate flag for CROSS_TARGET that can be reset by
bsd.compat.mk is probably the right thing.
This commit is contained in:
Simon J. Gerraty 2023-09-23 15:58:13 -07:00
parent f2f73fa7bd
commit f174619c38

View file

@ -95,11 +95,13 @@ META_COOKIE_RM?=
META_COOKIE_TOUCH?=
META_DEPS+= ${META_NOPHONY}
.if ${MK_DIRDEPS_BUILD} == "yes"
.if ${MACHINE:Nhost*:Ncommon} != "" && ${MACHINE} != ${HOST_MACHINE}
# cross-building
CROSS_TARGET_FLAGS?= -target ${MACHINE_ARCH}-unknown-freebsd${FREEBSD_REVISION}
CFLAGS+= ${CROSS_TARGET_FLAGS}
ACFLAGS+= ${CROSS_TARGET_FLAGS}
.endif
.endif
.endif