From patchwork Thu Oct 31 02:54:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danomi Manchego X-Patchwork-Id: 287384 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 962422C03BC for ; Thu, 31 Oct 2013 13:54:43 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C24A18C356; Thu, 31 Oct 2013 02:54:42 +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 JRVcJUzCqVSZ; Thu, 31 Oct 2013 02:54:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 1DA988C1E1; Thu, 31 Oct 2013 02:54:36 +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 6FC7B1BF9CC 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 6F4788C1BA 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 STtQKf4UyDdB for ; Thu, 31 Oct 2013 02:54:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from qmta14.westchester.pa.mail.comcast.net (qmta14.westchester.pa.mail.comcast.net [76.96.59.212]) by whitealder.osuosl.org (Postfix) with ESMTP id 9FD438C185 for ; Thu, 31 Oct 2013 02:54:32 +0000 (UTC) Received: from omta08.westchester.pa.mail.comcast.net ([76.96.62.12]) by qmta14.westchester.pa.mail.comcast.net with comcast id jeRK1m0040Fqzac5EeuYB1; 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 jeuT1m0090s1VyU3UeuXjG; Thu, 31 Oct 2013 02:54:31 +0000 From: Danomi Manchego To: buildroot@busybox.net Date: Wed, 30 Oct 2013 22:54:23 -0400 Message-Id: <1383188064-2380-3-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=Cy1ABvX+1ur/eUEZeeIHA50b0It7M2bdTAmVyRdnKpY=; h=Received:Received:From:To:Subject:Date:Message-Id; b=E6lOLdCCIDBpihlNbog1HeSJjO+J0SKhrNqX2BeI6Km1ceHO2zMu9QrSP8BkDVB5M gSZFVgapLfC4DUBLE1Lj22qKggFV+jvrupT/BwRhrpHKgWwegQEZoV6ZMZ8aBTnzro mMn05cfP/M6FQNpD1rJN69Z0B3HmoM5DwpRHK5GnWXqVvpUrkB+mWZWmdO7/M/g0wK xXyrm6BgpWai1C3cEpgBjDhPu/04/EgNPWbCaA7zeW7HUv+HOAb0MDA14uPLwAIqZ+ HlBx6vKlL5s8+lDqHWwxvHC+T7LgpH181Uqak/sEwOPNC1bcn4Jb2ScLifGJbYgul4 r/CP/N7yKx0dg== Subject: [Buildroot] [PATCH 2/3] 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 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 an environment 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 becomes cumbersome. This patch changes the last-ditch cache location from "$HOME/.ccache" to the BR2_CCACHE_DIR value at the time of host-ccache compilation. Note that the ability to override the location by BUILDROOT_CACHE_DIR is left intact. Signed-off-by: Danomi Manchego --- package/ccache/ccache.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/ccache/ccache.mk b/package/ccache/ccache.mk index 9ad5129..1ebe974 100644 --- a/package/ccache/ccache.mk +++ b/package/ccache/ccache.mk @@ -50,12 +50,16 @@ HOST_CCACHE_CONF_OPT += ccache_cv_zlib_1_2_3=no # # + Filter out blanks, comments, and dont-care stuff, then sort, to try to make # immune to minor kconfig organizational changes. +# +# - Change hard-coded last-ditch default to match path in .config, to avoid the +# need to specify BUILDROOT_CACHE_DIR when invoking ccache directly. define HOST_CCACHE_PATCH_CONFIGURATION sed -i 's,getenv("CCACHE_DIR"),getenv("BUILDROOT_CACHE_DIR"),' $(@D)/ccache.c sed -n '1,/^# Commands/p; /^\# Toolchain/,/^\# System config/p' $(BUILDROOT_CONFIG) | \ grep -v -e '^$$' -e '^\#' -e GDB -e ECLIPSE | \ sort > $(STAMP_DIR)/ccache-toolchain-config sed -i "s,getenv(\"CCACHE_COMPILERCHECK\"),\"%compiler% -v; echo \'$$(md5sum < $(STAMP_DIR)/ccache-toolchain-config)\'\"," $(@D)/ccache.c + sed -i 's,"%s/.ccache","$(BUILDROOT_CACHE_DIR)",' $(@D)/ccache.c endef HOST_CCACHE_POST_CONFIGURE_HOOKS += \