summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--u-boot/config.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/u-boot/config.mk b/u-boot/config.mk
index bf1cdc4..264b91d 100644
--- a/u-boot/config.mk
+++ b/u-boot/config.mk
@@ -99,11 +99,13 @@ HOSTCFLAGS += -pedantic
cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
> /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
+exists_bfd_ld = $(shell if $(CROSS_COMPILE)ld.bfd -v > /dev/null 2>&1; \
+ then echo "$(1)"; else echo "$(2)"; fi; )
#
# Include the make variables (CC, etc...)
#
AS = $(CROSS_COMPILE)as
-LD = $(CROSS_COMPILE)ld
+LD = $(call exists_bfd_ld, "$(CROSS_COMPILE)ld.bfd", "$(CROSS_COMPILE)ld")
CC = $(CROSS_COMPILE)gcc
CPP = $(CC) -E
AR = $(CROSS_COMPILE)ar