build: enable _FORTIFY_SOURCE=2 for release builds
Change-Id: I61a0700c2ee6e22cdde6e6cc8c491a1e52043136 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
92a7dba668
commit
ed3b72fba9
@ -58,6 +58,8 @@ ifeq ($(CONFIG_DEBUG), y)
|
||||
COMMON_CFLAGS += -DDEBUG -O0
|
||||
else
|
||||
COMMON_CFLAGS += -DNDEBUG -O2
|
||||
# Enable _FORTIFY_SOURCE checks - these only work when optimizations are enabled.
|
||||
COMMON_CFLAGS += -D_FORTIFY_SOURCE=2
|
||||
endif
|
||||
|
||||
CFLAGS += $(COMMON_CFLAGS) -Wno-pointer-sign -std=gnu11
|
||||
|
Loading…
Reference in New Issue
Block a user