aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig30
1 files changed, 18 insertions, 12 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 0bf5b340b80e..719871f8727c 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -26,30 +26,36 @@ 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
- int
- default $(shell,$(LD) --version | $(srctree)/scripts/ld-version.sh)
-
config CC_IS_CLANG
- def_bool $(success,echo "$(CC_VERSION_TEXT)" | grep -q clang)
-
-config LD_IS_LLD
- def_bool $(success,$(LD) -v | head -n 1 | grep -q LLD)
+ def_bool $(success,test "$(cc-name)" = Clang)
config CLANG_VERSION
int
- default $(shell,$(srctree)/scripts/clang-version.sh $(CC))
+ default $(cc-version) if CC_IS_CLANG
+ default 0
+
+config LD_IS_BFD
+ def_bool $(success,test "$(ld-name)" = BFD)
+
+config LD_VERSION
+ int
+ default $(ld-version) if LD_IS_BFD
+ default 0
+
+config LD_IS_LLD
+ def_bool $(success,test "$(ld-name)" = LLD)
config LLD_VERSION
int
- default $(shell,$(srctree)/scripts/lld-version.sh $(LD))
+ default $(ld-version) if LD_IS_LLD
+ default 0
config CC_CAN_LINK
bool