public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: linux <linux-kernel@vger.kernel.org>
Subject: [PATCH] Saving ARCH and CROSS_COMPILE in generated Makefile
Date: Wed, 04 May 2005 19:11:07 -0400	[thread overview]
Message-ID: <1115248267.12758.21.camel@dv.roinet.com> (raw)

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


             reply	other threads:[~2005-05-04 23:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-04 23:11 Pavel Roskin [this message]
2005-05-04 23:23 ` [PATCH] Saving ARCH and CROSS_COMPILE in generated Makefile Al Viro
2005-05-05  3:18   ` Pavel Roskin
2005-05-05 21:20     ` Sam Ravnborg
2005-05-05 21:56       ` Pavel Roskin

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=1115248267.12758.21.camel@dv.roinet.com \
    --to=proski@gnu.org \
    --cc=linux-kernel@vger.kernel.org \
    /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