summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-01-15 13:08:12 -0500
committerMike Frysinger <vapier@gentoo.org>2012-01-16 15:55:10 -0500
commit94bf930db1cd171ff5eb6e83bf8f593d0cde123a (patch)
treeb0b393414afb8696474c9e0b7fa16d0f1194f97a
parent1d8d1f6b915c82d1f35d4618211b60d9f91761f1 (diff)
buildsys: skip compiler flag checking for clean targets
As suggested by Bernhard, there is no point in evaluating the compiler's flag availability when cleaning, so skip things in that case. If there are variables that change targets based on the flags, then things are already broken and need fixing independently. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--Rules.mak2
1 files changed, 2 insertions, 0 deletions
diff --git a/Rules.mak b/Rules.mak
index 2909d1bdc..032193e6b 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -176,11 +176,13 @@ check_ld=$(shell \
# Use variable indirection here so that we can have variable
# names with fun chars in them like equal signs
define check-tool-var
+ifeq ($(filter clean CLEAN_%,$(MAKECMDGOALS)),)
_v = $(2)_$(3)
ifndef $$(_v)
$$(_v) := $$(call $(1),$(subst %, ,$(3)))
export $$(_v)
endif
+endif
endef
# Usage: check-gcc-var,<flag>