From owner-freebsd-current@FreeBSD.ORG Tue Apr 29 05:31:58 2014 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5DD2356; Tue, 29 Apr 2014 05:31:58 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9BEE4131E; Tue, 29 Apr 2014 05:31:58 +0000 (UTC) Received: from Julian-MBP3.local (ppp121-45-232-70.lns20.per1.internode.on.net [121.45.232.70]) (authenticated bits=0) by vps1.elischer.org (8.14.8/8.14.8) with ESMTP id s3T5Vfuh071474 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 28 Apr 2014 22:31:51 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <535F3938.9060809@freebsd.org> Date: Tue, 29 Apr 2014 13:31:36 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Ian Lepore , Warner Losh Subject: Re: Make variables to force non default libraries and includes? References: <535E07C9.5060309@freebsd.org> <80F941B9-3A54-4059-BF99-A5F59A9731DA@gmail.com> <1398733072.61646.251.camel@revolution.hippie.lan> In-Reply-To: <1398733072.61646.251.camel@revolution.hippie.lan> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 8bit Cc: FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 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: Tue, 29 Apr 2014 05:31:59 -0000 On 4/29/14, 8:57 AM, Ian Lepore wrote: > On Mon, 2014-04-28 at 18:36 -0600, Warner Losh wrote: >> On Apr 28, 2014, at 1:48 AM, Julian Elischer wrote: >> >>> I need to do the equivalent of "cd /usr/src/cddl/usr.sbin/dtrace; make DESTDIR=/mumble all install” >> cd /usr/src >> make distributeworld DESTDIR=/mumble >> cd cddl/usr.sbin/dtrace >> make buildenv >> make all install >> >>> but it pulls in libraries from the base system, which differ slightly from those in the source tree. >> The above will create the right /mumble hierarchy, and will pull the libraries from the build rather than the local system. >> >>> How can I force it to use /mumble2/include and /mumble2/lib instead of / ? >>> >>> I can pre-populate /mumble2 using "make buildworld", "make libraries", and "make includes" but >>> I need to be able to do selective builds of just subdirectories after that.. I haven't spotted the right way of forcing the use of the "--system_root /mumble2" option in the compiles. >>> >>> I know we do it in 'buildworld' is there a more generic way? >>> >>> I have been looking in the .mk files but I haven't spotted it so far. >> You’re asking for some serious split-brain action. chroot builds are likely your best option. There’s no easy way to force this, although you might get some milage out of WMAKEENV options, but I think we bake most of the where to look for things options into the binaries. One crazy option would be to set CC=“cc —sysroot /mumble” but I’m sure there be dragons there… >> >> Good luck with this crazy, never have we supported it very well, option :) >> >> Warner > Actually the hooks are in place to do this stuff. Instead of make > buildenv to get an interactive shell you can do something like > > BLDENV=`${MAKE} buildenvvars` > chroot buildchroot/ "env -i $${BLDENV} cd /usr/src/somewhere && \ > make all install" > > -- Ian > > > > Is there a way to specify a different toolchain destination? i.e. not /usr/obj/usr/src/tmp ?