From: Frank Rowand <frank.rowand@am.sony.com>
To: "linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>,
<williams@redhat.com>
Cc: <jkacur@redhat.com>, <dvhart@linux.intel.com>
Subject: [PATCH RFC] rt-tests: Makefile get machinetype from compiler instead of uname
Date: Tue, 1 May 2012 19:34:13 -0700 [thread overview]
Message-ID: <4FA09D25.7090808@am.sony.com> (raw)
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>
---
Makefile | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)
Index: b/Makefile
===================================================================
--- 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
next reply other threads:[~2012-05-02 2:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-02 2:34 Frank Rowand [this message]
2012-05-02 20:30 ` [PATCH RFC] rt-tests: Makefile get machinetype from compiler instead of uname Darren Hart
2012-05-02 21:01 ` Frank Rowand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FA09D25.7090808@am.sony.com \
--to=frank.rowand@am.sony.com \
--cc=dvhart@linux.intel.com \
--cc=jkacur@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=williams@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox