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

[Xen-devel] [PATCH 06/16] x86: allow producing .i or .s for multiply compiled files



Since the generic pattern rules don't match those, explicit rules need
to be put in place for this to work.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/Makefile
+++ b/xen/Makefile
@@ -249,6 +249,17 @@ FORCE:
 %/: FORCE
        $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o built_in_bin.o
 
+build-intermediate = $(eval $(call build-intermediate-closure,$(1)))
+define build-intermediate-closure
+$(1): FORCE
+       $(MAKE) -f $(BASEDIR)/Rules.mk -C $$(@D) $$(@F)
+endef
+
+$(foreach base,arch/x86/mm/guest_walk_% \
+               arch/x86/mm/hap/guest_walk_%level \
+               arch/x86/mm/shadow/guest_%, \
+    $(foreach ext,o i s,$(call build-intermediate,$(base).$(ext))))
+
 kconfig := silentoldconfig oldconfig config menuconfig defconfig \
        nconfig xconfig gconfig savedefconfig listnewconfig olddefconfig \
        randconfig
--- a/xen/arch/x86/mm/Makefile
+++ b/xen/arch/x86/mm/Makefile
@@ -13,3 +13,9 @@ obj-y += mem_access.o
 
 guest_walk_%.o: guest_walk.c Makefile
        $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=$* -c $< -o $@
+
+guest_walk_%.i: guest_walk.c Makefile
+       $(CPP) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=$* -c 
$< -o $@
+
+guest_walk_%.s: guest_walk.c Makefile
+       $(CC) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=$* -S 
$< -o $@
--- a/xen/arch/x86/mm/hap/Makefile
+++ b/xen/arch/x86/mm/hap/Makefile
@@ -7,3 +7,9 @@ obj-y += nested_ept.o
 
 guest_walk_%level.o: guest_walk.c Makefile
        $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=$* -c $< -o $@
+
+guest_walk_%level.i: guest_walk.c Makefile
+       $(CPP) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=$* -c 
$< -o $@
+
+guest_walk_%level.s: guest_walk.c Makefile
+       $(CC) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=$* -S 
$< -o $@
--- a/xen/arch/x86/mm/shadow/Makefile
+++ b/xen/arch/x86/mm/shadow/Makefile
@@ -6,3 +6,9 @@ endif
 
 guest_%.o: multi.c Makefile
        $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=$* -c $< -o $@
+
+guest_%.i: multi.c Makefile
+       $(CPP) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=$* -c 
$< -o $@
+
+guest_%.s: multi.c Makefile
+       $(CC) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=$* -S 
$< -o $@





_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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