Merge 3.19-rc5 into char-misc-next
[linux-2.6-block.git] / tools / perf / config / Makefile.arch
CommitLineData
a6cf5f39
JO
1
2uname_M := $(shell uname -m 2>/dev/null || echo not)
3
c6e5e9fb 4RAW_ARCH := $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
a6cf5f39
JO
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/ \
620830b6
ZL
8 -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \
9 -e s/tile.*/tile/ )
a6cf5f39
JO
10
11# Additional ARCH settings for x86
c6e5e9fb
NK
12ifeq ($(RAW_ARCH),i386)
13 ARCH ?= x86
a6cf5f39
JO
14endif
15
c6e5e9fb
NK
16ifeq ($(RAW_ARCH),x86_64)
17 ARCH ?= x86
18
19 ifneq (, $(findstring m32,$(CFLAGS)))
20 RAW_ARCH := x86_32
a6cf5f39
JO
21 endif
22endif
e477f3f0 23
c6e5e9fb
NK
24ARCH ?= $(RAW_ARCH)
25
26LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
27ifeq ($(LP64), 1)
e477f3f0 28 IS_64_BIT := 1
e477f3f0 29else
c6e5e9fb 30 IS_64_BIT := 0
e477f3f0 31endif