[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XEN PATCH v8 44/47] WIP, no-VPATH: build object from S source to be in build_in.o


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Thu, 25 Nov 2021 13:40:03 +0000
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Ian Jackson" <iwj@xxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 25 Nov 2021 13:48:00 +0000
  • Ironport-data: A9a23:725R7KtZsRD2jzLt4P41BUD9lOfnVNJZMUV32f8akzHdYApBsoF/q tZmKWzVOffbN2b2c95xYN/i9x5U7JCDn9ZmTQNkpX8xES4T+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZQP0VOZigHtIQMsadUsxKbVIiGHhJZS5LwbZj29cx24XhWWthh PupyyHhEA79s9JLGjp8B5Kr8HuDa9yr5Vv0FnRnDRx6lAe2e0s9VfrzFonoR5fMeaFGH/bSe gr25OrRElU1XfsaIojNfr7TKiXmS1NJVOSEoiI+t6OK2nCuqsGuu0qS2TV1hUp/0l20c95NJ Nplr6K3dgQCNYjwpboQdUd+LSRZZawX9+qSSZS/mZT7I0zudnLtx7NlDV0sPJ1e8eFyaY1M3 aVGcnZXNEnF3r/ohuLgIgVvrp1LwM3DNYUDunZm3HfBAOwvW5zrSKTW/95Imjw3g6iiGN6DN 5dGN2U1PXwsZTVJHXITA7wUnt24j17tVmJ8q3mFqJEetj27IAtZj+G2bYu9lsaxbcdImkeVo ErW8mK/BQsVXPSE0iaM+H+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CwHnb/Tkc=
  • Ironport-hdrordr: A9a23:y2VlsKNEAx6esMBcTsejsMiBIKoaSvp037Eqv3ofdfUzSL3+qy nOpoVj6faaslcssR0b9OxofZPwI080lqQFhbX5X43DYOCOggLBR+tfBMnZsljd8kXFh4hgPM xbHZSWZuedMbEDt7eY3DWF
  • Ironport-sdr: p2E3iK5ubT2TJdzcT1TYGnOtYAnCJXZSJgSZdmYK29bNZEfw6lVl4SVJAUI1R8NNwidRu4Z/7W fmBnygXvUMNieufWuSG/r818X60MVeR0u926HauLxZ+82ttMDh0bJ7N4naGxeMmFxaU2lXPzdi 8o3zi+BWz+wfRO4xSUFqedqCUYxzuHlAHg6S13BWpPNT+lVXMcH6vgbBrTtjRf54A+vSygusZS sp8+4aExr4uaGqDHuls/JFhG0Q7ZFTUibmniwB6Xx3xBzxsV+ctQhHJGAGDuS36JMg5xqMXHKe Lzqe+SWerqEthP/oTuPIsUj5
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

similair to gen-objs-S, but obj-gen-y will be added to build_in.o

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---

Notes:
    we could maybe use $(targets) instead of introducing new variables.

 xen/Rules.mk        | 21 ++++++++++++++-------
 xen/common/Makefile |  2 +-
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 2d8d32f5fd72..0ef45d2c7087 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -22,6 +22,7 @@ include $(srctree)/scripts/Kbuild.include
 
 # Initialise some variables
 obj-y :=
+obj-gen-y :=
 lib-y :=
 targets :=
 ## targets made from generated sources
@@ -98,6 +99,7 @@ always-y        := $(addprefix $(obj)/,$(always-y))
 targets         := $(addprefix $(obj)/,$(targets))
 lib-y           := $(addprefix $(obj)/,$(lib-y))
 obj-y           := $(addprefix $(obj)/,$(obj-y))
+obj-gen-y       := $(addprefix $(obj)/,$(obj-gen-y))
 obj-bin-y       := $(addprefix $(obj)/,$(obj-bin-y))
 gen-objs-c      := $(addprefix $(obj)/,$(gen-objs-c))
 gen-objs-S      := $(addprefix $(obj)/,$(gen-objs-S))
@@ -112,6 +114,11 @@ ifneq ($(hostprogs-y),)
 include $(srctree)/scripts/Makefile.host
 endif
 
