summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorobache <obache>2009-01-25 12:30:47 +0000
committerobache <obache>2009-01-25 12:30:47 +0000
commitcc75bf8e8d72ff8fd33dd447b7499f63487ec199 (patch)
tree202639a072e1a97aa683a98faf7de1dff6d53a10
parent32bb510e16578fb643ba2c4d507f345ab911df92 (diff)
downloadpkgsrc-cc75bf8e8d72ff8fd33dd447b7499f63487ec199.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"