Subject: Re: World build failure in netbsd-2-0 and current
To: None <current-users@netbsd.org>
From: Dmitri Nikulin <setagllib@optusnet.com.au>
List: current-users
Date: 11/04/2004 19:56:17
Dmitri Nikulin wrote:

> Thor Lancelot Simon wrote:
>
>> On Wed, Nov 03, 2004 at 10:16:51PM -0700, Michael L. Hitch wrote:
>>  
>>
>>> On Wed, 3 Nov 2004 setagllib@optusnet.com.au wrote:
>>>   
>>>
>>>> CFLAGS=-O -march=pentium4 -mfpmath=sse -pipe
>>>>     
>>>
>>>        ^
>>>  My guess is that this should be += so it doesn't lose any 
>>> previously set
>>> CFLAGS.
>>>   
>>
>>
>> Actually, you shouldn't *ever* set CFLAGS in mk.conf, not even with +=;
>> you should set CPUFLAGS or COPTS.
>>
>> Thor
>>
>>  
>>
> Okay, now I think we're on to something. Will try this now... 
> hopefully will get somewhere. Thanks heaps for the tips, this might 
> just do it!
>
And indeed it did! COPTS didn't actually add optimization (only to 
kernel apparently) but CFLAGS didn't break anything when used with +=. 
The whole world compiled cleanly without needing those dirty hacks I 
applied.

Wow. A lack of a single + causing so much trouble. Could somebody pass 
this up to documentation teams so a fair warning can be issued? It's 
just that this never cropped up in my FreeBSD usage (lasted about a 
year, then 5.3 made it clear it was going nowhere good) so it hadn't 
occured to me that forcing CFLAGS could be a problem.

Thanks for everybody's help, and hopefully with some more familiarity I 
can give something back later.