pkgsrc/graphics/png/hacks.mk
tsutsui b074ccf342 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@.
2013-06-23 05:20:33 +00:00

18 lines
607 B
Makefile

# $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