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:
Daniel Verkamp 2015-10-12 16:31:01 -07:00
parent 92a7dba668
commit ed3b72fba9

View File

@ -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