[Babel-users] babeld building and binary size
Matthieu Boutier
boutier at irif.fr
Thu Dec 7 07:41:54 UTC 2017
Hi,
A first step could be to remove the "-g" from CFLAGS. Default is "-Os -g".
On my desktop computer (debian 64bits, gcc), commit 9be552feda7f:
$ make clean > /dev/null; make CFLAGS="-Os -g" > /dev/null; du -h babeld
460K babeld
$ make clean > /dev/null; make CFLAGS="-Os" > /dev/null; du -h babeld
132K babeld
The weird part, "-O0 -g" is smaller than "-Os -g":
$ make clean > /dev/null; make CFLAGS="-O0 -g" > /dev/null; du -h babeld
332K babeld
Other results:
$ make clean > /dev/null; make CFLAGS="-O0" > /dev/null; du -h babeld
188K babeld
$ make clean > /dev/null; make CFLAGS="-O3" > /dev/null; du -h babeld
196K babeld
$ make clean > /dev/null; make CFLAGS="-O2" > /dev/null; du -h babeld
156K babeld
$ make clean > /dev/null; make CFLAGS="-O1" > /dev/null; du -h babeld
148K babeld
> Can you explain why the executable file is smaller or can you share the
> Makefile to build the smaller executable file ?
You should find the corresponding makefile in the lede repos.
Matthieu
More information about the Babel-users
mailing list