aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2013-03-24 19:53:03 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-05-29 07:37:17 -0400
commit0e433feb109da0a174d838f0a5fb1af144848761 (patch)
tree48aec177661ae3e75b337d57e68d42f9907ef45a /tools
parent779724fd079ec9a3b050b631b2d21ea97981e258 (diff)
perf tools: Move libunwind check config into config/Makefile
Moving libunwind 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-8-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/Makefile24
-rw-r--r--tools/perf/config/Makefile27
2 files changed, 27 insertions, 24 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 51fac31b9c6b..7dc6615219f2 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -473,26 +473,6 @@ ifneq ($(MAKECMDGOALS),tags)
473# because maintaining the nesting to match is a pain. If 473# because maintaining the nesting to match is a pain. If
474# we had "elif" things would have been much nicer... 474# we had "elif" things would have been much nicer...
475 475
476# There's only x86 (both 32 and 64) support for CFI unwind so far
477ifneq ($(ARCH),x86)
478 NO_LIBUNWIND := 1
479endif
480
481ifndef NO_LIBUNWIND
482# for linking with debug library, run like:
483# make DEBUG=1 LIBUNWIND_DIR=/opt/libunwind/
484ifdef LIBUNWIND_DIR
485 LIBUNWIND_CFLAGS := -I$(LIBUNWIND_DIR)/include
486 LIBUNWIND_LDFLAGS := -L$(LIBUNWIND_DIR)/lib
487endif
488
489FLAGS_UNWIND=$(LIBUNWIND_CFLAGS) $(ALL_CFLAGS) $(LIBUNWIND_LDFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(LIBUNWIND_LIBS)
490ifneq ($(call try-cc,$(SOURCE_LIBUNWIND),$(FLAGS_UNWIND),libunwind),y)
491 msg := $(warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 0.99);
492 NO_LIBUNWIND := 1
493endif # Libunwind support
494endif # NO_LIBUNWIND
495
496-include arch/$(ARCH)/Makefile 476-include arch/$(ARCH)/Makefile
497 477
498ifneq ($(OUTPUT),) 478ifneq ($(OUTPUT),)
@@ -521,10 +501,6 @@ endif # NO_DWARF
521endif # NO_LIBELF 501endif # NO_LIBELF
522 502
523ifndef NO_LIBUNWIND 503ifndef NO_LIBUNWIND
524 BASIC_CFLAGS += -DLIBUNWIND_SUPPORT
525 EXTLIBS += $(LIBUNWIND_LIBS)
526 BASIC_CFLAGS := $(LIBUNWIND_CFLAGS) $(BASIC_CFLAGS)
527 BASIC_LDFLAGS := $(LIBUNWIND_LDFLAGS) $(BASIC_LDFLAGS)
528 LIB_OBJS += $(OUTPUT)util/unwind.o 504 LIB_OBJS += $(OUTPUT)util/unwind.o
529endif 505endif
530 506
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 71e737c4c4d6..438574bdf4b1 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -170,3 +170,30 @@ endif # PERF_HAVE_DWARF_REGS
170endif # NO_DWARF 170endif # NO_DWARF
171 171
172endif # NO_LIBELF 172endif # NO_LIBELF
173
174# There's only x86 (both 32 and 64) support for CFI unwind so far
175ifneq ($(ARCH),x86)
176 NO_LIBUNWIND := 1
177endif
178
179ifndef NO_LIBUNWIND
180# for linking with debug library, run like:
181# make DEBUG=1 LIBUNWIND_DIR=/opt/libunwind/
182ifdef LIBUNWIND_DIR
183 LIBUNWIND_CFLAGS := -I$(LIBUNWIND_DIR)/include
184 LIBUNWIND_LDFLAGS := -L$(LIBUNWIND_DIR)/lib
185endif
186
187FLAGS_UNWIND=$(LIBUNWIND_CFLAGS) $(ALL_CFLAGS) $(LIBUNWIND_LDFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(LIBUNWIND_LIBS)
188ifneq ($(call try-cc,$(SOURCE_LIBUNWIND),$(FLAGS_UNWIND),libunwind),y)
189 msg := $(warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 0.99);
190 NO_LIBUNWIND := 1
191endif # Libunwind support
192endif # NO_LIBUNWIND
193
194ifndef NO_LIBUNWIND
195 BASIC_CFLAGS += -DLIBUNWIND_SUPPORT
196 EXTLIBS += $(LIBUNWIND_LIBS)
197 BASIC_CFLAGS := $(LIBUNWIND_CFLAGS) $(BASIC_CFLAGS)
198 BASIC_LDFLAGS := $(LIBUNWIND_LDFLAGS) $(BASIC_LDFLAGS)
199endif # NO_LIBUNWIND