aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/config/Makefile.arch
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/config/Makefile.arch')
-rw-r--r--tools/perf/config/Makefile.arch26
1 files changed, 13 insertions, 13 deletions
diff --git a/tools/perf/config/Makefile.arch b/tools/perf/config/Makefile.arch
index 851cd0172a76..ff95a68741d1 100644
--- a/tools/perf/config/Makefile.arch
+++ b/tools/perf/config/Makefile.arch
@@ -1,7 +1,7 @@
1 1
2uname_M := $(shell uname -m 2>/dev/null || echo not) 2uname_M := $(shell uname -m 2>/dev/null || echo not)
3 3
4ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ 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/ \ 5 -e s/arm.*/arm/ -e s/sa110/arm/ \
6 -e s/s390x/s390/ -e s/parisc64/parisc/ \ 6 -e s/s390x/s390/ -e s/parisc64/parisc/ \
7 -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ 7 -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
@@ -9,23 +9,23 @@ ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
9 -e s/tile.*/tile/ ) 9 -e s/tile.*/tile/ )
10 10
11# Additional ARCH settings for x86 11# Additional ARCH settings for x86
12ifeq ($(ARCH),i386) 12ifeq ($(RAW_ARCH),i386)
13 override ARCH := x86 13 ARCH ?= x86
14endif 14endif
15 15
16ifeq ($(ARCH),x86_64) 16ifeq ($(RAW_ARCH),x86_64)
17 override ARCH := x86 17 ARCH ?= x86
18 IS_X86_64 := 0 18
19 ifeq (, $(findstring m32,$(CFLAGS))) 19 ifneq (, $(findstring m32,$(CFLAGS)))
20 IS_X86_64 := $(shell echo __x86_64__ | ${CC} -E -x c - | tail -n 1) 20 RAW_ARCH := x86_32
21 RAW_ARCH := x86_64
22 endif 21 endif
23endif 22endif
24 23
25ifeq (${IS_X86_64}, 1) 24ARCH ?= $(RAW_ARCH)
25
26LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
27ifeq ($(LP64), 1)
26 IS_64_BIT := 1 28 IS_64_BIT := 1
27else ifeq ($(ARCH),x86)
28 IS_64_BIT := 0
29else 29else
30 IS_64_BIT := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1) 30 IS_64_BIT := 0
31endif 31endif