From owner-freebsd-current@FreeBSD.ORG Thu Mar 1 17:33:56 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ABE8B1065674 for ; Thu, 1 Mar 2012 17:33:56 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 6C8D18FC0A for ; Thu, 1 Mar 2012 17:33:56 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 979D77300A; Thu, 1 Mar 2012 18:52:12 +0100 (CET) Date: Thu, 1 Mar 2012 18:52:12 +0100 From: Luigi Rizzo To: Alexander Kabaev Message-ID: <20120301175212.GA32051@onelab2.iet.unipi.it> References: <20120301173819.GA31913@onelab2.iet.unipi.it> <20120301122413.02413f49@kan.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120301122413.02413f49@kan.dyndns.org> User-Agent: Mutt/1.4.2.3i Cc: current@freebsd.org Subject: Re: how to cross-build a single application ? 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: Thu, 01 Mar 2012 17:33:56 -0000 On Thu, Mar 01, 2012 at 12:24:13PM -0500, Alexander Kabaev wrote: > On Thu, 1 Mar 2012 18:38:19 +0100 > Luigi Rizzo wrote: > > > What is the way to properly cross-build a single program > > (after having gone throught the 'toolchain' and possibly > > even a full 'buildworld') > > from the top-level directory of a FreeBSD source tree ? > > > > right now i do something like > > > > cd $SOURCE_ROOT > > make MAKEOBJDIRPREFIX=/my_obj_tree TARGET=amd64 buildworld > > > > but i seem to remember that there is a more efficient way > > when you want to rebuild only one program or one subtree. > > I think i have seen this question being answered from time to time > > but i can't find how now. > > > > any hints ? > > > > cheers > > luigi > > > > Something like this should work: > > cd src/ > make buildenv TARGET=... > cd usr.bin/blah > make close: eval `make buildenvvars TARGET=... ` && cd usr.bin/blah && make thanks! luigi