LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Michal Marek <michal.lkml@markovi.net>,
Nick Desaulniers <ndesaulniers@google.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] kbuild: rebuild *.lto.o when objtool is changed
Date: Sat, 28 Aug 2021 18:51:03 +0900 [thread overview]
Message-ID: <20210828095103.2617393-5-masahiroy@kernel.org> (raw)
In-Reply-To: <20210828095103.2617393-1-masahiroy@kernel.org>
When objtool is changed, all objects are rebuilt, but this check
is missing in the %.lto.o rule.
Move the objtool-md5sum into the objtool variable so the updated
objtool is detected when CONFIG_LTO_CLANG=y as well.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
scripts/Makefile.build | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index cc0c494a48d3..790b72208668 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -225,7 +225,10 @@ endif # CONFIG_FTRACE_MCOUNT_USE_RECORDMCOUNT
ifdef CONFIG_STACK_VALIDATION
-objtool = $(objtree)/tools/objtool/objtool \
+# Record the md5sum of the objtool executable so any change in it results in
+# rebuilding objects.
+objtool = : $(objtool-md5sum) ; \
+ $(objtree)/tools/objtool/objtool \
$(if $(CONFIG_UNWINDER_ORC),orc generate,check) \
$(if $(part-of-module), --module) \
$(if $(CONFIG_FRAME_POINTER),, --no-fp) \
@@ -239,12 +242,9 @@ ifndef CONFIG_LTO_CLANG
# 'OBJECT_FILES_NON_STANDARD := y': skip objtool checking for a directory
# 'OBJECT_FILES_NON_STANDARD_foo.o := 'y': skip objtool checking for a file
# 'OBJECT_FILES_NON_STANDARD_foo.o := 'n': override directory skip for a file
-#
-# Record the md5sum of the objtool executable so any change in it results in
-# rebuilding objects.
cmd_objtool = $(if $(patsubst y%,, \
$(OBJECT_FILES_NON_STANDARD_$(basetarget).o)$(OBJECT_FILES_NON_STANDARD)n), \
- ; : $(objtool-md5sum) ; $(objtool) $@)
+ ; $(objtool) $@)
endif # CONFIG_LTO_CLANG
endif # CONFIG_STACK_VALIDATION
--
2.30.2
next prev parent reply other threads:[~2021-08-28 9:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-28 9:50 [PATCH 1/5] modpost: get the *.mod file path more simply Masahiro Yamada
2021-08-28 9:51 ` [PATCH 2/5] kbuild: detect objtool changes correctly without .SECONDEXPANSION Masahiro Yamada
2021-08-31 1:43 ` Masahiro Yamada
2021-08-28 9:51 ` [PATCH 3/5] kbuild: clean up objtool_args slightly Masahiro Yamada
2021-08-31 1:41 ` Masahiro Yamada
2021-08-28 9:51 ` [PATCH 4/5] kbuild: merge objtool_args into objtool in scripts/Makefile.build Masahiro Yamada
2021-08-28 9:51 ` Masahiro Yamada [this message]
2021-08-31 1:41 ` [PATCH 1/5] modpost: get the *.mod file path more simply Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210828095103.2617393-5-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.lkml@markovi.net \
--cc=ndesaulniers@google.com \
--subject='Re: [PATCH 5/5] kbuild: rebuild *.lto.o when objtool is changed' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).