blob: ae8bec45de65369a9a486ee511e9c7f32e5e93f8 [file] [log] [blame]
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001From ff4d1d7e85be94ef43709cd698f0ec9a12f247d1 Mon Sep 17 00:00:00 2001
2From: Beniamin Sandu <beniaminsandu@gmail.com>
3Date: Thu, 13 Aug 2020 16:24:39 +0300
4Subject: [PATCH 01/10] Kconfig: fix dependency issue when building in-tree
5 without CONFIG_FTRACE
6
7When building in-tree, one could disable CONFIG_FTRACE from kernel
8config which will leave CONFIG_TRACEPOINTS selected by LTTNG modules,
9but generate a lot of linker errors like below because it leaves out
10other stuff, e.g.:
11
12trace.c:(.text+0xd86b): undefined reference to `trace_event_buffer_reserve'
13ld: trace.c:(.text+0xd8de): undefined reference to `trace_event_buffer_commit'
14ld: trace.c:(.text+0xd926): undefined reference to `event_triggers_call'
15ld: trace.c:(.text+0xd942): undefined reference to `trace_event_ignore_this_pid'
16ld: net/mac80211/trace.o: in function `trace_event_raw_event_drv_tdls_cancel_channel_switch':
17
18It appears to be caused by the fact that TRACE_EVENT macros in the Linux
19kernel depend on the Ftrace ring buffer as soon as CONFIG_TRACEPOINTS is
20enabled.
21
22Steps to reproduce:
23
24- Get a clone of an upstream stable kernel and use scripts/built-in.sh on it
25
26- Configure a standard x86-64 build, enable built-in LTTNG but disable
27 CONFIG_FTRACE from Kernel Hacking-->Tracers using menuconfig
28
29- Build will fail at linking stage
30
31Upstream-Status: Backport
32
33Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com>
34Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
35---
36 Kconfig | 2 +-
37 1 file changed, 1 insertion(+), 1 deletion(-)
38
39diff --git a/Kconfig b/Kconfig
40index acdab73..10eccff 100644
41--- a/Kconfig
42+++ b/Kconfig
43@@ -2,7 +2,7 @@
44
45 config LTTNG
46 tristate "LTTng support"
47- select TRACEPOINTS
48+ select TRACING
49 help
50 LTTng is an open source tracing framework for Linux.
51
52--
532.19.1
54