]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
x86: fold linker script pre-processing rules
authorJan Beulich <jbeulich@suse.com>
Thu, 30 Jan 2020 16:19:46 +0000 (17:19 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 30 Jan 2020 16:19:46 +0000 (17:19 +0100)
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 <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/Makefile

index a64d12ac4daf29fb5fd4eaa0e91ff8fca66041cf..bce5fdb3170f0faca34af9f9e8340daa371b60da 100644 (file)
@@ -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 $@ $<