kbuild: reuse $(cmd_objtool) for cmd_cc_lto_link_modules
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2090231 commit 90a35349 Author: Masahiro Yamada <masahiroy@kernel.org> Date: Tue, 31 Aug 2021 16:39:57 +0900 kbuild: reuse $(cmd_objtool) for cmd_cc_lto_link_modules For CONFIG_LTO_CLANG=y, the objtool processing is not possible at the compilation, hence postponed by the link time. Reuse $(cmd_objtool) for CONFIG_LTO_CLANG=y by defining objtool-enabled properly. For CONFIG_LTO_CLANG=y: objtool-enabled is off for %.o compilation objtool-enabled is on for %.lto link For CONFIG_LTO_CLANG=n: objtool-enabled is on for %.o compilation (but, it depends on OBJECT_FILE_NON_STANDARD) Set part-of-module := y for %.lto.o to avoid repeating --module. Signed-off-by:Masahiro Yamada <masahiroy@kernel.org> Reviewed-by:
Kees Cook <keescook@chromium.org> Acked-by:
Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by:
Waiman Long <longman@redhat.com>
Please register or sign in to comment