summaryrefslogtreecommitdiffstats
path: root/Makefile.main
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2017-11-22 23:15:50 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-12-18 17:58:32 -0600
commit427cc73b1eab4b4512fbaf623f9a120c6afdf09f (patch)
tree0b4b535bbf49601e222c7972858c96b5d1b44d43 /Makefile.main
parent8e88ab0e66a201a1d786e7e95c98314bf4e806e7 (diff)
downloadtalos-skiboot-427cc73b1eab4b4512fbaf623f9a120c6afdf09f.tar.gz
talos-skiboot-427cc73b1eab4b4512fbaf623f9a120c6afdf09f.zip
make check: Make valgrind optional
To (slightly) lower the barrier for contributions, we can make valgrind optional with just a small amount of plumbing. This allows make check to run successfully without valgrind. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'Makefile.main')
-rw-r--r--Makefile.main8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile.main b/Makefile.main
index 73c91962..c8f0a3bb 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -43,7 +43,7 @@ HOSTCFLAGS += -DDEBUG -DCCAN_LIST_DEBUG
HOSTGCOVCFLAGS = -fprofile-arcs -ftest-coverage -lgcov -O0 -g -pg
-VALGRIND=valgrind -q --show-reachable=yes --error-exitcode=99
+VALGRIND := valgrind -q --show-reachable=yes --error-exitcode=99
# Target options
@@ -84,6 +84,12 @@ ifeq ($(SKIBOOT_GCOV),1)
CFLAGS += -fprofile-arcs -ftest-coverage -DSKIBOOT_GCOV=1
endif
+ifeq ($(USE_VALGRIND),1)
+CFLAGS += -DUSE_VALGRIND=1
+else
+VALGRIND :=
+endif
+
# Stack protector disabled for now. gcc tends to use the TLS to
# access the canary (depending on how gcc was built), and this won't
# work for us.
OpenPOWER on IntegriCloud