[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 4/4] xen: add a gcov Kconfig option
Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Cc: Jan Beulich <jbeulich@xxxxxxxx> Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx> Cc: Tim Deegan <tim@xxxxxxx> Cc: Doug Goldstein <cardoe@xxxxxxxxxx> Would like to have it default to DEBUG, but we also need to check compiler to be gcc. I couldn't figure out how to check compiler to be gcc in Kconfig. --- Config.mk | 3 --- xen/Kconfig.debug | 5 +++++ xen/Rules.mk | 2 +- xen/common/Makefile | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Config.mk b/Config.mk index 9c60896..081ff69 100644 --- a/Config.mk +++ b/Config.mk @@ -20,9 +20,6 @@ or = $(if $(strip $(1)),$(1),$(if $(strip $(2)),$(2),$(if $(strip $(3)),$( debug ?= y debug_symbols ?= $(debug) -# Test coverage support -coverage ?= n - XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \ -e s/i86pc/x86_32/ -e s/amd64/x86_64/ \ -e s/armv7.*/arm32/ -e s/armv8.*/arm64/ \ diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug index 1be6344..a0bd043 100644 --- a/xen/Kconfig.debug +++ b/xen/Kconfig.debug @@ -13,6 +13,11 @@ config DEBUG if DEBUG || EXPERT = "y" +config GCOV + bool "Gcov Support" + ---help--- + Enable gcov (a test coverage program in GCC) support. + config CRASH_DEBUG bool "Crash Debugging Support" depends on X86 diff --git a/xen/Rules.mk b/xen/Rules.mk index 22aca0a..696aaa8 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -115,7 +115,7 @@ subdir-all := $(subdir-y) $(subdir-n) $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS += -DINIT_SECTIONS_ONLY -ifeq ($(coverage),y) +ifeq ($(CONFIG_GCOV),y) $(filter-out %.init.o $(nogcov-y),$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS += -fprofile-arcs -ftest-coverage -DTEST_COVERAGE endif diff --git a/xen/common/Makefile b/xen/common/Makefile index c2e6846..0fed30b 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -75,7 +75,7 @@ obj-$(CONFIG_TMEM) += $(tmem-y) subdir-$(CONFIG_X86) += hvm -subdir-$(coverage) += gcov +subdir-$(CONFIG_GCOV) += gcov subdir-y += libelf subdir-$(CONFIG_HAS_DEVICE_TREE) += libfdt -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |