* [PATCH] perf: allow forcing use of cplus_demangle
@ 2010-05-10 20:43 Kyle McMartin
2010-05-12 8:40 ` [tip:perf/core] perf symbols: " tip-bot for Kyle McMartin
0 siblings, 1 reply; 2+ messages in thread
From: Kyle McMartin @ 2010-05-10 20:43 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel
For Fedora, I want to force perf to link against libiberty.a for
cplus_demangle, rather than libbfd.a for bfd_demangle due to licensing
insanity on binutils. (libiberty is LGPL2, libbfd is GPL3.)
If we just rely on autodetection, we'll end up with libbfd linked
against us, since they're both in binutils-static in the buildroot.
Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index bc0f670..429bace 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -541,6 +541,9 @@ endif
ifdef NO_DEMANGLE
BASIC_CFLAGS += -DNO_DEMANGLE
+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")
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:perf/core] perf symbols: allow forcing use of cplus_demangle
2010-05-10 20:43 [PATCH] perf: allow forcing use of cplus_demangle Kyle McMartin
@ 2010-05-12 8:40 ` tip-bot for Kyle McMartin
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Kyle McMartin @ 2010-05-12 8:40 UTC (permalink / raw)
To: linux-tip-commits; +Cc: acme, linux-kernel, hpa, mingo, kyle, kyle, tglx, mingo
Commit-ID: d11c7addfe0fa501cb54c824c0fac3481d527433
Gitweb: http://git.kernel.org/tip/d11c7addfe0fa501cb54c824c0fac3481d527433
Author: Kyle McMartin <kyle@mcmartin.ca>
AuthorDate: Mon, 10 May 2010 16:43:35 -0400
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 11 May 2010 12:43:11 -0300
perf symbols: allow forcing use of cplus_demangle
For Fedora, I want to force perf to link against libiberty.a for
cplus_demangle, rather than libbfd.a for bfd_demangle due to licensing insanity
on binutils. (libiberty is LGPL2, libbfd is GPL3.)
If we just rely on autodetection, we'll end up with libbfd linked against us,
since they're both in binutils-static in the buildroot.
Cc: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <20100510204335.GA7565@bombadil.infradead.org>
Signed-off-by: Kyle McMartin <kyle@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Makefile | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index b28bb73..0797786 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -592,6 +592,9 @@ endif
ifdef NO_DEMANGLE
BASIC_CFLAGS += -DNO_DEMANGLE
+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")
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-12 8:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-10 20:43 [PATCH] perf: allow forcing use of cplus_demangle Kyle McMartin
2010-05-12 8:40 ` [tip:perf/core] perf symbols: " tip-bot for Kyle McMartin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome