Re: [patch 00/2] improve .text size on gcc 4.0 and newer compilers

Alan Cox
2006-01-02T23:58:39Z

On Llu, 2006-01-02 at 22:23 +0000, Russell King wrote:
> > you know what? gcc inlines those automatic even without you typing
> > "inline". (esp if you have unit-at-a-time enabled)

> GCC will only automatically inline using -O3. We don't use -O3 with
> the kernel - only -O2 and -Os.

Or using -finline-functions which is a good idea. -O3 has some other
undesirable side effects. Both -O2 -finline-functions and -Os
-finline-functions will do what looks to be the right thing.

Mind you anything more than a few instructions is questionable with
current processors.

Alan