Code size reduction

[ Thread Index | Date Index | More lists.tuxfamily.org/slitaz Archives ]


Just some info regarding code sizes and GCC options

I used some specific gcc and ld options on my gentoo server installation (I use it cause it's a lot easier in terms of developer usage)

Additional CFLAGS: -fivopts -fomit-frame-pointer -ftree-loop-im -ffunction-sections -fdata-sections -fwhole-program -flto
Additional LDFLAGS: -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--gc-sections -flto"

Some size reduction numbers:
htop from 140Kb to 102Kb
7z from 436Kb to 286Kb
7za from 1178Kb to 960Kb
git from 1300Kb to 1038Kb 

transmission (O_o) :
from
-rwxr-xr-x   1 root root  385596 Apr 26 12:00 transmission-cli
-rwxr-xr-x   1 root root  388172 Apr 26 12:00 transmission-create
-rwxr-xr-x   1 root root  391008 Apr 26 12:00 transmission-daemon
-rwxr-xr-x   1 root root  383696 Apr 26 12:00 transmission-edit
-rwxr-xr-x   1 root root  419784 Apr 26 12:00 transmission-remote
-rwxr-xr-x   1 root root  384084 Apr 26 12:00 transmission-show
to
-rwxr-xr-x 1 root root 330640 Apr 28 12:44 /usr/bin/transmission-cli
-rwxr-xr-x 1 root root  30940 Apr 28 12:44 /usr/bin/transmission-create
-rwxr-xr-x 1 root root 334772 Apr 28 12:44 /usr/bin/transmission-daemon
-rwxr-xr-x 1 root root  26992 Apr 28 12:44 /usr/bin/transmission-edit
-rwxr-xr-x 1 root root  73844 Apr 28 12:44 /usr/bin/transmission-remote
-rwxr-xr-x 1 root root  36244 Apr 28 12:44 /usr/bin/transmission-show

Actually, I dont think about using it in a system-scale (due to some regressions mainly in LTO), but we can test and use this flags with some packages.

With best regards, Alexander.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/