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>
This commit is contained in:
parent
779724fd07
commit
0e433feb10
|
@ -473,26 +473,6 @@ ifneq ($(MAKECMDGOALS),tags)
|
||||||
# because maintaining the nesting to match is a pain. If
|
# because maintaining the nesting to match is a pain. If
|
||||||
# we had "elif" things would have been much nicer...
|
# we had "elif" things would have been much nicer...
|
||||||
|
|
||||||
# There's only x86 (both 32 and 64) support for CFI unwind so far
|
|
||||||
ifneq ($(ARCH),x86)
|
|
||||||
NO_LIBUNWIND := 1
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef NO_LIBUNWIND
|
|
||||||
# for linking with debug library, run like:
|
|
||||||
# make DEBUG=1 LIBUNWIND_DIR=/opt/libunwind/
|
|
||||||
ifdef LIBUNWIND_DIR
|
|
||||||
LIBUNWIND_CFLAGS := -I$(LIBUNWIND_DIR)/include
|
|
||||||
LIBUNWIND_LDFLAGS := -L$(LIBUNWIND_DIR)/lib
|
|
||||||
endif
|
|
||||||
|
|
||||||
FLAGS_UNWIND=$(LIBUNWIND_CFLAGS) $(ALL_CFLAGS) $(LIBUNWIND_LDFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(LIBUNWIND_LIBS)
|
|
||||||
ifneq ($(call try-cc,$(SOURCE_LIBUNWIND),$(FLAGS_UNWIND),libunwind),y)
|
|
||||||
msg := $(warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 0.99);
|
|
||||||
NO_LIBUNWIND := 1
|
|
||||||
endif # Libunwind support
|
|
||||||
endif # NO_LIBUNWIND
|
|
||||||
|
|
||||||
-include arch/$(ARCH)/Makefile
|
-include arch/$(ARCH)/Makefile
|
||||||
|
|
||||||
ifneq ($(OUTPUT),)
|
ifneq ($(OUTPUT),)
|
||||||
|
@ -521,10 +501,6 @@ endif # NO_DWARF
|
||||||
endif # NO_LIBELF
|
endif # NO_LIBELF
|
||||||
|
|
||||||
ifndef NO_LIBUNWIND
|
ifndef NO_LIBUNWIND
|
||||||
BASIC_CFLAGS += -DLIBUNWIND_SUPPORT
|
|
||||||
EXTLIBS += $(LIBUNWIND_LIBS)
|
|
||||||
BASIC_CFLAGS := $(LIBUNWIND_CFLAGS) $(BASIC_CFLAGS)
|
|
||||||
BASIC_LDFLAGS := $(LIBUNWIND_LDFLAGS) $(BASIC_LDFLAGS)
|
|
||||||
LIB_OBJS += $(OUTPUT)util/unwind.o
|
LIB_OBJS += $(OUTPUT)util/unwind.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -170,3 +170,30 @@ endif # PERF_HAVE_DWARF_REGS
|
||||||
endif # NO_DWARF
|
endif # NO_DWARF
|
||||||
|
|
||||||
endif # NO_LIBELF
|
endif # NO_LIBELF
|
||||||
|
|
||||||
|
# There's only x86 (both 32 and 64) support for CFI unwind so far
|
||||||
|
ifneq ($(ARCH),x86)
|
||||||
|
NO_LIBUNWIND := 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef NO_LIBUNWIND
|
||||||
|
# for linking with debug library, run like:
|
||||||
|
# make DEBUG=1 LIBUNWIND_DIR=/opt/libunwind/
|
||||||
|
ifdef LIBUNWIND_DIR
|
||||||
|
LIBUNWIND_CFLAGS := -I$(LIBUNWIND_DIR)/include
|
||||||
|
LIBUNWIND_LDFLAGS := -L$(LIBUNWIND_DIR)/lib
|
||||||
|
endif
|
||||||
|
|
||||||
|
FLAGS_UNWIND=$(LIBUNWIND_CFLAGS) $(ALL_CFLAGS) $(LIBUNWIND_LDFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(LIBUNWIND_LIBS)
|
||||||
|
ifneq ($(call try-cc,$(SOURCE_LIBUNWIND),$(FLAGS_UNWIND),libunwind),y)
|
||||||
|
msg := $(warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 0.99);
|
||||||
|
NO_LIBUNWIND := 1
|
||||||
|
endif # Libunwind support
|
||||||
|
endif # NO_LIBUNWIND
|
||||||
|
|
||||||
|
ifndef NO_LIBUNWIND
|
||||||
|
BASIC_CFLAGS += -DLIBUNWIND_SUPPORT
|
||||||
|
EXTLIBS += $(LIBUNWIND_LIBS)
|
||||||
|
BASIC_CFLAGS := $(LIBUNWIND_CFLAGS) $(BASIC_CFLAGS)
|
||||||
|
BASIC_LDFLAGS := $(LIBUNWIND_LDFLAGS) $(BASIC_LDFLAGS)
|
||||||
|
endif # NO_LIBUNWIND
|
||||||
|
|
Loading…
Reference in New Issue