In essence -O2 just tells gcc to activate a list of optimizations
gcc -Q -O2 --help=optimizers
tells you what.
So what about making this patch much smaller by explicitely using the optimizations
that are absolutely necessary?
e.g:
-finline-small-functions -finline-functions-called-once
(what else do we need?)
We might even be able to collapse this with the optimize for size option,
by providing a Kconfig entry that allows to choose between
-O0 -finline-small-functions -finline-functions-called-once
-O1 -finline-small-functions -finline-functions-called-once
-Os
-O2
-O3
Christian
--