Re: [PATCH] m32r: set CHECKFLAGS properly

Al Viro
2005-09-27T23:06:32Z

On Tue, Sep 27, 2005 at 02:37:09PM -0400, Kyle Moffett wrote:
> >And no, sparse (or any other C compiler) is not required to have
> >the same pile as gcc does.
>
> But when we're using sparse to check kernel sources, it should have a
> similar set to what the regular compiler (IE: gcc) has when building
> kernel sources.

Have you ever looked at that set of defines? Note that even with gcc
most of them are supposed to be only used in gcc headers. Most of
those are never used in the kernel code, and for a good reason. Only
two are actually used - stdarg.h and (for raid6 with CONFIG_ALTIVEC)
altivec.h. Guess what? The former doesn't use any of these defines
and in case of the latter the only define used would be a lie - sparse
does *not* handle -maltivec.

It gets even better when you get to defines that describe compiler capacities.
sparse, for example, does *not* support wchar_t et.al.; gcc does. Should
we lie about that support? Should sparse binary that kinda-sorta imitates
e.g. builtins of gcc 3.3 (and declares __GNUC... accordingly) pick bogus
ones from gcc4 you are using for build?

There are very few defines we really want out of that pile. "Take everything"
is nowhere near sanity, especially if you consider the differences between
gcc versions (and gcc builds, while we are at it).