]> www.infradead.org Git - users/dwmw2/linux.git/commit
kbuild: fix Clang LTO with CONFIG_OBJTOOL=n
authorMasahiro Yamada <masahiroy@kernel.org>
Fri, 31 Jan 2025 14:04:01 +0000 (23:04 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Fri, 31 Jan 2025 19:28:05 +0000 (04:28 +0900)
commit695ed93bb30e03e9f826ee70abdd83f970741a37
tree3ded5ccff06562c0f0414e8215c0185b238a067a
parent71d815bf5dfd4f63f7557e0abe7f257c202863a1
kbuild: fix Clang LTO with CONFIG_OBJTOOL=n

Since commit bede169618c6 ("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: bede169618c6 ("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>
scripts/Makefile.build
scripts/Makefile.lib