summaryrefslogtreecommitdiffstats
path: root/toolchain/gcc
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2019-10-19 12:00:43 +0000
committerYousong Zhou <yszhou4tech@gmail.com>2019-10-24 11:40:00 +0000
commit69b9f0161e147d566b3b9572a0bc39a97c257fc0 (patch)
treef0ec81c8e62b3b5a58a3502db491f2fe87b56ec9 /toolchain/gcc
parented6ba2801c0a97e8b78f96ad71eb0493a0f1823f (diff)
downloadopenwrt-69b9f0161e147d566b3b9572a0bc39a97c257fc0.tar.gz
openwrt-69b9f0161e147d566b3b9572a0bc39a97c257fc0.tar.bz2
openwrt-69b9f0161e147d566b3b9572a0bc39a97c257fc0.zip
toolchain: gcc: enable sanitizers for glibc toolchain
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'toolchain/gcc')
-rw-r--r--toolchain/gcc/final/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/toolchain/gcc/final/Makefile b/toolchain/gcc/final/Makefile
index b815f677d6..0315b9d1f1 100644
--- a/toolchain/gcc/final/Makefile
+++ b/toolchain/gcc/final/Makefile
@@ -4,7 +4,6 @@ include ../common.mk
GCC_CONFIGURE += \
--with-headers=$(TOOLCHAIN_DIR)/include \
- --disable-libsanitizer \
--enable-languages=$(TARGET_LANGUAGES) \
--enable-shared \
--enable-threads \
@@ -12,6 +11,10 @@ GCC_CONFIGURE += \
--enable-lto \
--with-libelf=$(TOPDIR)/staging_dir/host
+ifndef CONFIG_USE_GLIBC
+ GCC_CONFIGURE += --disable-libsanitizer
+endif
+
ifdef CONFIG_USE_MUSL
GCC_MAKE += gcc_cv_libc_provides_ssp=yes
endif