From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6519 invoked by alias); 15 Dec 2004 11:45:54 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 6483 invoked from network); 15 Dec 2004 11:45:49 -0000 Received: from unknown (HELO wproxy.gmail.com) (64.233.184.207) by sourceware.org with SMTP; 15 Dec 2004 11:45:49 -0000 Received: by wproxy.gmail.com with SMTP id 55so102730wri for ; Wed, 15 Dec 2004 03:45:48 -0800 (PST) Received: by 10.54.53.44 with SMTP id b44mr79112wra; Wed, 15 Dec 2004 03:44:54 -0800 (PST) Received: by 10.54.45.53 with HTTP; Wed, 15 Dec 2004 03:44:54 -0800 (PST) Message-ID: <42f6506e041215034463e2c9b@mail.gmail.com> Date: Wed, 15 Dec 2004 11:45:00 -0000 From: Gaurav Jain Reply-To: Gaurav Jain To: gcc-help@gcc.gnu.org Subject: Code Bloat using GCC 3.2 on Linux Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2004-12/txt/msg00134.txt.bz2 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