On Sun, 9 Jan 2000, John Polstra wrote:
> In article <[EMAIL PROTECTED]>,
> Bruce Evans <[EMAIL PROTECTED]> wrote:
> >
> > You apparently
> > clobbered -O in CFLAGS by setting CFLAGS=-g. -g normally needs to be
> > added to CC to avoid breaking CFLAGS (CC='cc -g').
>
> Better yet: DEBUG_FLAGS=-g
Except it only supported in bsd.prog.mk and bsd.lib.mk, but not in
bsd.kmod.mk, kernel Makefiles, or if no bsd .mk files are included
A few verbose module makefiles add it explicitly. You can also use
COPTS, but it is only supported in bsd.prog.mk, bsd.kmod.mk and kernel
Makefiles.
The ordering of these macros is important but very obscure. E.g., if
the default options contain -g, then you may want kill -g by adding
-g0 after -g. ${DEBUG_FLAGS} seems to be added last, so it works
right. Not so for ${COPTS}. It is added before ${CWARNFLAGS}, so
it can't be used to kill unwanted warning flags.
I think COPTS and DEBUG_FLAGS should be reserved for users, but COPTS
is used by 16 Makefiles in the src tree, e.g., ping/Makefile. Its
use there is 100% wrong since it is used for warning flags and a non-
option.
Bruce
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message