From owner-freebsd-toolchain@FreeBSD.ORG Sat May 28 21:32:44 2011 Return-Path: Delivered-To: freebsd-toolchain@FreeBSD.ORG Received: by hub.freebsd.org (Postfix, from userid 1233) id C99031065674; Sat, 28 May 2011 21:32:44 +0000 (UTC) Date: Sat, 28 May 2011 21:32:44 +0000 From: Alexander Best To: Bruce Cran Message-ID: <20110528213244.GA93335@freebsd.org> References: <20110527115147.GA73802@freebsd.org> <3BF63174-1B29-4A4D-96DD-3ED65ED96EAC@bsdimp.com> <20110527181459.GA29908@freebsd.org> <20110527182906.GA31871@freebsd.org> <86oc2mlsey.fsf@gmail.com> <20110528182326.GA75447@freebsd.org> <20110528202619.GA27204@muon.cran.org.uk> <20110528203924.GA88186@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110528203924.GA88186@freebsd.org> Cc: freebsd-hackers@FreeBSD.ORG, freebsd-toolchain@FreeBSD.ORG, Pan Tsu Subject: Re: [rfc] a few kern.mk and bsd.sys.mk related changes X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 21:32:44 -0000 On Sat May 28 11, Alexander Best wrote: > 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? man this is confusing. why must the freebsd make skeleton be so complicated. :( it seems -fno-omit-frame-pointers gets set in sys/conf/Makefile.amd64 and sys/conf/Makefile.powerpc already. also for modules in sys/conf/kmod.mk. i guess somebody with a better in deth knowledge should investigate this matter. this is a bit too complicated for me. cheers. alex > > 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 -- a13x