aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/Makefile
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2012-10-09 11:50:01 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-10-24 12:20:10 -0400
commit28d213bac4649a1868fa78dab2d3b1ef09235171 (patch)
tree27ba4162517e00c406d23ce87021735163ec58e7 /tools/perf/Makefile
parentce37f400336a34bb6e72c4700f9dcc2a41ff7163 (diff)
perf tools: Diplays more output on features check for make V=1
Adding more verbose output for compile time features checking, to ease up debuging of feature detection failures. Suggested-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/n/tip-fbjha6xs5soyaiek8j4142xg@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r--tools/perf/Makefile46
1 files changed, 23 insertions, 23 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index f530502630a4..6790cb441a63 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -155,15 +155,15 @@ SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
155 155
156-include config/feature-tests.mak 156-include config/feature-tests.mak
157 157
158ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -fstack-protector-all),y) 158ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -fstack-protector-all,-fstack-protector-all),y)
159 CFLAGS := $(CFLAGS) -fstack-protector-all 159 CFLAGS := $(CFLAGS) -fstack-protector-all
160endif 160endif
161 161
162ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -Wstack-protector),y) 162ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -Wstack-protector,-Wstack-protector),y)
163 CFLAGS := $(CFLAGS) -Wstack-protector 163 CFLAGS := $(CFLAGS) -Wstack-protector
164endif 164endif
165 165
166ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -Wvolatile-register-var),y) 166ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -Wvolatile-register-var,-Wvolatile-register-var),y)
167 CFLAGS := $(CFLAGS) -Wvolatile-register-var 167 CFLAGS := $(CFLAGS) -Wvolatile-register-var
168endif 168endif
169 169
@@ -172,7 +172,7 @@ endif
172BASIC_CFLAGS = -Iutil/include -Iarch/$(ARCH)/include -I$(OUTPUT)util -I$(TRACE_EVENT_DIR) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE 172BASIC_CFLAGS = -Iutil/include -Iarch/$(ARCH)/include -I$(OUTPUT)util -I$(TRACE_EVENT_DIR) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
173BASIC_LDFLAGS = 173BASIC_LDFLAGS =
174 174
175ifeq ($(call try-cc,$(SOURCE_BIONIC),$(CFLAGS)),y) 175ifeq ($(call try-cc,$(SOURCE_BIONIC),$(CFLAGS),bionic),y)
176 BIONIC := 1 176 BIONIC := 1
177 EXTLIBS := $(filter-out -lrt,$(EXTLIBS)) 177 EXTLIBS := $(filter-out -lrt,$(EXTLIBS))
178 EXTLIBS := $(filter-out -lpthread,$(EXTLIBS)) 178 EXTLIBS := $(filter-out -lpthread,$(EXTLIBS))
@@ -477,9 +477,9 @@ ifdef NO_LIBELF
477 NO_LIBUNWIND := 1 477 NO_LIBUNWIND := 1
478else 478else
479FLAGS_LIBELF=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) 479FLAGS_LIBELF=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS)
480ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF)),y) 480ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF),libelf),y)
481 FLAGS_GLIBC=$(ALL_CFLAGS) $(ALL_LDFLAGS) 481 FLAGS_GLIBC=$(ALL_CFLAGS) $(ALL_LDFLAGS)
482 ifeq ($(call try-cc,$(SOURCE_GLIBC),$(FLAGS_GLIBC)),y) 482 ifeq ($(call try-cc,$(SOURCE_GLIBC),$(FLAGS_GLIBC),glibc),y)
483 LIBC_SUPPORT := 1 483 LIBC_SUPPORT := 1
484 endif 484 endif
485 ifeq ($(BIONIC),1) 485 ifeq ($(BIONIC),1)
@@ -494,7 +494,7 @@ ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF)),y)
494 endif 494 endif
495else 495else
496 FLAGS_DWARF=$(ALL_CFLAGS) -ldw -lelf $(ALL_LDFLAGS) $(EXTLIBS) 496 FLAGS_DWARF=$(ALL_CFLAGS) -ldw -lelf $(ALL_LDFLAGS) $(EXTLIBS)
497 ifneq ($(call try-cc,$(SOURCE_DWARF),$(FLAGS_DWARF)),y) 497 ifneq ($(call try-cc,$(SOURCE_DWARF),$(FLAGS_DWARF),libdw),y)
498 msg := $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev); 498 msg := $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev);
499 NO_DWARF := 1 499 NO_DWARF := 1
500 endif # Dwarf support 500 endif # Dwarf support
@@ -510,7 +510,7 @@ ifdef LIBUNWIND_DIR
510endif 510endif
511 511
512FLAGS_UNWIND=$(LIBUNWIND_CFLAGS) $(ALL_CFLAGS) $(LIBUNWIND_LDFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(LIBUNWIND_LIBS) 512FLAGS_UNWIND=$(LIBUNWIND_CFLAGS) $(ALL_CFLAGS) $(LIBUNWIND_LDFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(LIBUNWIND_LIBS)
513ifneq ($(call try-cc,$(SOURCE_LIBUNWIND),$(FLAGS_UNWIND)),y) 513ifneq ($(call try-cc,$(SOURCE_LIBUNWIND),$(FLAGS_UNWIND),libunwind),y)
514 msg := $(warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 0.99); 514 msg := $(warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 0.99);
515 NO_LIBUNWIND := 1 515 NO_LIBUNWIND := 1
516endif # Libunwind support 516endif # Libunwind support
@@ -539,7 +539,7 @@ LIB_OBJS += $(OUTPUT)util/symbol-minimal.o
539else # NO_LIBELF 539else # NO_LIBELF
540BASIC_CFLAGS += -DLIBELF_SUPPORT 540BASIC_CFLAGS += -DLIBELF_SUPPORT
541 541
542ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_COMMON)),y) 542ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_COMMON),-DLIBELF_MMAP),y)
543 BASIC_CFLAGS += -DLIBELF_MMAP 543 BASIC_CFLAGS += -DLIBELF_MMAP
544endif 544endif
545 545
@@ -565,7 +565,7 @@ endif
565 565
566ifndef NO_LIBAUDIT 566ifndef NO_LIBAUDIT
567 FLAGS_LIBAUDIT = $(ALL_CFLAGS) $(ALL_LDFLAGS) -laudit 567 FLAGS_LIBAUDIT = $(ALL_CFLAGS) $(ALL_LDFLAGS) -laudit
568 ifneq ($(call try-cc,$(SOURCE_LIBAUDIT),$(FLAGS_LIBAUDIT)),y) 568 ifneq ($(call try-cc,$(SOURCE_LIBAUDIT),$(FLAGS_LIBAUDIT),libaudit),y)
569 msg := $(warning No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev); 569 msg := $(warning No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev);
570 else 570 else
571 BASIC_CFLAGS += -DLIBAUDIT_SUPPORT 571 BASIC_CFLAGS += -DLIBAUDIT_SUPPORT
@@ -576,7 +576,7 @@ endif
576 576
577ifndef NO_NEWT 577ifndef NO_NEWT
578 FLAGS_NEWT=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -lnewt 578 FLAGS_NEWT=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -lnewt
579 ifneq ($(call try-cc,$(SOURCE_NEWT),$(FLAGS_NEWT)),y) 579 ifneq ($(call try-cc,$(SOURCE_NEWT),$(FLAGS_NEWT),libnewt),y)
580 msg := $(warning newt not found, disables TUI support. Please install newt-devel or libnewt-dev); 580 msg := $(warning newt not found, disables TUI support. Please install newt-devel or libnewt-dev);
581 else 581 else
582 # Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h 582 # Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h
@@ -605,10 +605,10 @@ endif
605 605
606ifndef NO_GTK2 606ifndef NO_GTK2
607 FLAGS_GTK2=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) 607 FLAGS_GTK2=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
608 ifneq ($(call try-cc,$(SOURCE_GTK2),$(FLAGS_GTK2)),y) 608 ifneq ($(call try-cc,$(SOURCE_GTK2),$(FLAGS_GTK2),gtk2),y)
609 msg := $(warning GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev); 609 msg := $(warning GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev);
610 else 610 else
611 ifeq ($(call try-cc,$(SOURCE_GTK2_INFOBAR),$(FLAGS_GTK2)),y) 611 ifeq ($(call try-cc,$(SOURCE_GTK2_INFOBAR),$(FLAGS_GTK2),-DHAVE_GTK_INFO_BAR),y)
612 BASIC_CFLAGS += -DHAVE_GTK_INFO_BAR 612 BASIC_CFLAGS += -DHAVE_GTK_INFO_BAR
613 endif 613 endif
614 BASIC_CFLAGS += -DGTK2_SUPPORT 614 BASIC_CFLAGS += -DGTK2_SUPPORT
@@ -635,7 +635,7 @@ else
635 PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null` 635 PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
636 FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS) 636 FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
637 637
638 ifneq ($(call try-cc,$(SOURCE_PERL_EMBED),$(FLAGS_PERL_EMBED)),y) 638 ifneq ($(call try-cc,$(SOURCE_PERL_EMBED),$(FLAGS_PERL_EMBED),perl),y)
639 BASIC_CFLAGS += -DNO_LIBPERL 639 BASIC_CFLAGS += -DNO_LIBPERL
640 else 640 else
641 ALL_LDFLAGS += $(PERL_EMBED_LDFLAGS) 641 ALL_LDFLAGS += $(PERL_EMBED_LDFLAGS)
@@ -689,11 +689,11 @@ else
689 PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null) 689 PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
690 FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS) 690 FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
691 691
692 ifneq ($(call try-cc,$(SOURCE_PYTHON_EMBED),$(FLAGS_PYTHON_EMBED)),y) 692 ifneq ($(call try-cc,$(SOURCE_PYTHON_EMBED),$(FLAGS_PYTHON_EMBED),python),y)
693 $(call disable-python,Python.h (for Python 2.x)) 693 $(call disable-python,Python.h (for Python 2.x))
694 else 694 else
695 695
696 ifneq ($(call try-cc,$(SOURCE_PYTHON_VERSION),$(FLAGS_PYTHON_EMBED)),y) 696 ifneq ($(call try-cc,$(SOURCE_PYTHON_VERSION),$(FLAGS_PYTHON_EMBED),python version),y)
697 $(warning Python 3 is not yet supported; please set) 697 $(warning Python 3 is not yet supported; please set)
698 $(warning PYTHON and/or PYTHON_CONFIG appropriately.) 698 $(warning PYTHON and/or PYTHON_CONFIG appropriately.)
699 $(warning If you also have Python 2 installed, then) 699 $(warning If you also have Python 2 installed, then)
@@ -727,22 +727,22 @@ else
727 BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE 727 BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE
728 else 728 else
729 FLAGS_BFD=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -DPACKAGE='perf' -lbfd 729 FLAGS_BFD=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -DPACKAGE='perf' -lbfd
730 has_bfd := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD)) 730 has_bfd := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD),libbfd)
731 ifeq ($(has_bfd),y) 731 ifeq ($(has_bfd),y)
732 EXTLIBS += -lbfd 732 EXTLIBS += -lbfd
733 else 733 else
734 FLAGS_BFD_IBERTY=$(FLAGS_BFD) -liberty 734 FLAGS_BFD_IBERTY=$(FLAGS_BFD) -liberty
735 has_bfd_iberty := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD_IBERTY)) 735 has_bfd_iberty := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD_IBERTY),liberty)
736 ifeq ($(has_bfd_iberty),y) 736 ifeq ($(has_bfd_iberty),y)
737 EXTLIBS += -lbfd -liberty 737 EXTLIBS += -lbfd -liberty
738 else 738 else
739 FLAGS_BFD_IBERTY_Z=$(FLAGS_BFD_IBERTY) -lz 739 FLAGS_BFD_IBERTY_Z=$(FLAGS_BFD_IBERTY) -lz
740 has_bfd_iberty_z := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD_IBERTY_Z)) 740 has_bfd_iberty_z := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD_IBERTY_Z),libz)
741 ifeq ($(has_bfd_iberty_z),y) 741 ifeq ($(has_bfd_iberty_z),y)
742 EXTLIBS += -lbfd -liberty -lz 742 EXTLIBS += -lbfd -liberty -lz
743 else 743 else
744 FLAGS_CPLUS_DEMANGLE=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -liberty 744 FLAGS_CPLUS_DEMANGLE=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -liberty
745 has_cplus_demangle := $(call try-cc,$(SOURCE_CPLUS_DEMANGLE),$(FLAGS_CPLUS_DEMANGLE)) 745 has_cplus_demangle := $(call try-cc,$(SOURCE_CPLUS_DEMANGLE),$(FLAGS_CPLUS_DEMANGLE),demangle)
746 ifeq ($(has_cplus_demangle),y) 746 ifeq ($(has_cplus_demangle),y)
747 EXTLIBS += -liberty 747 EXTLIBS += -liberty
748 BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE 748 BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE
@@ -764,19 +764,19 @@ ifeq ($(NO_PERF_REGS),0)
764endif 764endif
765 765
766ifndef NO_STRLCPY 766ifndef NO_STRLCPY
767 ifeq ($(call try-cc,$(SOURCE_STRLCPY),),y) 767 ifeq ($(call try-cc,$(SOURCE_STRLCPY),,-DHAVE_STRLCPY),y)
768 BASIC_CFLAGS += -DHAVE_STRLCPY 768 BASIC_CFLAGS += -DHAVE_STRLCPY
769 endif 769 endif
770endif 770endif
771 771
772ifndef NO_ON_EXIT 772ifndef NO_ON_EXIT
773 ifeq ($(call try-cc,$(SOURCE_ON_EXIT),),y) 773 ifeq ($(call try-cc,$(SOURCE_ON_EXIT),,-DHAVE_ON_EXIT),y)
774 BASIC_CFLAGS += -DHAVE_ON_EXIT 774 BASIC_CFLAGS += -DHAVE_ON_EXIT
775 endif 775 endif
776endif 776endif
777 777
778ifndef NO_BACKTRACE 778ifndef NO_BACKTRACE
779 ifeq ($(call try-cc,$(SOURCE_BACKTRACE),),y) 779 ifeq ($(call try-cc,$(SOURCE_BACKTRACE),,-DBACKTRACE_SUPPORT),y)
780 BASIC_CFLAGS += -DBACKTRACE_SUPPORT 780 BASIC_CFLAGS += -DBACKTRACE_SUPPORT
781 endif 781 endif
782endif 782endif