x86: fix efi.lds dependency generation
PATCH v2 1/1 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 to work with *.lds. At the same time replace the hardcoded sed run for xen.lds with the new one.
--- xen/arch/x86/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/x86/Makefile +2 -2
@@ -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 + sed -e 's/.*\.lds\.o:/$(@F):/g' <.$(@F).d >.$(@F).d.new mv -f .xen.lds.d.new .xen.lds.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
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
xen/arch/x86/Makefile $(BASEDIR)/include/asm-x86/asm-macros.h: asm-macros.i Makefile · line 238
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 19.11.18 at 11:25, <[email protected]> wrote:
xen/arch/x86/Makefile +1
-1@@ -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 + sed -e 's/.*\.lds\.o:/$(@F):/g' <.$(@F).d >.$(@F).d.new mv -f .xen.lds.d.new .xen.lds.d
Hmm, okay, this can be relaxed, but I'm not sure it's needed. Anyway
albeit if you already bring both rules into closer sync, adjusting the last line above at the same time would have been nice.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 5 lines · Jan Beulich
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 19.11.18 at 11:25, <[email protected]> wrote:
xen/arch/x86/Makefile +0
-0@@ -234,12 +234,12 @@ $(BASEDIR)/include/asm-x86/asm-macros.h: asm-macros.i Makefile
Quoted 8 lines
xen/arch/x86/Makefile $(BASEDIR)/include/asm-x86/asm-macros.h: asm-macros.i Makefile · line 238
Quoted 5 lines
xen/arch/x86/Makefile +1
-1xen.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 + sed -e 's/.*\.lds\.o:/$(@F):/g' <.$(@F).d >.$(@F).d.new mv -f .xen.lds.d.new .xen.lds.dHmm, okay, this can be relaxed, but I'm not sure it's needed. Anyway
Acked-by Jan Beulich <[email protected]>
Thanks.
Quoted 2 lines
albeit if you already bring both rules into closer sync, adjusting the last line above at the same time would have been nice.
Alright. I can fold that in as well.
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel