aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2014-01-03 09:32:32 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-01-13 08:06:22 -0500
commita6cf5f39236c2ea6008a2f5cb908c3181c123096 (patch)
tree28c2448afb14845c0bebf4b487a0eca52bf6d5c7 /tools/perf
parent41cde47675de62ee0f3877c00ab44373b2b2f4ca (diff)
perf tools: Move arch setup into seprate Makefile
I need to use arch related setup in the tests/make, so moving arch setup into Makefile.arch. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.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> Link: http://lkml.kernel.org/r/1388759553-12974-1-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/config/Makefile52
-rw-r--r--tools/perf/config/Makefile.arch22
2 files changed, 40 insertions, 34 deletions
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 14faeeb0d752..f2bc659d20af 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -1,28 +1,26 @@
1uname_M := $(shell uname -m 2>/dev/null || echo not)
2 1
3ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ 2ifeq ($(src-perf),)
4 -e s/arm.*/arm/ -e s/sa110/arm/ \ 3src-perf := $(srctree)/tools/perf
5 -e s/s390x/s390/ -e s/parisc64/parisc/ \ 4endif
6 -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
7 -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ )
8NO_PERF_REGS := 1
9CFLAGS := $(EXTRA_CFLAGS) $(EXTRA_WARNINGS)
10 5
11# Additional ARCH settings for x86 6ifeq ($(obj-perf),)
12ifeq ($(ARCH),i386) 7obj-perf := $(OUTPUT)
13 override ARCH := x86
14 NO_PERF_REGS := 0
15 LIBUNWIND_LIBS = -lunwind -lunwind-x86
16endif 8endif
17 9
18ifeq ($(ARCH),x86_64) 10ifneq ($(obj-perf),)
19 override ARCH := x86 11obj-perf := $(abspath $(obj-perf))/
20 IS_X86_64 := 0 12endif
21 ifeq (, $(findstring m32,$(CFLAGS))) 13
22 IS_X86_64 := $(shell echo __x86_64__ | ${CC} -E -x c - | tail -n 1) 14LIB_INCLUDE := $(srctree)/tools/lib/
23 endif 15CFLAGS := $(EXTRA_CFLAGS) $(EXTRA_WARNINGS)
16
17include $(src-perf)/config/Makefile.arch
18
19NO_PERF_REGS := 1
20
21# Additional ARCH settings for x86
22ifeq ($(ARCH),x86)
24 ifeq (${IS_X86_64}, 1) 23 ifeq (${IS_X86_64}, 1)
25 RAW_ARCH := x86_64
26 CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT 24 CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT
27 ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S ../../arch/x86/lib/memset_64.S 25 ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S ../../arch/x86/lib/memset_64.S
28 LIBUNWIND_LIBS = -lunwind -lunwind-x86_64 26 LIBUNWIND_LIBS = -lunwind -lunwind-x86_64
@@ -64,20 +62,6 @@ ifeq ($(NO_PERF_REGS),0)
64 CFLAGS += -DHAVE_PERF_REGS_SUPPORT 62 CFLAGS += -DHAVE_PERF_REGS_SUPPORT
65endif 63endif
66 64
67ifeq ($(src-perf),)
68src-perf := $(srctree)/tools/perf
69endif
70
71ifeq ($(obj-perf),)
72obj-perf := $(OUTPUT)
73endif
74
75ifneq ($(obj-perf),)
76obj-perf := $(abspath $(obj-perf))/
77endif
78
79LIB_INCLUDE := $(srctree)/tools/lib/
80
81# include ARCH specific config 65# include ARCH specific config
82-include $(src-perf)/arch/$(ARCH)/Makefile 66-include $(src-perf)/arch/$(ARCH)/Makefile
83 67
diff --git a/tools/perf/config/Makefile.arch b/tools/perf/config/Makefile.arch
new file mode 100644
index 000000000000..fef8ae922800
--- /dev/null
+++ b/tools/perf/config/Makefile.arch
@@ -0,0 +1,22 @@
1
2uname_M := $(shell uname -m 2>/dev/null || echo not)
3
4ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
5 -e s/arm.*/arm/ -e s/sa110/arm/ \
6 -e s/s390x/s390/ -e s/parisc64/parisc/ \
7 -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
8 -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ )
9
10# Additional ARCH settings for x86
11ifeq ($(ARCH),i386)
12 override ARCH := x86
13endif
14
15ifeq ($(ARCH),x86_64)
16 override ARCH := x86
17 IS_X86_64 := 0
18 ifeq (, $(findstring m32,$(CFLAGS)))
19 IS_X86_64 := $(shell echo __x86_64__ | ${CC} -E -x c - | tail -n 1)
20 RAW_ARCH := x86_64
21 endif
22endif