+ifndef building_out_of_srctree
+    obj-y += $(obj-gen-y)
+    obj-gen-y :=
+endif
+
 # subdir-builtin may contain duplications. Use $(sort ...)
 subdir-builtin := $(sort $(filter %/built_in.o, $(obj-y)))
 
@@ -144,7 +151,7 @@ else
 endif
 
 # Reset COV_FLAGS in cases where an objects has another one as prerequisite
-$(nocov-y) $(filter %.init.o, $(obj-y) $(obj-bin-y) $(extra-y)): \
+$(nocov-y) $(filter %.init.o, $(obj-y) $(obj-bin-y) $(obj-gen-y) $(extra-y)): \
     COV_FLAGS :=
 
 $(non-init-objects): _c_flags += $(COV_FLAGS)
@@ -155,7 +162,7 @@ ifeq ($(CONFIG_UBSAN),y)
 UBSAN_FLAGS := $(filter-out -fno-%,$(CFLAGS_UBSAN)) $(filter 
-fno-%,$(CFLAGS_UBSAN))
 
 # Reset UBSAN_FLAGS in cases where an objects has another one as prerequisite
-$(noubsan-y) $(filter %.init.o, $(obj-y) $(obj-bin-y) $(extra-y)): \
+$(noubsan-y) $(filter %.init.o, $(obj-y) $(obj-bin-y) $(obj-gen-y) 
$(extra-y)): \
     UBSAN_FLAGS :=
 
 $(non-init-objects): _c_flags += $(UBSAN_FLAGS)
@@ -209,13 +216,13 @@ cmd_ld_builtin = \
     $(LD) $(XEN_LDFLAGS) -r -o $@ $(real-prereqs)
 endif
 
-$(obj)/built_in.o: $(obj-y) FORCE
-       $(call if_changed,$(if $(strip $(obj-y)),ld_builtin,cc_builtin))
+$(obj)/built_in.o: $(obj-y) $(obj-gen-y) FORCE
+       $(call if_changed,$(if $(strip $(obj-y) 
$(obj-gen-y)),ld_builtin,cc_builtin))
 
 $(obj)/lib.a: $(lib-y) FORCE
        $(call if_changed,ar)
 
-targets += $(filter-out $(subdir-builtin), $(obj-y))
+targets += $(filter-out $(subdir-builtin), $(obj-y) $(obj-gen-y))
 targets += $(lib-y) $(MAKECMDGOALS)
 
 $(obj)/built_in_bin.o: $(obj-bin-y)
@@ -258,7 +265,7 @@ quiet_cmd_cc_o_S = CC      $@
 cmd_cc_o_S = $(CC) $(a_flags) -c $< -o $@
 
 ifdef building_out_of_srctree
-$(gen-objs-S): $(obj)/%.o: $(obj)/%.S FORCE
+$(gen-objs-S) $(obj-gen-y): $(obj)/%.o: $(obj)/%.S FORCE
        $(call if_changed_dep,cc_o_S)
 endif
 $(obj)/%.o: $(src)/%.S FORCE
@@ -279,7 +286,7 @@ define cmd_obj_init_o
     $(OBJCOPY) $(foreach s,$(SPECIAL_DATA_SECTIONS),--rename-section 
.$(s)=.init.$(s)) $< $@
 endef
 
-$(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): $(obj)/%.init.o: 
$(obj)/%.o FORCE
+$(filter %.init.o,$(obj-y) $(obj-bin-y) $(obj-gen-y) $(extra-y)): 
$(obj)/%.init.o: $(obj)/%.o FORCE
        $(call if_changed,obj_init_o)
 
 quiet_cmd_cpp_i_c = CPP     $@
diff --git a/xen/common/Makefile b/xen/common/Makefile
index b1e076c30b81..fe3a4b7a8619 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -1,6 +1,6 @@
 obj-$(CONFIG_ARGO) += argo.o
 obj-y += bitmap.o
-obj-$(CONFIG_HYPFS_CONFIG) += config_data.o
+obj-gen-$(CONFIG_HYPFS_CONFIG) += config_data.o
 obj-$(CONFIG_CORE_PARKING) += core_parking.o
 obj-y += cpu.o
 obj-$(CONFIG_DEBUG_TRACE) += debugtrace.o
-- 
Anthony PERARD




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.