# kernel compile configuration question



## jronald (Mar 22, 2010)

The options for 'cpu' are as
I486_CPU
I586_CPU
I686_CPU

Take 686 for example, it can reference many cpus with different features,
can the compiler take advantage of the specific features of a specific cpu.


----------



## DutchDaemon (Mar 22, 2010)

See /usr/share/examples/etc/make.conf.


----------



## jronald (Mar 23, 2010)

DutchDaemon said:
			
		

> See /usr/share/examples/etc/make.conf.



It works, but I don't understand what is the option "cpu" in the kernel config file used for?
I think only machine architecture makes sense to the kernel, and the option "machine" is for this.


----------



## User23 (Mar 23, 2010)

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html



> This is the machine architecture. It must be either alpha, amd64, i386, ia64, pc98, powerpc, or sparc64.
> 
> cpu          I486_CPU
> cpu          I586_CPU
> ...


----------



## jronald (Mar 23, 2010)

User23 said:
			
		

> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html



Does the kernel depend on a specific cpu?
I think it only depends on cpu architeture, like i386, arm, etc.


----------



## DutchDaemon (Mar 23, 2010)

The cpu setting is used to determine which cpu-specific code to include in the kernel. Nothing will break if you leave all of these in, but using only the cpu setting for the CPU you actually have will make your kernel smaller and leaner. Less overhead is always good.


----------

