Source: perl
Version: 5.26.0-4
Severity: normal
Tags: patch
User: debian-sup...@lists.debian.org
Usertags: sh4

Hi!

src:perl currently fails to build from source on sh4 with:

./miniperl -Ilib make_ext.pl cpan/Archive-Tar/pm_to_blib  MAKE="/usr/bin/make" 
LIBPERL_A=libperl.a
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Unsuccessful Makefile.PL(cpan/Archive-Tar): code=11 at make_ext.pl line 518.
Makefile:586: recipe for target 'cpan/Archive-Tar/pm_to_blib' failed
make[1]: *** [cpan/Archive-Tar/pm_to_blib] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
debian/rules:124: recipe for target 'perl.static' failed
make: *** [perl.static] Error 2
dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2

I have not tracked down the actual reason for the bug yet, but it can
be worked around by building perl without optimizations enabled on sh4.

The attached patch disables the optimizations on sh4 and makes the build
succeed. Please consider applying it for the next upload.

Thanks,
Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
--- debian/config.debian.orig   2017-07-20 21:23:29.000000000 +0200
+++ debian/config.debian        2017-07-22 17:01:36.675181556 +0200
@@ -74,7 +74,8 @@
 
 case "$host_arch_cpu:$build_type" in
     sh4:*) # required to correctly handle floating point on sh4
-       ccflags="$ccflags -mieee";;
+       ccflags="$ccflags -mieee"
+       optimize="$optimize${optimize:+ }-O0";;
 
     m68k:shared) # work around an optimiser bug
        ccflags="$ccflags -fno-regmove";;

Reply via email to