From owner-freebsd-arch@FreeBSD.ORG Mon Sep 20 05:56:00 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73F8F1065672; Mon, 20 Sep 2010 05:56:00 +0000 (UTC) (envelope-from davidxu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 62AC48FC16; Mon, 20 Sep 2010 05:56:00 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o8K5twM4058772; Mon, 20 Sep 2010 05:55:59 GMT (envelope-from davidxu@freebsd.org) Message-ID: <4C9767EE.3000802@freebsd.org> Date: Mon, 20 Sep 2010 13:55:58 +0000 From: David Xu User-Agent: Thunderbird 2.0.0.24 (X11/20100630) MIME-Version: 1.0 To: David Xu , freebsd-arch@freebsd.org, Marcel Moolenaar , Bruce Evans References: <4C972E83.7090603@freebsd.org> <20100920024542.GA25717@zim.MIT.EDU> In-Reply-To: <20100920024542.GA25717@zim.MIT.EDU> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: Per-source CFLAGS again X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2010 05:56:00 -0000 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}/}