Re: 2.6.21-rc7-mm2 -- PPC link failure

Christoph Lameter
2007-04-27T16:58:29Z

On Fri, 27 Apr 2007, Andy Whitcroft wrote:

> > See my patch @ http://marc.info/?l=linux-kernel&m=117752927203466&w=2
>
> Yeah I played with that for a bit last night to no good effect.
> BUILD_BUG_ON simply becomes a noop if the optimiser doesn't really
> really know that the thing its talking about is a real constant.

Too bad. Sigh.

> I assume that if it cannot be sure that it should constant fold the
> number, it leaves it for runtime. Then the optimiser sees that the
> thing is void and therefore removable and removes it. So no error.
>
> Perhaps we need to enlist someone from gcc-land to tell us how to figure
> out what its doing and massage it into working.

In the meantime how about moving that generation of the link err out of
SLUB and SLAB into kernel.h and make some BUILD_BUG() or so out of it? We
are talking about some generically useful functionality I guess.