lkml.org 
[lkml]   [2017]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 13/21] ftrace: Disable LTO for ftrace self tests
Date
From: Andi Kleen <ak@linux.intel.com>

Even when the test functions are not inlined something makes the ftrace
self tests fail with LTO. ftrace manually tests seems to work fine.
Disable LTO for the self test file, which makes the self tests work
again.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
kernel/trace/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile
index e2538c7638d4..a471a08305e9 100644
--- a/kernel/trace/Makefile
+++ b/kernel/trace/Makefile
@@ -8,7 +8,7 @@ KBUILD_CFLAGS = $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS))

ifdef CONFIG_FTRACE_SELFTEST
# selftest needs instrumentation
-CFLAGS_trace_selftest_dynamic.o = $(CC_FLAGS_FTRACE)
+CFLAGS_trace_selftest_dynamic.o = $(CC_FLAGS_FTRACE) ${DISABLE_LTO}
obj-y += trace_selftest_dynamic.o
endif
endif
--
2.13.6
\
 
 \ /
  Last update: 2017-11-27 22:36    [W:0.168 / U:1.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site