summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2009-01-25 12:30:47 +0000
committerobache <obache@pkgsrc.org>2009-01-25 12:30:47 +0000
commit19f4ecd5c9015f653555f89ca5d237cfda420c85 (patch)
tree202639a072e1a97aa683a98faf7de1dff6d53a10
parent7d6859df98522670842b5affccaf86a4631fe5bf (diff)
downloadpkgsrc-19f4ecd5c9015f653555f89ca5d237cfda420c85.tar.gz
Rename -Wextra with -W if gcc-{2,3}, workaround of PR 40123.
-rw-r--r--sysutils/file/Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/sysutils/file/Makefile b/sysutils/file/Makefile
index b31ea6e5d7a..a975c7e4950 100644
--- a/sysutils/file/Makefile
+++ b/sysutils/file/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2009/01/25 05:33:17 obache Exp $
+# $NetBSD: Makefile,v 1.19 2009/01/25 12:30:47 obache Exp $
DISTNAME= file-4.26
CATEGORIES= sysutils
@@ -21,6 +21,14 @@ MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
TEST_TARGET= check
+.include "../../mk/compiler.mk"
+
+# gcc<4 does not know -Wextra.
+# XXX: should be treated with wrappers automatically.
+.if !empty(CC_VERSION:Mgcc-[23]*)
+BUILDLINK_TRANSFORM+= rename:-Wextra:-W
+.endif
+
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"