On Mon, 2007-11-05 at 18:01 +0100, Jacek M. Holeczek wrote:
> A simple ".exe" compiled with MS C++ is about 3 kB long, the same code
> compiled with CeGCC is about 40 kB long.
> Similarly, a ".dll" compiled with MS C++ is about 39 kB long, the same
> code compiled with CeGCC is about 89 kB long.
> In both cases, the CeGCC produces significantly longer binaries (in both
> cases about 40 kB longer).
> Of course, in all cases, the debug info is stripped (and the code is
> "optimized" by the compiler).
> Can someone comment on this issue?
> Maybe I need to switch some additional flags on?

It all depends on what you're using, and you're not very specific.

If you're using mingw32ce, then odds are that you're not using many DLLs
as we don't distribute them yet. That's different for cegcc.

Also you mention C++. The C++ support has evolved a lot in gcc,
Microsoft is almost certain to have higher quality in some areas
(especially the libraries) there.

Apart from that, have you run "size" on the executables, and compared
the results ? Also you may be able to see more if you use objdump on
them. You should be able to use both these tools even on MS generated
executables.

Here is the output for a downloaded and a homegrown xwords. Note they
may not be exactly from the same source :-)
dannypc: {26} l
total 285
-rw-r--r-- 1 danny backx 179712 Nov 29 21:43 xwords411.exe
-rwxrwxr-x 1 danny backx 109568 Nov 29 21:43 xwords4.exe
dannypc: {27} arm-wince-cegcc-size *
   text    data     bss     dec     hex filename
 162912   14436    3908  181256   2c408 xwords411.exe
  93384   12924       4  106312   19f48 xwords4.exe

Surprisingly the smaller executable is the one compiled with cegcc !

        Danny

Attachment: signature.asc
Description: This is a digitally signed message part

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to