]> Pileus Git - ~andy/linux/blob - tools/perf/config/Makefile.arch
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[~andy/linux] / tools / perf / config / Makefile.arch
1
2 uname_M := $(shell uname -m 2>/dev/null || echo not)
3
4 ARCH ?= $(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
11 ifeq ($(ARCH),i386)
12   override ARCH := x86
13 endif
14
15 ifeq ($(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
22 endif