Skip to content
Commit 90a35349 authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

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: default avatarMasahiro Yamada <masahiroy@kernel.org>
Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Acked-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
parent ef62588c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment