Faster compilations
Stephano Mariani
sk.ml@btinternet.com
Wed Dec 26 06:57:00 GMT 2001
I find it really helps to rebuild gcc with your optimizations specific
to your developed machine. For example if you are on a pentium 4,
rebuild gcc, configure with --disable-checking, compile with -O3
-fomit-frame-pointer -fno-strenght-reduce -mcpu=pentium4 ... Likewise
mcpu=athlon if you are on athlon.
Also, if you have enough ram, always -pipe.
Organise your Makefiles... If possible use autoconf/automake, they have
good dependency tracking, so the minimum number of files are rebuilt.
If you are on a good multitasking OS, eg Linux (2.4 or better),
WinNT/2K/XP, Solaris etc. then you might wish to try "make -j n", where
n is a reasonable number of parallel builds.
Experiment, it usually helps!
Stephano Mariani
-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Devrim Erdem
Sent: Wednesday, 26 December 2001 2:19
To: gcc-help
Subject: Faster compilations
Hi,
My huge application has many include files, many derived classes and
several template classes. It takes a lot of time (30-40s) to compile
some of my files on my 1GHz, 256 Mb Ram system.
Though I know that getting a faster harddrive and more RAM may help, I
would like to ask the experts if that would really work. What takes most
of the time during the compilation ?
Is it possible to organize files ( other than grouping them into
libraries ) so that they may compile faster ?
I use precompiled headers on Windows with Visual C++. Is there a similar
technique with gcc ?
Thanks.
--
Devrim Erdem
-------------------------------------
VIRES Simulationstechnologie GmbH
Oberaustrasse 34
83026 Rosenheim
Germany
phone +49.8031.463640
fax +49.8031.463645
email devrim@vires.com
internet www.vires.com
-------------------------------------
More information about the Gcc-help
mailing list