tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: COPTS



On Tue, Sep 1, 2015 at 8:55 PM, Valery Ushakov <uwe%stderr.spb.ru@localhost> wrote:
> On Tue, Sep 01, 2015 at 15:11:37 +1000, matthew green wrote:
>
>> Masao Uebayashi writes:
>> > My recollection is that COPTS used to be a make variable, that is only
>> > set by users, but never set by system (in-tree) makefiles.  Now there
>> > are not many but some places where COPTS are set by system makefiles.
>> > i believe that COPTS+=-fxxx and COPTS+=-DXXX are replaced with
>> > CFLAGS+=-fxxx and CPPFLAGS+=-DXXX respectively.
>>
>> this doesn't match what my memory says, though it's not *entirely*
>> wrong.  COPTS seems to be stuff shared, though it's confusing.
>>
>> history on eg, bsd.sys.mk shows that CPUFLAGS is actually what you
>> propose COPTS is supposed to be, but sadly, if you look around,
>> you'll see that we set CPUFLAGS in our tree a whole lot of places.
>>
>> ie, this is a real mismash and some clean up would be great.  what
>> you said seems good as a first step.  thanks.
>
> It's an ancient problem.  COPTS usage in kernel makefile is in
> conflict its usage in the rest of the tree.  I wrote about it several
> times here and on port-sparc, e.g.
>
>   http://mail-index.netbsd.org/tech-toolchain/2011/11/18/msg001778.html
>
> port-sparc - b/c lost -O would explode kernel size above OBP limits,
> iirc, so it was immediately noticeable.

Thanks, this DEFCOPTS/COPTS relationship exactly matches what I really
wanted to explain.


Home | Main Index | Thread Index | Old Index