kernel compile configuration question

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 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.
 
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
cpu I686_CPU

The above option specifies the type of CPU you have in your system. You may have multiple instances of the CPU line (if, for example, you are not sure whether you should use I586_CPU or I686_CPU), but for a custom kernel it is best to specify only the CPU you have. If you are unsure of your CPU type, you can check the /var/run/dmesg.boot file to view your boot messages.
 
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.
 
Back
Top