* [PATCH] Makefile:add cross_compiler for Makefile
@ 2015-09-28 6:12 Yuanbin Zhou
2015-09-28 12:22 ` John Kacur
0 siblings, 1 reply; 2+ messages in thread
From: Yuanbin Zhou @ 2015-09-28 6:12 UTC (permalink / raw)
To: williams, jkacur; +Cc: linux-rt-users
In this site(https://rt.wiki.kernel.org/index.php/Cyclictest), It has been shown that you can use "make CROSS_COPILE=<your-compiler-prefix>" to build software ran in other platform like arm & mips, but in fact it does not work, this patch is used to solve this problem.
Signed-off-by: Yuanbin Zhou <hduffddybz@gmail.com>
---
Makefile | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/Makefile b/Makefile
index a48e759..9b31ce4 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,17 @@ sources += signaltest.c ptsematest.c sigwaittest.c svsematest.c sendme.c \
TARGETS = $(sources:.c=)
+CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
+AS = $(CROSS_COMPILE)as
+LD = $(CROSS_COMPILE)ld
+CC = $(CROSS_COMPILE)gcc
+CPP = $(CC) -E
+AR = $(CROSS_COMPILE)ar
+NM = $(CROSS_COMPILE)nm
+STRIP = $(CROSS_COMPILE)strip
+OBJCOPY = $(CROSS_COMPILE)objcopy
+OBJDUMP = $(CROSS_COMPILE)objdump
+
LIBS = -lrt -lpthread
RTTESTLIB = -lrttest -L.
EXTRA_LIBS ?= -ldl # for get_cpu
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Makefile:add cross_compiler for Makefile
2015-09-28 6:12 [PATCH] Makefile:add cross_compiler for Makefile Yuanbin Zhou
@ 2015-09-28 12:22 ` John Kacur
0 siblings, 0 replies; 2+ messages in thread
From: John Kacur @ 2015-09-28 12:22 UTC (permalink / raw)
To: Yuanbin Zhou; +Cc: williams, jkacur, linux-rt-users
On Sun, 27 Sep 2015, Yuanbin Zhou wrote:
> In this site(https://rt.wiki.kernel.org/index.php/Cyclictest), It has been shown that you can use "make CROSS_COPILE=<your-compiler-prefix>" to build software ran in other platform like arm & mips, but in fact it does not work, this patch is used to solve this problem.
>
> Signed-off-by: Yuanbin Zhou <hduffddybz@gmail.com>
> ---
> Makefile | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index a48e759..9b31ce4 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -11,6 +11,17 @@ sources += signaltest.c ptsematest.c sigwaittest.c svsematest.c sendme.c \
>
> TARGETS = $(sources:.c=)
>
> +CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
> +AS = $(CROSS_COMPILE)as
> +LD = $(CROSS_COMPILE)ld
> +CC = $(CROSS_COMPILE)gcc
> +CPP = $(CC) -E
> +AR = $(CROSS_COMPILE)ar
> +NM = $(CROSS_COMPILE)nm
> +STRIP = $(CROSS_COMPILE)strip
> +OBJCOPY = $(CROSS_COMPILE)objcopy
> +OBJDUMP = $(CROSS_COMPILE)objdump
> +
> LIBS = -lrt -lpthread
> RTTESTLIB = -lrttest -L.
> EXTRA_LIBS ?= -ldl # for get_cpu
> --
> 2.1.4
Thank you for your patch, it looks sane. I'm not sure what version it
applies against though, when I tried to apply it, it failed.
I did accept the first cross-compile patch, that wasn't suffiencient for
your purposes, so you need to apply your patch on top of that.
Can you respin it against the following branch please? (and resend it of
course)
repo: git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git
branch: devel/v0.95-devel
Thanks
John
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-28 12:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-28 6:12 [PATCH] Makefile:add cross_compiler for Makefile Yuanbin Zhou
2015-09-28 12:22 ` John Kacur
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).