author: Masahiro Yamada <masahiroy@kernel.org> 2021-01-16 08:35:42 +0900
committer: Masahiro Yamada <masahiroy@kernel.org> 2021-02-16 12:01:32 +0900
commit: aec6c60a01d3a3170242d6a99372a388e1136dc6
parent: 052c805a1851a4415f9e2adfa9654a0b793e0c45
Commit Summary:
Diffstat:
1 file changed, 5 insertions, 4 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 29ad68325028..7bcfa24524c2 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -26,11 +26,11 @@ config CC_VERSION_TEXT
and then every file will be rebuilt.
config CC_IS_GCC
- def_bool $(success,echo "$(CC_VERSION_TEXT)" | grep -q gcc)
+ def_bool $(success,test "$(cc-name)" = GCC)
config GCC_VERSION
int
- default $(shell,$(srctree)/scripts/gcc-version.sh $(CC)) if CC_IS_GCC
+ default $(cc-version) if CC_IS_GCC
default 0
config LD_VERSION
@@ -38,14 +38,15 @@ config LD_VERSION
default $(shell,$(LD) --version | $(srctree)/scripts/ld-version.sh)
config CC_IS_CLANG
- def_bool $(success,echo "$(CC_VERSION_TEXT)" | grep -q clang)
+ def_bool $(success,test "$(cc-name)" = Clang)
config LD_IS_LLD
def_bool $(success,$(LD) -v | head -n 1 | grep -q LLD)
config CLANG_VERSION
int
- default $(shell,$(srctree)/scripts/clang-version.sh $(CC))
+ default $(cc-version) if CC_IS_CLANG
+ default 0
config LLD_VERSION
int