Kconfig: fix dependency issue when building in-tree without CONFIG_FTRACE
authorBeniamin Sandu <beniaminsandu@gmail.com>
Thu, 13 Aug 2020 13:24:39 +0000 (16:24 +0300)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 13 Aug 2020 18:22:30 +0000 (14:22 -0400)
commita1a87ddd1990aa70e7a64a1059f8c3b23ac35099
tree6babab43f56bb6a92dc4666b2872d21883624a8c
parentc3cd20968c4e10c2d4525d40a6db596eb1429239
Kconfig: fix dependency issue when building in-tree without CONFIG_FTRACE

When building in-tree, one could disable CONFIG_FTRACE from kernel
config which will leave CONFIG_TRACEPOINTS selected by LTTNG modules,
but generate a lot of linker errors like below because it leaves out
other stuff, e.g.:

trace.c:(.text+0xd86b): undefined reference to `trace_event_buffer_reserve'
ld: trace.c:(.text+0xd8de): undefined reference to `trace_event_buffer_commit'
ld: trace.c:(.text+0xd926): undefined reference to `event_triggers_call'
ld: trace.c:(.text+0xd942): undefined reference to `trace_event_ignore_this_pid'
ld: net/mac80211/trace.o: in function `trace_event_raw_event_drv_tdls_cancel_channel_switch':

It appears to be caused by the fact that TRACE_EVENT macros in the Linux
kernel depend on the Ftrace ring buffer as soon as CONFIG_TRACEPOINTS is
enabled.

Steps to reproduce:

- Get a clone of an upstream stable kernel and use scripts/built-in.sh on it

- Configure a standard x86-64 build, enable built-in LTTNG but disable
  CONFIG_FTRACE from Kernel Hacking-->Tracers using menuconfig

- Build will fail at linking stage

Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Kconfig
This page took 0.032074 seconds and 4 git commands to generate.