All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuanbin Zhou <hduffddybz@gmail.com>
To: williams@redhat.com, jkacur@redhat.com
Cc: linux-rt-users@vger.kernel.org
Subject: [PATCH] Makefile:add cross_compiler for Makefile
Date: Sun, 27 Sep 2015 22:12:05 -0800	[thread overview]
Message-ID: <20150928061205.GA6382@debian.debian> (raw)

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



             reply	other threads:[~2015-09-28  6:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-28  6:12 Yuanbin Zhou [this message]
2015-09-28 12:22 ` [PATCH] Makefile:add cross_compiler for Makefile John Kacur

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=20150928061205.GA6382@debian.debian \
    --to=hduffddybz@gmail.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 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.