kbuild: detect objtool update without using .SECONDEXPANSION
authorMasahiro Yamada <masahiroy@kernel.org>
Tue, 31 Aug 2021 07:39:56 +0000 (16:39 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Wed, 22 Sep 2021 00:26:25 +0000 (09:26 +0900)
commitef62588c2c8611c196b780561610921b7b864bb2
tree158403af4b941651df8d69745a1c2250353cafe1
parent918a6b7f68468ab80ec5e7ab7f3d2ef88905c20b
kbuild: detect objtool update without using .SECONDEXPANSION

Redo commit 8852c5524029 ("kbuild: Fix objtool dependency for
'OBJECT_FILES_NON_STANDARD_<obj> := n'") to add the objtool
dependency in a cleaner way.

Using .SECONDEXPANSION ends up with unreadable code due to escaped
dollars. Also, it is not efficient because the second half of
Makefile.build is parsed twice every time.

Append the objtool dependency to the *.cmd files at the build time.

This is what fixdep and gen_ksymdeps.sh already do. So, following the
same pattern seems a natural solution.

This allows us to drop $$(objtool_dep) entirely.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
scripts/Makefile.build