summaryrefslogtreecommitdiff
path: root/scripts/Kconfig.include
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2021-05-04 11:46:00 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2021-05-04 11:46:00 -0700
commitd0034a7a4ac7fae708146ac0059b9c47a1543f0d (patch)
treeac3ac88066f0f80632aa754e3ae008994f2426a2 /scripts/Kconfig.include
parent56cfe6f820a6315291eb5a1b82bb49633b993d3b (diff)
parentd12b64b9764ea17554fb230784ebf91287ed807e (diff)
Merge branch 'next' into for-linus
Prepare input updates for 5.13 merge window.
Diffstat (limited to 'scripts/Kconfig.include')
-rw-r--r--scripts/Kconfig.include13
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/Kconfig.include b/scripts/Kconfig.include
index a5fe72c504ff..58fdb5308725 100644
--- a/scripts/Kconfig.include
+++ b/scripts/Kconfig.include
@@ -39,8 +39,17 @@ as-instr = $(success,printf "%b\n" "$(1)" | $(CC) $(CLANG_FLAGS) -c -x assembler
$(error-if,$(failure,command -v $(CC)),compiler '$(CC)' not found)
$(error-if,$(failure,command -v $(LD)),linker '$(LD)' not found)
-# Fail if the linker is gold as it's not capable of linking the kernel proper
-$(error-if,$(success, $(LD) -v | grep -q gold), gold linker '$(LD)' not supported)
+# Get the compiler name, version, and error out if it is not supported.
+cc-info := $(shell,$(srctree)/scripts/cc-version.sh $(CC))
+$(error-if,$(success,test -z "$(cc-info)"),Sorry$(comma) this compiler is not supported.)
+cc-name := $(shell,set -- $(cc-info) && echo $1)
+cc-version := $(shell,set -- $(cc-info) && echo $2)
+
+# Get the linker name, version, and error out if it is not supported.
+ld-info := $(shell,$(srctree)/scripts/ld-version.sh $(LD))
+$(error-if,$(success,test -z "$(ld-info)"),Sorry$(comma) this linker is not supported.)
+ld-name := $(shell,set -- $(ld-info) && echo $1)
+ld-version := $(shell,set -- $(ld-info) && echo $2)
# machine bit flags
# $(m32-flag): -m32 if the compiler supports it, or an empty string otherwise.