Email address obfuscation in effect -- please
click here to turn it off.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
- To: MLUG Members <EMAIL:PROTECTED>
- Subject: Re: [MLUG] Multithreaded compile using apt?
- From: Stephen Montgomery-Smith <EMAIL:PROTECTED>
- Date: Mon, 21 Apr 2008 09:08:47 -0500
- Delivery-date: Mon, 21 Apr 2008 09:09:35 -0500
- Envelope-to: EMAIL:PROTECTED
- In-reply-to: <EMAIL:PROTECTED>
- References: <EMAIL:PROTECTED>
- Reply-to: MLUG Members <EMAIL:PROTECTED>
- Sender: EMAIL:PROTECTED
- User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.13) Gecko/20080413 SeaMonkey/1.1.9
Jack Smith wrote:
I have a quick question here and Google wasn't very helpful. I want to
be able to use both CPU cores when I compile a Debian source package
using apt. I can get things to compile just fine, but gcc only spawns
one thread. How would I go about getting it to spawn more threads? I
already tried to export MAKEOPTS="-j3" in the terminal to get gcc to
spawn three threads, but apparently apt spoon-feeds gcc instructions.
--Jack
I was under the impression that "-j3" is an option that is given to
make, not to gcc. It causes make to spawn three gcc's (or other
compilation services) at a time.
I use it all the time when compiling the FreeBSD kernel, but my
impression is that the Makefile has to be quite carefully written for it
to work properly. It would not surprise me if the Makefile's for many
source packages were not "-j??" friendly.
My personal experience with multithreading is that you always gain
efficiency by doing the threading as at high a level as possible. So,
for example, you could have a multithreaded gcc. But a multithreaded
make would be more efficient. And running three totally separate
compilations (i.e. building three separate packages) simultaneously is
the very best way.
Stephen
_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members