From 29df39d6b5bf3125de37e5e9f7d02f9ceee40aa5 Mon Sep 17 00:00:00 2001 From: jlam Date: Tue, 30 Mar 2004 21:39:24 +0000 Subject: 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. --- mk/compiler/gcc.mk | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'mk/compiler') 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. -- cgit v1.2.3