public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Saving ARCH and CROSS_COMPILE in generated Makefile
@ 2005-05-04 23:11 Pavel Roskin
  2005-05-04 23:23 ` Al Viro
  0 siblings, 1 reply; 5+ messages in thread
From: Pavel Roskin @ 2005-05-04 23:11 UTC (permalink / raw)
  To: linux

Hello!

I don't want to specify ARCH and CROSS_COMPILE with every make
invocation when cross-compiling the kernel.  I believe they should be
saved somewhere.  The most natural place would be .config, but I guess
it's not acceptable for some reason, or it would have been done long
ago.

The second best place would be the Makefile generated in the build
directory when the kernel is compiled outside the source tree.  The
patch below implements that.

Unfortunately, builds in the source directory would not profit from this
patch.  Perhaps we could always generate "makefile" or "GNUmakefile" in
the build directory, but it would be another patch.  Anyway, few people
cross-compile their kernels, and it's not unreasonable to encourage them
to use out-of-tree builds.

SUBARCH is not saved on purpose, since users are not supposed to
override it.

Compiling external modules against the build tree does the right thing
without ARCH and CROSS_COMPILE being specified.

Signed-off-by: Pavel Roskin <proski@gnu.org>

Index: scripts/mkmakefile
===================================================================
--- 2aa9e4732d7014dcda4c0e80d2e377f52e2262e9/scripts/mkmakefile  (mode:100644 sha1:c4d621b30d0db1649d99f9cebf31377cc2d8d32b)
+++ uncommitted/scripts/mkmakefile  (mode:100644)
@@ -21,6 +21,11 @@
 
 MAKEFLAGS += --no-print-directory
 
+ARCH = $ARCH
+CROSS_COMPILE = $CROSS_COMPILE
+
+export ARCH CROSS_COMPILE
+
 all:
 	\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT)
 


-- 
Regards,
Pavel Roskin


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

end of thread, other threads:[~2005-05-05 21:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-04 23:11 [PATCH] Saving ARCH and CROSS_COMPILE in generated Makefile Pavel Roskin
2005-05-04 23:23 ` Al Viro
2005-05-05  3:18   ` Pavel Roskin
2005-05-05 21:20     ` Sam Ravnborg
2005-05-05 21:56       ` Pavel Roskin

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