Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

efi/libstub: zboot: Avoid eager evaluation of objcopy flags

The Make variable containing the objcopy flags may be constructed from
the output of build tools operating on build artifacts, and these may
not exist when doing a make clean.

So avoid evaluating them eagerly, to prevent spurious build warnings.

Suggested-by: Pedro Falcato <pedro.falcato@gmail.com>
Tested-by: Alan Bartlett <ajb@elrepo.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

+2 -1
+2 -1
drivers/firmware/efi/libstub/Makefile.zboot
··· 32 32 $(obj)/vmlinuz: $(obj)/vmlinux.bin FORCE 33 33 $(call if_changed,$(zboot-method-y)) 34 34 35 - OBJCOPYFLAGS_vmlinuz.o := -I binary -O $(EFI_ZBOOT_BFD_TARGET) $(EFI_ZBOOT_OBJCOPY_FLAGS) \ 35 + # avoid eager evaluation to prevent references to non-existent build artifacts 36 + OBJCOPYFLAGS_vmlinuz.o = -I binary -O $(EFI_ZBOOT_BFD_TARGET) $(EFI_ZBOOT_OBJCOPY_FLAGS) \ 36 37 --rename-section .data=.gzdata,load,alloc,readonly,contents 37 38 $(obj)/vmlinuz.o: $(obj)/vmlinuz FORCE 38 39 $(call if_changed,objcopy)