perf build: Add arch x86 objects building
authorJiri Olsa <jolsa@kernel.org>
Tue, 30 Dec 2014 13:03:40 +0000 (14:03 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 12 Feb 2015 16:12:01 +0000 (13:12 -0300)
Move the x86 arch objects building under build framework to be included
in the libperf build object.

Adding also arch/$(ARCH)/Build files for the rest of the archs. The
reason for this is that in arch/Build we now do:

  +libperf-y += $(ARCH)/

which would make the build to fail on other architectures, because the
build framework requires 'Build' file in nested directories and this
patch adds it only for x86.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Tested-by: Will Deacon <will.deacon@arm.com>
Cc: Alexis Berlemont <alexis.berlemont@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-5enob06z07m7ew6nzzdmp3n2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/Build
tools/perf/arch/arm/Build [new file with mode: 0644]
tools/perf/arch/arm64/Build [new file with mode: 0644]
tools/perf/arch/powerpc/Build [new file with mode: 0644]
tools/perf/arch/s390/Build [new file with mode: 0644]
tools/perf/arch/sh/Build [new file with mode: 0644]
tools/perf/arch/sparc/Build [new file with mode: 0644]
tools/perf/arch/x86/Build [new file with mode: 0644]
tools/perf/arch/x86/Makefile
tools/perf/arch/x86/tests/Build [new file with mode: 0644]
tools/perf/arch/x86/util/Build [new file with mode: 0644]

index 304f5e76c6130a4cd872bb8aac4a8df132d816e0..109eb75cf7de4e97c855fe52c3d6437f454b5c8e 100644 (file)
@@ -1 +1,2 @@
 libperf-y += common.o
+libperf-y += $(ARCH)/
diff --git a/tools/perf/arch/arm/Build b/tools/perf/arch/arm/Build
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tools/perf/arch/arm64/Build b/tools/perf/arch/arm64/Build
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tools/perf/arch/powerpc/Build b/tools/perf/arch/powerpc/Build
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tools/perf/arch/s390/Build b/tools/perf/arch/s390/Build
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tools/perf/arch/sh/Build b/tools/perf/arch/sh/Build
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tools/perf/arch/sparc/Build b/tools/perf/arch/sparc/Build
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tools/perf/arch/x86/Build b/tools/perf/arch/x86/Build
new file mode 100644 (file)
index 0000000..41bf61d
--- /dev/null
@@ -0,0 +1,2 @@
+libperf-y += util/
+libperf-$(CONFIG_DWARF_UNWIND) += tests/
index 9b21881db52f9e2b2205b4106e9fba30c57700ed..21322e0385b886667d7bbd9a17edddc1ad1b3c8f 100644 (file)
@@ -1,19 +1,4 @@
 ifndef NO_DWARF
 PERF_HAVE_DWARF_REGS := 1
-LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/dwarf-regs.o
 endif
-ifndef NO_LIBUNWIND
-LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/unwind-libunwind.o
-endif
-ifndef NO_LIBDW_DWARF_UNWIND
-LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/unwind-libdw.o
-endif
-ifndef NO_DWARF_UNWIND
-LIB_OBJS += $(OUTPUT)arch/$(ARCH)/tests/regs_load.o
-LIB_OBJS += $(OUTPUT)arch/$(ARCH)/tests/dwarf-unwind.o
-endif
-LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/header.o
-LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/tsc.o
-LIB_H += arch/$(ARCH)/util/tsc.h
 HAVE_KVM_STAT_SUPPORT := 1
-LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/kvm-stat.o
diff --git a/tools/perf/arch/x86/tests/Build b/tools/perf/arch/x86/tests/Build
new file mode 100644 (file)
index 0000000..b30eff9
--- /dev/null
@@ -0,0 +1,2 @@
+libperf-y += regs_load.o
+libperf-y += dwarf-unwind.o
diff --git a/tools/perf/arch/x86/util/Build b/tools/perf/arch/x86/util/Build
new file mode 100644 (file)
index 0000000..cfbccc4
--- /dev/null
@@ -0,0 +1,8 @@
+libperf-y += header.o
+libperf-y += tsc.o
+libperf-y += kvm-stat.o
+
+libperf-$(CONFIG_DWARF) += dwarf-regs.o
+
+libperf-$(CONFIG_LIBUNWIND)          += unwind-libunwind.o
+libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o