Posted: Sun 26 Jun 2005, 13:56 Post_subject:
Compiling for puppy: leave out the 'debug' symbols
This little detail is not on the "compiling for puppy" but it's a fairly important one:
a lot of Makefiles will leave the "add debug symbol" option of gcc enabled (it's "-g"). This means that a alot of "text" information is added to your program to facilitate debugging, increasing the program file significanlty.
When you compile for puppy before typing make (but after the ./configure step if it's part of the compiling steps) you should open Makefile and look for a line that sets the C flags (usually CFLAGS = ....).
if the line include -g remove it and see how much space is gained. This will NOT change the behavior of the program.
There are other optimizations that can be enabled, such as changing the optimizer setting. I find of a lot of program use -O2 by default, changing it to -Os will usually make a smaller program. In theory changing optimizer settings should not change the behavior of your program, however it is possible that it can have subtle side effects that the original programmer didn't test for.
I'm really happy to see the source-sorcerer project, because now we can go in and check how each package was built, and make sure that each build is optimized. _________________ Mandriva LE 2005 user and puppy newbie