* [PATCH RFC] rt-tests: Makefile get machinetype from compiler instead of uname
@ 2012-05-02 2:34 Frank Rowand
2012-05-02 20:30 ` Darren Hart
0 siblings, 1 reply; 3+ messages in thread
From: Frank Rowand @ 2012-05-02 2:34 UTC (permalink / raw)
To: linux-rt-users, williams; +Cc: jkacur, dvhart
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RFC] rt-tests: Makefile get machinetype from compiler instead of uname
2012-05-02 2:34 [PATCH RFC] rt-tests: Makefile get machinetype from compiler instead of uname Frank Rowand
@ 2012-05-02 20:30 ` Darren Hart
2012-05-02 21:01 ` Frank Rowand
0 siblings, 1 reply; 3+ messages in thread
From: Darren Hart @ 2012-05-02 20:30 UTC (permalink / raw)
To: frank.rowand; +Cc: linux-rt-users, williams, jkacur
On 05/01/2012 07:34 PM, Frank Rowand wrote:
>
> 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.
Built in Yocto using an ARM cross compiler and ran cyclictest in qemuarm
with the resulting image. Appears sane.
What problem manifested before?
>
> Signed-off-by: Frank Rowand <frank.rowand@am.sony.com>
Tested-by: Darren Hart <dvhart@linux.intel.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
>
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RFC] rt-tests: Makefile get machinetype from compiler instead of uname
2012-05-02 20:30 ` Darren Hart
@ 2012-05-02 21:01 ` Frank Rowand
0 siblings, 0 replies; 3+ messages in thread
From: Frank Rowand @ 2012-05-02 21:01 UTC (permalink / raw)
To: Darren Hart; +Cc: Rowand, Frank, linux-rt-users, williams, jkacur
On 05/02/12 13:30, Darren Hart wrote:
> On 05/01/2012 07:34 PM, Frank Rowand wrote:
>>
>> 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.
>
>
> Built in Yocto using an ARM cross compiler and ran cyclictest in qemuarm
> with the resulting image. Appears sane.
>
> What problem manifested before?
>
>>
>> Signed-off-by: Frank Rowand <frank.rowand@am.sony.com>
>
> Tested-by: Darren Hart <dvhart@linux.intel.com>
Thanks!
As you and jkacur surmised, the problem I'm trying to fix is that
the machinetype got the host machine type instead of the target
machine type. Could definitely word the description better...
-Frank
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-02 21:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-02 2:34 [PATCH RFC] rt-tests: Makefile get machinetype from compiler instead of uname Frank Rowand
2012-05-02 20:30 ` Darren Hart
2012-05-02 21:01 ` Frank Rowand
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.