From 69b9f0161e147d566b3b9572a0bc39a97c257fc0 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Sat, 19 Oct 2019 12:00:43 +0000 Subject: toolchain: gcc: enable sanitizers for glibc toolchain Signed-off-by: Yousong Zhou --- toolchain/gcc/final/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'toolchain/gcc') 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 -- cgit v1.2.3