Commit 0cfd9006 authored by Masahiro Yamada's avatar Masahiro Yamada

kbuild: replace $(linked-object) with CONFIG options

*.prelink.o is created when CONFIG_LTO_CLANG or CONFIG_X86_KERNEL_IBT
is enabled.

Replace $(linked-object) with $(CONFIG_LTO_CLANG)$(CONFIG_X86_KERNEL_IBT)
so you will get a quick idea of when the --link option is passed.

No functional change is intended.
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Acked-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14
parent 0aa24a79
...@@ -219,7 +219,7 @@ objtool_args = \ ...@@ -219,7 +219,7 @@ objtool_args = \
$(if $(CONFIG_STACK_VALIDATION), --stackval) \ $(if $(CONFIG_STACK_VALIDATION), --stackval) \
$(if $(CONFIG_HAVE_STATIC_CALL_INLINE), --static-call) \ $(if $(CONFIG_HAVE_STATIC_CALL_INLINE), --static-call) \
--uaccess \ --uaccess \
$(if $(linked-object), --link) \ $(if $($(CONFIG_LTO_CLANG)$(CONFIG_X86_KERNEL_IBT)), --link) \
$(if $(part-of-module), --module) \ $(if $(part-of-module), --module) \
$(if $(CONFIG_GCOV_KERNEL), --no-unreachable) $(if $(CONFIG_GCOV_KERNEL), --no-unreachable)
...@@ -284,7 +284,6 @@ quiet_cmd_cc_prelink_modules = LD [M] $@ ...@@ -284,7 +284,6 @@ quiet_cmd_cc_prelink_modules = LD [M] $@
# modules into native code # modules into native code
$(obj)/%.prelink.o: objtool-enabled = y $(obj)/%.prelink.o: objtool-enabled = y
$(obj)/%.prelink.o: part-of-module := y $(obj)/%.prelink.o: part-of-module := y
$(obj)/%.prelink.o: linked-object := y
$(obj)/%.prelink.o: $(obj)/%.o FORCE $(obj)/%.prelink.o: $(obj)/%.o FORCE
$(call if_changed,cc_prelink_modules) $(call if_changed,cc_prelink_modules)
......
Markdown is supported
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