perf: allow forcing use of cplus_demangle
PATCH 1/1 perf: 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.
---
tools/perf/Makefile +3 -0
@@ -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")
[tip:perf/core] perf symbols: allow forcing use of cplus_demangle
Commit-ID: d11c7addfe0fa501cb54c824c0fac3481d527433 Gitweb: http://git.kernel.org/tip/d11c7addfe0fa501cb54c824c0fac3481d527433 Author: Kyle McMartin <[email protected]> AuthorDate: Mon, 10 May 2010 16:43:35 -0400 Committer: Arnaldo Carvalho de Melo <[email protected]> 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 <[email protected]>
LKML-Reference: <[email protected]>
--- tools/perf/Makefile | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
tools/perf/Makefile +3 -0
@@ -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")