Re: huge gcc 4.1.{0,1} __weak problem

From: Jakub Jelinek
Date: Thu May 01 2008 - 18:51:50 EST


On Thu, May 01, 2008 at 03:42:38PM -0700, Andrew Morton wrote:
> Is there some vaguely maintainable workaround we can do? If the problem
> only affects completely-empty weak functions then we could put something in
> them to make them non-empty?

for (;;); isn't enough, the function would be still considered const and by
4.1.0 and some 4.1.1 incorrectly optimized out, without regard to weak
attribute.
But e.g.
asm ("");
should be enough.

Jakub
--
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/