Subject: Re: c99
To: Jan Schaumann <jschauma@netmeister.org>
From: Roland Illig <rillig@NetBSD.org>
List: tech-pkg
Date: 12/02/2006 23:02:44
Jan Schaumann wrote:
> Index: mk/compiler/gcc.mk
> ===================================================================
> RCS file: /cvsroot/pkgsrc/mk/compiler/gcc.mk,v
> retrieving revision 1.85
> diff -b -u -r1.85 gcc.mk
> --- mk/compiler/gcc.mk 22 Oct 2006 00:14:17 -0000 1.85
> +++ mk/compiler/gcc.mk 2 Dec 2006 19:30:42 -0000
> @@ -137,6 +137,10 @@
> _LANGUAGES.gcc+= ${LANGUAGES.gcc:M${_lang_}}
> .endfor
>
> +.if !empty(USE_LANGUAGES:Mc99)
> +CFLAGS+= -std=c99
> +.endif
I would add this to _WRAP_EXTRA_ARGS.CC instead of CFLAGS, since that is
guaranteed to survive even packages that ignore the user's choice for
CFLAGS.
Other than that, the patch looks fine to me.
Roland