toolchain: add fortify-headers, enable FORTIFY_SOURCE by default

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46117
This commit is contained in:
Steven Barth
2015-06-23 14:38:03 +00:00
parent 2086f7284c
commit 2738526a16
5 changed files with 57 additions and 2 deletions

View File

@@ -144,7 +144,7 @@ ifndef DUMP
export GCC_HONOUR_COPTS:=0
TARGET_CROSS:=$(if $(TARGET_CROSS),$(TARGET_CROSS),$(OPTIMIZE_FOR_CPU)-openwrt-linux$(if $(TARGET_SUFFIX),-$(TARGET_SUFFIX))-)
TARGET_CFLAGS+= -fhonour-copts $(if $(CONFIG_GCC_VERSION_4_4)$(CONFIG_GCC_VERSION_4_5),,-Wno-error=unused-but-set-variable)
TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/usr/include -I$(TOOLCHAIN_DIR)/include
TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/usr/include -I$(TOOLCHAIN_DIR)/include/fortify -I$(TOOLCHAIN_DIR)/include
TARGET_LDFLAGS+= -L$(TOOLCHAIN_DIR)/usr/lib -L$(TOOLCHAIN_DIR)/lib
TARGET_PATH:=$(TOOLCHAIN_DIR)/bin:$(TARGET_PATH)
else