[PATCH] kbuild: Set CLANG_VERSION only when Clang is used

From: Sedat Dilek
Date: Sun Apr 19 2020 - 08:36:33 EST


Do like GCC_VERSION is set when GCC (see CC_IS_GCC) is used.

Signed-off-by: Sedat Dilek <sedat.dilek@xxxxxxxxx>
---
init/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/Kconfig b/init/Kconfig
index 9e22ee8fbd75..c23f9d3d6d6c 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -25,7 +25,7 @@ config CC_IS_CLANG

config CLANG_VERSION
int
- default $(shell,$(srctree)/scripts/clang-version.sh $(CC))
+ default $(shell,$(srctree)/scripts/clang-version.sh $(CC)) if CC_IS_CLANG

config CC_CAN_LINK
def_bool $(success,$(srctree)/scripts/cc-can-link.sh $(CC))
--
2.26.1