mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] lib: remove redundant ftrace flag removal
@ 2019-08-06 16:25 Mark Rutland
  2019-08-14  7:59 ` [tip:x86/cleanups] lib: Remove " tip-bot for Mark Rutland
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Rutland @ 2019-08-06 16:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mark Rutland, Andrew Morton, Borislav Petkov, Gary R Hook, Ingo Molnar

Since architectures can implement ftrace using a variety of mechanisms,
generic code should always use CC_FLAGS_FTRACE rather than assuming that
ftrace is built using -pg.

Since commit:

  2464a609ded09420 ("ftrace: do not trace library functions")

... lib/Makefile has removed CC_FLAGS_FTRACE from KBUILD_CFLAGS, so ftrace is
disabled for all files under lib/.

Given that, we shouldn't explicitly remove -pg when building
lib/string.o, as this is redundant and bad form.

This patch cleans things up accordingly.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Gary R Hook <gary.hook@amd.com>
Cc: Ingo Molnar <mingo@kernel.org>
---
 lib/Makefile | 4 ----
 1 file changed, 4 deletions(-)

I've verified this atop of v5.3-rc3, where the Makefile removes all of
CC_FLAGS_FTRACE (containing "-pg -mrecord-mcount -mfentry") from the CFLAGS for
building string.o

Mark.

diff --git a/lib/Makefile b/lib/Makefile
index 29c02a924973..c5892807e06f 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -21,10 +21,6 @@ KCOV_INSTRUMENT_dynamic_debug.o := n
 ifdef CONFIG_AMD_MEM_ENCRYPT
 KASAN_SANITIZE_string.o := n
 
-ifdef CONFIG_FUNCTION_TRACER
-CFLAGS_REMOVE_string.o = -pg
-endif
-
 CFLAGS_string.o := $(call cc-option, -fno-stack-protector)
 endif
 
-- 
2.11.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-14  8:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-06 16:25 [PATCH] lib: remove redundant ftrace flag removal Mark Rutland
2019-08-14  7:59 ` [tip:x86/cleanups] lib: Remove " tip-bot for Mark Rutland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome