From patchwork Fri Aug 2 07:33:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 264210 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 53B672C0096 for ; Fri, 2 Aug 2013 17:35:32 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id F338F93A5D; Fri, 2 Aug 2013 07:35:46 +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 Yhrbrprgch3w; Fri, 2 Aug 2013 07:35:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 0203793A68; Fri, 2 Aug 2013 07:35:44 +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 A0BFA1C25F9 for ; Fri, 2 Aug 2013 07:35:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 55B018CD3D for ; Fri, 2 Aug 2013 07:35:26 +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 51AvMT-5URS6 for ; Fri, 2 Aug 2013 07:35:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ea0-f178.google.com (mail-ea0-f178.google.com [209.85.215.178]) by whitealder.osuosl.org (Postfix) with ESMTPS id 0DBB38CD36 for ; Fri, 2 Aug 2013 07:35:24 +0000 (UTC) Received: by mail-ea0-f178.google.com with SMTP id a15so146957eae.9 for ; Fri, 02 Aug 2013 00:35:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:content-type:mime-version:content-transfer-encoding:subject :x-mercurial-node:message-id:in-reply-to:references:user-agent:date :from:to:cc; bh=5jko624Il8tjVZHabrO6wuexdVrVPKp5E4jXsQqRN1Q=; b=ps737GV4A7iVLYK5cTGhx03zWhaeSyzsYdnmbqb9GWQzInyYGy24p0kixiBNxtotFN Zu2l1TwPeLii3AM8IHBLSfAmOLFHcIOGHioxczwZCgNyJeCAqTYHWorLXVw+Oapbjzvs Hn9zlKboPi7v1YvSTBZijI8vpotkDHCLoPYvXzTMeOz6NcV1wD8IO+DUM1+ooGaYxGyb ByoWzsbZ3teaO+GHp6h2KBv97nf9KnKX96HV/lTppdx6KwG+d5wMFL0PeAa7qWouUfXI l+0lOd08z8bQj84XZcEzUOSKsrtfx7IEMy53qfDYb0BRX0ppIGW0OxfC+BBK4lH6Cv9K ye9Q== X-Received: by 10.15.42.72 with SMTP id t48mr4582114eev.105.1375428923386; Fri, 02 Aug 2013 00:35:23 -0700 (PDT) Received: from [127.0.1.1] (d54C62EEB.access.telenet.be. [84.198.46.235]) by mx.google.com with ESMTPSA id cg12sm9935819eeb.7.2013.08.02.00.35.22 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 02 Aug 2013 00:35:22 -0700 (PDT) MIME-Version: 1.0 X-Mercurial-Node: f72fc9db6ce74195608e316484741d98a6436fb6 Message-Id: In-Reply-To: References: User-Agent: Mercurial-patchbomb/2.2.2 Date: Fri, 02 Aug 2013 09:33:54 +0200 From: Thomas De Schampheleire To: buildroot@busybox.net Cc: thomas.petazzoni@free-electrons.com Subject: [Buildroot] [PATCH 2 of 4] host-ccache: turn into a proper dependency 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: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net This patch moves the host-ccache build target from BASE_TARGETS in Makefile to an actual host prerequisite in support/dependencies. This causes host-ccache to be built as part of the dependencies, before any real package is built. Since the dependencies are built without ccache anyway, there is no need to set HOST_CCACHE_CONF_ENV anymore. Suggested-by: Thomas Petazzoni Signed-off-by: Thomas De Schampheleire Acked-by: Samuel Martin --- Makefile | 4 ---- package/ccache/ccache.mk | 6 ------ support/dependencies/dependencies.mk | 4 ++++ 3 files changed, 4 insertions(+), 10 deletions(-) Note: this in itself works, when the dependencies are built (regular 'make' for example, or explicit 'make dependencies'). However, if we want to supersede patch http://patchwork.ozlabs.org/patch/257372/, that wants the following to work: $ make clean menuconfig $ make {barebox,busybox,ctng,linux,uclibc}-menuconfig then I think something additional is necessary. In the above flow, the dependencies target is never used, so host-ccache doesn't get a chance to build. diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -222,10 +222,6 @@ GNU_HOST_NAME:=$(shell support/gnuconfig # ################################################################################ -ifeq ($(BR2_CCACHE),y) -BASE_TARGETS += host-ccache -endif - ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) BASE_TARGETS += toolchain-buildroot else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) diff --git a/package/ccache/ccache.mk b/package/ccache/ccache.mk --- a/package/ccache/ccache.mk +++ b/package/ccache/ccache.mk @@ -10,12 +10,6 @@ CCACHE_SOURCE = ccache-$(CCACHE_VERSION CCACHE_LICENSE = GPLv3+, others CCACHE_LICENSE_FILES = LICENSE.txt GPL-3.0.txt -# When ccache is being built for the host, ccache is not yet -# available, so we have to use the special C compiler without the -# cache. -HOST_CCACHE_CONF_ENV = \ - CC="$(HOSTCC_NOCCACHE)" - # Force ccache to use its internal zlib. The problem is that without # this, ccache would link against the zlib of the build system, but we # might build and install a different version of zlib in $(O)/host diff --git a/support/dependencies/dependencies.mk b/support/dependencies/dependencies.mk --- a/support/dependencies/dependencies.mk +++ b/support/dependencies/dependencies.mk @@ -20,6 +20,10 @@ ifeq ($(BR2_STRIP_sstrip),y) DEPENDENCIES_HOST_PREREQ+=host-sstrip endif +ifeq ($(BR2_CCACHE),y) +DEPENDENCIES_HOST_PREREQ += host-ccache +endif + core-dependencies: @HOSTCC="$(firstword $(HOSTCC))" MAKE="$(MAKE)" \ DL_TOOLS="$(sort $(DL_TOOLS_DEPENDENCIES))" \