[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 3/4] xen: fix gcov compilation
Currently enabling gcov in hypervisor won't build because although 26c9d03d ("gcov: Adding support for coverage information") claimed that %.init.o files were excluded from applying compilation options, it was in fact not true. Fix that by filtering out the options correctly. Due to the dependency of stub.o in x86 EFI build can't be eliminated easily and we prefer a generalised method going forward, we introduce nogov-y to explicitly mark objects that don't need to build with gcov support. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Signed-off-by: Jan Beulich <JBeulich@xxxxxxxx> --- 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: Wei Liu <wei.liu2@xxxxxxxxxx> --- xen/Rules.mk | 4 +++- xen/arch/x86/efi/Makefile | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index a190ff0..22aca0a 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -115,7 +115,9 @@ subdir-all := $(subdir-y) $(subdir-n) $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS += -DINIT_SECTIONS_ONLY -$(obj-$(coverage)): CFLAGS += -fprofile-arcs -ftest-coverage -DTEST_COVERAGE +ifeq ($(coverage),y) +$(filter-out %.init.o $(nogcov-y),$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS += -fprofile-arcs -ftest-coverage -DTEST_COVERAGE +endif ifeq ($(lto),y) # Would like to handle all object files as bitcode, but objects made from diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile index 5099430..d62b14f 100644 --- a/xen/arch/x86/efi/Makefile +++ b/xen/arch/x86/efi/Makefile @@ -12,3 +12,4 @@ efi := $(if $(efi),$(shell rm disabled)y,$(shell $(call create,boot.init.o); $(c extra-$(efi) += boot.init.o relocs-dummy.o runtime.o compat.o stub.o: $(extra-y) +nogcov-$(efi) += stub.o -- 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 |