From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 01/14] perf tools: Support static linking with libdw
Date: Mon, 17 Aug 2015 16:11:54 -0300 [thread overview]
Message-ID: <1439838727-6824-2-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1439838727-6824-1-git-send-email-acme@kernel.org>
From: Andi Kleen <ak@linux.intel.com>
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>
---
tools/build/feature/Makefile | 7 ++++++-
tools/perf/config/Makefile | 6 +++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 1c0d69f44552..74ca42093d70 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -70,8 +70,13 @@ test-libelf.bin:
test-glibc.bin:
$(BUILD)
+DWARFLIBS := -ldw
+ifeq ($(findstring -static,${LDFLAGS}),-static)
+DWARFLIBS += -lelf -lebl -lz -llzma -lbz2
+endif
+
test-dwarf.bin:
- $(BUILD) -ldw
+ $(BUILD) $(DWARFLIBS)
test-libelf-mmap.bin:
$(BUILD) -lelf
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
--
2.1.0
next prev parent reply other threads:[~2015-08-17 19:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-17 19:11 [GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-08-17 19:11 ` Arnaldo Carvalho de Melo [this message]
2015-08-17 19:11 ` [PATCH 02/14] perf probe: Fix to add missed brace around if block Arnaldo Carvalho de Melo
2015-08-17 19:11 ` [PATCH 03/14] perf trace: Move vfs_getname storage to per thread area Arnaldo Carvalho de Melo
2015-08-17 19:11 ` [PATCH 04/14] perf script: Initialize callchain_param.record_mode Arnaldo Carvalho de Melo
2015-08-17 19:11 ` [PATCH 05/14] perf annotate: Fix 32-bit compilation error in util/annotate.c Arnaldo Carvalho de Melo
2015-08-17 19:11 ` [PATCH 06/14] perf symbols: Fix annotation of vdso Arnaldo Carvalho de Melo
2015-08-17 19:12 ` [PATCH 07/14] perf tools: Add a helper function to probe whether cpu-wide tracing is possible Arnaldo Carvalho de Melo
2015-08-17 19:12 ` [PATCH 08/14] perf auxtrace: Add Intel PT as an AUX area tracing type Arnaldo Carvalho de Melo
2015-08-17 19:12 ` [PATCH 09/14] perf tools: Add Intel PT packet decoder Arnaldo Carvalho de Melo
2015-08-17 19:12 ` [PATCH 10/14] perf tools: Add Intel PT instruction decoder Arnaldo Carvalho de Melo
2015-08-17 19:12 ` [PATCH 11/14] perf tools: Add Intel PT log Arnaldo Carvalho de Melo
2015-08-17 19:12 ` [PATCH 12/14] perf tools: Add Intel PT decoder Arnaldo Carvalho de Melo
2015-08-17 19:12 ` [PATCH 13/14] perf tools: Add Intel PT support Arnaldo Carvalho de Melo
2015-08-17 19:12 ` [PATCH 14/14] perf tools: Take Intel PT into use Arnaldo Carvalho de Melo
2015-08-20 9:50 ` [GIT PULL 00/14] perf/core improvements and fixes Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1439838727-6824-2-git-send-email-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=ak@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).