From d13cb96e781f7d4c4f7223606c25c82d558c538f Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sat, 5 Jun 2021 03:18:42 +0200 Subject: don't add -rdynamic when not replacing malloc * this flag could negatively affect optimizations * fixes builds on MinGW --- src/Makefile.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 8441456..194d8ee 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,10 +14,13 @@ include $(top_srcdir)/scintilla.am # FIXME: Common flags should be in configure.ac AM_CFLAGS = -std=gnu11 -Wall -Wno-initializer-overrides -Wno-unused-value AM_CPPFLAGS += -I$(top_srcdir)/contrib/rb3ptr +AM_LDFLAGS = +if REPLACE_MALLOC # NOTE: This may be necessary to ensure that malloc() overriding # works. It may prevent elimination of unused functions, though. -AM_LDFLAGS = -rdynamic +AM_LDFLAGS += -rdynamic +endif if STATIC_EXECUTABLES # AM_LDFLAGS are libtool flags, NOT compiler/linker flags -- cgit v1.2.3