diff options
| author | Jiri Olsa <jolsa@redhat.com> | 2013-03-24 19:45:08 -0400 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-05-28 09:24:07 -0400 |
| commit | cf4cca10f6905229b9269e8f0a300016010320de (patch) | |
| tree | dba38792a7f9238fb97718776bdf37c4a82e2350 /tools/perf/Makefile | |
| parent | 362493f0d63e25698018f6f36b2e02201342dbee (diff) | |
perf tools: Move libelf check config into config/Makefile
Moving libelf 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-6-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Makefile')
| -rw-r--r-- | tools/perf/Makefile | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index aa6f93389c55..a174c687efb5 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
| @@ -473,45 +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 | ifdef NO_LIBELF | ||
| 477 | NO_DWARF := 1 | ||
| 478 | NO_DEMANGLE := 1 | ||
| 479 | NO_LIBUNWIND := 1 | ||
| 480 | else | ||
| 481 | FLAGS_LIBELF=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) | ||
| 482 | ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF),libelf),y) | ||
| 483 | FLAGS_GLIBC=$(ALL_CFLAGS) $(ALL_LDFLAGS) | ||
| 484 | ifeq ($(call try-cc,$(SOURCE_GLIBC),$(FLAGS_GLIBC),glibc),y) | ||
| 485 | LIBC_SUPPORT := 1 | ||
| 486 | endif | ||
| 487 | ifeq ($(BIONIC),1) | ||
| 488 | LIBC_SUPPORT := 1 | ||
| 489 | endif | ||
| 490 | ifeq ($(LIBC_SUPPORT),1) | ||
| 491 | msg := $(warning No libelf found, disables 'probe' tool, please install elfutils-libelf-devel/libelf-dev); | ||
| 492 | |||
| 493 | NO_LIBELF := 1 | ||
| 494 | NO_DWARF := 1 | ||
| 495 | NO_DEMANGLE := 1 | ||
| 496 | else | ||
| 497 | msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static); | ||
| 498 | endif | ||
| 499 | else | ||
| 500 | # for linking with debug library, run like: | ||
| 501 | # make DEBUG=1 LIBDW_DIR=/opt/libdw/ | ||
| 502 | ifdef LIBDW_DIR | ||
| 503 | LIBDW_CFLAGS := -I$(LIBDW_DIR)/include | ||
| 504 | LIBDW_LDFLAGS := -L$(LIBDW_DIR)/lib | ||
| 505 | endif | ||
| 506 | |||
| 507 | FLAGS_DWARF=$(ALL_CFLAGS) $(LIBDW_CFLAGS) -ldw -lelf $(LIBDW_LDFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) | ||
| 508 | ifneq ($(call try-cc,$(SOURCE_DWARF),$(FLAGS_DWARF),libdw),y) | ||
| 509 | 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); | ||
| 510 | NO_DWARF := 1 | ||
| 511 | endif # Dwarf support | ||
| 512 | endif # SOURCE_LIBELF | ||
| 513 | endif # NO_LIBELF | ||
| 514 | |||
| 515 | # There's only x86 (both 32 and 64) support for CFI unwind so far | 476 | # There's only x86 (both 32 and 64) support for CFI unwind so far |
| 516 | ifneq ($(ARCH),x86) | 477 | ifneq ($(ARCH),x86) |
| 517 | NO_LIBUNWIND := 1 | 478 | NO_LIBUNWIND := 1 |
| @@ -553,13 +514,6 @@ BUILTIN_OBJS := $(filter-out $(OUTPUT)builtin-probe.o,$(BUILTIN_OBJS)) | |||
| 553 | LIB_OBJS += $(OUTPUT)util/symbol-minimal.o | 514 | LIB_OBJS += $(OUTPUT)util/symbol-minimal.o |
| 554 | 515 | ||
| 555 | else # NO_LIBELF | 516 | else # NO_LIBELF |
| 556 | BASIC_CFLAGS += -DLIBELF_SUPPORT | ||
| 557 | |||
| 558 | FLAGS_LIBELF=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) | ||
| 559 | ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_LIBELF),-DLIBELF_MMAP),y) | ||
| 560 | BASIC_CFLAGS += -DLIBELF_MMAP | ||
| 561 | endif | ||
| 562 | |||
| 563 | ifndef NO_DWARF | 517 | ifndef NO_DWARF |
| 564 | ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) | 518 | ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) |
| 565 | msg := $(warning DWARF register mappings have not been defined for architecture $(ARCH), DWARF support disabled); | 519 | msg := $(warning DWARF register mappings have not been defined for architecture $(ARCH), DWARF support disabled); |
