提交 167a58f1 编写于 作者: C Conny Seidel 提交者: Arnaldo Carvalho de Melo

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: NConny Seidel <conny.seidel@.amd.com>
Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 0879b100
...@@ -605,33 +605,35 @@ endif ...@@ -605,33 +605,35 @@ endif
ifdef NO_DEMANGLE ifdef NO_DEMANGLE
BASIC_CFLAGS += -DNO_DEMANGLE BASIC_CFLAGS += -DNO_DEMANGLE
else ifdef HAVE_CPLUS_DEMANGLE
EXTLIBS += -liberty
BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE
else else
FLAGS_BFD=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd ifdef HAVE_CPLUS_DEMANGLE
has_bfd := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD)) EXTLIBS += -liberty
ifeq ($(has_bfd),y) BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE
EXTLIBS += -lbfd else
else FLAGS_BFD=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd
FLAGS_BFD_IBERTY=$(FLAGS_BFD) -liberty has_bfd := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD))
has_bfd_iberty := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD_IBERTY)) ifeq ($(has_bfd),y)
ifeq ($(has_bfd_iberty),y) EXTLIBS += -lbfd
EXTLIBS += -lbfd -liberty
else else
FLAGS_BFD_IBERTY_Z=$(FLAGS_BFD_IBERTY) -lz FLAGS_BFD_IBERTY=$(FLAGS_BFD) -liberty
has_bfd_iberty_z := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD_IBERTY_Z)) has_bfd_iberty := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD_IBERTY))
ifeq ($(has_bfd_iberty_z),y) ifeq ($(has_bfd_iberty),y)
EXTLIBS += -lbfd -liberty -lz EXTLIBS += -lbfd -liberty
else else
FLAGS_CPLUS_DEMANGLE=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -liberty FLAGS_BFD_IBERTY_Z=$(FLAGS_BFD_IBERTY) -lz
has_cplus_demangle := $(call try-cc,$(SOURCE_CPLUS_DEMANGLE),$(FLAGS_CPLUS_DEMANGLE)) has_bfd_iberty_z := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD_IBERTY_Z))
ifeq ($(has_cplus_demangle),y) ifeq ($(has_bfd_iberty_z),y)
EXTLIBS += -liberty EXTLIBS += -lbfd -liberty -lz
BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE
else else
msg := $(warning No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling) FLAGS_CPLUS_DEMANGLE=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -liberty
BASIC_CFLAGS += -DNO_DEMANGLE has_cplus_demangle := $(call try-cc,$(SOURCE_CPLUS_DEMANGLE),$(FLAGS_CPLUS_DEMANGLE))
ifeq ($(has_cplus_demangle),y)
EXTLIBS += -liberty
BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE
else
msg := $(warning No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling)
BASIC_CFLAGS += -DNO_DEMANGLE
endif
endif endif
endif endif
endif endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册