summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index d8fdad14f..67defe4d1 100644
--- a/Makefile
+++ b/Makefile
@@ -169,8 +169,6 @@ endif
################################################################################
# Common sources and include directories
################################################################################
-include lib/compiler-rt/compiler-rt.mk
-
# Allow overriding the timestamp, for example for reproducible builds, or to
# synchronize timestamps across multiple projects.
# This must be set to a C string (including quotes where applicable).
@@ -191,8 +189,7 @@ BL_COMMON_SOURCES += common/bl_common.c \
plat/common/plat_bl_common.c \
plat/common/plat_log_common.c \
plat/common/${ARCH}/plat_common.c \
- plat/common/${ARCH}/platform_helpers.S \
- ${COMPILER_RT_SRCS}
+ plat/common/${ARCH}/platform_helpers.S
ifeq ($($(ARCH)-cc-id),arm-clang)
BL_COMMON_SOURCES += lib/${ARCH}/armclang_printf.S
@@ -1017,6 +1014,12 @@ endif #(SPD)
include ${MAKE_HELPERS_DIRECTORY}cflags.mk
################################################################################
+# Include compiler-rt. It is built with MAKE_LIB so it must be included after
+# some macros are defined, especially BUILD_PLAT
+################################################################################
+include lib/compiler-rt/compiler-rt.mk
+
+################################################################################
# Build targets
################################################################################