build(bl2): deduplicate sources
Deduplicating sources prevents the build system from complaining about
multiply-compiled files, which can happen if multiple makefiles depend
on a component. This already occurs for BL31.
Signed-off-by: Chris Kay <chris.kay@arm.com>
Change-Id: Ic9e67932550f07cb9e4d199f68bc46c33a611748
diff --git a/Makefile b/Makefile
index a110964..814f98b 100644
--- a/Makefile
+++ b/Makefile
@@ -1195,6 +1195,8 @@
FIP_BL2_ARGS := tb-fw
endif
+BL2_SOURCES := $(sort ${BL2_SOURCES})
+
$(if ${BL2}, $(eval $(call TOOL_ADD_IMG,bl2,--${FIP_BL2_ARGS})),\
$(eval $(call MAKE_BL,bl2,${FIP_BL2_ARGS})))
endif