[Buildroot] [git commit] jemalloc: add a check for valgrind being configured as well

From: Thomas Petazzoni <hidden>
Date: 2016-09-11 20:26:49
Subsystem: the rest · Maintainer: Linus Torvalds

commit: https://git.buildroot.net/buildroot/commit/?id=ec692f94984e10593dd154fc340299131b347b0f
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

jemalloc can be compiled with valgrind support being enabled
to produce proper output, so when the valgrind package has
been configured configure jemalloc appropriately.

In addition, make sure to disable valgrind support unconditionally in
the host variant of jemalloc.

Signed-off-by: Charles Hardin <redacted>
Signed-off-by: Thomas Petazzoni <redacted>
---
 package/jemalloc/jemalloc.mk | 9 +++++++++
 1 file changed, 9 insertions(+)
diff --git a/package/jemalloc/jemalloc.mk b/package/jemalloc/jemalloc.mk
index 7086dfa..f1c9ffe 100644
--- a/package/jemalloc/jemalloc.mk
+++ b/package/jemalloc/jemalloc.mk
@@ -11,5 +11,14 @@ JEMALLOC_LICENSE = BSD-2c
 JEMALLOC_LICENSE_FILES = COPYING
 JEMALLOC_INSTALL_STAGING = YES
 
+ifeq ($(BR2_PACKAGE_VALGRIND),y)
+JEMALLOC_DEPENDENCIES += valgrind
+JEMALLOC_CONF_OPTS += --enable-valgrind
+else
+JEMALLOC_CONF_OPTS += --disable-valgrind
+endif
+
+HOST_JEMALLOC_CONF_OPTS += --disable-valgrind
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help