Skip to content

Commit

Permalink
kbuild: clean up objtool_args slightly
Browse files Browse the repository at this point in the history
The code:

  $(if $(or $(CONFIG_GCOV_KERNEL),$(CONFIG_LTO_CLANG)), ...)

... can be simpled to:

  $(if $(CONFIG_GCOV_KERNEL)$(CONFIG_LTO_CLANG), ...)

Also, remove meaningless commas at the end of $(if ...).

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
  • Loading branch information
Masahiro Yamada committed Sep 2, 2021
1 parent e54dd93 commit 44815c9
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions scripts/Makefile.lib
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,12 @@ endif
# then here to avoid duplication.
objtool_args = \
$(if $(CONFIG_UNWINDER_ORC),orc generate,check) \
$(if $(part-of-module), --module,) \
$(if $(part-of-module), --module) \
$(if $(CONFIG_FRAME_POINTER),, --no-fp) \
$(if $(or $(CONFIG_GCOV_KERNEL),$(CONFIG_LTO_CLANG)), \
--no-unreachable,) \
$(if $(CONFIG_RETPOLINE), --retpoline,) \
$(if $(CONFIG_X86_SMAP), --uaccess,) \
$(if $(CONFIG_FTRACE_MCOUNT_USE_OBJTOOL), --mcount,)
$(if $(CONFIG_GCOV_KERNEL)$(CONFIG_LTO_CLANG), --no-unreachable)\
$(if $(CONFIG_RETPOLINE), --retpoline) \
$(if $(CONFIG_X86_SMAP), --uaccess) \
$(if $(CONFIG_FTRACE_MCOUNT_USE_OBJTOOL), --mcount)

# Useful for describing the dependency of composite objects
# Usage:
Expand Down

0 comments on commit 44815c9

Please sign in to comment.