mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-19 02:54:24 +00:00
Add -fno-builtin to CFLAGS
Disable the automatic substitution of functions with builtins. The existing -ffreestanding option should already do this but explicitly adding -fno-builtin reduces the risk of compiler variation. With this option, GCC is not supposed to be able to make assumptions on what the function does, which could otherwise lead to security-sensitive code removal. This can lead to potentially less efficient code but improves predictability of what code is actually compiled into the binary. Change-Id: I06ad151c61318bd1b00d84976f051d2d94314acc Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
This commit is contained in:
parent
d7aa7b44d6
commit
e507f8e7fe
1 changed files with 1 additions and 1 deletions
2
Makefile
2
Makefile
|
@ -149,7 +149,7 @@ ASFLAGS += $(CPPFLAGS) $(ASFLAGS_$(ARCH)) \
|
||||||
-D__ASSEMBLY__ -ffreestanding \
|
-D__ASSEMBLY__ -ffreestanding \
|
||||||
-Wa,--fatal-warnings
|
-Wa,--fatal-warnings
|
||||||
TF_CFLAGS += $(CPPFLAGS) $(TF_CFLAGS_$(ARCH)) \
|
TF_CFLAGS += $(CPPFLAGS) $(TF_CFLAGS_$(ARCH)) \
|
||||||
-ffreestanding -Wall -std=c99 -Os \
|
-ffreestanding -fno-builtin -Wall -std=c99 -Os \
|
||||||
-ffunction-sections -fdata-sections
|
-ffunction-sections -fdata-sections
|
||||||
|
|
||||||
LDFLAGS += --fatal-warnings -O1
|
LDFLAGS += --fatal-warnings -O1
|
||||||
|
|
Loading…
Add table
Reference in a new issue