From owner-freebsd-ports@FreeBSD.ORG Sat Aug 4 01:06:08 2012 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0F097106564A for ; Sat, 4 Aug 2012 01:06:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E3A9A8FC12 for ; Sat, 4 Aug 2012 01:06:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q74167Rd097696 for ; Sat, 4 Aug 2012 01:06:07 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q74167ZE097695 for ports@FreeBSD.org; Sat, 4 Aug 2012 01:06:07 GMT (envelope-from bdrewery) Received: (qmail 53795 invoked from network); 3 Aug 2012 20:06:05 -0500 Received: from unknown (HELO ?10.10.0.115?) (freebsd@shatow.net@10.10.0.115) by sweb.xzibition.com with ESMTPA; 3 Aug 2012 20:06:05 -0500 Message-ID: <501C7572.3020707@FreeBSD.org> Date: Fri, 03 Aug 2012 20:05:54 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: ports@FreeBSD.org X-Enigmail-Version: 1.4.3 OpenPGP: id=3C9B0CF9; url=http://www.shatow.net/bryan/bryan.asc Content-Type: multipart/mixed; boundary="------------010907060809010505080901" Cc: Subject: [CFT] [bsd.port.mk] ports ccache build support 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, 04 Aug 2012 01:06:08 -0000 This is a multi-part message in MIME format. --------------010907060809010505080901 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, ports/169579 is currently tracking this. This patch adds ccache support to ports (off by default). Other patches have changed $CC to use ccache, which results in having a space in $CC. This breaks many ports such as boost and libtool ports. This patch however utilizes the symlinks in /usr/local/libexec/ccache/{cc,gcc,etc...} by prefixing that directory into $PATH in the $MAKE_ENV. Using this method, I have seen 0 failures, compared to the $CC method which results in many build failures and requiring to define which ports do not support ccache. To enable: Define WITH_CCACHE_BUILD=yes in /etc/make.conf The cache directory CCACHE_DIR defaults to /usr/obj/ccache Defining NO_CCACHE can disable ccache support in make.conf or in a port. This is mostly to allow compatibility with current setups utilizing NO_CCACHE. If $CC already contains ccache, the support is disabled in case of custom setup. Users can override other ccache env variables [1] by using MAKE_ENV+= in their make.conf. Such as: MAKE_ENV+= CCACHE_LOGFILE=/var/log/ccache.log To use ccache(1) from the command line to configure the size or view stats: CCACHE_DIR=/usr/obj/ccache ccache -s FWIW, this is also possible to achieve with bsd.local.mk [2], but it would be much nicer to support without needing to customize your checkout. [1] https://ccache.samba.org/manual.html#_environment_variables [2] http://fossil.etoilebsd.net/poudriere/doc/trunk/doc/ccache.wiki -- Regards, Bryan Drewery bdrewery@freenode/EFNet --------------010907060809010505080901 Content-Type: text/plain; charset=windows-1252; name="patch-bsd.port.mk-ccache.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="patch-bsd.port.mk-ccache.txt" LS0tIGJzZC5wb3J0Lm1rLm9yaWcJMjAxMi0wOC0wNCAwMjo1NzoxOS4wMDAwMDAwMDAgKzAy MDAKKysrIGJzZC5wb3J0Lm1rCTIwMTItMDgtMDQgMDI6NTg6NDMuMDAwMDAwMDAwICswMjAw CkBAIC05MzQsNiArOTM0LDEzIEBACiAjCQkJCSAgdGhhdCBhcmUgZXhwbGljaXRseSBtYXJr ZWQgTUFLRV9KT0JTX1VOU0FGRS4gIFVzZXIgc2V0dGFibGU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