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:
parent
a6b86949fc
commit
f09a3cc462
@ -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
|
||||
|
@ -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>
|
||||
|
7
tools/build/cross-build/Makefile
Normal file
7
tools/build/cross-build/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
NO_OBJ=
|
||||
SCRIPTS= date.sh hostname.sh
|
||||
BINDIR= /usr/bin
|
||||
|
||||
.include <bsd.prog.mk>
|
6
tools/build/cross-build/date.sh
Normal file
6
tools/build/cross-build/date.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
exec /bin/date -r0 "$@"
|
6
tools/build/cross-build/hostname.sh
Normal file
6
tools/build/cross-build/hostname.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
echo dummy
|
Loading…
Reference in New Issue
Block a user