disclaimer: i'm not much of a programmer
for compiling CHDK for a gcc newer than ~4.6.X they have link-time optimization (-flto)
where for composite linked files there are optimized again during the integration
and for some files it makes them a bit faster but also
with a much ~10%-to-few times
smaller file size
but flto needs to be specified in BOTH CFLAGS and LDFLAGS
but currently not compatible the elf flt file format thing
unless something done to fix it