scripts/Makefile.lib | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index d1425778664b..c79ced81130d 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -229,20 +229,21 @@ ifdef CONFIG_OBJTOOL objtool := $(objtree)/tools/objtool/objtool -objtool_args = \ - $(if $(CONFIG_HAVE_JUMP_LABEL_HACK), --hacks=jump_label) \ - $(if $(CONFIG_HAVE_NOINSTR_HACK), --hacks=noinstr) \ - $(if $(CONFIG_X86_KERNEL_IBT), --ibt) \ - $(if $(CONFIG_FTRACE_MCOUNT_USE_OBJTOOL), --mcount) \ - $(if $(CONFIG_UNWINDER_ORC), --orc) \ - $(if $(CONFIG_RETPOLINE), --retpoline) \ - $(if $(CONFIG_SLS), --sls) \ - $(if $(CONFIG_STACK_VALIDATION), --stackval) \ - $(if $(CONFIG_HAVE_STATIC_CALL_INLINE), --static-call) \ - $(if $(CONFIG_HAVE_UACCESS_VALIDATION), --uaccess) \ - $(if $(delay-objtool), --link) \ - $(if $(part-of-module), --module) \ - $(if $(CONFIG_GCOV_KERNEL), --no-unreachable) +objtool_args-$(CONFIG_HAVE_JUMP_LABEL_HACK) += --hacks=jump_label +objtool_args-$(CONFIG_HAVE_NOINSTR_HACK) += --hacks=noinstr +objtool_args-$(CONFIG_X86_KERNEL_IBT) += --ibt +objtool_args-$(CONFIG_FTRACE_MCOUNT_USE_OBJTOOL) += --mcount +objtool_args-$(CONFIG_UNWINDER_ORC) += --orc +objtool_args-$(CONFIG_RETPOLINE) += --retpoline +objtool_args-$(CONFIG_SLS) += --sls +objtool_args-$(CONFIG_STACK_VALIDATION) += --stackval +objtool_args-$(CONFIG_HAVE_STATIC_CALL_INLINE) += --static-call +objtool_args-$(CONFIG_HAVE_UACCESS_VALIDATION) += --uaccess +objtool_args-$(CONFIG_GCOV_KERNEL) += --no-unreachable + +objtool_args = $(objtool_args-y) \ + $(if $(delay-objtool), --link) \ + $(if $(part-of-module), --module) delay-objtool := $(or $(CONFIG_LTO_CLANG),$(CONFIG_X86_KERNEL_IBT))