diff options
author | jschauma <jschauma@pkgsrc.org> | 2006-12-02 22:32:59 +0000 |
---|---|---|
committer | jschauma <jschauma@pkgsrc.org> | 2006-12-02 22:32:59 +0000 |
commit | 721b60b433c2f8906e5064206e90937b196829ca (patch) | |
tree | 97923b6df098fa627f577ea81af4285038c9d84a /mk/compiler | |
parent | 114ef6550554f18c0cd488aa39d20668e70e4f54 (diff) | |
download | pkgsrc-721b60b433c2f8906e5064206e90937b196829ca.tar.gz |
Instead of setting compiler flags in each package if it uses C99,
allow USE_LANGUAGES+=c99 and let gcc and mipspro do the right thing.
May need to be reviewed/added for other compilers.
ok rillig@
Diffstat (limited to 'mk/compiler')
-rw-r--r-- | mk/compiler/gcc.mk | 6 | ||||
-rw-r--r-- | mk/compiler/mipspro.mk | 6 |
2 files changed, 10 insertions, 2 deletions
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 |