* [Buildroot] [PATCH 1/1] infra: allow running 'make clean menuconfig ; make *-menuconfig'
@ 2013-05-27 9:02 Samuel Martin
2013-05-27 9:23 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Samuel Martin @ 2013-05-27 9:02 UTC (permalink / raw)
To: buildroot
This patch adds host-ccache to the dependency list of any package if
BR2_CCACHE is enable.
Fixes bug #5678
Also, drop some explicit redundant host-ccache dependencies that
intend to fix this kind of issue.
Note that, only the uClibc dependency on host-ccache remains since
uClibc does not use any of the Buildroot package infrastructure yet.
Signed-off-by: "Samuel Martin" <s.martin49@gmail.com>
---
package/crosstool-ng/crosstool-ng.mk | 2 +-
package/pkg-generic.mk | 12 ++++++++++++
package/sstrip/sstrip.mk | 5 -----
3 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/package/crosstool-ng/crosstool-ng.mk b/package/crosstool-ng/crosstool-ng.mk
index b533396..0b96b50 100644
--- a/package/crosstool-ng/crosstool-ng.mk
+++ b/package/crosstool-ng/crosstool-ng.mk
@@ -5,7 +5,7 @@ CROSSTOOL_NG_INSTALL_TARGET = NO
CROSSTOOL_NG_MAKE = $(MAKE1)
HOST_CROSSTOOL_NG_DEPENDENCIES = \
- $(if $(BR2_CCACHE),host-ccache) host-gawk \
+ host-gawk \
host-automake host-gperf host-bison host-flex \
host-texinfo
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 56fca6b..1c8d182 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -306,6 +306,18 @@ $(2)_REDISTRIBUTE ?= YES
$(2)_DEPENDENCIES ?= $(filter-out $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
+# Inconditionnaly add host-ccache dependency when BR2_CCACHE is enabled.
+# This allows to run the following without failing on test the compiler
+# because the ccache binary is not yet built:
+#
+# $ make clean menuconfig
+# $ make [linux|ctng|uclibc|barebox|busybox]-menuconfig
+ifeq ($(BR2_CCACHE),y)
+ifneq ($(1),host-ccache)
+$(2)_DEPENDENCIES += host-ccache
+endif
+endif
+
$(2)_INSTALL_STAGING ?= NO
$(2)_INSTALL_IMAGES ?= NO
$(2)_INSTALL_TARGET ?= YES
diff --git a/package/sstrip/sstrip.mk b/package/sstrip/sstrip.mk
index e078b2c..3c29c52 100644
--- a/package/sstrip/sstrip.mk
+++ b/package/sstrip/sstrip.mk
@@ -8,11 +8,6 @@ SSTRIP_SITE = svn://dev.openwrt.org/openwrt/trunk/tools/sstrip
SSTRIP_VERSION = 20154
HOST_SSTRIP_BINARY = $(GNU_TARGET_NAME)-sstrip
-# This is a kludge to get host-ccache built before us or it fails
-ifeq ($(BR2_CCACHE),y)
-HOST_SSTRIP_DEPENDENCIES = host-ccache
-endif
-
define SSTRIP_BUILD_CMDS
cd $(@D) ; \
$(TARGET_CC) $(TARGET_CFLAGS) -include endian.h -include byteswap.h \
--
1.8.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH 1/1] infra: allow running 'make clean menuconfig ; make *-menuconfig'
2013-05-27 9:02 [Buildroot] [PATCH 1/1] infra: allow running 'make clean menuconfig ; make *-menuconfig' Samuel Martin
@ 2013-05-27 9:23 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2013-05-27 9:23 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Mon, 27 May 2013 11:02:32 +0200, Samuel Martin wrote:
> +# Inconditionnaly add host-ccache dependency when BR2_CCACHE is enabled.
> +# This allows to run the following without failing on test the compiler
> +# because the ccache binary is not yet built:
> +#
> +# $ make clean menuconfig
> +# $ make [linux|ctng|uclibc|barebox|busybox]-menuconfig
> +ifeq ($(BR2_CCACHE),y)
> +ifneq ($(1),host-ccache)
> +$(2)_DEPENDENCIES += host-ccache
> +endif
> +endif
I am not sure we want to make this specific to the ccache problem. The
linux-menuconfig target also needs to depend on "dirs" so that the base
directories need to be created.
Shouldn't we depend on something like $(BASE_TARGETS) instead, which
will then contain "host-ccache dirs", and everything that's needed?
Also, all packages depend on the toolchain (but beware, binutils is
also a package, and is part of the toolchain).
So just like everything in the core infrastructure: I don't want a
patch that just fixes the particular problem of this bug by adding more
crap. I want something that clarifies the dependency of packages on
"base" things, and makes it work properly.
Thanks,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-27 9:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-27 9:02 [Buildroot] [PATCH 1/1] infra: allow running 'make clean menuconfig ; make *-menuconfig' Samuel Martin
2013-05-27 9:23 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox