mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: kbuild devel <kbuild-devel@lists.sourceforge.net>,
	LKML <linux-kernel@vger.kernel.org>
Cc: Andi Kleen <ak@suse.de>, Adrian Bunk <bunk@kernel.org>
Subject: Re: [PATCH v2] kbuild: save ARCH & CROSS_COMPILE when building a kernel
Date: Fri, 12 Oct 2007 19:53:08 +0200	[thread overview]
Message-ID: <20071012175308.GC21193@uranus.ravnborg.org> (raw)
In-Reply-To: <20071009194919.GA26726@uranus.ravnborg.org>

On Tue, Oct 09, 2007 at 09:49:19PM +0200, Sam Ravnborg wrote:
> When building a kernel for a different architecture
> kbuild requires the user always to specify ARCH and
> CROSS_COMPILE on the command-line.
> Failing to do so can result in strange build errros especially
> when the asm symlink point to anohter architecture than
> the one being build.
> The typical case is that the user forget to specify
> ARCH and/or CROSS_COMPILE on the commandline.
> 
> Address the above issues by saving ARCH and CROSS_COMPILE
> when building a kernel. The information is saved in a
> file named ".kbuild" which is not supposed to be manually
> edited and kbuild will overwrite it when a kernel is build.
> 
> If a kernel is build and no ARCH/CROSS_COMPILE info is saved
> then the current settings are saved.
> If ARCH/CROSS_COMPILE was saved then these value are used.
> If the user specified either ARCH and/or CROSS_COMPILE
> it is validated that they match the saved values and kbuild
> error out if this is not the case.

There quickly turned up two issues which this patch when
hitting -mm.
Issue 1) Adding the ARCH ?= caused all native builds
to loose their ARCH setting. I only tested this with
my suite of crosscompilers and not native.

Issue 2) When installing the kernel in a different
environment than where is was compiled turned up that
we even for a modules_install or headers_install call
gcc - and with CROSS_COMPILE set the gcc could not be
located and we printed an error message.

The latter issue require some more involved refactoring
of the top-level Makefile and is thus not ready until next
merge window.
The patch will be withdrawn for now and I hope to have
the top-level Makefile refactored until next merge window.

The prime reason for the refactoring is to remove the top-
level Makefile from the 3xun list.
3xun = Unreadable, unhackable, unmaintainable

Introducing said patch afterwoard is just a nice bonus.

	Sam

      reply	other threads:[~2007-10-12 17:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-09 19:49 Sam Ravnborg
2007-10-12 17:53 ` Sam Ravnborg [this message]

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=20071012175308.GC21193@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=ak@suse.de \
    --cc=bunk@kernel.org \
    --cc=kbuild-devel@lists.sourceforge.net \
    --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

Powered by JetHome