]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: Fix objtool dependency for 'OBJECT_FILES_NON_STANDARD_<obj> := n'
authorJosh Poimboeuf <jpoimboe@redhat.com>
Tue, 18 May 2021 23:59:15 +0000 (18:59 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:53:20 +0000 (16:53 +0200)
commitd0eddb09dfbe800d271b22811acbbb9199c2e894
treea0e25fb078f9e1fca71f44f0cfeed8f2131f4624
parent425294405c936bb4e013c4a13fa870902357a78c
kbuild: Fix objtool dependency for 'OBJECT_FILES_NON_STANDARD_<obj> := n'

[ Upstream commit 8852c552402979508fdc395ae07aa8761aa46045 ]

"OBJECT_FILES_NON_STANDARD_vma.o := n" has a dependency bug.  When
objtool source is updated, the affected object doesn't get re-analyzed
by objtool.

Peter's new variable-sized jump label feature relies on objtool
rewriting the object file.  Otherwise the system can fail to boot.  That
effectively upgrades this minor dependency issue to a major bug.

The problem is that variables in prerequisites are expanded early,
during the read-in phase.  The '$(objtool_dep)' variable indirectly uses
'$@', which isn't yet available when the target prerequisites are
evaluated.

Use '.SECONDEXPANSION:' which causes '$(objtool_dep)' to be expanded in
a later phase, after the target-specific '$@' variable has been defined.

Fixes: 0e44d9595813 ("objtool: Add CONFIG_STACK_VALIDATION option")
Fixes: ab3257042c26 ("jump_label, x86: Allow short NOPs")
Reported-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
scripts/Makefile.build