# sample-make.conf for intel xeon quadcore?



## wonslung (Jun 1, 2009)

hello, i'm looking for advice for make.conf 

server is an intel xeon quadcore 2.83ghz with 8gb of ram 
i intend to use freebsd 7.2 and ZFS

sofar i have this:

```
CPUTYPE?=nocona

CFLAGS=         -O2 -pipe -fno-strict-aliasing
COPTFLAGS=      -O2 -pipe -funroll-loops -ffast-math -fno-strict-aliasing

KERNCONF=       SERVER GENERIC

OPTIMIZED_CFLAGS=       YES
WITHOUT_X11=            YES
BUILD_OPTIMIZED=        YES
WITH_CPUFLAGS=          YES
WITHOUT_DEBUG=          YES
WITH_OPTIMIZED_CFLAGS=  YES
NO_PROFILE=             YES
BUILD_STATIC=           YES
```

Does that look ok?  

Also, when it comes to jails can i just copy the same thing into my jail make.conf or is that going to cause issues?

thanks


----------



## SirDice (Jun 1, 2009)

Remove CFLAGS, COPTFLAGS, OPTIMIZED_CFLAGS, WITH_OPTIMIZED_CFLAGS and BUILD_STATIC. There's really no need for them.


----------



## wonslung (Jun 1, 2009)

every single guide i've seen has cflags and coptflags....
some say to use -o3 some say only to os -o or -o2 but i've never seen one say not to use them at all....now i'm truly confused


----------



## fronclynne (Jun 1, 2009)

-O2 is already set in most places by default.  And where it's not there is likely a good reason.  -pipe is already set in most places by default.  -fno-strict-aliasing is already . . . oh, you know.

Additionally, many of the Makefiles override -On anyway (since only the last one counts, they just tack their own, tested opt levels near the end of the line).  multimedia/mplayer comes to mind.

Explicitly setting -O1 (& -Os) has broken buildworld for me in the past.  Won't use 'em.

-O3 is silly.

(I remember seeing advice on using -O9 and above in some linux forums many years ago.  Evidence that you should be wary of what you read on Internet.)


----------



## SirDice (Jun 1, 2009)

The CFLAGS and COPTFLAGS will "optimize" somethings but as far as I understood it it'll be marginal at best. Setting those flags also has the added 'bonus' of hitting some undefined failures and when you run into them first thing everyone will advise you is to remove them. So why bother?


----------



## wonslung (Jun 1, 2009)

ok, thanks for elaborating guys.  I'm still getting used to Freebsd...i love how much better things work in general....i loved the idea of a central file to control building ports and world but what you're saying makes very good sense.

I'll just set the cpu type from now on

thanks


----------

