Commit c70c4b62 authored by Roger Pau Monné's avatar Roger Pau Monné Committed by Jan Beulich

kconfig: detect LD implementation

Detect GNU and LLVM ld implementations. This is required for further
patches that will introduce diverging behaviour depending on the
linker implementation in use.

Note that LLVM ld returns "compatible with GNU linkers" as part of the
version string, so be on the safe side and use '^' to only match at
the start of the line in case LLVM ever decides to change the text to
use "compatible with GNU ld" instead.
Signed-off-by: default avatarRoger Pau Monné <>
Reviewed-by: default avatarMichal Orzel <>
Acked-by: default avatarJulien Grall <>
parent 3c245bc3
......@@ -23,6 +23,12 @@ config CLANG_VERSION
default $(shell,$(srctree)/scripts/ $(CC))
config LD_IS_GNU
def_bool $(success,$(LD) --version | head -n 1 | grep -q "^GNU ld")
config LD_IS_LLVM
def_bool $(success,$(LD) --version | head -n 1 | grep -q "^LLD")
# -fvisibility=hidden reduces -fpic cost, if it's available
def_bool $(cc-option,-fvisibility=hidden)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment