From owner-freebsd-current@FreeBSD.ORG Thu Nov 17 17:43:22 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A63516A420 for ; Thu, 17 Nov 2005 17:43:22 +0000 (GMT) (envelope-from schweikh@schweikhardt.net) Received: from bremen.shuttle.de (bremen.shuttle.de [194.95.249.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id E757443D49 for ; Thu, 17 Nov 2005 17:43:21 +0000 (GMT) (envelope-from schweikh@schweikhardt.net) Received: by bremen.shuttle.de (Postfix, from userid 10) id 31F743BA24; Thu, 17 Nov 2005 18:43:17 +0100 (CET) Received: from hal9000.schweikhardt.net (localhost [127.0.0.1]) by hal9000.schweikhardt.net (8.13.4/8.13.4) with ESMTP id jAGHwr4P003559; Wed, 16 Nov 2005 18:58:53 +0100 (CET) (envelope-from schweikh@hal9000.schweikhardt.net) Received: (from schweikh@localhost) by hal9000.schweikhardt.net (8.13.4/8.13.4/Submit) id jAGHwrE2003558; Wed, 16 Nov 2005 18:58:53 +0100 (CET) (envelope-from schweikh) Date: Wed, 16 Nov 2005 18:58:53 +0100 From: Jens Schweikhardt To: Nicolas Blais Message-ID: <20051116175853.GA899@schweikhardt.net> References: <200511141702.45491.nb_root@videotron.ca> <437A780C.8070609@portaone.com> <3DE7B806-FB6B-4388-8FC7-E495F82E9D9B@ahze.net> <200511151942.04277.nb_root@videotron.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200511151942.04277.nb_root@videotron.ca> User-Agent: Mutt/1.5.11 Cc: Steve Hodgson , Maxim.Sobolev@portaone.com, michael johnson , freebsd-current@freebsd.org Subject: Re: Using ccache for build{world, kernel} 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, 17 Nov 2005 17:43:22 -0000 On Tue, Nov 15, 2005 at 07:41:58PM -0500, Nicolas Blais wrote: ... # Whatever the final outcome, the current port of ccache breaks a lot of big # compiles (3 ports failed during 'portupgrade -ai', such as GTK2.8.7 and # buildworld) while NOCCACHE makes the build a success. # # Maybe flag the port 'broken' until it is safe to use? The ccache port is not broken. Rather, the assumption that any port can deal with CC="foo bar" is wrong. Some ports choke because they've never seen a CC like that (libtool15 comes to mind), some may choke because their build can't deal with a space in a program name (shell word splitting at the wrong time or not at all is a likely culprit). Some insist on their own special-tailored compiler (openoffice). The build hackery out there in 13000 ports is unbelievably, uh, creative. To avoid all of these issues you have to replace all of /usr/bin/{cc,c++,gcc,g++,...} and /usr/local/bin/gcc-ooo and that ilk with a symlink to /usr/local/bin/ccache and put the real compilers in some other directory. In other words, the ccache installation is as transparent as can be. The various builds don't even know that they are using ccache when they run /usr/bin/cc and you don't need any CC, CXX or PATH sequence hackery. Usually this means to set CCACHE_PATH which collides with the needs of a "make buildworld". So, you really need two different strategies, one when building world/kernel, and one for all other purposes. That's what I do right now and so far I have no problems with ports and ccache. Regards, Jens -- Jens Schweikhardt http://www.schweikhardt.net/ SIGSIG -- signature too long (core dumped)