Date: Mon, 20 Sep 2010 13:55:58 +0000 From: David Xu <davidxu@freebsd.org> To: David Xu <davidxu@freebsd.org>, freebsd-arch@freebsd.org, Marcel Moolenaar <xcllnt@mac.com>, Bruce Evans <brde@optusnet.com.au> Subject: Re: Per-source CFLAGS again Message-ID: <4C9767EE.3000802@freebsd.org> In-Reply-To: <20100920024542.GA25717@zim.MIT.EDU> References: <4C972E83.7090603@freebsd.org> <20100920024542.GA25717@zim.MIT.EDU>
next in thread | previous in thread | raw e-mail | index | archive | help
David Schultz wrote: > The reason I proposed the feature was so that we could compile the > parts of libc that come from a third party (namely, gdtoa) with > different warning flags than the rest of libc. It was not > committed because someone else proposed a simpler way to get make > to use different flags for gdtoa. > > I suppose it wouldn't hurt to commit it it's needed for something > else, but I think Marcel also had some philosophical objections to > the proposal. This time, the compiler's function is required to generate some stack unwinding info, it is not compiler's warning flag. without modification to sys.mk: I have to hack the libc's Makefile, but obviously, CWARNFLAGS is not the right place. Index: Makefile =================================================================== --- Makefile +++ Makefile @@ -145,3 +145,5 @@ SSP_CFLAGS:= ${SSP_CFLAGS:S/^-fstack-protector-all$/-fstack-protector/} # Disable stack protection for SSP symbols. SSP_CFLAGS:= ${.IMPSRC:N*/stack_protector.c:C/^.+$/${SSP_CFLAGS}/} +# Generate stack unwinding table for cancellation points +CWARNFLAGS:= ${.IMPSRC:Ncancelpoints_*:C/^.+$/${CWARNFLAGS}/:C/^$/-fexceptions ${CWARNFLAGS}/}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C9767EE.3000802>