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

From: Christoph Lameter
Date: Fri Apr 27 2007 - 12:58:48 EST


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.

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