Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 195106b9 authored by He Kuang's avatar He Kuang Committed by Arnaldo Carvalho de Melo
Browse files

perf unwind: Use LIBUNWIND_DIR for remote libunwind feature check



Pass LIBUNWIND_DIR to feature check flags for remote libunwind
tests. So perf can be able to detect remote libunwind libraries from
arbitrary directory.

Signed-off-by: default avatarHe Kuang <hekuang@huawei.com>
Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1464924803-22214-2-git-send-email-hekuang@huawei.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 8beeb00f
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -67,9 +67,18 @@ endif
#
#
#   make DEBUG=1 LIBUNWIND_DIR=/opt/libunwind/
#   make DEBUG=1 LIBUNWIND_DIR=/opt/libunwind/
#
#

libunwind_arch_set_flags = $(eval $(libunwind_arch_set_flags_code))
define libunwind_arch_set_flags_code
  FEATURE_CHECK_CFLAGS-libunwind-$(1)  = -I$(LIBUNWIND_DIR)/include
  FEATURE_CHECK_LDFLAGS-libunwind-$(1) = -L$(LIBUNWIND_DIR)/lib
endef

ifdef LIBUNWIND_DIR
ifdef LIBUNWIND_DIR
  LIBUNWIND_CFLAGS  = -I$(LIBUNWIND_DIR)/include
  LIBUNWIND_CFLAGS  = -I$(LIBUNWIND_DIR)/include
  LIBUNWIND_LDFLAGS = -L$(LIBUNWIND_DIR)/lib
  LIBUNWIND_LDFLAGS = -L$(LIBUNWIND_DIR)/lib
  LIBUNWIND_ARCHS = x86 x86_64 arm aarch64 debug-frame-arm debug-frame-aarch64
  $(foreach libunwind_arch,$(LIBUNWIND_ARCHS),$(call libunwind_arch_set_flags,$(libunwind_arch)))
endif
endif
LIBUNWIND_LDFLAGS += $(LIBUNWIND_LIBS)
LIBUNWIND_LDFLAGS += $(LIBUNWIND_LIBS)