summaryrefslogtreecommitdiff
path: root/tools/perf/Makefile.config
diff options
context:
space:
mode:
authorMichael Petlan <mpetlan@redhat.com>2021-04-28 11:20:23 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-04-29 10:31:00 -0300
commit56d32d4cac645bac05fa70d935fa5040e3ab6bb3 (patch)
tree7afeb1356bfba0afcb92083703d391a1a98eb5ff /tools/perf/Makefile.config
parent2750ce1d4df2e70630d76bc53da160ca43a80d22 (diff)
perf tools: Enable libtraceevent dynamic linking
Currently we support only static linking with kernel's libtraceevent (tools/lib/traceevent). This patch adds libtraceevent package detection and support to link perf with it dynamically. The libtraceevent package status is displayed with: $ make VF=1 LIBTRACEEVENT_DYNAMIC=1 ... ... libtraceevent: [ on ] Default behavior remains the same (static linking). Committer testing: $ make LIBTRACEEVENT_DYNAMIC=1 VF=1 O=/tmp/build/perf -C tools/perf install-bin |& grep traceevent Makefile.config:1090: *** Error: No libtraceevent devel library found, please install libtraceevent-devel. Stop. $ Signed-off-by: Michael Petlan <mpetlan@redhat.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> LPU-Reference: 20210428092023.4009-1-mpetlan@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Makefile.config')
-rw-r--r--tools/perf/Makefile.config9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 3514fe956ed1..99c73a7b6a26 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -1079,6 +1079,15 @@ ifdef LIBPFM4
endif
endif
+ifdef LIBTRACEEVENT_DYNAMIC
+ $(call feature_check,libtraceevent)
+ ifeq ($(feature-libtraceevent), 1)
+ EXTLIBS += -ltraceevent
+ else
+ dummy := $(error Error: No libtraceevent devel library found, please install libtraceevent-devel);
+ endif
+endif
+
# Among the variables below, these:
# perfexecdir
# perf_include_dir