diff options
author | jlam <jlam@pkgsrc.org> | 2004-03-30 21:39:24 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-03-30 21:39:24 +0000 |
commit | 29df39d6b5bf3125de37e5e9f7d02f9ceee40aa5 (patch) | |
tree | 637c840435779aaaab9fb1bc7936c2efb45e5a0c /mk/compiler | |
parent | 2fb05f74213166af081b74252f7cc808eed83a05 (diff) | |
download | pkgsrc-29df39d6b5bf3125de37e5e9f7d02f9ceee40aa5.tar.gz |
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
Objective-C code where it is convention to use "#import". Suppress
the warning if we're building Objective-C code using GCC by passing
-Wno-import to the compiler.
Diffstat (limited to 'mk/compiler')
-rw-r--r-- | mk/compiler/gcc.mk | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index 67099ec9bed..54b8afd1281 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.61 2004/03/13 20:02:52 jlam Exp $ +# $NetBSD: gcc.mk,v 1.62 2004/03/30 21:39:24 jlam Exp $ .if !defined(COMPILER_GCC_MK) COMPILER_GCC_MK= defined @@ -122,6 +122,16 @@ _LANGUAGES.gcc= # empty _LANGUAGES.gcc+= ${LANGUAGES.gcc:M${_lang_}} .endfor +# 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 +# Objective-C code where it is convention to use "#import". Suppress +# the warning if we're building Objective-C code using GCC. +# +.if !empty(_LANGUAGES.gcc:Mobjc) +CFLAGS+= -Wno-import +.endif + .if !empty(_NEED_GCC2:M[yY][eE][sS]) # # We require gcc-2.x in the lang/gcc directory. |