aboutsummaryrefslogtreecommitdiffstats
path: root/rules.mk
diff options
context:
space:
mode:
authorSteven Barth <cyrus@openwrt.org>2015-06-29 06:47:49 +0000
committerSteven Barth <cyrus@openwrt.org>2015-06-29 06:47:49 +0000
commit55fe8b2988612cd587fa8e942b221890a8f40325 (patch)
treeddfd348ff3570e792aeccd94ee95f5f811f9372c /rules.mk
parent9caaed9141b25f841c15a440f0c9d2faf68d0dad (diff)
downloadupstream-55fe8b2988612cd587fa8e942b221890a8f40325.tar.gz
upstream-55fe8b2988612cd587fa8e942b221890a8f40325.tar.bz2
upstream-55fe8b2988612cd587fa8e942b221890a8f40325.zip
toolchain: only use fortify-headers for musl
Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 46138
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/rules.mk b/rules.mk
index a0a9a5d202..58b9f3eb0b 100644
--- a/rules.mk
+++ b/rules.mk
@@ -144,7 +144,11 @@ 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/fortify -I$(TOOLCHAIN_DIR)/include
+ TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/usr/include
+ ifeq ($(CONFIG_USE_MUSL),y)
+ TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/include/fortify
+ endif
+ TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/include
TARGET_LDFLAGS+= -L$(TOOLCHAIN_DIR)/usr/lib -L$(TOOLCHAIN_DIR)/lib
TARGET_PATH:=$(TOOLCHAIN_DIR)/bin:$(TARGET_PATH)
else