From owner-freebsd-arch@FreeBSD.ORG Mon Jan 12 08:22:39 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 393FC1065673; Mon, 12 Jan 2009 08:22:39 +0000 (UTC) (envelope-from prvs=julian=2560a13b2@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id 1FDBB8FC16; Mon, 12 Jan 2009 08:22:39 +0000 (UTC) (envelope-from prvs=julian=2560a13b2@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.87]) by smtp-outbound.ironport.com with ESMTP; 11 Jan 2009 23:54:02 -0800 Message-ID: <496AF718.70005@elischer.org> Date: Sun, 11 Jan 2009 23:54:00 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Sam Leffler References: <20090111.095109.-1112748421.imp@bsdimp.com> <20090111172427.GD89178@hoeg.nl> <20090111191251.GA74450@zim.MIT.EDU> <20090111.142350.1560738814.imp@bsdimp.com> <496A65E1.5030309@freebsd.org> In-Reply-To: <496A65E1.5030309@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org Subject: Re: Quick hack to make fast kernel builds easier [really cross-build support] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2009 08:22:39 -0000 Sam Leffler wrote: > M. Warner Losh wrote: >> In message: <20090111191251.GA74450@zim.MIT.EDU> >> David Schultz writes: >> : On Sun, Jan 11, 2009, Ed Schouten wrote: >> : > I often just run `make' in /usr/obj/..., >> : > which also saves some typing, but unfortunately that doesn't work >> when >> : > cross compiling. >> : : Also, as far as I know, there's no convenient way to rebuild a >> : single module for another architecture. I use the following script >> : called 'arch' to set the appropriate environment variables, so if >> : I've already run 'make universe' and I want to rebuild libc for >> : sparc64, I say: >> : : cd /usr/src/lib/libc && arch sparc64 make >> : : It would be nice if there were a better mechanism for this that's >> : integrated into the build system. >> >> I do one of the following: >> >> (1) env TARGET=arm make buildworld -DNO_CLEAN >> >> or >> >> (2) env TARGET=arm make buildenv >> $ cd lib/libc && make >> >> These both work out well enough in practice for me. I've wanted a >> target that was 'reworld' that just did an 'all' and maybe a few other >> things, but I've never had the time to polish this up (had it in a >> couple of trees that I lost due to disk failure). >> >> I do agree it would be nice if there was some way to do 'all' for a >> subdirectory with a 'trust me, I know what I'm doing, so don't do all >> that other stuff' flag. >> >> > I told das privately but will note publicly that: When Cisco was thinking of using BSD for the Nova project I had a cross build env set up for PPC. I had a chroot where all teh standard tools were cross tools... so 'cc' ran on a PC but gave PPC binaries. in addition all the libraries to link with etc. were all PPC libs. Seemed to work ok.. to rebuild tools WITHIN the chroo you did the build on the enclosing environment with a DESTDIR=/ppc-chroot TARTGET=PPC (or whatever it was) and to generate arbitrary PPC binaries you just compiled them normally within the chroot. > > tools/tools/nanobsd/gateworks > > uses make buildenv to cross-build various bits. At some point I want to > promote some of the shell code to be part of nanobsd but until we've got > something to deal with ports I'm in no hurry. > > Sam > > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"