From owner-svn-src-head@FreeBSD.ORG Wed Oct 21 21:07:13 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53F3C106566B; Wed, 21 Oct 2009 21:07:13 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from mail.vega.ru (mail.vega.ru [90.156.167.5]) by mx1.freebsd.org (Postfix) with ESMTP id 0FF478FC1A; Wed, 21 Oct 2009 21:07:12 +0000 (UTC) Received: from [10.100.124.99] (port=53814 helo=edoofus.dev.vega.ru) by mail.vega.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69 (FreeBSD)) (envelope-from ) id 1N0iOl-000FI5-Or; Thu, 22 Oct 2009 01:07:11 +0400 Date: Thu, 22 Oct 2009 01:07:07 +0400 From: Ruslan Ermilov To: Roman Divacky Message-ID: <20091021210707.GB5410@edoofus.dev.vega.ru> References: <200910211707.n9LH7kHx005204@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200910211707.n9LH7kHx005204@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198335 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Oct 2009 21:07:13 -0000 On Wed, Oct 21, 2009 at 05:07:46PM +0000, Roman Divacky wrote: > Author: rdivacky > Date: Wed Oct 21 17:07:46 2009 > New Revision: 198335 > URL: http://svn.freebsd.org/changeset/base/198335 > > Log: > Set CSTD in all cases except when CC=icc and NO_WARNS is set. This > way we can set desired C standard even for cross tools etc. > I think you meant to say "always set CFLAGS based on CSTD". Unfortunately the actual change does not only that, it also breaks NO_WARNS (by ignoring it) for anything that's not "icc". It also breaks "icc" compiles without NO_WARNS by passing unrecognized flags to the compiler. A correct change would be to move setting of CFLAGS based on CSTD out of the control of NO_WARNS, like this: %%% Index: bsd.sys.mk =================================================================== --- bsd.sys.mk (revision 198170) +++ bsd.sys.mk (working copy) @@ -11,7 +11,7 @@ # the default is gnu99 for now CSTD ?= gnu99 -.if !defined(NO_WARNS) && ${CC} != "icc" +.if ${CC} != "icc" . if ${CSTD} == "k&r" CFLAGS += -traditional . elif ${CSTD} == "c89" || ${CSTD} == "c90" @@ -23,6 +23,8 @@ . else CFLAGS += -std=${CSTD} . endif +.endif +.if !defined(NO_WARNS) && ${CC} != "icc" # -pedantic is problematic because it also imposes namespace restrictions #CFLAGS += -pedantic . if defined(WARNS) %%% > Tested by: make universe > Approved by: ed (maintainer) > OK by: das > > Modified: > head/share/mk/bsd.sys.mk > > Modified: head/share/mk/bsd.sys.mk > ============================================================================== > --- head/share/mk/bsd.sys.mk Wed Oct 21 16:12:09 2009 (r198334) > +++ head/share/mk/bsd.sys.mk Wed Oct 21 17:07:46 2009 (r198335) > @@ -11,7 +11,7 @@ > # the default is gnu99 for now > CSTD ?= gnu99 > > -.if !defined(NO_WARNS) && ${CC} != "icc" > +.if !defined(NO_WARNS) || ${CC} != "icc" > . if ${CSTD} == "k&r" > CFLAGS += -traditional > . elif ${CSTD} == "c89" || ${CSTD} == "c90" > -- Ruslan Ermilov ru@FreeBSD.org FreeBSD committer