From d48c097c7897ca3f796b2adac764af4cca5aa8ff Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 9 Aug 2015 08:04:54 +0000 Subject: Pullup ticket #4789 - requested by mrg lang/perl5: bug fix patch Revisions pulled up: - lang/perl5/hacks.mk 1.17 --- Module Name: pkgsrc Committed By: mrg Date: Fri Aug 7 22:11:23 UTC 2015 Modified Files: pkgsrc/lang/perl5: hacks.mk Log Message: use -fno-reorder-blocks for sparc64, mips, and vax and GCC 4.5*. something in op.c (as miniop.c) is mis-compiled with this option which is enabled by -O2, when using GCC 4.5. i didn't try to figure out exactly what as op.c is 419,359 bytes long and the assembler output is almost 100% different and approximiately 1.5MB either way (the diff of the asm output is larger than the combined inputs), so for now we have this hack. this problem doesn't appear to occur in newer GCC. XXX: pullup to 2015Q2. --- lang/perl5/hacks.mk | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lang/perl5/hacks.mk b/lang/perl5/hacks.mk index a7df8724d0a..bdfcda3cac4 100644 --- a/lang/perl5/hacks.mk +++ b/lang/perl5/hacks.mk @@ -1,4 +1,4 @@ -# $NetBSD: hacks.mk,v 1.16 2015/05/17 12:57:16 bsiegert Exp $ +# $NetBSD: hacks.mk,v 1.16.2.1 2015/08/09 08:04:54 tron Exp $ .if !defined(PERL5_HACKS_MK) PERL5_HACKS_MK= defined @@ -74,4 +74,17 @@ LDFLAGS+= ${COMPILER_RPATH_FLAG}/usr/sfw/lib/amd64 . 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 -- cgit v1.2.3