diff options
-rw-r--r-- | tools/perf/Makefile | 37 | ||||
-rw-r--r-- | tools/perf/config/Makefile | 37 |
2 files changed, 37 insertions, 37 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 061de65569c2..e4d99c485d6e 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -538,43 +538,6 @@ ifndef NO_LIBPYTHON | |||
538 | LIB_OBJS += $(OUTPUT)scripts/python/Perf-Trace-Util/Context.o | 538 | LIB_OBJS += $(OUTPUT)scripts/python/Perf-Trace-Util/Context.o |
539 | endif | 539 | endif |
540 | 540 | ||
541 | ifdef NO_DEMANGLE | ||
542 | BASIC_CFLAGS += -DNO_DEMANGLE | ||
543 | else | ||
544 | ifdef HAVE_CPLUS_DEMANGLE | ||
545 | EXTLIBS += -liberty | ||
546 | BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE | ||
547 | else | ||
548 | FLAGS_BFD=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -DPACKAGE='perf' -lbfd | ||
549 | has_bfd := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD),libbfd) | ||
550 | ifeq ($(has_bfd),y) | ||
551 | EXTLIBS += -lbfd | ||
552 | else | ||
553 | FLAGS_BFD_IBERTY=$(FLAGS_BFD) -liberty | ||
554 | has_bfd_iberty := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD_IBERTY),liberty) | ||
555 | ifeq ($(has_bfd_iberty),y) | ||
556 | EXTLIBS += -lbfd -liberty | ||
557 | else | ||
558 | FLAGS_BFD_IBERTY_Z=$(FLAGS_BFD_IBERTY) -lz | ||
559 | has_bfd_iberty_z := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD_IBERTY_Z),libz) | ||
560 | ifeq ($(has_bfd_iberty_z),y) | ||
561 | EXTLIBS += -lbfd -liberty -lz | ||
562 | else | ||
563 | FLAGS_CPLUS_DEMANGLE=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -liberty | ||
564 | has_cplus_demangle := $(call try-cc,$(SOURCE_CPLUS_DEMANGLE),$(FLAGS_CPLUS_DEMANGLE),demangle) | ||
565 | ifeq ($(has_cplus_demangle),y) | ||
566 | EXTLIBS += -liberty | ||
567 | BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE | ||
568 | else | ||
569 | msg := $(warning No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling) | ||
570 | BASIC_CFLAGS += -DNO_DEMANGLE | ||
571 | endif | ||
572 | endif | ||
573 | endif | ||
574 | endif | ||
575 | endif | ||
576 | endif | ||
577 | |||
578 | ifeq ($(NO_PERF_REGS),0) | 541 | ifeq ($(NO_PERF_REGS),0) |
579 | ifeq ($(ARCH),x86) | 542 | ifeq ($(ARCH),x86) |
580 | LIB_H += arch/x86/include/perf_regs.h | 543 | LIB_H += arch/x86/include/perf_regs.h |
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index b9b146538f7b..317dafee92e4 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile | |||
@@ -324,3 +324,40 @@ else | |||
324 | endif | 324 | endif |
325 | endif | 325 | endif |
326 | endif | 326 | endif |
327 | |||
328 | ifdef NO_DEMANGLE | ||
329 | BASIC_CFLAGS += -DNO_DEMANGLE | ||
330 | else | ||
331 | ifdef HAVE_CPLUS_DEMANGLE | ||
332 | EXTLIBS += -liberty | ||
333 | BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE | ||
334 | else | ||
335 | FLAGS_BFD=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -DPACKAGE='perf' -lbfd | ||
336 | has_bfd := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD),libbfd) | ||
337 | ifeq ($(has_bfd),y) | ||
338 | EXTLIBS += -lbfd | ||
339 | else | ||
340 | FLAGS_BFD_IBERTY=$(FLAGS_BFD) -liberty | ||
341 | has_bfd_iberty := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD_IBERTY),liberty) | ||
342 | ifeq ($(has_bfd_iberty),y) | ||
343 | EXTLIBS += -lbfd -liberty | ||
344 | else | ||
345 | FLAGS_BFD_IBERTY_Z=$(FLAGS_BFD_IBERTY) -lz | ||
346 | has_bfd_iberty_z := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD_IBERTY_Z),libz) | ||
347 | ifeq ($(has_bfd_iberty_z),y) | ||
348 | EXTLIBS += -lbfd -liberty -lz | ||
349 | else | ||
350 | FLAGS_CPLUS_DEMANGLE=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -liberty | ||
351 | has_cplus_demangle := $(call try-cc,$(SOURCE_CPLUS_DEMANGLE),$(FLAGS_CPLUS_DEMANGLE),demangle) | ||
352 | ifeq ($(has_cplus_demangle),y) | ||
353 | EXTLIBS += -liberty | ||
354 | BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE | ||
355 | else | ||
356 | msg := $(warning No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling) | ||
357 | BASIC_CFLAGS += -DNO_DEMANGLE | ||
358 | endif | ||
359 | endif | ||
360 | endif | ||
361 | endif | ||
362 | endif | ||
363 | endif | ||