From owner-freebsd-current@FreeBSD.ORG Fri Jul 13 19:35:49 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AD2B516A402 for ; Fri, 13 Jul 2007 19:35:49 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) Received: from mail.ambrisko.com (mail.ambrisko.com [64.174.51.43]) by mx1.freebsd.org (Postfix) with ESMTP id 84F6113C428 for ; Fri, 13 Jul 2007 19:35:49 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) Received: from server2.ambrisko.com (HELO www.ambrisko.com) ([192.168.1.2]) by ironport2.ambrisko.com with ESMTP; 13 Jul 2007 12:02:25 -0700 Received: from ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.13.1/8.12.11) with ESMTP id l6DJ7Fbj090310; Fri, 13 Jul 2007 12:07:15 -0700 (PDT) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.13.1/8.13.1/Submit) id l6DJ7Fu1090309; Fri, 13 Jul 2007 12:07:15 -0700 (PDT) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200707131907.l6DJ7Fu1090309@ambrisko.com> In-Reply-To: <7579f7fb0707131121s2725d0a7o34dc81cd2c6cf9f@mail.gmail.com> To: Matthew Jacob Date: Fri, 13 Jul 2007 12:07:15 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Cc: Max Laier , freebsd-current@freebsd.org Subject: Re: Can't build RELENG_6 from HEAD? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2007 19:35:49 -0000 Matthew Jacob writes: | gcc 4.X will barf all over RELENG_6 code. Better start thinking about | a jailed build. And if you do script something like: #!/bin/sh UNAME_s="FreeBSD" UNAME_m="i386" UNAME_p="i386" ROOT=$HOME/stable_$UNAME_p REVISION=`cd ${ROOT}/sys/conf && grep REVISION= newvers.sh | cut -f2 -d'"'` BRANCH=`cd ${ROOT}/sys/conf && grep BRANCH= newvers.sh | head -n1 | cut -f2 -d'"'` UNAME_r=$REVISION-$BRANCH UNAME_v="$UNAME_s $UNAME_r #0: Thu May 4 07:54:55 PDT 2006 root@a21p:/data/home/ambrisko/current/usr/src/sys/$UNAME_p/compile/THINK" OSVERSION=`awk '/\#define.*__FreeBSD_version/ { print $3 }' < ${ROOT}/sys/sys/param.h` export UNAME_s UNAME_r UNAME_v UNAME_m UNAME_p OSVERSION ROOT if [ -r $ROOT/dev/zero ] then echo dev already mounted else sudo mount -t devfs dev $ROOT/dev fi sudo ln -sf ld-elf.so.1 $ROOT/libexec/ld-elf32.so.1 sudo sh -c '( echo "libpthread.so.2 libthr.so.2" ;\ echo "libpthread.so libthr.so") > ${ROOT}/etc/libmap.conf' sudo cp ${ROOT}/etc/libmap.conf ${ROOT}/etc/libmap32.conf sudo chroot $ROOT You can then build i386 on amd64 or i386 on i386. Ports will build and pkg_add works :-) Inside uname -a will report 6.X for i386. I think it would be nice to put some of this into the src/Makefile so you can do "make chroot" and it would set this up and throw you into a chroot/jail/vimage. At work we extended it to 4.X. This way we can build everything on a FreeBSD amd64 machine for 6.X i386, 6.X amd64 or 4.X i386 code. The 4.X is important to link with 3rd party code. It simplifies our build machines and I can build our stuff on a amd64 -current box. Doug A.