public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [KBUILD] Put the CROSS_COMPILE and ARCH variables in the build directory makefile
@ 2012-09-30 23:20 Jason Gunthorpe
  2012-10-30 13:46 ` Michal Marek
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Gunthorpe @ 2012-09-30 23:20 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Michal Marek

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-30 15:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-30 23:20 [PATCH] [KBUILD] Put the CROSS_COMPILE and ARCH variables in the build directory makefile Jason Gunthorpe
2012-10-30 13:46 ` Michal Marek
2012-10-30 15:19   ` Jason Gunthorpe
2012-10-30 15:28     ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox