code move only

Signed-off-by: David Ahern <dsah...@gmail.com>
Cc: Arnaldo Carvalho de Melo <a...@ghostprotocols.net>
Cc: Borislav Petkov <b...@alien8.de>
Cc: Frederic Weisbecker <fweis...@gmail.com>
Cc: Ingo Molnar <mi...@kernel.org>
Cc: Jiri Olsa <jo...@redhat.com>
Cc: Namhyung Kim <namhy...@kernel.org>
Cc: Peter Zijlstra <a.p.zijls...@chello.nl>
Cc: Stephane Eranian <eran...@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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to