Subject: Re: Problems with system makefiles and optimization flags
To: Jason R Thorpe <thorpej@wasabisystems.com>
From: Simon J. Gerraty <sjg@crufty.net>
List: tech-toolchain
Date: 11/08/2002 11:18:19
>Revision 1.57 of <sys.mk> introduced a new "DBG" variable to hold
>default CFLAGS.  This is broken for a couple of reasons:

My bad.

>	1. <sys.mk> contains the default rules for ALL Makefiles,
>	   not just the NetBSD source tree Makefiles, i.e. random
>	   3rd party programs with their own Makefiles are allowed
>	   by POSIX to use default rules, which are provided by
>	   <sys.mk>.  The "DBG" variable intrudes on the namespace.

Granted, DBG may have been a poor choice of name.
The setup in sys.mk - whatever its is changed to should allow for
a variable that can be overridden on the command line to affect only
the optimization/debug flags.  It is very hany to re-build something 
with -g -O0 to debug something without needing to edit the makefiles.

Having something that works for userland and kernel builds - perhaps
(as someone suggested already) keeping cpu flags separate from
optimization/debug flags - would be nice.

Thanks
--sjg