This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question: single CPU usage
- To: Joy Woodford <joy dot woodford at hos dot horizon dot ie>
- Subject: Re: Question: single CPU usage
- From: Jack Lloyd <lloyd at acm dot jhu dot edu>
- Date: Thu, 16 Aug 2001 14:36:14 -0400 (EDT)
- Cc: <gcc at gcc dot gnu dot org>
On Thu, 16 Aug 2001, Joy Woodford wrote:
> I have been advised that gcc will only use one CPU on any machine that
> it is running. Is this true? Are there any plans to make gcc take
> advantage of additional CPUs in a system?
There is no need to do so; your build tools can handle this for you. For
example, doing
make -j N foo
will build foo running at most N jobs in parrallel (with most makes; some
don't have this feature - use GNU make if yours doesn't). Presuming that
your OS is SMP-aware and you have N CPUs, your compilation will use all of
them. If you're refering to parrelelizing the interals of GCC (ie,
compiling a single file will use all available CPUs via with threads or
something), that would probably be pretty hard.
Jack