From: Jan Beulich Date: Thu, 30 Jan 2020 16:19:46 +0000 (+0100) Subject: x86: fold linker script pre-processing rules X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=837da5e3a31938891e4bada2497ec6b7b73908cc;p=people%2Fdwmw2%2Fxen.git x86: fold linker script pre-processing rules 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 Acked-by: Andrew Cooper --- diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index a64d12ac4d..bce5fdb317 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -241,16 +241,12 @@ $(BASEDIR)/include/asm-x86/asm-macros.h: asm-macros.i Makefile echo '#endif' >>$@.new $(call move-if-changed,$@.new,$@) -xen.lds: xen.lds.S +efi.lds: AFLAGS += -DEFI +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 - boot/mkelf32: boot/mkelf32.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $<