Add hacks that I use to test cross-builds (by building on

native and foreign architectures and comparing products).
They eliminate most of the differences caused by different
object directory paths, timestamping, and identification.

(Note WORLDTMP was renamed to ${OBJTREE}${.CURDIR}/tmp.)
This commit is contained in:
Ruslan Ermilov 2005-03-02 16:40:51 +00:00
parent a6b86949fc
commit f09a3cc462
5 changed files with 25 additions and 2 deletions

View File

@ -127,12 +127,12 @@ BUILD_ARCH!= sysctl -n hw.machine_arch
.error To cross-build, set TARGET_ARCH.
.endif
.endif
.if ${MACHINE} == ${TARGET}
.if ${MACHINE} == ${TARGET} && !defined(CROSS_BUILD_TESTING)
OBJTREE= ${MAKEOBJDIRPREFIX}
.else
OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}
.endif
WORLDTMP= ${OBJTREE}${.CURDIR}/${MACHINE_ARCH}
WORLDTMP= ${OBJTREE}${.CURDIR}/tmp
# /usr/games added for fortune which depend on strfile
BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games
XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games

View File

@ -23,4 +23,8 @@ INCS+= nl_types.h
SRCS= dummy.c
.endif
.if defined(CROSS_BUILD_TESTING)
SUBDIR= cross-build
.endif
.include <bsd.lib.mk>

View File

@ -0,0 +1,7 @@
# $FreeBSD$
NO_OBJ=
SCRIPTS= date.sh hostname.sh
BINDIR= /usr/bin
.include <bsd.prog.mk>

View File

@ -0,0 +1,6 @@
#!/bin/sh
#
# $FreeBSD$
#
exec /bin/date -r0 "$@"

View File

@ -0,0 +1,6 @@
#!/bin/sh
#
# $FreeBSD$
#
echo dummy