summaryrefslogtreecommitdiff
path: root/make_helpers/build_macros.mk
diff options
context:
space:
mode:
Diffstat (limited to 'make_helpers/build_macros.mk')
-rw-r--r--make_helpers/build_macros.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk
index 16bdd788..7bea01df 100644
--- a/make_helpers/build_macros.mk
+++ b/make_helpers/build_macros.mk
@@ -330,6 +330,7 @@ define MAKE_BL
$(eval DUMP := $(call IMG_DUMP,$(1)))
$(eval BIN := $(call IMG_BIN,$(1)))
$(eval BL_LINKERFILE := $(BL$(call uppercase,$(1))_LINKERFILE))
+ $(eval BL_LIBS := $(BL$(call uppercase,$(1))_LIBS))
# We use sort only to get a list of unique object directory names.
# ordering is not relevant but sort removes duplicates.
$(eval TEMP_OBJ_DIRS := $(sort $(BUILD_DIR)/ $(dir ${OBJS})))
@@ -351,7 +352,7 @@ bl${1}_dirs: | ${OBJ_DIRS}
$(eval $(call MAKE_OBJS,$(BUILD_DIR),$(SOURCES),$(1)))
$(eval $(call MAKE_LD,$(LINKERFILE),$(BL_LINKERFILE)))
-$(ELF): $(OBJS) $(LINKERFILE) | bl$(1)_dirs
+$(ELF): $(OBJS) $(LINKERFILE) | bl$(1)_dirs $(BL_LIBS)
@echo " LD $$@"
ifdef MAKE_BUILD_STRINGS
$(call MAKE_BUILD_STRINGS, $(BUILD_DIR)/build_message.o)
@@ -361,7 +362,7 @@ else
$$(CC) $$(TF_CFLAGS) $$(CFLAGS) -xc - -o $(BUILD_DIR)/build_message.o
endif
$$(Q)$$(LD) -o $$@ $$(LDFLAGS) -Map=$(MAPFILE) --script $(LINKERFILE) \
- $(BUILD_DIR)/build_message.o $(OBJS)
+ $(BUILD_DIR)/build_message.o $(OBJS) $(BL_LIBS)
$(DUMP): $(ELF)
@echo " OD $$@"