diff options
Diffstat (limited to 'mk')
-rw-r--r-- | mk/compiler.mk | 6 | ||||
-rw-r--r-- | mk/compiler/gcc.mk | 6 | ||||
-rw-r--r-- | mk/compiler/mipspro.mk | 6 |
3 files changed, 13 insertions, 5 deletions
diff --git a/mk/compiler.mk b/mk/compiler.mk index 158dc65ed13..9e08c8d6c7b 100644 --- a/mk/compiler.mk +++ b/mk/compiler.mk @@ -1,4 +1,4 @@ -# $NetBSD: compiler.mk,v 1.56 2006/11/16 02:42:13 markd Exp $ +# $NetBSD: compiler.mk,v 1.57 2006/12/02 22:32:59 jschauma Exp $ # # This Makefile fragment implements handling for supported C/C++/Fortran # compilers. @@ -49,8 +49,8 @@ # USE_LANGUAGES # Lists the languages used in the source code of the package, # and is used to determine the correct compilers to install. -# Valid values are: c, c++, fortran, java, objc. The default -# is "c". +# Valid values are: c, c99, c++, fortran, java, objc. The +# default is "c". # # The following variables are defined, and available for testing in # package Makefiles: diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index 1c7845163ba..465d181c455 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.85 2006/10/22 00:14:17 rillig Exp $ +# $NetBSD: gcc.mk,v 1.86 2006/12/02 22:32:59 jschauma Exp $ # # This is the compiler definition for the GNU Compiler Collection. # @@ -137,6 +137,10 @@ _LANGUAGES.gcc= # empty _LANGUAGES.gcc+= ${LANGUAGES.gcc:M${_lang_}} .endfor +.if !empty(USE_LANGUAGES:Mc99) +_WRAP_EXTRA_ARGS.CC+= -std=c99 +.endif + # GCC has this annoying behaviour where it advocates in a multi-line # banner the use of "#include" over "#import" when including headers. # This generates a huge number of warnings when building practically all diff --git a/mk/compiler/mipspro.mk b/mk/compiler/mipspro.mk index ef44bfc6ddc..be8ba1ef75f 100644 --- a/mk/compiler/mipspro.mk +++ b/mk/compiler/mipspro.mk @@ -1,4 +1,4 @@ -# $NetBSD: mipspro.mk,v 1.35 2006/10/22 00:14:17 rillig Exp $ +# $NetBSD: mipspro.mk,v 1.36 2006/12/02 22:32:59 jschauma Exp $ # # This is the compiler definition for the MIPSpro C compiler. # @@ -71,6 +71,10 @@ _LANGUAGES.mipspro= # empty _LANGUAGES.mipspro+= ${LANGUAGES.mipspro:M${_lang_}} .endfor +.if !empty(USE_LANGUAGES:Mc99) +_WRAP_EXTRA_ARGS.CC+= -c99 +.endif + # Prepend the path to the compiler to the PATH. .if !empty(_LANGUAGES.mipspro) PREPEND_PATH+= ${_MIPSPRO_DIR}/bin |