diff options
author | Mike Galbraith <efault@gmx.de> | 2009-08-08 08:14:15 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-09 06:54:47 -0400 |
commit | 183f3b0887083d36c8a25cd5e3518906415d1889 (patch) | |
tree | ede429e89d4e0553246454a5ee6b36c276872003 /tools/perf/Makefile | |
parent | c24b513337f06712b8c81eb4f1413d44591dfee7 (diff) |
perf_counter tools: Fix libbfd detection for systems with libz dependency
Due to a libz dependency in some distro's binutils package,
C++ demangle support isn't compiled in despite the necessary
libraries being available.
Fix this by adding a -lz link test to the dependency detection
rules.
Signed-off-by: Mike Galbraith <efault@gmx.de>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1249733655.6929.5.camel@marge.simson.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r-- | tools/perf/Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 1916e44b9bb0..60411e94113b 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -387,10 +387,14 @@ else | |||
387 | 387 | ||
388 | 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 /dev/null $(ALL_LDFLAGS) -lbfd -liberty > /dev/null 2>&1 && echo y") | 388 | 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 /dev/null $(ALL_LDFLAGS) -lbfd -liberty > /dev/null 2>&1 && echo y") |
389 | 389 | ||
390 | 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 /dev/null $(ALL_LDFLAGS) -lbfd -liberty -lz > /dev/null 2>&1 && echo y") | ||
391 | |||
390 | ifeq ($(has_bfd),y) | 392 | ifeq ($(has_bfd),y) |
391 | EXTLIBS += -lbfd | 393 | EXTLIBS += -lbfd |
392 | else ifeq ($(has_bfd_iberty),y) | 394 | else ifeq ($(has_bfd_iberty),y) |
393 | EXTLIBS += -lbfd -liberty | 395 | EXTLIBS += -lbfd -liberty |
396 | else ifeq ($(has_bfd_iberty_z),y) | ||
397 | EXTLIBS += -lbfd -liberty -lz | ||
394 | else | 398 | else |
395 | msg := $(warning No bfd.h/libbfd found, install binutils-dev[el] to gain symbol demangling) | 399 | msg := $(warning No bfd.h/libbfd found, install binutils-dev[el] to gain symbol demangling) |
396 | BASIC_CFLAGS += -DNO_DEMANGLE | 400 | BASIC_CFLAGS += -DNO_DEMANGLE |