[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [XEN PATCH] xen/arch/x86/Makefile: Remove $(guard) use from $(TARGET).efi target
On 19.11.2019 18:58, Anthony PERARD wrote: > Following the patch 65d104984c04 ("x86: fix race to build > arch/x86/efi/relocs-dummy.o"), the error message > nm: 'efi/relocs-dummy.o': No such file" > started to appear on system which can't build the .efi target. This is > because relocs-dummy.o isn't built anymore. > The error is printed by the evaluation of VIRT_BASE and ALT_BASE which > aren't use anyway. > > But, we don't need that file as we don't want to build `$(TARGET).efi' > anyway. On such system, $(guard) evaluate to the shell builtin ':', > which prevent any of the shell commands in `$(TARGET).efi' from been > executed. > > Even if $(guard) is evaluated opon use, it depends on $(XEN_BUILD_PE) > which is evaluated at the assignment. So, we can replace $(guard) in > $(TARGET).efi by having two different rules depending on > $(XEN_BUILD_PE) instead. > > The change with this patch is that none of the dependency of > $(TARGET).efi will be built if the linker doesn't support PE > and VIRT_BASE and ALT_BASE don't get evaluated anymore, so nm will not > complain about the missing relocs-dummy.o file anymore. > > Since prelink-efi.o isn't built on system that can't build > $(TARGET).efi anymore, we can remove the $(guard) variable everywhere. And indeed the need for it had disappeared with 18cd4997d2 ("x86/efi: move the logic to detect PE build support"). > Reported-by: Jan Beulich <jbeulich@xxxxxxxx> > Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> Also Cc-ing Jürgen, as this addresses a (cosmetic) regression from 65d104984c ("x86: fix race to build arch/x86/efi/relocs-dummy.o"). > @@ -178,8 +178,6 @@ CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI > > $(TARGET).efi: VIRT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A > VIRT_START$$,,p') > $(TARGET).efi: ALT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A > ALT_START$$,,p') > -# Don't use $(wildcard ...) here - at least make 3.80 expands this too early! > -$(TARGET).efi: guard = $(if $(filter y,$(XEN_BUILD_PE)),,:) It is particularly telling that the comment here had been stale as of that earlier change from Roger, as the (shell level) wildcard use was the whole reason for needing $(guard) here. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |