Re: kbuild-permanently-fix-kernel-configuration-include-mess.patch added to -mm tree

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

 



On Wed, Sep 14, 2005 at 05:05:57PM +0800, Coywolf Qi Hunt wrote:
> On 9/14/05, [email protected] <[email protected]> wrote:
> > 
> > The patch titled
> > 
> >      kbuild: permanently fix kernel configuration include mess.
> > 
> > has been added to the -mm tree.  Its filename is
> > 
> >      kbuild-permanently-fix-kernel-configuration-include-mess.patch
> > 
> > 
> > From: Russell King <[email protected]>
> > 
> > Include autoconf.h into every kernel compilation via the gcc command line
> > using -imacros.  This ensures that we have the kernel configuration
> > included from the start, rather than relying on each file having #include
> > <linux/config.h> as appropriate.  History has shown that this is something
> > which is difficult to get right.
> 
> Not all compilations need config.h included and this slows down gratuitously.

That is a small price to pay, rather than having to continually maintain
"does this file need config.h included" - which I think can conclusively
be shown to be a total lost cause.  There are about 3450 configuration
include errors in the kernel as of -git last night.

Getting config.h includes wrong causes subtle bugs - for instance, one
file may be built with some feature enabled which changes a structure
size, and another filfe may be built with it disabled.

I put forward that maintaining correct config.h include across all
files is demonstratably impossible in such a large source base without
considerable work.

I also put forward that the percentage of compilations which do not need
config.h is small and probably realistically zero.

Therefore, I think that a small slowdown for the few (if any) files which
don't need linux/config.h including is a good tradeoff.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
-
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]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux