summaryrefslogtreecommitdiff
path: root/mk/compiler/gcc.mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-03-30 21:39:24 +0000
committerjlam <jlam@pkgsrc.org>2004-03-30 21:39:24 +0000
commitc1f2ff8d61fcb73eadcab201e107935dad787268 (patch)
tree637c840435779aaaab9fb1bc7936c2efb45e5a0c /mk/compiler/gcc.mk
parentc34086143e358d991a621df72b7245d1aadd6638 (diff)
downloadpkgsrc-c1f2ff8d61fcb73eadcab201e107935dad787268.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/gcc.mk')
-rw-r--r--mk/compiler/gcc.mk12
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.