summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Rowand <frank.rowand@am.sony.com>2012-05-01 19:34:13 -0700
committerClark Williams <williams@redhat.com>2012-05-03 16:17:38 -0500
commitf4256bfde48fa269758633d79e722d50a431b314 (patch)
treeba9be9b842d339a063735f41e94a906a248beb4a
parent3c14034e3dfd23aea9e830e7aa7be5f1acaa8410 (diff)
downloadcyclictest-f4256bfde48fa269758633d79e722d50a431b314.tar.gz
rt-tests: Makefile get machinetype from compiler instead of uname
Fix the machinetype check for cross-compiling. This has been tested on an x86_64 Fedora host for an x86_64 target and an ARM target. Additional testing would be greatly appreciated. Signed-off-by: Frank Rowand <frank.rowand@am.sony.com> Tested-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Clark Williams <williams@redhat.com>
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 31e1792..fc7c149 100644
--- a/Makefile
+++ b/Makefile
@@ -14,8 +14,8 @@ bindir ?= $(prefix)/bin
mandir ?= $(prefix)/share/man
srcdir ?= $(prefix)/src
-machinetype = $(shell uname -m | \
- sed -e 's/i.86/i386/' -e 's/mips.*/mips/' -e 's/ppc.*/powerpc/')
+machinetype = $(shell $(CC) -dumpmachine | \
+ sed -e 's/-.*//' -e 's/i.86/i386/' -e 's/mips.*/mips/' -e 's/ppc.*/powerpc/')
ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),)
NUMA := 1
endif