aboutsummaryrefslogtreecommitdiff
path: root/Makefile.main
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-05-07 17:11:43 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-05-15 07:59:18 +1000
commit2b9fdc7a27b2199830dd9f245eff92d506cc9bf9 (patch)
tree634e348ab1c8da4dca8c6961f2d4942267cf8fdb /Makefile.main
parent4fed073fd02ae24c1e3f099e20bed623ac00df2e (diff)
downloadskiboot-2b9fdc7a27b2199830dd9f245eff92d506cc9bf9.zip
skiboot-2b9fdc7a27b2199830dd9f245eff92d506cc9bf9.tar.gz
skiboot-2b9fdc7a27b2199830dd9f245eff92d506cc9bf9.tar.bz2
Enable SKIBOOT_GCOV build option for building with profiling
Enable build options for building skiboot with GCOV profiling, including a skeleton -lgcov replacement in the form of core/gcov-profiling.c We don't actually have to do anything as part of the gcov routines, gcov auto generates everything we need. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'Makefile.main')
-rw-r--r--Makefile.main4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile.main b/Makefile.main
index cf41a22..bd03ff4 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -52,6 +52,10 @@ CPPFLAGS += -ffreestanding
CFLAGS := -fno-strict-aliasing -fstack-protector-all -pie -mbig-endian -m64
+ifeq ($(SKIBOOT_GCOV),1)
+CFLAGS += -fprofile-arcs -ftest-coverage
+endif
+
ifeq ($(STACK_CHECK),1)
CFLAGS += -fstack-protector-all -pg
CPPFLAGS += -DSTACK_CHECK_ENABLED