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
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
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.
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
kbuild-devel mailing list