View Single Post
Old 5th May 2008
Grogan's Avatar
Grogan Grogan is offline
Port Guard
 
Join Date: May 2008
Location: Ontario, Canada
Posts: 23
Default

Quote:
Originally Posted by fjwcash View Post
You can set the exact CPU type in the machine via /etc/make.conf and that will enable different features in the software you install via the ports tree or when compiling the world or kernel. See /usr/share/examples/etc/make.conf for all the details. This sets all the gcc options like -m -cpu and so forth.
I do this in make.conf:

For kernel:
COPTFLAGS=-O2 -march=nocona

That's safe enough, because the kernel build system turns off potentially harmful instructions (e.g. -mno-sse2 -mno-sse3 -mno-mmx etc.) that would be enabled by -march.

That's just optimizing the execution of the kernel functions themselves though.

For general software:
CFLAGS=-O2 -mtune=nocona

That's safe enough to enable globally. -mtune just tunes the scheduling and stuff for the specified cpu and doesn't break anything.

nocona is about the closest thing to correct that gcc 4.2.x will do for my CPU. Once gcc 4.3.x is a bit more mature and usable (and projects catch up with it), there's a core2 cpu type.
Reply With Quote