summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authormrg <mrg@pkgsrc.org>2015-08-07 22:11:22 +0000
committermrg <mrg@pkgsrc.org>2015-08-07 22:11:22 +0000
commit497c23400b5caa43e5a6f6504e4cb28234191686 (patch)
treeea516021356f2c9a700afe71a97e76de7e6314c1 /lang
parentbe9d1904060ebb7b52c02ac753616f1d2480fc16 (diff)
downloadpkgsrc-497c23400b5caa43e5a6f6504e4cb28234191686.tar.gz
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.
Diffstat (limited to 'lang')
-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..17b0354aafd 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.17 2015/08/07 22:11:22 mrg 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