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
diff --git a/Makefile b/Makefile
index 544af73..d3951ea 100644
--- a/Makefile
+++ b/Makefile
@@ -96,8 +96,9 @@
-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