Current-Users archive

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

Re: toolchain flags in mk.conf [was Re: evbppc and alpha build breakage]



On Thu, Mar 21, 2013 at 02:15:21AM +0400, Valery Ushakov wrote:
> On Wed, Mar 20, 2013 at 20:09:26 +0000, Taylor R Campbell wrote:
> 
> >    Date: Wed, 20 Mar 2013 15:06:59 -0400
> >    From: Thor Lancelot Simon <tls%panix.com@localhost>
> > 
> >    On Wed, Mar 20, 2013 at 03:21:10PM +0000, Taylor R Campbell wrote:
> >    >    CFLAGS+=    -pipe
> >    >    AFLAGS+=    -pipe
> > 
> >    Explicitly setting CFLAGS, AFLAGS, etc. like this will cause severe
> >    misbehavior.  It overrides the composition of the flags at many
> >    different points within the build and will cause unobvious lossage
> >    that is hard to debug even when it does not cause an immediate
> >    build-time explosion.  Don't ever do it.
> > 
> > So I learned!  But, for the sake of curiosity -- is there a right way
> > to use mk.conf or `build.sh -V' to insert `-pipe' or similar into the
> > toolchain?  There are umpteen zillion variables involved, and
> > share/mk/bsd.README isn't clear on who is supposed to set what.
> > 
> > My rough impression is that
> > 
> > - *FLAGS are to be set only by bsd.*.mk,
> > - *OPTS are to be set only by the Makefile, and
> > - there is nothing relevant that is allowed to be set by mk.conf.
> > 
> > Is this accurate?
> 
> Except that COPTS has been broken for kernel builds since ~forever.  I
> tried to raise this issue a couple of times, but without any success.

I think Valery meant to say "you're supposed to be able to set COPTS,
since everything is supposed to use += when handling COPTS, except
that..." which matches my understanding as well.

Thor


Home | Main Index | Thread Index | Old Index