Re: gcc 3.0.2/kernel details (-O issue)

H. Peter Anvin (hpa@zytor.com)
Thu, 20 Dec 2001 04:03:50 -0800


J.A. Magallon wrote:

>
> Problem is killing inlined functions. Current kernel relies in the
> real version of the funtion staying there even all its uses have been
> inlined. GCC's before 3 do not do what they are supposed to and do not
> kill the real function. GCC3 kills it in certain cases and build
> crashes. So kernel builds ok with old gcc's because they do not do
> what they are supposed. Hence all the 'extern inline' mesh...
> (plz, correct me if I'm wrong).
>

You're wrong. The thing is the kernel does NOT include any noninline
functions, which breaks if you *don't* inline (like gcc doesn't if the
optimizer isn't turned on...)

-hpa

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