Skip to content
Commit beb64203 authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo
Browse files

perf trace: Fix compilation error for make NO_LIBBPF=1 DEBUG=1



The perf compilation fails for NO_LIBBPF=1 DEBUG=1 with:

  $ make NO_LIBBPF=1 DEBUG=1
    BUILD:   Doing 'make -j8' parallel build
    CC       builtin-trace.o
    LD       perf-in.o
    LINK     perf
  /usr/bin/ld: perf-in.o: in function `trace__find_bpf_map_by_name':
  /home/jolsa/kernel/linux-perf/tools/perf/builtin-trace.c:4608: undefined reference to `bpf_object__find_map_by_name'
  collect2: error: ld returned 1 exit status
  make[2]: *** [Makefile.perf:631: perf] Error 1
  make[1]: *** [Makefile.perf:225: sub-make] Error 2
  make: *** [Makefile:70: all] Error 2

Move trace__find_bpf_map_by_name calls under HAVE_LIBBPF_SUPPORT ifdef
and add make test for this.

Committer notes:

Add missing:

  run += make_no_libbpf_DEBUG

Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.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/20200518141027.3765877-1-jolsa@kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 6d1f9162
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment