summaryrefslogtreecommitdiffstats
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorambrisko <ambrisko@FreeBSD.org>2005-12-02 00:50:30 +0000
committerambrisko <ambrisko@FreeBSD.org>2005-12-02 00:50:30 +0000
commit8420930ca22c048fd8c66d14a24ac9b3b01f6f01 (patch)
tree4959ed14f9333fb1234fd67393765e185198b189 /Makefile.inc1
parentf83dd5362c9e9f7d28da449b219b08e08c36db42 (diff)
downloadFreeBSD-src-8420930ca22c048fd8c66d14a24ac9b3b01f6f01.zip
FreeBSD-src-8420930ca22c048fd8c66d14a24ac9b3b01f6f01.tar.gz
Add support to easily build FreeBSD unpacked in a chroot of another
FreeBSD machine. To do this add the man 1 uname changes to __xuname.c so we can override the settings it reports. Add OSVERSION override to getosreldate. Finally which Makefile.inc1 to use uname -m instead of sysctl -n hw.machine_arch to get the arch. type. With these change you can put a complete FreeBSD OS image into a chroot set: UNAME_s=FreeBSD UNAME_r=4.7-RELEASE UNAME_v="FreeBSD $UNAME_r #1: Fri Jul 22 20:32:52 PDT 2005 fake@fake:/usr/obj/usr/src/sys/FAKE" UNAME_m=i386 UNAME_p=i386 OSVERSION=470000 on an amd64 or i386 and it just work including building ports and using pkg_add -r etc. The caveat for this example is that these patches have to be applied to FreeBSD 4.7 and the uname(1) changes need to be merged. This also addresses issue with libtool. This is usefull for when a build machine has been trashed for an old release and we want to do a build on a new machine that FreeBSD 4.7 won't run on ...
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc12
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 8f140a6..6a93be9 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -122,7 +122,7 @@ _CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} \
.error CPUTYPE global should be set with ?=.
.endif
.if make(buildworld)
-BUILD_ARCH!= sysctl -n hw.machine_arch
+BUILD_ARCH!= uname -m
.if ${MACHINE_ARCH} != ${BUILD_ARCH}
.error To cross-build, set TARGET_ARCH.
.endif
OpenPOWER on IntegriCloud