[Skiboot] [PATCH 5/6] Makefile: gard/pflash targets for CI build with HOSTCFLAGS/HOSTGCOVFLAGS

Stewart Smith stewart at linux.vnet.ibm.com
Mon Jul 17 19:13:59 AEST 2017


This enables us to do coverage reports on gard/pflash.

Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 Makefile.main | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile.main b/Makefile.main
index b22925dac88a..686a70a41677 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -42,7 +42,11 @@ HOSTCFLAGS += $(call try-cflag,$(HOSTCC),-Wjump-misses-init) \
 	  $(call try-cflag,$(HOSTCC),-Wstack-usage=1024)
 HOSTCFLAGS += -DDEBUG -DCCAN_LIST_DEBUG
 
+ifeq ($(SKIBOOT_GCOV),1)
 HOSTGCOVCFLAGS = -fprofile-arcs -ftest-coverage -lgcov -O0 -g -pg
+else
+HOSTGCOVCFLAGS =
+endif
 
 VALGRIND=valgrind -q --show-reachable=yes --error-exitcode=99
 
@@ -180,10 +184,10 @@ include $(SRC)/libstb/Makefile.inc
 
 # hack for travis-ci and coverity
 gard:
-	(cd external/gard; make)
+	(cd external/gard; CFLAGS="$(HOSTCFLAGS) $(HOSTGCOVCFLAGS)" make)
 
 pflash:
-	(cd external/pflash; make)
+	(cd external/pflash; CFLAGS="$(HOSTCFLAGS) $(HOSTGCOVCFLAGS)" make)
 
 pflash-coverity:
 	(cd external/pflash; ./build-all-arch.sh)
-- 
2.13.0



More information about the Skiboot mailing list