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

[Xen-changelog] [xen master] x86: allow producing .i or .s for multiply compiled files



commit f6e9f559bedc5df6b975075d3afe3a8f5ae27e23
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Jul 19 09:41:08 2018 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jul 19 09:41:08 2018 +0200

    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>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/Makefile                    | 11 +++++++++++
 xen/arch/x86/mm/Makefile        |  6 ++++++
 xen/arch/x86/mm/hap/Makefile    |  6 ++++++
 xen/arch/x86/mm/shadow/Makefile |  6 ++++++
 4 files changed, 29 insertions(+)

diff --git a/xen/Makefile b/xen/Makefile
index a321962fd0..e0b17f61be 100644
--- 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
diff --git a/xen/arch/x86/mm/Makefile b/xen/arch/x86/mm/Makefile
index e977dd8c5b..3017119813 100644
--- 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 $@
diff --git a/xen/arch/x86/mm/hap/Makefile b/xen/arch/x86/mm/hap/Makefile
index b6299f3eff..b14a9aff93 100644
--- 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 $@
diff --git a/xen/arch/x86/mm/shadow/Makefile b/xen/arch/x86/mm/shadow/Makefile
index cd4ec8a36b..bcb23d2cd7 100644
--- 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 $@
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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