Fine-tune compiler flags
Per default, GCC enables -fdelete-null-pointer-checks, which is harmful and hence we should disable it: "Assume that programs cannot safely dereference null pointers, and that no code or data element resides there." We want to be careful with our stack usage, hence enable -fconserve-stack: "Attempt to minimize stack usage. The compiler will attempt to use less stack space, even if that makes the program slower." Change-Id: I74eac2b07c986553f79898a2f2e57bbead4223f8 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: https://review.coreboot.org/20883 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
parent
b58366a4c0
commit
7c8d331fbb
|
@ -363,6 +363,7 @@ CFLAGS_common += -Wwrite-strings -Wredundant-decls -Wno-trigraphs
|
||||||
CFLAGS_common += -Wstrict-aliasing -Wshadow -Wdate-time
|
CFLAGS_common += -Wstrict-aliasing -Wshadow -Wdate-time
|
||||||
CFLAGS_common += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer
|
CFLAGS_common += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer
|
||||||
CFLAGS_common += -ffunction-sections -fdata-sections -fno-pie
|
CFLAGS_common += -ffunction-sections -fdata-sections -fno-pie
|
||||||
|
CFLAGS_common += -fno-delete-null-pointer-checks -fconserve-stack
|
||||||
|
|
||||||
ADAFLAGS_common += -gnatg -gnatp
|
ADAFLAGS_common += -gnatg -gnatp
|
||||||
ADAFLAGS_common += -Wuninitialized -Wall -Werror
|
ADAFLAGS_common += -Wuninitialized -Wall -Werror
|
||||||
|
|
Loading…
Reference in New Issue