Check TARGET_ARCH as well as TARGET to determine if we are doing a cross

build. This is necessary to be able to cross-build 32-bit PowerPC from
a 64-bit PowerPC host.

Reviewed by:	imp
This commit is contained in:
Nathan Whitehorn 2010-09-08 19:53:16 +00:00
parent 93dbfc7840
commit 87ff4bceb6

View File

@ -161,7 +161,7 @@ BUILD_ARCH!= uname -p
.error To cross-build, set TARGET_ARCH.
.endif
.endif
.if ${MACHINE} == ${TARGET} && !defined(CROSS_BUILD_TESTING)
.if ${MACHINE} == ${TARGET} && ${MACHINE_ARCH} == ${TARGET_ARCH} && !defined(CROSS_BUILD_TESTING)
OBJTREE= ${MAKEOBJDIRPREFIX}
.else
OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH}