[vox] gcc using smp
Ken Herron
kherron+lugod at fmailbox.com
Sat Aug 12 07:50:37 PDT 2006
Scott Miller wrote:
> I'm fairly new to Ubuntu. But is there a place to set gcc to use both
> CPUs? I know in gentoo it's in /etc/make.conf but ubuntu doesn't have
> one of those.
I don't know about ubuntu specifically, but in general there are two
things you can do.
If you run gcc with the -pipe option, then it will try to run its
subprocesses in parallel connected by pipes. Otherwise it'll run them
one at a time using temporary files. This only helps compilation, not
linking.
If you run make with its -j option, then make will build multiple
targets in parallel when it can. For example, if make needs to recompile
several files, then "make -j 3" would run three copies of the compiler
at a time.
More information about the vox
mailing list