Re: kernel compiler
Allan Sandfeld (linux@sneulv.dk)
Fri, 26 Oct 2001 11:18:46 +0200
On Friday 26 October 2001 00:13, J . A . Magallon wrote:
> On 20011025 Lost Logic wrote:
> >GCC 3.0 Produces slower code, eh? I was of the understanding that it
> >contained many more optimizations than previous versions...???
> >
> >Any way, I've been able to run my system based entirely on a fairly
> >recent GCC CVS-3.02 snapshot, including kernels, and everything EXCEPT
> >for glibc which is specifically incompatible according to the GNU folks.
> >
> >By way of information however, neither of the GCC 3.0 releases (3.0.0 or
> >3.0.1) work at all on my system, and I cannot get a kernel to function
> >at better than -O2 (not that I could get that to work in 2.95.* or
> >2.96.* either).
>
> -O3 activates -finline-functions:
> `-finline-functions'
> Integrate all simple functions into their callers. The compiler
> heuristically decides which functions are simple enough to be worth
> integrating in this way.
>
> If all calls to a given function are integrated, and the function
> is declared `static', then the function is normally not output as
> assembler code in its own right.
>
> Last paragraph is the key. Perhaps previous gcc'd did not all his work
> as the manual says (ie, did not kill the non-inline version, bug),
> but people has got used to the bug, and see it as a feature.
I believe '-fkeep-inline-functions' is your friend in this case. I haven't
tested it though on the kernel.
regards
`Allan
-
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/