public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
To: linux-kbuild@vger.kernel.org
Cc: Michal Marek <mmarek@suse.cz>
Subject: [PATCH] [KBUILD] Put the CROSS_COMPILE and ARCH variables in the build directory makefile
Date: Sun, 30 Sep 2012 17:20:05 -0600	[thread overview]
Message-ID: <20120930232005.GB30637@obsidianresearch.com> (raw)

To make cross building a little simpler. The usage with mini-config would
be something like:

$ mkdir build
$ make ARCH=arm CROSS_COMPILE=arm-v5te-linux-gnueabi- \
       KCONFIG_ALLCONFIG=mini.config O=build allnoconfig
$ make -C build/

After configuring subsequent builds do not need to specify the cross
options.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
---
 scripts/mkmakefile |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/scripts/mkmakefile b/scripts/mkmakefile
index 0cc0442..7cdc3fb 100644
--- a/scripts/mkmakefile
+++ b/scripts/mkmakefile
@@ -56,4 +56,9 @@ Makefile:;
 
 %/: all
 	@:
+
+CROSS_COMPILE?=${CROSS_COMPILE:-}
+${CROSS_COMPILE:+export CROSS_COMPILE}
+ARCH?=${ARCH:-}
+${ARCH:+export ARCH}
 EOF
-- 
1.7.4.1


             reply	other threads:[~2012-09-30 23:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-30 23:20 Jason Gunthorpe [this message]
2012-10-30 13:46 ` [PATCH] [KBUILD] Put the CROSS_COMPILE and ARCH variables in the build directory makefile Michal Marek
2012-10-30 15:19   ` Jason Gunthorpe
2012-10-30 15:28     ` Michal Marek

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=20120930232005.GB30637@obsidianresearch.com \
    --to=jgunthorpe@obsidianresearch.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=mmarek@suse.cz \
    /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