Re: Why 'linux/fs.h' cannot be included? I *can*...

From: Jeff Garzik (garzik@havoc.gtf.org)
Date: Wed Jan 30 2002 - 21:35:14 EST


On Thu, Jan 31, 2002 at 01:06:32PM +1100, Keith Owens wrote:
> On Wed, 30 Jan 2002 20:57:14 -0500,
> Jeff Garzik <garzik@havoc.gtf.org> wrote:
> >On Thu, Jan 31, 2002 at 12:51:50PM +1100, Keith Owens wrote:
> >> tend not to live very long. Christoph Hellwig suggested a Makefile
> >> change that prevents kernel code including user space headers, it is
> >> included in kbuild 2.5 and there is a 2.4 version in
> >>
> >> http://marc.theaimsgroup.com/?l=linux-kernel&m=100321690511549&w=2
> >
> >Patch looks ok to me... The only thing I wonder is if we should put
> >kernel includes before gcc includes, just in case we want to override
> >something.
>
> I doubt that is ever a good idea. The kernel would have to track which
> gcc was being used and work out what to override or duplicate. Why
> make the kernel any more sensitive to gcc than we have to?

The kernel often has special rules for and usage of gcc.
Why -prevent- the flexibility of doing this?

As soon as a case appears when we might need to care about what the gcc
headers are doing, we will want to do this anyway.

> >I would support putting this in the default cflags for 2.4 and 2.5...
>
> --nostdinc is the default for kbuild 2.5. I did not bother sending it
> in for 2.4 because my kbuild 2.5 testing finds the naughty code anyway
> and I send individual bug fixes for the offending files. There is also
> a risk of breaking existing third party code, I was not willing to take
> that risk on a "stable" series like 2.4.

Understandable... but I disagree :)

First, we rarely bend over backwards for 3rd party code, and more
importantly we should -never ever- do anything to assist and support
bad code.

        Jeff

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



This archive was generated by hypermail 2b29 : Thu Jan 31 2002 - 21:01:30 EST