summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKyle McMartin <kyle@mcmartin.ca>2010-05-10 16:43:35 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-05-11 12:43:11 -0300
commitd11c7addfe0fa501cb54c824c0fac3481d527433 (patch)
tree4de64fa8df645092ba6b973a272f272e8af7b5b0 /tools
parent6b3c4ef50441e85dc9b2c9b67e95e8ad1185c15e (diff)
downloadkernel-mfld-blackbay-d11c7addfe0fa501cb54c824c0fac3481d527433.tar.gz
kernel-mfld-blackbay-d11c7addfe0fa501cb54c824c0fac3481d527433.tar.bz2
kernel-mfld-blackbay-d11c7addfe0fa501cb54c824c0fac3481d527433.zip
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index b28bb7359b1..0797786aa72 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")