summaryrefslogtreecommitdiff
path: root/lang/perl5/hacks.mk
diff options
context:
space:
mode:
authorhauke <hauke@pkgsrc.org>2011-10-11 10:02:13 +0000
committerhauke <hauke@pkgsrc.org>2011-10-11 10:02:13 +0000
commita04ae2b84ec72e511882052c968e450d7d4d620d (patch)
tree300ab77e328fe84df30d305b4e35e8ca89cce8bb /lang/perl5/hacks.mk
parent44fe8a15f15e31ceff52b9c29a2c7a931cd32867 (diff)
downloadpkgsrc-a04ae2b84ec72e511882052c968e450d7d4d620d.tar.gz
On m68k, gcc creates short assembler branch insns, and expects the
assembler to adapt them to the distance. m68k gas appears not to do that for fpu branch insns, resulting in an out-of-range FPU assembler branch instruction error in "ext/re/re_exec.c". As a workaround, building with "-Os" instead of "-O2" reduces the size of the object file enough to allow short branches. See PR toolchain/45439.
Diffstat (limited to 'lang/perl5/hacks.mk')
-rw-r--r--lang/perl5/hacks.mk24
1 files changed, 23 insertions, 1 deletions
diff --git a/lang/perl5/hacks.mk b/lang/perl5/hacks.mk
index 96384b5004b..3dba627bf06 100644
--- a/lang/perl5/hacks.mk
+++ b/lang/perl5/hacks.mk
@@ -1,4 +1,7 @@
-# $NetBSD: hacks.mk,v 1.4 2010/11/02 07:54:31 wiz Exp $
+# $NetBSD: hacks.mk,v 1.5 2011/10/11 10:02:13 hauke Exp $
+
+.if !defined(PERL5_HACKS_MK)
+PERL5_HACKS_MK= defined
.include "../../mk/compiler.mk"
@@ -43,3 +46,22 @@ BUILDLINK_TRANSFORM+= rm:-O[0-9]*
PKG_HACKS+= arm-codegen
CFLAGS+= -fno-cse-skip-blocks
.endif
+
+### [ Fri Oct 11 10:00:00 UTC 2011 : hauke ]
+###
+### On m68k, gcc creates short assembler branch insns, and expects
+### the assembler to adapt them to the distance. m68k gas appears not to
+### do that for fpu branch insns, resulting in an out-of-range FPU
+### assembler branch instruction error in "ext/re/re_exec.c".
+###
+### As a workaround, building with "-Os" instead of "-O2" reduces
+### the size of the object file enough to allow short branches.
+###
+### See PR toolchain/45439.
+
+. if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "m68k"
+PKG_HACKS+= m68k-codegen
+BUILDLINK_TRANSFORM+= rename:-O[0-9]*:-Os
+. endif
+
+.endif # PERL5_HACKS_MK