summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron>2015-08-09 08:04:54 +0000
committertron <tron>2015-08-09 08:04:54 +0000
commitd48c097c7897ca3f796b2adac764af4cca5aa8ff (patch)
tree459d7bf85469d32e72ea6701812e62c55c0f93fc
parentae3dab2c58e17ee4af5a6351923b6551f1dadbd3 (diff)
downloadpkgsrc-d48c097c7897ca3f796b2adac764af4cca5aa8ff.tar.gz
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.
-rw-r--r--lang/perl5/hacks.mk15
1 files changed, 14 insertions, 1 deletions
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