[PATCH] build: avoid evaluating cc-ifversion for ever objtool invocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Johannes Berg <johannes.berg@xxxxxxxxx>

To speed up the build a little bit, avoid evaluating cc-ifversion for
every objtool invocation. The variable needs to be evaluated every
time it's used because of the $(if $(part-of-module)...) in it, but
we don't need to call out to the compiler to get its version every
time.

Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
---
 scripts/Makefile.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index e7889f486ca1..4f4557bc96f0 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -257,7 +257,8 @@ endif
 ifdef CONFIG_GCOV_KERNEL
 objtool_args += --no-unreachable
 else
-objtool_args += $(call cc-ifversion, -lt, 0405, --no-unreachable)
+_no_unreachable_lt_0405 := $(call cc-ifversion, -lt, 0405, --no-unreachable)
+objtool_args += $(_no_unreachable_lt_0405)
 endif
 ifdef CONFIG_RETPOLINE
 ifneq ($(RETPOLINE_CFLAGS),)
-- 
2.14.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux