Re: [PATCH] m32r: set CHECKFLAGS properly

Al Viro
2005-09-29T01:56:33Z

On Wed, Sep 28, 2005 at 07:04:14PM +0900, Hirokazu Takata wrote:
> In the top Makefile, CHECKFLAGS is defined as follows:
> CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ $(CF)
>
> Can I use CF for user specific CHECKFLAGS ?
> What do you think about we specify it manyally for a biendian target?
>
> ex. m32r
> sparse check for biendian target
> $ make ARCH=m32r CF=-D__BIG_ENDIAN__=1 C=1 ... for big-endian
> $ make ARCH=m32r CF=-D__LITTLE__=1 C=1 ... for little-endian

That's doable, but... I'd rather not make it mandatory - CF is for
"specific for this build" flags and when used for parallel cross-builds
such requirements make it rather nasty to deal with.

> I understand what you said.
> I think having -D__BIG_ENDIAN__ is one of the realistic solutions,
> because it seems that there is no good solution about this problem
> as other people said in this ML-thread.

Note that it's not just sparse. There is a legitimate need to make
endianness of target visible to Kconfig - not to mention anything
else, there are drivers that are really broken on big-endian targets.