OSDN Git Service

x86/boot: Don't add the EFI stub to targets
authorArvind Sankar <nivedita@alum.mit.edu>
Wed, 15 Jul 2020 03:26:31 +0000 (23:26 -0400)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 19 Jul 2020 11:07:11 +0000 (13:07 +0200)
commitda05b143a308bd6a7a444401f9732678ae63fc70
tree6a987b5c80414b069cddf9b2428da50f48de691b
parent58ac3154b83938515129c20aa76d456a4c9202a8
x86/boot: Don't add the EFI stub to targets

vmlinux-objs-y is added to targets, which currently means that the EFI
stub gets added to the targets as well. It shouldn't be added since it
is built elsewhere.

This confuses Makefile.build which interprets the EFI stub as a target
$(obj)/$(objtree)/drivers/firmware/efi/libstub/lib.a
and will create drivers/firmware/efi/libstub/ underneath
arch/x86/boot/compressed, to hold this supposed target, if building
out-of-tree. [0]

Fix this by pulling the stub out of vmlinux-objs-y into efi-obj-y.

[0] See scripts/Makefile.build near the end:
    # Create directories for object files if they do not exist

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lkml.kernel.org/r/20200715032631.1562882-1-nivedita@alum.mit.edu
arch/x86/boot/compressed/Makefile