efi/libstub/arm64: link stub lib.a conditionally
authorMasahiro Yamada <masahiroy@kernel.org>
Thu, 4 Jun 2020 02:20:30 +0000 (11:20 +0900)
committerArd Biesheuvel <ardb@kernel.org>
Thu, 9 Jul 2020 06:45:09 +0000 (09:45 +0300)
commitc1aac64ddc01112e137121a43645b96c3633c41b
tree1039b8e5f5b8f071c45a94e0836d6c0941d35e24
parent59476f80d8781a84e25f0cbcf378ccab1ad7abf8
efi/libstub/arm64: link stub lib.a conditionally

Since commit 799c43415442 ("kbuild: thin archives make default for
all archs"), core-y is passed to the linker with --whole-archive.
Hence, the whole of stub library is linked to vmlinux.

Use libs-y so that lib.a is passed after --no-whole-archive for
conditional linking.

The unused drivers/firmware/efi/libstub/relocate.o will be dropped
for ARCH=arm64.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20200604022031.164207-1-masahiroy@kernel.org
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
arch/arm64/Makefile