svn commit: r198335 - head/share/mk

Roman Divacky rdivacky at FreeBSD.org
Thu Oct 22 07:07:21 UTC 2009


On Thu, Oct 22, 2009 at 01:07:07AM +0400, Ruslan Ermilov wrote:
> 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".

yes, it sets the C standard regardless of NO_WARNS


> 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:

previously it did:

NO_WARNS ICC	CFLAGS includes CSTD
0	 0	1
0	 1	0
1	 0	0
1	 1	0


now it does

NO_WARNS ICC	CFLAGS includes CSTD
0	 0	1
0	 1	1
1	 0	1
1	 1	0

so you are saying that for ICC and !NO_WARNS the CFLAGS should not
include CSTD? ie:

NO_WARNS ICC	CFLAGS includes CSTD
0	 0	1
0	 1	0
1	 0	1
1	 1	0

am I right? my intention was to set the C standard regardless of NO_WARNS
for "clang" (because it default to C99 and gcc breaks with it).

feel free to fix my commit if this is the case

thank you


More information about the svn-src-head mailing list