Re: [RFC/RFT] kbuild: save ARCH & CROSS_COMPILE

From: Sam Ravnborg
Date: Tue Oct 09 2007 - 12:33:19 EST


On Tue, Oct 09, 2007 at 10:09:06AM -0400, Jeff Dike wrote:
> On Tue, Oct 09, 2007 at 12:00:30PM +0200, Sam Ravnborg wrote:
> > If it is OK to drop the $(SUBARCH) assingment like this then yes.
> > ARCH ?=
> > CROSS_COMPILE ?=
>
> Does the UML build still work when you do that?

The original behaviour is kept is ARCH is not set on the
commandline and saved in .kbuild (Kbuild.config in the patch).

The logic goes basically like this:
If there is no .kbuild file then set ARCH = $(SUBARCH)
else set ARCH = saved ARCH from .kbuild.

And then a bit sanity check that the user does not
try to change architecture in the middle.

I actually used um as testing ground for this patch so
it works for um in my way of building um.

I considered switching architectures automagically
but concluded that in most cases when a user change ARCH
then that's because the user forgot to specify ARCH or more
seldom forgot what ARCH was being built in that directory.

Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/