summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorVarun Wadekar <vwadekar@nvidia.com>2019-01-31 09:22:30 -0800
committerVarun Wadekar <vwadekar@nvidia.com>2019-02-05 08:27:32 -0800
commit77f1f7a11738cece09d3e399e30f6106dc0f909a (patch)
tree3bbec8c5979b71c3535cda7f70b469e327c85e6e /Makefile
parenta01b0f1619e90aa39e0b5232767269d083186d74 (diff)
Introduce build option to override libc
This patch introduces a build option 'OVERRIDE_LIBC' that platforms can set to override libc from the BL image. The default value is '0' to keep the library. Change-Id: I10a0b247f6a782eeea4a0359e30a8d79b1e9e4e1 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 0169f3f6..34f6890b 100644
--- a/Makefile
+++ b/Makefile
@@ -248,7 +248,6 @@ DTC_CPPFLAGS += -nostdinc -Iinclude -undef -x assembler-with-cpp
# Common sources and include directories
################################################################################
include lib/compiler-rt/compiler-rt.mk
-include lib/libc/libc.mk
BL_COMMON_SOURCES += common/bl_common.c \
common/tf_log.c \
@@ -393,6 +392,13 @@ endif
endif
################################################################################
+# Include libc if not overridden
+################################################################################
+ifeq (${OVERRIDE_LIBC},0)
+include lib/libc/libc.mk
+endif
+
+################################################################################
# Check incompatible options
################################################################################
@@ -595,6 +601,7 @@ $(eval $(call assert_boolean,HANDLE_EA_EL3_FIRST))
$(eval $(call assert_boolean,HW_ASSISTED_COHERENCY))
$(eval $(call assert_boolean,MULTI_CONSOLE_API))
$(eval $(call assert_boolean,NS_TIMER_SWITCH))
+$(eval $(call assert_boolean,OVERRIDE_LIBC))
$(eval $(call assert_boolean,PL011_GENERIC_UART))
$(eval $(call assert_boolean,PROGRAMMABLE_RESET_ADDRESS))
$(eval $(call assert_boolean,PSCI_EXTENDED_STATE_ID))