diff options
author | Konstantin Khlebnikov <khlebnikov@yandex-team.ru> | 2017-08-20 14:39:27 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-08-22 13:24:54 -0300 |
commit | ba335df4ea2a5011002c5cde53bab6d7f5d714d8 (patch) | |
tree | 6dd01027dadf65c2bb478b6c55eb3bd5d1917f12 /tools/perf/Makefile.config | |
parent | ac0bb6b72f4bbab08f270a919406d971e73698b5 (diff) | |
download | linux-ba335df4ea2a5011002c5cde53bab6d7f5d714d8.tar.gz linux-ba335df4ea2a5011002c5cde53bab6d7f5d714d8.tar.bz2 linux-ba335df4ea2a5011002c5cde53bab6d7f5d714d8.zip |
perf tools: Fix static linking with libdw from elfutils
Fix feature test for static libdw: link required dependencies. Backends
of libebl are not statically linked thus libdl is required.
In Debian/Ubuntu libdw-dev includes libebl.a starting from 0.166-1.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/150322916720.129772.7959925864494283854.stgit@buzz
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Makefile.config')
-rw-r--r-- | tools/perf/Makefile.config | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 37d203c4cd1f..bb4735b92ada 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -103,8 +103,12 @@ ifdef LIBDW_DIR LIBDW_CFLAGS := -I$(LIBDW_DIR)/include LIBDW_LDFLAGS := -L$(LIBDW_DIR)/lib endif +DWARFLIBS := -ldw +ifeq ($(findstring -static,${LDFLAGS}),-static) + DWARFLIBS += -lelf -lebl -ldl -lz -llzma -lbz2 +endif FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind := $(LIBDW_CFLAGS) -FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind := $(LIBDW_LDFLAGS) -ldw +FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind := $(LIBDW_LDFLAGS) $(DWARFLIBS) # for linking with debug library, run like: # make DEBUG=1 LIBBABELTRACE_DIR=/opt/libbabeltrace/ @@ -365,10 +369,6 @@ ifndef NO_LIBELF else CFLAGS += -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS) LDFLAGS += $(LIBDW_LDFLAGS) - DWARFLIBS := -ldw - ifeq ($(findstring -static,${LDFLAGS}),-static) - DWARFLIBS += -lelf -lebl -lz -llzma -lbz2 - endif EXTLIBS += ${DWARFLIBS} $(call detected,CONFIG_DWARF) endif # PERF_HAVE_DWARF_REGS |