aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/Makefile
diff options
context:
space:
mode:
authorConny Seidel <conny.seidel@amd.com>2010-07-01 09:19:26 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-07-02 09:01:58 -0400
commit167a58f10d9cd1bdf6a911aa1eecbdff596de156 (patch)
tree9e71a68c8267172db279706724ab1545663aaa8b /tools/perf/Makefile
parent0879b100f3c187257729f36cba33d96ec2875766 (diff)
perf tools: Fix fallback to cplus_demangle() when bfd_demangle() is not available
make version 3.80 doesn't support "else ifdef" on the same line, also it doesn't support unindented nested constructs. Build fails with: Makefile:608: Extraneous text after `else' directive Makefile:611: *** only one `else' per conditional. Stop. This patch fixes the build for make 3.80. Cc: Borislav Petkov <borislav.petkov@amd.com> LKML-Reference: <1277990366-1462-1-git-send-email-conny.seidel@amd.com> Signed-off-by: Conny Seidel <conny.seidel@.amd.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r--tools/perf/Makefile48
1 files changed, 25 insertions, 23 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 17a3692397c5..26f626d45a9e 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -605,33 +605,35 @@ endif
605 605
606ifdef NO_DEMANGLE 606ifdef NO_DEMANGLE
607 BASIC_CFLAGS += -DNO_DEMANGLE 607 BASIC_CFLAGS += -DNO_DEMANGLE
608else ifdef HAVE_CPLUS_DEMANGLE
609 EXTLIBS += -liberty
610 BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE
611else 608else
612 FLAGS_BFD=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd 609 ifdef HAVE_CPLUS_DEMANGLE
613 has_bfd := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD)) 610 EXTLIBS += -liberty
614 ifeq ($(has_bfd),y) 611 BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE
615 EXTLIBS += -lbfd 612 else
616 else 613 FLAGS_BFD=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd
617 FLAGS_BFD_IBERTY=$(FLAGS_BFD) -liberty 614 has_bfd := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD))
618 has_bfd_iberty := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD_IBERTY)) 615 ifeq ($(has_bfd),y)
619 ifeq ($(has_bfd_iberty),y) 616 EXTLIBS += -lbfd
620 EXTLIBS += -lbfd -liberty
621 else 617 else
622 FLAGS_BFD_IBERTY_Z=$(FLAGS_BFD_IBERTY) -lz 618 FLAGS_BFD_IBERTY=$(FLAGS_BFD) -liberty
623 has_bfd_iberty_z := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD_IBERTY_Z)) 619 has_bfd_iberty := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD_IBERTY))
624 ifeq ($(has_bfd_iberty_z),y) 620 ifeq ($(has_bfd_iberty),y)
625 EXTLIBS += -lbfd -liberty -lz 621 EXTLIBS += -lbfd -liberty
626 else 622 else
627 FLAGS_CPLUS_DEMANGLE=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -liberty 623 FLAGS_BFD_IBERTY_Z=$(FLAGS_BFD_IBERTY) -lz
628 has_cplus_demangle := $(call try-cc,$(SOURCE_CPLUS_DEMANGLE),$(FLAGS_CPLUS_DEMANGLE)) 624 has_bfd_iberty_z := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD_IBERTY_Z))
629 ifeq ($(has_cplus_demangle),y) 625 ifeq ($(has_bfd_iberty_z),y)
630 EXTLIBS += -liberty 626 EXTLIBS += -lbfd -liberty -lz
631 BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE
632 else 627 else
633 msg := $(warning No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling) 628 FLAGS_CPLUS_DEMANGLE=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -liberty
634 BASIC_CFLAGS += -DNO_DEMANGLE 629 has_cplus_demangle := $(call try-cc,$(SOURCE_CPLUS_DEMANGLE),$(FLAGS_CPLUS_DEMANGLE))
630 ifeq ($(has_cplus_demangle),y)
631 EXTLIBS += -liberty
632 BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE
633 else
634 msg := $(warning No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling)
635 BASIC_CFLAGS += -DNO_DEMANGLE
636 endif
635 endif 637 endif
636 endif 638 endif
637 endif 639 endif