From: Kyle McMartin Date: Mon, 10 May 2010 20:43:35 +0000 (-0400) Subject: perf symbols: allow forcing use of cplus_demangle X-Git-Tag: v2.6.32.40~42 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=cdcf58a4ed7461f9e4584ca1b2b46eb4bbd12811;p=karo-tx-linux.git perf symbols: allow forcing use of cplus_demangle commit d11c7addfe0fa501cb54c824c0fac3481d527433 upstream. 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 LKML-Reference: <20100510204335.GA7565@bombadil.infradead.org> Signed-off-by: Kyle McMartin Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Greg Kroah-Hartman --- diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 04f8ee5d8cd0..e5c942b6825b 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -450,6 +450,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 '; 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")