@@ -39,6 +39,7 @@ ALL_OBJS-$(CONFIG_CRYPTO) += $(BASEDIR)/crypto/built_in.o
# Initialise some variables
ccflags-y :=
+asflags-y :=
# Allow arch specific cflags, to be calculated for each objects.
arch_ccflags =
@@ -101,7 +102,8 @@ c_flags = -MMD -MF $(@D)/.$(@F).d \
$(ccflags-y) $(CFLAGS_$(target-stem).o)
a_flags = -MMD -MF $(@D)/.$(@F).d \
- $(XEN_AFLAGS)
+ $(XEN_AFLAGS) \
+ $(asflags-y)
built_in.o: $(obj-y) $(extra-y)
ifeq ($(obj-y),)
@@ -174,14 +174,14 @@ EFI_LDFLAGS += --major-subsystem-version=2 --minor-subsystem-version=0
export XEN_BUILD_EFI := $(shell $(CC) $(filter-out $(CFLAGS-y) .%.d,$(CFLAGS)) -c efi/check.c -o efi/check.o 2>/dev/null && echo y)
# Check if the linker supports PE.
XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsystem=10 -o efi/check.efi efi/check.o 2>/dev/null && echo y))
-ccflags-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
+asflags-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
$(TARGET).efi: VIRT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A VIRT_START$$,,p')
$(TARGET).efi: ALT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A ALT_START$$,,p')
ifneq ($(build_id_linker),)
ifeq ($(call ld-ver-build-id,$(LD) $(filter -m%,$(EFI_LDFLAGS))),y)
-ccflags-y += -DBUILD_ID_EFI
+asflags-y += -DBUILD_ID_EFI
EFI_LDFLAGS += $(build_id_linker)
note_file := efi/buildid.o
# NB: this must be the last input in the linker call, because inputs following
-DXEN_BUILD_EFI and -DBUILD_ID_EFI seems to only be used in xen.lds.S which is build using the AFLAGS, so add those flags only to asflags-y. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> --- That fix build of xen.efi. Should add asflags-y into the patch title. --- xen/Rules.mk | 4 +++- xen/arch/x86/Makefile | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-)