[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] x86: fold linker script pre-processing rules



commit 837da5e3a31938891e4bada2497ec6b7b73908cc
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Jan 30 17:19:46 2020 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jan 30 17:19:46 2020 +0100

    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 <jbeulich@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/Makefile | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

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 $@ $<
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.