From patchwork Tue Aug 2 09:38:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Bader X-Patchwork-Id: 107869 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 3AEF8B71CA for ; Tue, 2 Aug 2011 19:38:30 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1QoBQZ-0005fW-78; Tue, 02 Aug 2011 09:38:19 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1QoBQV-0005eG-Mq for kernel-team@lists.ubuntu.com; Tue, 02 Aug 2011 09:38:15 +0000 Received: from p5b2e5828.dip.t-dialin.net ([91.46.88.40] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1QoBQV-0003oq-GR for kernel-team@lists.ubuntu.com; Tue, 02 Aug 2011 09:38:15 +0000 From: Stefan Bader To: kernel-team@lists.ubuntu.com Subject: [Maverick] UBUNTU: SAUCE: perf: Link libbfd statically Date: Tue, 2 Aug 2011 11:38:11 +0200 Message-Id: <1312277892-5468-3-git-send-email-stefan.bader@canonical.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1312277892-5468-1-git-send-email-stefan.bader@canonical.com> References: <1312277892-5468-1-git-send-email-stefan.bader@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From 8fb5549770e69e3c7a1ccf141d1498267f414c0a Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 5 Jul 2011 20:13:40 -0400 Subject: [PATCH] UBUNTU: SAUCE: perf: Link libbfd statically The binutils-dev package description forbids Debian packages from linking libbfd dynamically, because that would lead to very strict versioned dependencies, so that frequent rebuilds are required to keep every package in sync with current binutils. It would also make it impossible to install multiple versions of linux-tools linked against different binutils versions. BugLink: https://bugs.launchpad.net/bugs/783660 Signed-off-by: Anders Kaseorg [v2: Changed to modify EXTLIBS] [v3: Adapted to apply to Maverick] Signed-off-by: Stefan Bader --- tools/perf/Makefile | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/perf/Makefile b/tools/perf/Makefile index d75c28a..3ee346c 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -605,18 +605,19 @@ else EXTLIBS += -liberty BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE else - has_bfd := $(shell sh -c "(echo '\#include '; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd "$(QUIET_STDERR)" && echo y") + LIBBFD := $(shell $(CC) -print-file-name=libbfd.a) + has_bfd := $(shell sh -c "(echo '\#include '; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) $(LIBBFD) "$(QUIET_STDERR)" && echo y") ifeq ($(has_bfd),y) - EXTLIBS += -lbfd + EXTLIBS += $(LIBBFD) else - has_bfd_iberty := $(shell sh -c "(echo '\#include '; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd -liberty "$(QUIET_STDERR)" && echo y") + has_bfd_iberty := $(shell sh -c "(echo '\#include '; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) $(LIBBFD) -liberty "$(QUIET_STDERR)" && echo y") ifeq ($(has_bfd_iberty),y) - EXTLIBS += -lbfd -liberty + EXTLIBS += $(LIBBFD) -liberty else - has_bfd_iberty_z := $(shell sh -c "(echo '\#include '; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd -liberty -lz "$(QUIET_STDERR)" && echo y") + has_bfd_iberty_z := $(shell sh -c "(echo '\#include '; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) $(LIBBFD) -liberty -lz "$(QUIET_STDERR)" && echo y") ifeq ($(has_bfd_iberty_z),y) - EXTLIBS += -lbfd -liberty -lz + EXTLIBS += $(LIBBFD) -liberty -lz else has_cplus_demangle := $(shell sh -c "(echo 'extern char *cplus_demangle(const char *, int);'; echo 'int main(void) { cplus_demangle(0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -liberty "$(QUIET_STDERR)" && echo y") ifeq ($(has_cplus_demangle),y)