Files
linux/scripts/Makefile.lib
Masahiro Yamada 3c51227c63 kbuild: fix Clang LTO with CONFIG_OBJTOOL=n
[ Upstream commit 695ed93bb3 ]

Since commit bede169618 ("kbuild: enable objtool for *.mod.o and
additional kernel objects"), Clang LTO builds do not perform any
optimizations when CONFIG_OBJTOOL is disabled (e.g., for ARCH=arm64).
This is because every LLVM bitcode file is immediately converted to
ELF format before the object files are linked together.

This commit fixes the breakage.

Fixes: bede169618 ("kbuild: enable objtool for *.mod.o and additional kernel objects")
Reported-by: Yonghong Song <yonghong.song@linux.dev>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Yonghong Song <yonghong.song@linux.dev>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-02-08 10:02:18 +01:00

20 KiB