FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 07-06-2011, 12:13 AM
Anders Kaseorg
 
Default 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 <andersk@mit.edu>
[v2: Changed to modify EXTLIBS]
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
tools/perf/Makefile | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 940257b..61cd6cc 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -564,20 +564,21 @@ else
EXTLIBS += -liberty
BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE
else
- FLAGS_BFD=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd
+ LIBBFD := $(shell $(CC) -print-file-name=libbfd.a)
+ FLAGS_BFD=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(LIBBFD)
has_bfd := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD))
ifeq ($(has_bfd),y)
- EXTLIBS += -lbfd
+ EXTLIBS += $(LIBBFD)
else
FLAGS_BFD_IBERTY=$(FLAGS_BFD) -liberty
has_bfd_iberty := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD_IBERTY))
ifeq ($(has_bfd_iberty),y)
- EXTLIBS += -lbfd -liberty
+ EXTLIBS += $(LIBBFD) -liberty
else
FLAGS_BFD_IBERTY_Z=$(FLAGS_BFD_IBERTY) -lz
has_bfd_iberty_z := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD_IBERTY_Z))
ifeq ($(has_bfd_iberty_z),y)
- EXTLIBS += -lbfd -liberty -lz
+ EXTLIBS += $(LIBBFD) -liberty -lz
else
FLAGS_CPLUS_DEMANGLE=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -liberty
has_cplus_demangle := $(call try-cc,$(SOURCE_CPLUS_DEMANGLE),$(FLAGS_CPLUS_DEMANGLE ))
--
1.7.4.1


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 07-06-2011, 12:13 AM
Anders Kaseorg
 
Default 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 <andersk@mit.edu>
[v2: Changed to modify EXTLIBS]
[v3: Adapted to apply to Maverick]
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
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 <bfd.h>'; 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 <bfd.h>'; 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 <bfd.h>'; 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 <bfd.h>'; 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 <bfd.h>'; 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 <bfd.h>'; 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)
--
1.7.4.1


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 07-06-2011, 12:13 AM
Anders Kaseorg
 
Default 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 <andersk@mit.edu>
[v2: Changed to modify EXTLIBS]
[v3: Adapted to apply to Maverick]
[v4: Adapted to apply to Lucid]
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
tools/perf/Makefile | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index e5c942b..9851a06 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -454,18 +454,19 @@ else ifdef HAVE_CPLUS_DEMANGLE
EXTLIBS += -liberty
BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE
else
- has_bfd := $(shell sh -c "(echo '#include <bfd.h>'; 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 <bfd.h>'; 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 <bfd.h>'; 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 <bfd.h>'; 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 <bfd.h>'; 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 <bfd.h>'; 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)
--
1.7.4.1


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 08-02-2011, 09:38 AM
Stefan Bader
 
Default UBUNTU: SAUCE: perf: Link libbfd statically

 
Old 08-02-2011, 09:38 AM
Stefan Bader
 
Default UBUNTU: SAUCE: perf: Link libbfd statically

 
Old 08-02-2011, 09:38 AM
Stefan Bader
 
Default UBUNTU: SAUCE: perf: Link libbfd statically

 

Thread Tools




All times are GMT. The time now is 04:49 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org