Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31be9478 authored by Song Liu's avatar Song Liu Committed by Arnaldo Carvalho de Melo
Browse files

perf feature detection: Add -lopcodes to feature-libbfd



Both libbfd and libopcodes are distributed with binutil-dev/devel. When
libbfd is present, it is OK to assume that libopcodes also present. This
has been a safe assumption for bpftool.

This patch adds -lopcodes to perf/Makefile.config. libopcodes will be
used in the next commit for BPF annotation.

Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
Reviewed-by: default avatarJiri Olsa <jolsa@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stanislav Fomichev <sdf@google.com>
Cc: kernel-team@fb.com
Link: http://lkml.kernel.org/r/20190312053051.2690567-12-songliubraving@fb.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent ee7a112f
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -713,7 +713,7 @@ else
endif
endif


ifeq ($(feature-libbfd), 1)
ifeq ($(feature-libbfd), 1)
  EXTLIBS += -lbfd
  EXTLIBS += -lbfd -lopcodes
else
else
  # we are on a system that requires -liberty and (maybe) -lz
  # we are on a system that requires -liberty and (maybe) -lz
  # to link against -lbfd; test each case individually here
  # to link against -lbfd; test each case individually here
@@ -724,10 +724,10 @@ else
  $(call feature_check,libbfd-liberty-z)
  $(call feature_check,libbfd-liberty-z)


  ifeq ($(feature-libbfd-liberty), 1)
  ifeq ($(feature-libbfd-liberty), 1)
    EXTLIBS += -lbfd -liberty
    EXTLIBS += -lbfd -lopcodes -liberty
  else
  else
    ifeq ($(feature-libbfd-liberty-z), 1)
    ifeq ($(feature-libbfd-liberty-z), 1)
      EXTLIBS += -lbfd -liberty -lz
      EXTLIBS += -lbfd -lopcodes -liberty -lz
    endif
    endif
  endif
  endif
endif
endif