From: Jan Kiszka <jan.kis...@siemens.com>

They can switch on build options we don't want or support. This allows
to drop explicit gcov and OCR disabling. In some cases, this condition
was actually already fulfilled.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>
---
 Kbuild                              | 10 +++++-----
 configs/Makefile                    |  4 ++--
 hypervisor/Makefile                 |  2 --
 hypervisor/arch/arm-common/Kbuild   |  1 -
 hypervisor/arch/x86/Kbuild          |  1 -
 inmates/lib/arm-common/Makefile.lib |  2 --
 inmates/lib/x86/Makefile.lib        |  4 ++--
 tools/Makefile                      |  4 ++--
 8 files changed, 11 insertions(+), 17 deletions(-)

diff --git a/Kbuild b/Kbuild
index 090094e22..00e14f7da 100644
--- a/Kbuild
+++ b/Kbuild
@@ -41,17 +41,17 @@ GEN_VERSION_H := 
$(obj)/hypervisor/include/generated/version.h
 $(GEN_VERSION_H): $(src)/Makefile FORCE
        $(call filechk,version)
 
+subdir-y := driver hypervisor configs inmates tools
+
+subdir-ccflags-y := -Werror
+
 # Do not generate files by creating dependencies if we are cleaning up
 ifeq ($(filter %/Makefile.clean,$(MAKEFILE_LIST)),)
 
-$(obj)/hypervisor $(obj)/inmates: $(GEN_CONFIG_MK)
+$(addprefix $(obj)/,$(subdir-y)): $(GEN_CONFIG_MK)
 
 $(obj)/driver $(obj)/hypervisor: $(GEN_VERSION_H)
 
 endif
 
-subdir-y := driver hypervisor configs inmates tools
-
-subdir-ccflags-y := -Werror
-
 clean-dirs := Documentation/generated hypervisor/include/generated
diff --git a/configs/Makefile b/configs/Makefile
index 39eac6644..5396bbcb0 100644
--- a/configs/Makefile
+++ b/configs/Makefile
@@ -10,6 +10,8 @@
 # the COPYING file in the top-level directory.
 #
 
+-include $(GEN_CONFIG_MK)
+
 LINUXINCLUDE := -I$(src)/../hypervisor/arch/$(SRCARCH)/include \
                -I$(src)/../hypervisor/include \
                -I$(src)/../include
@@ -21,8 +23,6 @@ endif
 
 OBJCOPYFLAGS := -O binary
 
-GCOV_PROFILE := n
-
 CONFIGS = $(shell cd $(src); ls $(SRCARCH)/*.c)
 
 always := $(CONFIGS:.c=.cell)
diff --git a/hypervisor/Makefile b/hypervisor/Makefile
index 92c39221a..2257848d6 100644
--- a/hypervisor/Makefile
+++ b/hypervisor/Makefile
@@ -34,8 +34,6 @@ ifneq ($(wildcard $(INC_CONFIG_H)),)
 KBUILD_CFLAGS += -include $(INC_CONFIG_H)
 endif
 
-GCOV_PROFILE := n
-
 CORE_OBJECTS = setup.o printk.o paging.o control.o lib.o mmio.o pci.o ivshmem.o
 CORE_OBJECTS += uart.o uart-8250.o
 
diff --git a/hypervisor/arch/arm-common/Kbuild 
b/hypervisor/arch/arm-common/Kbuild
index 08cc4543e..127bc5987 100644
--- a/hypervisor/arch/arm-common/Kbuild
+++ b/hypervisor/arch/arm-common/Kbuild
@@ -12,7 +12,6 @@
 
 -include $(GEN_CONFIG_MK)
 
-GCOV_PROFILE := n
 ccflags-$(CONFIG_JAILHOUSE_GCOV) += -fprofile-arcs -ftest-coverage
 
 OBJS-y += dbg-write.o lib.o psci.o control.o paging.o mmu_cell.o setup.o
diff --git a/hypervisor/arch/x86/Kbuild b/hypervisor/arch/x86/Kbuild
index 2ac465f2b..0e5a9ffbe 100644
--- a/hypervisor/arch/x86/Kbuild
+++ b/hypervisor/arch/x86/Kbuild
@@ -14,7 +14,6 @@
 
 -include $(GEN_CONFIG_MK)
 
-GCOV_PROFILE := n
 ccflags-$(CONFIG_JAILHOUSE_GCOV) += -fprofile-arcs -ftest-coverage
 
 BUILT_IN_OBJECTS := built-in-amd.o built-in-intel.o
diff --git a/inmates/lib/arm-common/Makefile.lib 
b/inmates/lib/arm-common/Makefile.lib
index 323cabb81..4c35cdc60 100644
--- a/inmates/lib/arm-common/Makefile.lib
+++ b/inmates/lib/arm-common/Makefile.lib
@@ -36,8 +36,6 @@
 # THE POSSIBILITY OF SUCH DAMAGE.
 #
 
-GCOV_PROFILE := n
-
 OBJS-y := ../string.o ../cmdline.o
 OBJS-y += printk.o gic.o timer.o
 OBJS-y += uart-jailhouse.o uart-pl011.o uart-8250.o uart-8250-8.o
diff --git a/inmates/lib/x86/Makefile.lib b/inmates/lib/x86/Makefile.lib
index 955fa8010..e02fa474a 100644
--- a/inmates/lib/x86/Makefile.lib
+++ b/inmates/lib/x86/Makefile.lib
@@ -36,9 +36,9 @@
 # THE POSSIBILITY OF SUCH DAMAGE.
 #
 
+-include $(GEN_CONFIG_MK)
+
 KBUILD_CFLAGS += -m64 -mno-red-zone
-GCOV_PROFILE := n
-OBJECT_FILES_NON_STANDARD := y
 
 define DECLARE_TARGETS =
  _TARGETS = $(1)
diff --git a/tools/Makefile b/tools/Makefile
index 4bc6ef53b..6bab351a5 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -10,6 +10,8 @@
 # the COPYING file in the top-level directory.
 #
 
+-include $(GEN_CONFIG_MK)
+
 # includes installation-related variables and definitions
 include $(src)/../scripts/include.mk
 
@@ -20,8 +22,6 @@ KBUILD_CFLAGS := -g -O3 -DLIBEXECDIR=\"$(libexecdir)\" \
        -Wall -Wextra -Wmissing-declarations -Wmissing-prototypes -Werror \
        -DJAILHOUSE_VERSION=\"$(shell cat $(src)/../VERSION)\" $(EXTRA_CFLAGS)
 LDFLAGS :=
-GCOV_PROFILE := n
-OBJECT_FILES_NON_STANDARD := y
 
 # force no-pie for distro compilers that enable pie by default
 KBUILD_CFLAGS += $(call cc-option, -fno-pie)
-- 
2.13.6

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to