summaryrefslogtreecommitdiff
path: root/mk/compiler
diff options
context:
space:
mode:
authorjlam <jlam>2004-03-30 21:39:24 +0000
committerjlam <jlam>2004-03-30 21:39:24 +0000
commit2a755f2926b068c987f778fb8852984f37bb414d (patch)
tree637c840435779aaaab9fb1bc7936c2efb45e5a0c /mk/compiler
parent0ea93ea0ef18d7d22f1182a017554f5d8c407e8c (diff)
downloadpkgsrc-2a755f2926b068c987f778fb8852984f37bb414d.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.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.