aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2015-03-01 23:31:03 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-03-02 10:01:42 -0500
commitb11db6581beaccef8ae9a388ae96074aa5cc144f (patch)
treef3836fb1ac4c6371413404b4dbd4093cc6c096aa
parent4aa5f4f7bb8bc41cba15bcd0d80c4fb085027d6b (diff)
perf tools: Fix build error on ARCH=i386/x86_64/sparc64
He Kuang reported that current perf tools failed to build when ARCH variable was given like above. It was because the name is different that internal directory name. I can see that David's sparc64 build has same problem. So fix it by applying the sed conversion script to the command line ARCH variable also, and fixing the converted name there (i.e. i386/x86_64 -> x86, sparc64 -> sparc). Reported-by: He Kuang <hekuang@huawei.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Tested-by: He Kuang <hekuang@huawei.com> Acked: Jiri Olsa <jolsa@redhat.com> Cc: David Ahern <david.ahern@oracle.com> Cc: He Kuang <hekuang@huawei.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1425270663-10215-1-git-send-email-namhyung@kernel.org [ Resolved conflict with 4861f87cd3d1 "Make sparc64 arch point to sparc" ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/config/Makefile.arch27
1 files changed, 5 insertions, 22 deletions
diff --git a/tools/perf/config/Makefile.arch b/tools/perf/config/Makefile.arch
index ac8721ffa6c8..e9720571341d 100644
--- a/tools/perf/config/Makefile.arch
+++ b/tools/perf/config/Makefile.arch
@@ -1,32 +1,15 @@
1ifndef ARCH
2ARCH := $(shell uname -m 2>/dev/null || echo not)
3endif
1 4
2uname_M := $(shell uname -m 2>/dev/null || echo not) 5ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
3 6 -e s/sun4u/sparc/ -e s/sparc64/sparc/ \
4RAW_ARCH := $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
5 -e s/arm.*/arm/ -e s/sa110/arm/ \ 7 -e s/arm.*/arm/ -e s/sa110/arm/ \
6 -e s/s390x/s390/ -e s/parisc64/parisc/ \ 8 -e s/s390x/s390/ -e s/parisc64/parisc/ \
7 -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ 9 -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
8 -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \ 10 -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \
9 -e s/tile.*/tile/ ) 11 -e s/tile.*/tile/ )
10 12
11# Additional ARCH settings for x86
12ifeq ($(RAW_ARCH),i386)
13 ARCH ?= x86
14endif
15
16ifeq ($(RAW_ARCH),x86_64)
17 ARCH ?= x86
18
19 ifneq (, $(findstring m32,$(CFLAGS)))
20 RAW_ARCH := x86_32
21 endif
22endif
23
24ifeq ($(RAW_ARCH),sparc64)
25 ARCH ?= sparc
26endif
27
28ARCH ?= $(RAW_ARCH)
29
30LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1) 13LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
31ifeq ($(LP64), 1) 14ifeq ($(LP64), 1)
32 IS_64_BIT := 1 15 IS_64_BIT := 1