summaryrefslogtreecommitdiffstats
path: root/tools/perf/config/Makefile
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2015-08-13 00:48:37 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-08-13 19:49:11 +0200
commit7aec51cbf0646cc15d719b08caea931576dc7f2a (patch)
treed502a6428c71a423e907dfd0285da24ede731bc7 /tools/perf/config/Makefile
parentMerge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
downloadlinux-7aec51cbf0646cc15d719b08caea931576dc7f2a.tar.xz
linux-7aec51cbf0646cc15d719b08caea931576dc7f2a.zip
perf tools: Support static linking with libdw
The Fedora 22 version of libdw requires a couple of extra libraries to link. With a dynamic link the dependencies are pulled in automatically, but this doesn't work for static linking. Add the needed libraries explicitely to the feature probe and the Makefile. v2: Explicitly check for static linking and only add the dependencies when -static is set. This is to avoid regressions on Arnaldo's system. Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Link: http://lkml.kernel.org/r/1439419717-20601-1-git-send-email-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/config/Makefile')
-rw-r--r--tools/perf/config/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 823195aa6d4b..827557fc7511 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -297,7 +297,11 @@ ifndef NO_LIBELF
else
CFLAGS += -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS)
LDFLAGS += $(LIBDW_LDFLAGS)
- EXTLIBS += -ldw
+ 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
endif # NO_DWARF