From owner-freebsd-ports@FreeBSD.ORG Sat Jun 21 15:25:47 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9B981065670 for ; Sat, 21 Jun 2008 15:25:47 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Received: from istc.kiev.ua (wolf.istc.kiev.ua [193.108.236.1]) by mx1.freebsd.org (Postfix) with ESMTP id 86E9B8FC15 for ; Sat, 21 Jun 2008 15:25:47 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Received: from [91.123.146.100] (helo=ravenloft.kiev.ua) by istc.kiev.ua with esmtp (Exim 4.52) id 1KA4yE-000690-9P; Sat, 21 Jun 2008 18:25:44 +0300 Received: from kozlov by ravenloft.kiev.ua with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KA4yD-000Aio-BE; Sat, 21 Jun 2008 18:25:41 +0300 Date: Sat, 21 Jun 2008 18:25:41 +0300 From: Alex Kozlov To: RW , freebsd-ports@freebsd.org, spam@rm-rf.kiev.ua Message-ID: <20080621152541.GA41126@ravenloft.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: Alex Kozlov X-Spam-Score: 0.0 (/) X-Spam-Report: Content analysis detailz: (0.0 points, 10.0 required) Cc: Subject: Re: Standardize NO_CCACHE flag and ccache definitions X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2008 15:25:47 -0000 On Sat, Jun 21, 2008 at 01:32:20AM +0100, RW wrote: > On Wed, 18 Jun 2008 23:27:16 +0200 > Martin Tournoij wrote: > > > > There are some ports which refuse to compile with ccache, these all > > seem to be projects which use scons, unlike make, scons does not copy > > the user's environment automatically, and the required environment > > variables for ccache (like CCACHE_DIR) aren't present, which leads to > > build failure, an example is games/freera. > > > > I'm not that familiar with scons, and what exactly the "proper way" is > > to handle this sort of stuff in scons, > > I don't have any experience with scons, but I did used to use cons. > IIRC cons expects to do the caching itself. Since it already generates a > hash that can be used to label the correct object file, it pretty much > comes for free and running ccache would just duplicate the overheads. I > think it's probable that there isn't a "proper way". >From porter's handbook: To make third party SConstruct respect everything that is passed to SCons in SCONS_ENV (that is, most importantly, CC/CXX/CFLAGS/CXXFLAGS), patch the SConstruct so build Environment is constructed like this: env = Environment(**ARGUMENTS) It may be then modified with env.Append and env.Replace. -- Adios