From: Jamie Iles <jamie.iles@picochip.com>
To: linux-kernel@vger.kernel.org
Cc: Jamie Iles <jamie.iles@picochip.com>,
Peter Zijlstra <peterz@infradead.org>
Subject: [PATCH 2/2] perf tools: allow cross compiling
Date: Fri, 11 Dec 2009 09:21:00 +0000 [thread overview]
Message-ID: <1260523260-15694-2-git-send-email-jamie.iles@picochip.com> (raw)
In-Reply-To: <1260523260-15694-1-git-send-email-jamie.iles@picochip.com>
For embedded platforms, we want to be able to build the perf
tools on a build machine to run on a different arch. This patch
allows $CROSS_COMPILE to set the cross compiler. Additionally, if
NO_LIBPERL is set, then don't use perl include paths as they will
be for the host arch.
Signed-off-by: Jamie Iles <jamie.iles@picochip.com>
CC: Peter Zijlstra <peterz@infradead.org>
---
tools/perf/Makefile | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 23ec660..e2ee3b5 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -237,8 +237,8 @@ lib = lib
export prefix bindir sharedir sysconfdir
-CC = gcc
-AR = ar
+CC = $(CROSS_COMPILE)gcc
+AR = $(CROSS_COMPILE)ar
RM = rm -f
TAR = tar
FIND = find
@@ -492,8 +492,10 @@ else
LIB_OBJS += util/probe-finder.o
endif
+ifndef NO_LIBPERL
PERL_EMBED_LDOPTS = `perl -MExtUtils::Embed -e ldopts 2>/dev/null`
PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
+endif
ifneq ($(shell sh -c "(echo '\#include <EXTERN.h>'; echo '\#include <perl.h>'; echo 'int main(void) { perl_alloc(); return 0; }') | $(CC) -x c - $(PERL_EMBED_CCOPTS) -o /dev/null $(PERL_EMBED_LDOPTS) > /dev/null 2>&1 && echo y"), y)
BASIC_CFLAGS += -DNO_LIBPERL
--
1.6.5.4
next prev parent reply other threads:[~2009-12-11 9:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-11 9:20 [PATCH 1/2] perf tools: allow building for ARM Jamie Iles
2009-12-11 9:21 ` Jamie Iles [this message]
2009-12-11 10:27 ` [tip:perf/urgent] perf tools: Allow cross compiling tip-bot for Jamie Iles
2009-12-11 12:20 ` [PATCH] perf tools: allow building for ARM (patch v2) Jamie Iles
2009-12-11 12:54 ` [tip:perf/urgent] perf tools: Allow building for ARM tip-bot for Jamie Iles
2009-12-11 13:04 ` Jamie Iles
2009-12-11 13:26 ` Ingo Molnar
2009-12-11 10:23 ` [PATCH 1/2] perf tools: allow " Ingo Molnar
2009-12-11 10:30 ` Jamie Iles
2009-12-11 10:38 ` Ingo Molnar
2009-12-11 11:01 ` Jamie Iles
2009-12-11 11:26 ` Mikael Pettersson
2009-12-11 21:22 ` Russell King - ARM Linux
[not found] ` <000101ca7a50$b3e2ad70$1ba80850$@deacon@arm.com>
2009-12-11 11:02 ` Ingo Molnar
2009-12-11 11:08 ` Pekka Enberg
2009-12-11 10:38 ` David Miller
2009-12-11 10:41 ` Ingo Molnar
2009-12-11 11:48 ` Jamie Iles
2009-12-11 12:48 ` Ingo Molnar
2009-12-11 21:19 ` Russell King - ARM Linux
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=1260523260-15694-2-git-send-email-jamie.iles@picochip.com \
--to=jamie.iles@picochip.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
/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
all inboxes | Powered by JetHome®