diff options
author | Conny Seidel <conny.seidel@amd.com> | 2010-07-06 11:39:43 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-07-22 16:30:39 -0400 |
commit | 8a4fd31e0e8dc33f00b8949a12ac56310bac57bc (patch) | |
tree | cf8db87595eb836c513464a81d8ee5da05f31c59 /tools/perf | |
parent | 70a7cb3b39994ff366ff100b46f9dc97b1510c0f (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: Ingo Molnar <mingo@elte.hu>,
Cc: Borislav Petkov <borislav.petkov@amd.com>
LKML-Reference: <1278430783-17259-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')
-rw-r--r-- | tools/perf/Makefile | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 3d8f31ed771d..d75c28a825f5 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -600,30 +600,32 @@ endif | |||
600 | 600 | ||
601 | ifdef NO_DEMANGLE | 601 | ifdef NO_DEMANGLE |
602 | BASIC_CFLAGS += -DNO_DEMANGLE | 602 | BASIC_CFLAGS += -DNO_DEMANGLE |
603 | else ifdef HAVE_CPLUS_DEMANGLE | ||
604 | EXTLIBS += -liberty | ||
605 | BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE | ||
606 | else | 603 | else |
607 | 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") | 604 | ifdef HAVE_CPLUS_DEMANGLE |
608 | 605 | EXTLIBS += -liberty | |
609 | ifeq ($(has_bfd),y) | 606 | BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE |
610 | EXTLIBS += -lbfd | ||
611 | else | 607 | else |
612 | 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 $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd -liberty "$(QUIET_STDERR)" && echo y") | 608 | 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") |
613 | ifeq ($(has_bfd_iberty),y) | 609 | |
614 | EXTLIBS += -lbfd -liberty | 610 | ifeq ($(has_bfd),y) |
611 | EXTLIBS += -lbfd | ||
615 | else | 612 | else |
616 | 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 $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd -liberty -lz "$(QUIET_STDERR)" && echo y") | 613 | 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 $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd -liberty "$(QUIET_STDERR)" && echo y") |
617 | ifeq ($(has_bfd_iberty_z),y) | 614 | ifeq ($(has_bfd_iberty),y) |
618 | EXTLIBS += -lbfd -liberty -lz | 615 | EXTLIBS += -lbfd -liberty |
619 | else | 616 | else |
620 | has_cplus_demangle := $(shell sh -c "(echo 'extern char *cplus_demangle(const char *, int);'; echo 'int main(void) { cplus_demangle(0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -liberty "$(QUIET_STDERR)" && echo y") | 617 | 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 $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd -liberty -lz "$(QUIET_STDERR)" && echo y") |
621 | ifeq ($(has_cplus_demangle),y) | 618 | ifeq ($(has_bfd_iberty_z),y) |
622 | EXTLIBS += -liberty | 619 | EXTLIBS += -lbfd -liberty -lz |
623 | BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE | ||
624 | else | 620 | else |
625 | msg := $(warning No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling) | 621 | has_cplus_demangle := $(shell sh -c "(echo 'extern char *cplus_demangle(const char *, int);'; echo 'int main(void) { cplus_demangle(0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -liberty "$(QUIET_STDERR)" && echo y") |
626 | BASIC_CFLAGS += -DNO_DEMANGLE | 622 | ifeq ($(has_cplus_demangle),y) |
623 | EXTLIBS += -liberty | ||
624 | BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE | ||
625 | else | ||
626 | msg := $(warning No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling) | ||
627 | BASIC_CFLAGS += -DNO_DEMANGLE | ||
628 | endif | ||
627 | endif | 629 | endif |
628 | endif | 630 | endif |
629 | endif | 631 | endif |