diff options
author | Jiri Olsa <jolsa@redhat.com> | 2013-03-24 19:53:03 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-05-29 07:37:17 -0400 |
commit | 0e433feb109da0a174d838f0a5fb1af144848761 (patch) | |
tree | 48aec177661ae3e75b337d57e68d42f9907ef45a /tools | |
parent | 779724fd079ec9a3b050b631b2d21ea97981e258 (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/Makefile | 24 | ||||
-rw-r--r-- | tools/perf/config/Makefile | 27 |
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 | ||
477 | ifneq ($(ARCH),x86) | ||
478 | NO_LIBUNWIND := 1 | ||
479 | endif | ||
480 | |||
481 | ifndef NO_LIBUNWIND | ||
482 | # for linking with debug library, run like: | ||
483 | # make DEBUG=1 LIBUNWIND_DIR=/opt/libunwind/ | ||
484 | ifdef LIBUNWIND_DIR | ||
485 | LIBUNWIND_CFLAGS := -I$(LIBUNWIND_DIR)/include | ||
486 | LIBUNWIND_LDFLAGS := -L$(LIBUNWIND_DIR)/lib | ||
487 | endif | ||
488 | |||
489 | FLAGS_UNWIND=$(LIBUNWIND_CFLAGS) $(ALL_CFLAGS) $(LIBUNWIND_LDFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(LIBUNWIND_LIBS) | ||
490 | ifneq ($(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 | ||
493 | endif # Libunwind support | ||
494 | endif # NO_LIBUNWIND | ||
495 | |||
496 | -include arch/$(ARCH)/Makefile | 476 | -include arch/$(ARCH)/Makefile |
497 | 477 | ||
498 | ifneq ($(OUTPUT),) | 478 | ifneq ($(OUTPUT),) |
@@ -521,10 +501,6 @@ endif # NO_DWARF | |||
521 | endif # NO_LIBELF | 501 | endif # NO_LIBELF |
522 | 502 | ||
523 | ifndef NO_LIBUNWIND | 503 | ifndef 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 |
529 | endif | 505 | endif |
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 | |||
170 | endif # NO_DWARF | 170 | endif # NO_DWARF |
171 | 171 | ||
172 | endif # NO_LIBELF | 172 | endif # NO_LIBELF |
173 | |||
174 | # There's only x86 (both 32 and 64) support for CFI unwind so far | ||
175 | ifneq ($(ARCH),x86) | ||
176 | NO_LIBUNWIND := 1 | ||
177 | endif | ||
178 | |||
179 | ifndef NO_LIBUNWIND | ||
180 | # for linking with debug library, run like: | ||
181 | # make DEBUG=1 LIBUNWIND_DIR=/opt/libunwind/ | ||
182 | ifdef LIBUNWIND_DIR | ||
183 | LIBUNWIND_CFLAGS := -I$(LIBUNWIND_DIR)/include | ||
184 | LIBUNWIND_LDFLAGS := -L$(LIBUNWIND_DIR)/lib | ||
185 | endif | ||
186 | |||
187 | FLAGS_UNWIND=$(LIBUNWIND_CFLAGS) $(ALL_CFLAGS) $(LIBUNWIND_LDFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(LIBUNWIND_LIBS) | ||
188 | ifneq ($(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 | ||
191 | endif # Libunwind support | ||
192 | endif # NO_LIBUNWIND | ||
193 | |||
194 | ifndef 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) | ||
199 | endif # NO_LIBUNWIND | ||