diff --git a/xen/Rules.mk b/xen/Rules.mk index 5e0699e58b..1f171f88e2 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -223,6 +223,9 @@ $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): %.init.o: %.o FORCE quiet_cmd_cpp_i_c = CPP $@ cmd_cpp_i_c = $(CPP) $(call cpp_flags,$(c_flags)) -MQ $@ -o $@ $< +quiet_cmd_cpp_i_S = CPP $@ +cmd_cpp_i_S = $(CPP) $(call cpp_flags,$(a_flags)) -MQ $@ -o $@ $< + quiet_cmd_cc_s_c = CC $@ cmd_cc_s_c = $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -S $< -o $@ @@ -232,6 +235,9 @@ cmd_cpp_s_S = $(CPP) $(call cpp_flags,$(a_flags)) -MQ $@ -o $@ $< %.i: %.c FORCE $(call if_changed,cpp_i_c) +%.i: %.S FORCE + $(call if_changed,cpp_i_S) + %.s: %.c FORCE $(call if_changed,cc_s_c) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 69b6cfaded..8e975f472d 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -273,7 +273,7 @@ efi/buildid.o efi/relocs-dummy.o: ; .PHONY: include include: $(BASEDIR)/include/asm-x86/asm-macros.h -asm-macros.i: CFLAGS-y += -D__ASSEMBLY__ -P +asm-macros.i: CFLAGS-y += -P $(BASEDIR)/include/asm-x86/asm-macros.h: asm-macros.i Makefile echo '#if 0' >$@.new diff --git a/xen/arch/x86/asm-macros.c b/xen/arch/x86/asm-macros.S similarity index 100% rename from xen/arch/x86/asm-macros.c rename to xen/arch/x86/asm-macros.S