[wight554: stripped from kdrag0n/proton_bluecross@
aba5259]
Signed-off-by: Volodymyr Zhdanov <wight554@gmail.com>
# Important: no spaces around options
ar-option = $(call try-run, $(AR) rc$(1) "$$TMP",$(1),$(2))
+# ld-name
+# Expands to either bfd or lld
+ld-name = $(shell $(LD) -v 2>&1 | grep -q "LLD" && echo lld || echo bfd)
+
# ld-version
# Note this is mainly for HJ Lu's 3 number binutil versions
ld-version = $(shell $(LD) --version | $(srctree)/scripts/ld-version.sh)