This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Code Bloat using GCC 3.2 on Linux
- From: Gaurav Jain <gaurav dot anywhere at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 15 Dec 2004 17:14:54 +0530
- Subject: Code Bloat using GCC 3.2 on Linux
- Reply-to: Gaurav Jain <gaurav dot anywhere at gmail dot com>
Hi,
I have an application which is compiled using gcc 3.2 on linux. The
problem is that the same application compiled on Windows using MS
VC.net is much smaller in size (about 1/2) than that on linux. The
application uses mainly C++ code, has lots of exception handling and
templates.
I'm currently using the following options to compile my source files:
gcc -x c++ -O2 -fno-omit-frame-pointer -ffloat-store -fno-inline
-Wno-multichar -fexceptions -mcpu=pentium
and the following for linking:
gcc -rdynamic -lm -ldl -lpthread
I wish to know whether there are any gcc options that can be used to
combat the excessive code bloat using gcc on linux? Why should the
same code have 1/2 the size on Windows? What's the way to get the
MINIMUM possible size of an application using gcc 3.2 (even if it is
at the cost of some run-time performance)?
Any help would be highly useful.
TIA,
-Gaurav