aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2013-03-17 19:38:16 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-05-29 07:47:34 -0400
commitc3cf8368452d2799296ce4244898ccb66b93686d (patch)
treea4792d32a360d56a49b91f6252d6d857f459146a /tools/perf
parent6e533cf12de06368aee4a44b6e781c9d3c9f7eb2 (diff)
perf tools: Move libbfd check config into config/Makefile
Moving libbfd check config into config/Makefile. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1369398928-9809-14-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/Makefile37
-rw-r--r--tools/perf/config/Makefile37
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
539endif 539endif
540 540
541ifdef NO_DEMANGLE
542 BASIC_CFLAGS += -DNO_DEMANGLE
543else
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
576endif
577
578ifeq ($(NO_PERF_REGS),0) 541ifeq ($(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
326endif 326endif
327
328ifdef NO_DEMANGLE
329 BASIC_CFLAGS += -DNO_DEMANGLE
330else
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
363endif