Re: [PATCH v2 06/13] kbuild: reuse $(cmd_objtool) for cmd_cc_lto_link_modules

Josh Poimboeuf
2021-09-04T19:11:39Z

On Tue, Aug 31, 2021 at 04:39:57PM +0900, Masahiro Yamada wrote:
> 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>

With Kees' suggested fix:

Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>

--
Josh