From patchwork Thu May 1 02:05:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danomi Manchego X-Patchwork-Id: 344390 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 35AE7140117 for ; Thu, 1 May 2014 12:05:23 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CD71D935CF; Thu, 1 May 2014 02:05:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iuubbh-JB+hd; Thu, 1 May 2014 02:05:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id DBAFE935B6; Thu, 1 May 2014 02:05:17 +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 C6AC41C2449 for ; Thu, 1 May 2014 02:05:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C1E698C1EE for ; Thu, 1 May 2014 02:05:16 +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 gyMJeiQZjP3w for ; Thu, 1 May 2014 02:05:15 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from qmta03.westchester.pa.mail.comcast.net (qmta03.westchester.pa.mail.comcast.net [76.96.62.32]) by whitealder.osuosl.org (Postfix) with ESMTP id 97B498C1CD for ; Thu, 1 May 2014 02:05:15 +0000 (UTC) Received: from omta23.westchester.pa.mail.comcast.net ([76.96.62.74]) by qmta03.westchester.pa.mail.comcast.net with comcast id wRxt1n0031c6gX853S5F6L; Thu, 01 May 2014 02:05:15 +0000 Received: from localhost.localdomain ([68.37.48.40]) by omta23.westchester.pa.mail.comcast.net with comcast id wS581n00E0s1VyU3jS5Ehp; Thu, 01 May 2014 02:05:15 +0000 From: Danomi Manchego To: buildroot@busybox.net Date: Wed, 30 Apr 2014 22:05:06 -0400 Message-Id: <1398909907-1847-1-git-send-email-danomimanchego123@gmail.com> X-Mailer: git-send-email 1.7.9.5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1398909915; bh=DrMKEp0zpVhQ1xifE/4b0HM2cP4KSppiEhLkZBsFiMg=; h=Received:Received:From:To:Subject:Date:Message-Id; b=Zwoez5XwqAhnGjk3DcdDKzR2OthrIyAyQN8WIcmfPXtrahbLuElHb6SplEds2AmQl tLyeM3lozOgCOBF3yio1zB9NRoLPD1YIt+xfYxub9mP8Qg6HI8dS8FHuBWMrTYxF+Y I5hdhd+1SrcbiiYOWnEotVvLOANc0uetB6QHLTMRdmi0Cj0bALSJSJXlbi0r5lNyq4 XR+rD+q1owG46ZUsZW5/Ar5M/qxBOxjTFRqHfAqKQZRGER6eNnybjBCDhbU1B+YQrf P1DNSHNriuoxjeratG9T8jWm09T7QbFAKDbKIicXRn+5hRLzuXHeZJPMEWHvGffp3/ dO9X1mqyQu1/g== Subject: [Buildroot] [PATCH v3 1/2] ccache: change default cache directory path to match config setting 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 Commit 433290761fceb476b095548eec10adf72405e050 changed the hard-coded ccache directory location to use BR_CACHE_DIR (then BUILDROOT_CACHE_DIR), which is exported by Makefile based on the BR2_CCACHE_DIR config option. This allowed the cache location to be changed on-the-fly by setting a "make" command line variable, but left the default location of ccache's normal default at "$HOME/.ccache". Since this location does not match the default for BR2_CCACHE_DIR, it is basically almost never correct, so direct invocation of ccache outside of the buildroot Makefile, such as for increasing the cache size, becomes cumbersome. This patch changes the last-ditch cache location from "$HOME/.ccache" to the BR_CCACHE_DIR value defined when host-ccache is configured. Note that the ability to later override the cache location by using a BR_CACHE_DIR command line variable is left intact. Signed-off-by: Danomi Manchego Reviewed-by: Thomas De Schampheleire --- Changes v2 -> v3: * n/a Changes v1 -> v2: * Refresh against latest, rather than building on top of unrelated WIP patch. * Update patch commit log wording. --- package/ccache/ccache.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/ccache/ccache.mk b/package/ccache/ccache.mk index 650290d..df92c5e 100644 --- a/package/ccache/ccache.mk +++ b/package/ccache/ccache.mk @@ -30,9 +30,12 @@ HOST_CCACHE_CONF_OPT += ccache_cv_zlib_1_2_3=no # the compiler, because in the context of Buildroot, that completely # defeats the purpose of ccache. Of course, that leaves the user # responsible for purging its cache when the compiler changes. +# - Change hard-coded last-ditch default to match path in .config, to avoid +# the need to specify BR_CACHE_DIR when invoking ccache directly. define HOST_CCACHE_PATCH_CONFIGURATION sed -i 's,getenv("CCACHE_DIR"),getenv("BR_CACHE_DIR"),' $(@D)/ccache.c sed -i 's,getenv("CCACHE_COMPILERCHECK"),"none",' $(@D)/ccache.c + sed -i 's,"%s/.ccache","$(BR_CACHE_DIR)",' $(@D)/ccache.c endef HOST_CCACHE_POST_CONFIGURE_HOOKS += \