# make/gcc and core 2 duo



## fch (Jan 26, 2009)

Hello !

make/gcc use only one CPU on my core 2 duo.
I've MAKEOPT=-j 4 and MAKEFLAG=-j 4 in /etc/make.conf.
Have you got any solution ?

Thanks in advance.

Best regards.


----------



## tangram (Jan 26, 2009)

Have you tried to simply pass -j argument at the command line?

A reasonable number of builds to start is one more than the number of CPUs you have. For example, if you have a two-core processor, you can use three build process by using:


```
# make -j3 install clean
```


----------



## ale (Jan 26, 2009)

If I'm not wrong, the kernel and (most of) the ports, are not safe to be built with -j, so, if that's the reason why you want to use -j, you may want to pay attention or check about more info about that by yourself.


----------



## DutchDaemon (Jan 26, 2009)

*Building* ports/world with -j (make buildworld/make buildkernel) is fine, *installing* them with -j (make installkernel/make installworld) is not.


----------



## ale (Jan 26, 2009)

DutchDaemon said:
			
		

> *Building* ports/world with -j (make buildworld/make buildkernel) is fine, *installing* them with -j (make installkernel/make installworld) is not.


Nice!
I knew about buildworld (it's even in the handbook), but I thought that it wasn't good for buildkernel.
Maybe it comes from the 5.x times...


----------



## trev (Jan 27, 2009)

ale said:
			
		

> I knew about buildworld (it's even in the handbook), but I thought that it wasn't good for buildkernel.
> Maybe it comes from the 5.x times...



make -jn where n > 2 causes  buildkernel to fail with errors (amd64, 7.1-STABLE).

make -j8 buildworld is cool though


----------



## DutchDaemon (Jan 27, 2009)

Must be very typical for amd64 then. I always build kernel/world with -j4 on i386 (any CPU, really).


----------



## kamikaze (Jan 27, 2009)

So do I on amd64.


----------



## kenorb (Nov 9, 2010)

fch said:
			
		

> Hello !
> 
> make/gcc use only one CPU on my core 2 duo.
> I've MAKEOPT=-j 4 and MAKEFLAG=-j 4 in /etc/make.conf.
> ...



Sorry to post to the old thread, but this information is out-dated and invalid (if somebody will find this post, I did).
MAKEOPTS is not supported by FreeBSD
See: http://forums.freebsd.org/showthread.php?t=19172
For proper configuration in make.conf instead.


----------

