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

[Xen-changelog] [xen staging] x86: fix efi.lds dependency generation



commit 30311d2e82a3eb69aa1667382a6b2529f6d944c4
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Fri Nov 16 18:58:55 2018 +0000
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Mon Nov 19 11:09:51 2018 +0000

    x86: fix efi.lds dependency generation
    
    RANDCONFIG builds discover efi.lds is not updated when autogenerated
    headers are updated.
    
    Upon inspection, the generated .d file contains xen.lds.o as target,
    not the once thought efi.lds.o. That's because gcc disregards the
    output object name specified by -o when generating dependency, so the
    sed invocation has no effect.
    
    Arguably that's a bug in gcc, which can be fixed at some point, so we
    make the sed rune work with *.lds. At the same time replace the
    hardcoded sed rune for xen.lds with the new one.
    
    Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 162b0b94c0..484dcb7ce7 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -234,12 +234,12 @@ $(BASEDIR)/include/asm-x86/asm-macros.h: asm-macros.i 
Makefile
 
 xen.lds: xen.lds.S
        $(CC) -P -E -Ui386 $(filter-out -Wa$(comma)%,$(AFLAGS)) -o $@ $<
-       sed -e 's/xen\.lds\.o:/xen\.lds:/g' <.xen.lds.d >.xen.lds.d.new
-       mv -f .xen.lds.d.new .xen.lds.d
+       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/efi\.lds\.o:/efi\.lds:/g' <.$(@F).d >.$(@F).d.new
+       sed -e 's/.*\.lds\.o:/$(@F):/g' <.$(@F).d >.$(@F).d.new
        mv -f .$(@F).d.new .$(@F).d
 
 boot/mkelf32: boot/mkelf32.c
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
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®.