jemalloc: add a check for valgrind being configured as well
authorCharles Hardin <ckhardin@exablox.com>
Thu, 8 Sep 2016 23:42:00 +0000 (16:42 -0700)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 11 Sep 2016 20:26:49 +0000 (22:26 +0200)
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 <ckhardin@exablox.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/jemalloc/jemalloc.mk

index 7086dfa9cd839bdf458d41bb5079e5b72fd20643..f1c9ffe622523cb12aade066744da2d5090bed39 100644 (file)
@@ -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))