Compiling utilizing multiple CPUs

Chuck Robey chuckr at
Tue Jan 15 11:37:52 PST 2008

Hash: SHA1

Chuck Swiger wrote:
> On Jan 14, 2008, at 3:55 PM, Christoffer Strömblad wrote:
>> Having looked through much of the available documentation one thing
>> continues to elude me... Is it possible to specify globally how many
>> CPUs are available when compiling a port? When I compile a port now it
>> seems as if only one CPU is used, even though more are available.
> The quality of the Makefiles or similar used by individual ports varies,
> and many of them are not safe to compile in a multithreaded fashion. 
> You can set "MAKEFLAGS=-j3" or similar in your environment, but it's
> really not recommended.
I think it's necessary to tell why its not recommend it: because many
makefiles are insufficiently sedt up to correctly allow multiple cpu's to
work side by side.  the make(7) utility itself uses the j flag correctly,
and I have had many correct items correctly compiled.  You just need to
understand the makefiles very carefully, and not try the multiple makefile
trick without being certain of your makefile.
Version: GnuPG v2.0.4 (FreeBSD)
Comment: Using GnuPG with Mozilla -


More information about the freebsd-ports mailing list