From: Sam Ravnborg Date: Sun, 20 Sep 2009 10:24:55 +0000 (+0200) Subject: kbuild: save ARCH & CROSS_COMPILE when building a kernel X-Git-Tag: v2.6.32-rc1~148^2~28 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=575543347b5baed0ca927cb90ba8807396fe9cc9;p=pandora-kernel.git kbuild: save ARCH & CROSS_COMPILE when building a kernel When building a kernel for a different architecture kbuild requires the user always to specify ARCH and CROSS_COMPILE on the command-line. We use the asm symlink to detect if user forgets to specify the correct ARCH value - but that symlink is about to die. And we do now want to loose this check. This patch save the settings of ARCH and CROSS_COMPILE in two files named: include/generated/kernel.arch include/generated/kernel.cross The settings are saved during "make *config" time and always read. If user try to change the settings we error out. This works both for plain builds and for O=... builds. So now you can do: $ mkdir sparc64 $ make O=sparc64 ARCH=sparc64 CROSS_COMPILE=sparc64-linux- defconfig $ cd sparc64 $ make Notice that you no longer need to tell kbuild the settings of ARCH and CROSS_COMPILE when you type make in the output directory. Likewise for plain builds where you do not use O=... Signed-off-by: Sam Ravnborg Cc: Roland McGrath --- Reading git-diff-tree failed