From patchwork Thu Oct 31 02:54:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danomi Manchego X-Patchwork-Id: 287385 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 8C0212C03BC for ; Thu, 31 Oct 2013 13:54:52 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 02A4B8C37C; Thu, 31 Oct 2013 02:54:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N6ZB7f2BQSS8; Thu, 31 Oct 2013 02:54:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 576DC8C292; Thu, 31 Oct 2013 02:54:40 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 942A01BF96C for ; Thu, 31 Oct 2013 02:54:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9331D84246 for ; Thu, 31 Oct 2013 02:54:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7YSrnGuREroQ for ; Thu, 31 Oct 2013 02:54:33 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from qmta12.westchester.pa.mail.comcast.net (qmta12.westchester.pa.mail.comcast.net [76.96.59.227]) by whitealder.osuosl.org (Postfix) with ESMTP id CA6FC8C1A6 for ; Thu, 31 Oct 2013 02:54:32 +0000 (UTC) Received: from omta08.westchester.pa.mail.comcast.net ([76.96.62.12]) by qmta12.westchester.pa.mail.comcast.net with comcast id jemm1m0050Fqzac5CeuYtM; Thu, 31 Oct 2013 02:54:32 +0000 Received: from localhost.localdomain ([68.37.48.40]) by omta08.westchester.pa.mail.comcast.net with comcast id jeuT1m0090s1VyU3UeuYjL; Thu, 31 Oct 2013 02:54:32 +0000 From: Danomi Manchego To: buildroot@busybox.net Date: Wed, 30 Oct 2013 22:54:24 -0400 Message-Id: <1383188064-2380-4-git-send-email-danomimanchego123@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1383188064-2380-1-git-send-email-danomimanchego123@gmail.com> References: <1383188064-2380-1-git-send-email-danomimanchego123@gmail.com> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1383188072; bh=SVeeZppNhy61Jfk0nk62XujF8MgP6NPCColiCZMlU7I=; h=Received:Received:From:To:Subject:Date:Message-Id; b=hJ97BWqOFkRJP8R2H+TaqPSG8s3/BGYJiOWljGUdlOOqLjdWsknttcZgeO9eLEl/W p+WceqaUAtHjnYaXkXJ5YOaKg0BSlyD0RQDHSg4z90gtTUa1gSHbLC6cKP5x/Dl9xm o04MTlHllz5bTYx4Ggxk6BjrJwKfagfIsqOVS9EI6WkLoiQxflSElbcguXDEdPvizp NYZke2hnEDtUakwvGhMp6LaVgKZ/YZc5Ys93CfmEYQGuvgapckTyKd21yVH+LE1Wdt +70UH1dK741KLDGfLS1+EW1jraClYIQowCvOveAlMPogaLwXXpPolSV7kRUd5iA/W/ jcRqWfZJp4/mg== Subject: [Buildroot] [PATCH 3/3] ccache: provide capability to do initial ccache setup X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net For example, if your project is known to require more space than the default max cache size, then you might want to automatically increase the cache size to a suitable amount using the -M option. Signed-off-by: Danomi Manchego --- Config.in | 15 ++++++++++++++- package/ccache/ccache.mk | 11 +++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Config.in b/Config.in index af720ec..c2971df 100644 --- a/Config.in +++ b/Config.in @@ -222,7 +222,7 @@ config BR2_CCACHE help This option will enable the use of ccache, a compiler cache. It will cache the result of previous builds to speed - up future builds. The cache is stored in + up future builds. By default, the cache is stored in $HOME/.buildroot-ccache. Note that Buildroot does not try to invalidate the cache @@ -239,6 +239,19 @@ config BR2_CCACHE_DIR help Where ccache should store cached files. +config BR2_CCACHE_INITIAL_SETUP + string "Compiler cache initial setup" + depends on BR2_CCACHE + help + Additional ccache setup options, such as max-files or max-size. + + For example, if your project is known to require more space + than the default max cache size, then you might want to + automatically increase the cache size to a suitable amount + using the -M option. + + Applied at time of ccache compilation. + config BR2_DEPRECATED bool "Show packages that are deprecated or obsolete" help diff --git a/package/ccache/ccache.mk b/package/ccache/ccache.mk index 1ebe974..cea0701 100644 --- a/package/ccache/ccache.mk +++ b/package/ccache/ccache.mk @@ -21,6 +21,17 @@ CCACHE_LICENSE_FILES = LICENSE.txt GPL-3.0.txt # has zero dependency besides the C library. HOST_CCACHE_CONF_OPT += ccache_cv_zlib_1_2_3=no +# Provide capability to do initial ccache setup (e.g. increase default size) +HOST_CCACHE_INITIAL_SETUP = $(call qstrip,$(BR2_CCACHE_INITIAL_SETUP)) +ifneq ($(HOST_CCACHE_INITIAL_SETUP),) + define HOST_CCACHE_DO_INITIAIL_SETUP + @$(call MESSAGE,"Do initial host ccache setup") + $(CCACHE) $(HOST_CCACHE_INITIAL_SETUP) + $(CCACHE) -s + endef + HOST_CCACHE_POST_INSTALL_HOOKS += HOST_CCACHE_DO_INITIAIL_SETUP +endif + # Patch host-ccache as follows: # - Use BUILDROOT_CACHE_DIR instead of CCACHE_DIR, because CCACHE_DIR # is already used by autotargets for the ccache package.