summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-04-23 23:23:51 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2020-05-12 13:28:33 +0900
commite33ae3ed331a5cfa24b2abe483f7f4b27bb99c06 (patch)
tree5c2541eddc8d3f6c520b51fd63832fc995f1b84d /init
parent081b4b54ff6c58be2ffcf09d42e5df8f031eacd0 (diff)
downloadlinux-stable-e33ae3ed331a5cfa24b2abe483f7f4b27bb99c06.tar.gz
linux-stable-e33ae3ed331a5cfa24b2abe483f7f4b27bb99c06.tar.bz2
linux-stable-e33ae3ed331a5cfa24b2abe483f7f4b27bb99c06.zip
kbuild: use $(CC_VERSION_TEXT) to evaluate CC_IS_GCC and CC_IS_CLANG
The result of '$(CC) --version | head -n 1' has already been computed by the top Makefile, and stored in the environment variable, CC_VERSION_TEXT. 'echo' is cheaper than the two commands $(CC) and 'head' although this optimization is not noticeable level. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig4
1 files changed, 2 insertions, 2 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 9278a603d399..2bc63a361033 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -9,7 +9,7 @@ config DEFCONFIG_LIST
default "arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)"
config CC_IS_GCC
- def_bool $(success,$(CC) --version | head -n 1 | grep -q gcc)
+ def_bool $(success,echo "$(CC_VERSION_TEXT)" | grep -q gcc)
config GCC_VERSION
int
@@ -21,7 +21,7 @@ config LD_VERSION
default $(shell,$(LD) --version | $(srctree)/scripts/ld-version.sh)
config CC_IS_CLANG
- def_bool $(success,$(CC) --version | head -n 1 | grep -q clang)
+ def_bool $(success,echo "$(CC_VERSION_TEXT)" | grep -q clang)
config CLANG_VERSION
int