There's no need to have twice almost the same rule. Simply add the extra -DEFI to AFLAGS for the EFI variant, and specify both targets for the then single rule.
Signed-off-by: Jan Beulich <jbeul...@suse.com> --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -241,15 +241,12 @@ $(BASEDIR)/include/generated/config.h: F echo '#endif' >>$@.new $(call move-if-changed,$@.new,$@) -xen.lds: xen.lds.S +xen.lds efi.lds: xen.lds.S $(CC) -P -E -Ui386 $(filter-out -Wa$(comma)%,$(AFLAGS)) -o $@ $< sed -e 's/.*\.lds\.o:/$(@F):/g' <.$(@F).d >.$(@F).d.new mv -f .$(@F).d.new .$(@F).d -efi.lds: xen.lds.S - $(CC) -P -E -Ui386 -DEFI $(filter-out -Wa$(comma)%,$(AFLAGS)) -o $@ $< - sed -e 's/.*\.lds\.o:/$(@F):/g' <.$(@F).d >.$(@F).d.new - mv -f .$(@F).d.new .$(@F).d +efi.lds: AFLAGS += -DEFI boot/mkelf32: boot/mkelf32.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel