]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
perf tools: Fix dynamic libbpf link
authorJiri Olsa <jolsa@kernel.org>
Sat, 8 May 2021 20:50:20 +0000 (22:50 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 18 Jun 2021 09:07:29 +0000 (11:07 +0200)
commit060ed28e11d0220901e9e20575ac92fd44b7d88b
treec683dbe02cd99dbd0062894fcd07c413cd7f781c
parent17be08f17d721030ddde4afe71d89b5669be876d
perf tools: Fix dynamic libbpf link

BugLink: https://bugs.launchpad.net/bugs/1931292
[ Upstream commit ad1237c30d975535a669746496cbed136aa5a045 ]

Justin reported broken build with LIBBPF_DYNAMIC=1.

When linking libbpf dynamically we need to use perf's
hashmap object, because it's not exported in libbpf.so
(only in libbpf.a).

Following build is now passing:

  $ make LIBBPF_DYNAMIC=1
    BUILD:   Doing 'make -j8' parallel build
    ...
  $ ldd perf | grep libbpf
        libbpf.so.0 => /lib64/libbpf.so.0 (0x00007fa7630db000)

Fixes: eee19501926d ("perf tools: Grab a copy of libbpf's hashmap")
Reported-by: Justin M. Forbes <jforbes@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20210508205020.617984-1-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
tools/perf/Makefile.config
tools/perf/util/Build