Re: [PATCH v2] kbuild: save ARCH & CROSS_COMPILE when building a kernel

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

 



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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux