Thread (22 messages) 22 messages, 4 authors, 2022-06-24

Re: [RFC PATCH v2 5/7] objtool: Enable objtool to run only on files with ftrace enabled

From: Peter Zijlstra <peterz@infradead.org>
Date: 2022-05-24 18:02:46
Also in: lkml

On Tue, May 24, 2022 at 08:01:39PM +0200, Peter Zijlstra wrote:
On Tue, May 24, 2022 at 03:17:45PM +0200, Christophe Leroy wrote:
quoted
From: Sathvika Vasireddy <redacted>

This patch makes sure objtool runs only on the object files
that have ftrace enabled, instead of running on all the object
files.

Signed-off-by: Naveen N. Rao <redacted>
Signed-off-by: Sathvika Vasireddy <redacted>
Signed-off-by: Christophe Leroy <redacted>
---
 scripts/Makefile.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 2e0c3f9c1459..06ceffd92921 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -258,8 +258,8 @@ else
 # '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
 
-$(obj)/%.o: objtool-enabled = $(if $(filter-out y%, \
-	$(OBJECT_FILES_NON_STANDARD_$(basetarget).o)$(OBJECT_FILES_NON_STANDARD)n),y)
+$(obj)/%.o: objtool-enabled = $(and $(if $(filter-out y%, $(OBJECT_FILES_NON_STANDARD_$(basetarget).o)$(OBJECT_FILES_NON_STANDARD)n),y),        \
+        $(if $(findstring $(strip $(CC_FLAGS_FTRACE)),$(_c_flags)),y),y)
I think this breaks x86, quite a bit of files have ftrace disabled but
very much must run objtool anyway.
Also; since the Changelog gives 0 clue as to what problem it's trying to
solve, I can't suggest anything.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help