Hook up LLVM compiler-rt in the build system

This patch enables compiler-rt for the AArch32 target.  The code is
not used for AArch64 as the architecture supports the 64-bit division
and modulo operations natively.

Change-Id: I1703a92872b0bb56ac0b98c67193830683963b13
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
diff --git a/Makefile b/Makefile
index b644b20..a263c4e 100644
--- a/Makefile
+++ b/Makefile
@@ -51,6 +51,7 @@
 					include/lib,			\
 					$(wildcard include/*)))
 LIB_DIRS_TO_CHECK	:=	$(sort $(filter-out			\
+					lib/compiler-rt			\
 					lib/libfdt%			\
 					lib/stdlib,			\
 					$(wildcard lib/*)))
@@ -144,6 +145,7 @@
 ################################################################################
 # Common sources and include directories
 ################################################################################
+include lib/compiler-rt/compiler-rt.mk
 include lib/stdlib/stdlib.mk
 
 BL_COMMON_SOURCES	+=	common/bl_common.c			\
@@ -153,6 +155,7 @@
 				lib/${ARCH}/misc_helpers.S		\
 				plat/common/${ARCH}/plat_common.c	\
 				plat/common/${ARCH}/platform_helpers.S	\
+				${COMPILER_RT_SRCS}			\
 				${STDLIB_SRCS}
 
 INCLUDES		+=	-Iinclude/bl1				\