GCC_CONFIGURE += \
--with-headers=$(TOOLCHAIN_DIR)/include \
- --disable-libsanitizer \
--enable-languages=$(TARGET_LANGUAGES) \
--enable-shared \
--enable-threads \
--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