aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHarry Liebel <Harry.Liebel@arm.com>2013-12-20 18:51:12 +0000
committerDan Handley <dan.handley@arm.com>2014-01-17 10:27:52 +0000
commit0af6d64df3dc2633058ad481fb5c64c09945cf60 (patch)
treeb1b3b8feee079cf8cc2d63ed9adf06318ab3031e /Makefile
parentbdb774df31a2a25604aa1331690c9b63353809f5 (diff)
downloadarm-trusted-firmware-0af6d64df3dc2633058ad481fb5c64c09945cf60.tar.gz
Do not let GCC use built-in functions
In order to reduce the software dependency on the compiler, the project is now compiled with the '-ffreestanding' flag. This is to prevent GCC from replacing functions with more optimised versions. An example is where GCC replaces a simple printf() with a puts(). Change-Id: I1973fe6957cd708e8432a0039af9d50e037bd884
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 544af73..d3951ea 100644
--- a/Makefile
+++ b/Makefile
@@ -96,8 +96,9 @@ INCLUDES += -Ilib/include/ -Iinclude/aarch64/ -Iinclude/ \
-Iarch/system/gic -Icommon/psci \
-Iinclude/stdlib -Iinclude/stdlib/sys
-ASFLAGS += -nostdinc -Wa,--fatal-warnings -D__ASSEMBLY__ ${INCLUDES}
-CFLAGS := -nostdinc -Wall -Werror -std=c99 -c -Os \
+ASFLAGS += -nostdinc -ffreestanding -Wa,--fatal-warnings \
+ -D__ASSEMBLY__ ${INCLUDES}
+CFLAGS := -nostdinc -ffreestanding -Wall -Werror -std=c99 -c -Os \
-DDEBUG=${DEBUG} ${INCLUDES} ${CFLAGS}
LDFLAGS += --fatal-warnings -O1