summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authortsutsui <tsutsui@pkgsrc.org>2013-06-23 05:20:33 +0000
committertsutsui <tsutsui@pkgsrc.org>2013-06-23 05:20:33 +0000
commiteef67ea73484254a09c9374c45efd9de91524f08 (patch)
treeb66b2ac08aa09e51aad60ebdce1e6f5006c971c7 /graphics
parent8f67b9acd48f949f0593968e57bec3901da56bda (diff)
downloadpkgsrc-eef67ea73484254a09c9374c45efd9de91524f08.tar.gz
Add workaround for PR/47798 (png gets SEGV on NetBSD/arm 6.1 due to gcc bug).
- specify "-O2 -fno-ipa-sra" for NetBSD/arm and gcc-4.5.* in hacks.mk - also bump PKGREVISION for explicit rebuild "Please commit that" from wiz@.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/png/Makefile3
-rw-r--r--graphics/png/hacks.mk18
2 files changed, 20 insertions, 1 deletions
diff --git a/graphics/png/Makefile b/graphics/png/Makefile
index df3f34d972e..8f92a3efca3 100644
--- a/graphics/png/Makefile
+++ b/graphics/png/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.158 2013/04/25 22:01:14 wiz Exp $
+# $NetBSD: Makefile,v 1.159 2013/06/23 05:20:33 tsutsui Exp $
DISTNAME= libpng-1.6.2
+PKGREVISION= 1
PKGNAME= ${DISTNAME:S/lib//}
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libpng/} \
diff --git a/graphics/png/hacks.mk b/graphics/png/hacks.mk
new file mode 100644
index 00000000000..64c45d414e2
--- /dev/null
+++ b/graphics/png/hacks.mk
@@ -0,0 +1,18 @@
+# $NetBSD: hacks.mk,v 1.3 2013/06/23 05:20:33 tsutsui Exp $
+
+.if !defined(PNG_HACKS_MK)
+PNG_HACKS_MK= defined
+
+.include "../../mk/compiler.mk"
+
+### gcc-4.5.3 in NetBSD/arm 6.1 causes SEGV in some png functions.
+### -O works around, and there is a report that -O2 -fno-ipa-sra is enough.
+### See PR/47798 for details.
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-arm) && !empty(CC_VERSION:Mgcc-4.5.*)
+# XXX: is there any good way to replace the default -O2 with multiple args?
+#PKG_HACKS+= optimisation
+#BUILDLINK_TRANSFORM+= rename:-O[2-9]*:-O2 -fno-ipa-sra
+CFLAGS+=-O2 -fno-ipa-sra
+.endif
+
+.endif # PNG_HACKS_MK