Re: kernel compiler

J . A . Magallon (jamagallon@able.es)
Fri, 26 Oct 2001 00:13:54 +0200


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.

-- 
J.A. Magallon                           #  Let the source be with you...        
mailto:jamagallon@able.es
Mandrake Linux release 8.2 (Cooker) for i586
Linux werewolf 2.4.14-pre1-beo #1 SMP Thu Oct 25 16:19:19 CEST 2001 i686
-
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/