Index: hacks.mk =================================================================== RCS file: /cvsroot/pkgsrc/lang/perl5/hacks.mk,v retrieving revision 1.16 diff -p -u -r1.16 hacks.mk --- hacks.mk 17 May 2015 12:57:16 -0000 1.16 +++ hacks.mk 6 Aug 2015 22:04:41 -0000 @@ -74,4 +74,17 @@ LDFLAGS+= ${COMPILER_RPATH_FLAG}/usr/sfw . endif .endif +### [Thu Aug 6 14:43:56 PDT 2015 : mrg] +### On NetBSD/{mips,vax,sparc64}, the -freorder-blocks option in -O2 +### causes opmini.c to be miscompiled, and perl build fails. +### +.if !empty(CC_VERSION:Mgcc-4.5.*) && ${OPSYS} == "NetBSD" +. if (${MACHINE_ARCH} == "vax" || \ + ${MACHINE_CPU} == "mips" || \ + ${MACHINE_ARCH} == "sparc64") +PKG_HACKS+= gcc-4.5-codegen +CFLAGS+= -fno-reorder-blocks +. endif +.endif + .endif # PERL5_HACKS_MK