[PATCH] [KBUILD] Put the CROSS_COMPILE and ARCH variables in the build directory makefile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux