Messages in this thread Patch in this message | | | From | David Ahern <> | Subject | [PATCH 16/23] perf: consolidate CONFIG_LIBUNWIND checks in Makefile | Date | Mon, 1 Apr 2013 21:54:30 -0600 |
| |
code move only
Signed-off-by: David Ahern <dsahern@gmail.com> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> --- tools/perf/Makefile | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 62c10b8..a606eb1 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -577,27 +577,6 @@ else endif endif -# There's only x86 (both 32 and 64) support for CFI unwind so far -ifneq ($(ARCH),x86) -ifdef CONFIG_LIBUNWIND - $(error CONFIG_LIBUNWIND only supported for x86 architecture) -endif -endif - -ifdef CONFIG_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) - $(error No libunwind found. Please install libunwind-dev[el] >= 0.99 or disable CONFIG_LIBUNWIND) -endif # Libunwind support -endif - -include arch/$(ARCH)/Makefile ifneq ($(OUTPUT),) @@ -637,6 +616,23 @@ else endif ifdef CONFIG_LIBUNWIND + # There's only x86 (both 32 and 64) support for CFI unwind so far + ifneq ($(ARCH),x86) + $(error CONFIG_LIBUNWIND only supported for x86 architecture) + endif + + # 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) + $(error No libunwind found. Please install libunwind-dev[el] >= 0.99 or disable CONFIG_LIBUNWIND) + endif + BASIC_CFLAGS += -DLIBUNWIND_SUPPORT EXTLIBS += $(LIBUNWIND_LIBS) BASIC_CFLAGS := $(LIBUNWIND_CFLAGS) $(BASIC_CFLAGS) -- 1.7.10.1
| |