From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752628AbdHXI1R (ORCPT ); Thu, 24 Aug 2017 04:27:17 -0400 Received: from terminus.zytor.com ([65.50.211.136]:42711 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751740AbdHXI1O (ORCPT ); Thu, 24 Aug 2017 04:27:14 -0400 Date: Thu, 24 Aug 2017 01:24:41 -0700 From: tip-bot for Konstantin Khlebnikov Message-ID: Cc: acme@redhat.com, alexander.shishkin@linux.intel.com, peterz@infradead.org, mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, khlebnikov@yandex-team.ru Reply-To: khlebnikov@yandex-team.ru, tglx@linutronix.de, hpa@zytor.com, mingo@kernel.org, peterz@infradead.org, alexander.shishkin@linux.intel.com, acme@redhat.com, linux-kernel@vger.kernel.org In-Reply-To: <150322916720.129772.7959925864494283854.stgit@buzz> References: <150322916720.129772.7959925864494283854.stgit@buzz> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf tools: Fix static linking with libdw from elfutils Git-Commit-ID: ba335df4ea2a5011002c5cde53bab6d7f5d714d8 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: ba335df4ea2a5011002c5cde53bab6d7f5d714d8 Gitweb: http://git.kernel.org/tip/ba335df4ea2a5011002c5cde53bab6d7f5d714d8 Author: Konstantin Khlebnikov AuthorDate: Sun, 20 Aug 2017 14:39:27 +0300 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 22 Aug 2017 13:24:54 -0300 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 Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/150322916720.129772.7959925864494283854.stgit@buzz Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Makefile.config | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 37d203c..bb4735b 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