Hi, TheStar writes:
On Tue, 11 Mar 2003 09:02:58 -0800 (PST) Simon Davis <sd1324@yahoo.com> wrote:
Hi,
After building dillo 0.7.1.2 and stripping the binary the file size is almost 1.6 megs. When I built 0.7 the final binary came out to be 289k.
I built both using the uclibc library and gcc 3.2.
Is there some special configuration option I need to add to make the binary smaller?
Humm.. this is really bizarre! I have just tried gcc-2.95 and gcc 3.2.3 and both produce ~260k binaries with -Os and stripped.
I always use the gcc option -Os, which turns off all optimisations that increase code size... Don't know how much it will help, but there's no harm in trying ;)
Just a nitpick, but that's not completely true. -Os will keep the optimizations -O2 perform _but_ which do not increase the code size too much. Furthermore, it adds some optimizations to reduce code size. There have been reports of programs (or even the Linux kernel) running faster with -Os then -O2 due to the small code size (which can eventually fit inside the CPU cache). But, yes, Simon could try to compile with -Os. Nonetheless, a 1.6 MiB dillo binary (stripped) is very odd. (Heck, I've just tried to compile with -O0 and I got a 329KiB binary). Maybe a GCC bug? Which version are you using? regards, -- Livio <livio@ime.usp.br>