OSDN Git Service

kbuild: readd -w option when vmlinux.o or Module.symver is missing
authorMasahiro Yamada <masahiroy@kernel.org>
Wed, 4 Jan 2023 14:04:59 +0000 (23:04 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Thu, 5 Jan 2023 07:53:48 +0000 (16:53 +0900)
commit735aec59afb18c3e2da0a637037e69ad62dbda6a
treee822cfb13ab2bc9a81d66584a70fa298dac1241c
parenta53da43decaa3936998fa7dce2346855a6942166
kbuild: readd -w option when vmlinux.o or Module.symver is missing

Commit 63ffe00d8c93 ("kbuild: Fix running modpost with musl libc")
accidentally turned the unresolved symbol warnings into errors when
vmlinux.o (for in-tree builds) or Module.symver (for external module
builds) is missing.

In those cases, unresolved symbols are expected, but the -w option
is not set because 'missing-input' is referenced before set.

Move $(missing-input) back to the original place. This should be fine
for musl libc because vmlinux.o and -w are not added at the same time.

With this change, -w may be passed twice, but it is not a big deal.

Link: https://lore.kernel.org/all/b56a03b8-2a2a-f833-a5d2-cdc50a7ca2bb@cschramm.eu/
Fixes: 63ffe00d8c93 ("kbuild: Fix running modpost with musl libc")
Reported-by: Christopher Schramm <debian@cschramm.eu>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Samuel Holland <samuel@sholland.org>
scripts/Makefile.modpost