At 04:45 AM 2/14/2006, Oliver Fromme wrote:
Vinny Abello <[EMAIL PROTECTED]> wrote:
 > CPUTYPE=pentium4

Better use "?=".

Yes, I saw that error and corrected it. Thanks. That wasn't the source of my problems actually, but I at least have it specified properly now.


 > CFLAGS= -O2 -pipe
 > COPTFLAGS= -O -pipe

I recommend not to overide those two at all.  Especially
your CFLAGS setting might generate broken code because
there are sources which are not aliasing-clean, which can
break with any optimizations beyond -O, unless you also
specify -fno-strict-aliasing.

Really? Are there any current examples of such? I've never run into this myself, but I'm sure you wouldn't be recommending it if it wasn't true.

What about -funroll-loops and -ffast-math? I see a lot of people using those options in general as well.

I actually found one reference from someone claiming -O3 is good in CFLAGS and -O2 for COPTFLAGS although I have read a lot of things about why not to use -O3 in CFLAGS and that it's not supported at all with buildworld, so I'm not really interested in using that at all, even with ports.

The defaults are "-O2 -fno-strict-aliasing -pipe" for
CFLAGS, and for COPTFLAGS it's "-O -pipe" if DEBUG is
defined (the default in GENERIC), otherwise "-O2 -pipe
-fno-strict-aliasing".

Is -O2 safe on COPTFLAGS if you have debugging disabled in the KERNCONF? I usually disable it as I have no interest in debugging the kernel (nor have I had problems where I've needed to... yet). I've found references in the archives that it is desirable to get (keep?) the kernel working with -O2 optimizations.


Any pointers appreciated. TIA!


Vinny Abello
Network Engineer
Server Management
[EMAIL PROTECTED]
(973)300-9211 x 125
(973)940-6125 (Direct)
PGP Key Fingerprint: 3BC5 9A48 FC78 03D3 82E0  E935 5325 FBCB 0100 977A

Tellurian Networks - The Ultimate Internet Connection
http://www.tellurian.com (888)TELLURIAN

"Courage is resistance to fear, mastery of fear - not absence of fear" -- Mark Twain

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to