Hello all,
I'm using the ppc-linux gcc-4.2.2 compiler and noted the code
size have increased significantly (about 40%!), comparing with
old 4.0.0 when using the -Os option. Same code, same compile-
and configuration-time options. Binutils are differ
(2.16.1 vs 2.17.50), though.
I've looked at the CSiBE testing results for ppc-elf with -Os,
comparing gcc_4_0_0 with mainline and found that the mainline
actually optimizes better, at least for the CSiBE test environment.
After some analysis I've came to the following results:
Number of packages in the CSiBE test environment: 863
N of packages where mainline GCC optimizes better: 290
N of packages where mainline GCC optimizes worse: 436
And the regression in code size is up to 40%, like in my case.
What I'm missing here? Apparently, just "-Os" is not enough to
get the best size-optimized code?
Currently, it builds as following:
ppc-linux-gcc -g -Os -fPIC -ffixed-r14 -meabi -fno-strict-aliasing
-D__KERNEL__ -DTEXT_BASE=0xfffc0000 -I/work/psl/tmp/u-boot/include
-fno-builtin -ffreestanding -nostdinc -isystem
/opt/eldk-4.2-01-08/usr/bin/../lib/gcc/powerpc-linux/4.2.2/include
-pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_4xx -ffixed-r2 -ffixed-r29
-mstring -msoft-float -Wa,-m440 -mcpu=440 -DCONFIG_440=1 -Wall
-Wstrict-prototypes -c -o interrupts.o interrupts.c
What would you suggest?
Thanks for any help,
Sergei