host-ccache: turn into a proper dependency
authorThomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>
Fri, 2 Aug 2013 07:33:54 +0000 (09:33 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 10 Aug 2013 19:19:34 +0000 (21:19 +0200)
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 <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Makefile
package/ccache/ccache.mk
support/dependencies/dependencies.mk

index caa1e38f81a92fc39b4221ed9159703a0e82e228..65127b248250522a7cc1cb265c54a9dfa16fe94f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -222,10 +222,6 @@ GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess)
 #
 ################################################################################
 
-ifeq ($(BR2_CCACHE),y)
-BASE_TARGETS += host-ccache
-endif
-
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
 BASE_TARGETS += toolchain-buildroot
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
index c5cb966458420442fe6414a0e24b8a92e1edf4bc..bead908c3cf909c3ac138dfb90413b9f3477cc64 100644 (file)
@@ -10,12 +10,6 @@ CCACHE_SOURCE  = ccache-$(CCACHE_VERSION).tar.bz2
 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
index 934da40bba817b44375a978e38f82b413b5f0c21..4a220e0e02e0d8b883ba4bb1bc82a7396fc9ae08 100644 (file)
@@ -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))" \