aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--configure.ac4
-rw-r--r--contrib/dlmalloc/Makefile.am3
2 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 38d33bf..cca1cd3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,6 +56,7 @@ AC_PROG_CC
# FIXME: We want -std=gnu11
AC_PROG_CC_C99
AC_PROG_SED
+AC_PROG_GREP
AC_PROG_INSTALL
# Mainly because of Scintilla, which depends on
@@ -75,6 +76,9 @@ AC_PROG_CXX
AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
AC_CHECK_TOOL(AR, ar)
+# Whether $CC is Clang
+AM_CONDITIONAL(CLANG, [$CC --version | $GREP -i clang >/dev/null])
+
# Check for Windows resource compiler and define
# WIN32 conditional
case $host in
diff --git a/contrib/dlmalloc/Makefile.am b/contrib/dlmalloc/Makefile.am
index e575683..8df52cb 100644
--- a/contrib/dlmalloc/Makefile.am
+++ b/contrib/dlmalloc/Makefile.am
@@ -14,8 +14,9 @@ AM_CPPFLAGS = -DINSECURE='defined(NDEBUG)' -DNO_MALLINFO=1 -DNO_MALLOC_STATS=1 \
# FIXME: This optimization is still broken as of GCC v9.3.0.
# This is a known GCC bug, triggered by memset() in calloc().
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93213
-# FIXME: This must not be passed on Clang
+if !CLANG
AM_CFLAGS = -fno-optimize-strlen
+endif
noinst_LTLIBRARIES = libdlmalloc.la
if REPLACE_MALLOC