gcc compile time
Kalle Last
kalle.last@gmail.com
Thu May 4 22:30:00 GMT 2006
2006/5/4, Mike Stump <mrs@apple.com>:
> On May 4, 2006, at 2:17 PM, Bill Cunningham wrote:
> > I used gcc-2.96 to compile gcc-3.4.6 core with the c++
> > libraries added.
> > It took almost if not two hours to compile and that was with these
> > options:
> >
> > make CFLAGS='-O' LIBCFLAGS='-g -O2'
> > LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap
>
> > I want to cut down on compile time. Are there any options that can
> > do that?
>
> You can use ccache to speed it up if you want to compile it over and
> over again. You can use -O0, that's faster than -O2. Also, you can
> install the new compiler, and then just use make instead of make
> bootstrap, that's also faster. Plus, you could just use make all
> instead, that's faster than bootstrap. And lastly, leaving out the -
> g is also faster.
>
If you have dual/multiple CPU's or HT using -j flag for make can speed
things up considerably. Probably it would help a bit even on a single
CPU machine.
If you have several machines with the same compiler versions in LAN
you can also use distcc together with the -j flag to distribute the
job.
--
Kalle Last
More information about the Gcc
mailing list