This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Downgrade the optimization of regcomp.c on mips and mipsel due to a gcc-4.9 bug
authorNiko Tyni <ntyni@debian.org>
Tue, 8 Jul 2014 20:04:30 +0000 (23:04 +0300)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 20 Sep 2014 17:02:34 +0000 (10:02 -0700)
  % cat ~/t.pl
  print ( (q{foo'} =~ /[^']+'/) ?  "ok\n" : "not ok\n" );
  % perl ~/t.pl
  ok
  % ./miniperl ~/t.pl
  not ok

This only happens with -fPIC -ftree-vrp builds.
It is a regression from gcc-4.8.

Bug-Debian: http://bugs.debian.org/754054
Patch-Name: debian/regcomp-mips-optim.diff

cflags.SH

index 031b780..bdb4bad 100755 (executable)
--- a/cflags.SH
+++ b/cflags.SH
@@ -455,6 +455,11 @@ for file do
     # or customize here
 
     case "$file" in
+    regcomp) : work around http://bugs.debian.org/754054
+        case $archname in
+        mips-*|mipsel-*)
+            optimize="$optimize -fno-tree-vrp";;
+        esac;;
     *) ;;
 
     # Customization examples follow.