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

My bad.

>	1. <> 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
>	   <>.  The "DBG" variable intrudes on the namespace.

Granted, DBG may have been a poor choice of name.
The setup in - 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.