[rfc] a few kern.mk and bsd.sys.mk related changes
Alexander Best
arundel at freebsd.org
Sat May 28 20:39:24 UTC 2011
On Sat May 28 11, Bruce Cran wrote:
> On Sat, May 28, 2011 at 06:23:26PM +0000, Alexander Best wrote:
> >
> > well i'm not an expert on this. but are we 100% sure that a kernel on amd64
> > compiled with -O2 frename-registers can be debugged the same way as one with
> > -O? if that is the case: sure...-O2 is fine. ;)
> >
> > however i've often read messages - mostly by bruce evans - claiming that
> > anything greater than -O will in fact decrease a kernel's ability to be
> > debugged just as well as a kernel with -O.
> >
>
> The critical option when -O2 is used is -fno-omit-frame-pointers, since removing
> frame pointers makes debugging impossible (on i386). With -O2 code is moved around and
> removed, so debugging is more difficult, but can still provide useful
> information.
how about making -fno-omit-frame-pointers mandatory for all builds with an
optimisation level higher than -O?
something like
.if !empty(COPTFLAGS:M-O[234sz]) && empty(COPTFLAGS:M-fno-omit-frame-pointers)
COPTFLAGS+= -fno-omit-frame-pointers
.endif
(-O4 and -Oz are clang specific, but it won't hurt having them in there)
cheers.
alex
>
> --
> Bruce Cran
--
a13x
More information about the freebsd-toolchain
mailing list