All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] compat/nedmalloc: don't  force NDEBUG on the rest of git
@ 2010-09-11  9:59 René Scharfe
  2010-09-11 17:23 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: René Scharfe @ 2010-09-11  9:59 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Steffen Prohaska, Junio C Hamano, Marius Storm-Olsen

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(-)

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)
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] compat/nedmalloc: don't  force NDEBUG on the rest of git
  2010-09-11  9:59 [PATCH] compat/nedmalloc: don't force NDEBUG on the rest of git René Scharfe
@ 2010-09-11 17:23 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2010-09-11 17:23 UTC (permalink / raw)
  To: René Scharfe
  Cc: Git Mailing List, Steffen Prohaska, Junio C Hamano, Marius Storm-Olsen

Makes sense; thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-11 17:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-11  9:59 [PATCH] compat/nedmalloc: don't force NDEBUG on the rest of git René Scharfe
2010-09-11 17:23 ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.