Current-Users archive

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

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



   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?


Home | Main Index | Thread Index | Old Index