aboutsummaryrefslogtreecommitdiffstats
path: root/tools/scripts/Makefile.arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-01-14 11:39:09 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-14 11:39:09 -0800
commit747a9b0a08ae300b99b8aa7861bd3609f3b3e782 (patch)
treec76ce3e65c4066120dc2918b8db1bc4100bdf272 /tools/scripts/Makefile.arch
parentMerge branch 'i2c/for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux (diff)
parentMerge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (diff)
downloadlinux-dev-747a9b0a08ae300b99b8aa7861bd3609f3b3e782.tar.xz
linux-dev-747a9b0a08ae300b99b8aa7861bd3609f3b3e782.zip
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar: "Tooling fixes, the biggest patch is one that decouples the kernel's list.h from tooling list.h" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits) perf tools: Fallback to srcdir/Documentation/tips.txt perf ui/tui: Print helpline message as is perf tools: Set and pass DOCDIR to builtin-report.c perf tools: Add file_only config option to strlist perf tools: Add more usage tips perf record: Add --buildid-all option tools subcmd: Add missing NORETURN define for parse-options.h tools: Fix formatting of the "make -C tools" help message tools: Make list.h self-sufficient perf tools: Fix mmap2 event allocation in synthesize code perf stat: Fix recort_usage typo perf test: Reset err after using it hold errcode in hist testcases perf test: Fix false TEST_OK result for 'perf test hist' tools build: Add BPF feature check to test-all perf bpf: Fix build breakage due to libbpf tools: Move Makefile.arch from perf/config to tools/scripts perf tools: Fix PowerPC native building perf tools: Fix phony build target for build-test perf tools: Add -lutil in python lib list for broken python-config perf tools: Add missing sources to perf's MANIFEST ...
Diffstat (limited to 'tools/scripts/Makefile.arch')
-rw-r--r--tools/scripts/Makefile.arch18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/scripts/Makefile.arch b/tools/scripts/Makefile.arch
new file mode 100644
index 000000000000..e11fbd6fae78
--- /dev/null
+++ b/tools/scripts/Makefile.arch
@@ -0,0 +1,18 @@
+ifndef ARCH
+ARCH := $(shell uname -m 2>/dev/null || echo not)
+endif
+
+ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
+ -e s/sun4u/sparc/ -e s/sparc64/sparc/ \
+ -e /arm64/!s/arm.*/arm/ -e s/sa110/arm/ \
+ -e s/s390x/s390/ -e s/parisc64/parisc/ \
+ -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
+ -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \
+ -e s/tile.*/tile/ )
+
+LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
+ifeq ($(LP64), 1)
+ IS_64_BIT := 1
+else
+ IS_64_BIT := 0
+endif