threads / patch / 25074

patchcompat/nedmalloc: don't force NDEBUG on the rest of git

Subject: [PATCH] compat/nedmalloc: don't force NDEBUG on the rest of git

## tl;dr

2 messages between Sep 11, 2010 and Sep 11, 2010. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

René Scharfe· Sep 11, 2010, 09:59 UTC · lore

Define the nedmalloc feature configuration macros for nedmalloc.o, only. This keeps assert(3) working for the rest of the git source; it was turned off for nedmalloc users before by defining NDEBUG globally.

Also remove -DUSE_NED_ALLOCATOR as this macro isn't used anywhere.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
---
 Makefile |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
Show changes to Makefile +6 −1
diff --git a/Makefile b/Makefile
index c27e8bc..4d45e04 100644
--- a/Makefile
+++ b/Makefile
@@ -1465,7 +1465,7 @@ ifdef NO_REGEX
 endif
 
 ifdef USE_NED_ALLOCATOR
-       COMPAT_CFLAGS += -DUSE_NED_ALLOCATOR -DOVERRIDE_STRDUP -DNDEBUG -DREPLACE_SYSTEM_ALLOCATOR -Icompat/nedmalloc
+       COMPAT_CFLAGS += -Icompat/nedmalloc
        COMPAT_OBJS += compat/nedmalloc/nedmalloc.o
 endif
 
@@ -1908,6 +1908,11 @@ ifdef NO_REGEX
 compat/regex/regex.o: EXTRA_CPPFLAGS = -DGAWK -DNO_MBSUPPORT
 endif
 
+ifdef USE_NED_ALLOCATOR
+compat/nedmalloc/nedmalloc.o: EXTRA_CPPFLAGS = \
+	-DNDEBUG -DOVERRIDE_STRDUP -DREPLACE_SYSTEM_ALLOCATOR
+endif
+
 git-%$X: %.o $(GITLIBS)
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
 

← back to recent threads