From 5e553abc29c2f330474d275626afa3aaa7c9d86b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
Date: Thu, 5 Jan 2017 17:47:17 +0100
Subject: Disable fused multiply-add instructions on 64-bit PowerPC because of
 GSL

Also remove -O0 -fsigned-char options that seems unneded now. Actually
they presence prevents from passing tests on ppc64 now.
---
 perl-PDL.spec | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/perl-PDL.spec b/perl-PDL.spec
index 75e39ab..3860b37 100644
--- a/perl-PDL.spec
+++ b/perl-PDL.spec
@@ -11,7 +11,7 @@
 Name:           perl-PDL
 %global cpan_version 2.016
 Version:        2.16.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        The Perl Data Language
 Group:          Development/Libraries
 License:        GPL+ or Artistic
@@ -178,10 +178,12 @@ such commercial packages as IDL and MatLab.
 sed -e 's,^#!/usr/bin/env perl,%(perl -MConfig -e 'print 
$Config{startperl}'),' -i Perldl2/pdl2
 
 %build
-# Optimization above -O0 segfaults tests, bug #914307
-CFLAGS="%{optflags} -Wno-unused -O0"
-%ifarch ppc ppc64 s390 s390x
-CFLAGS="$CFLAGS -fsigned-char"
+# Suppress numerous warnings about unused variables
+CFLAGS="%{optflags} -Wno-unused"
+# Fused multiply-add instructions cause segfaults on 64-bit PowerPC if GSL
+# support is enabled (the same option is in gsl.spec), bug #1410162
+%ifarch ppc64 ppc64le
+CFLAGS="$CFLAGS -ffp-contract=off"
 %endif
 # Uncomment to enable PDL::IO::Browser
 # CFLAGS="$CFLAGS -DNCURSES"
@@ -212,6 +214,10 @@ make test
 %{_mandir}/man3/*.3*
 
 %changelog
+* Thu Jan 05 2017 Petr Pisar <ppi...@redhat.com> - 2.17.0-2
+- Disable fused multiply-add instructions on 64-bit PowerPC because of GSL
+  (bug #1410162)
+
 * Mon Jun 06 2016 Jitka Plesnikova <jples...@redhat.com> - 2.16.0-1
 - 2.016 bump
 
-- 
cgit v0.12


        
http://pkgs.fedoraproject.org/cgit/perl-PDL.git/commit/?h=f25&id=5e553abc29c2f330474d275626afa3aaa7c9d86b
_______________________________________________
perl-devel mailing list -- perl-devel@lists.fedoraproject.org
To unsubscribe send an email to perl-devel-le...@lists.fedoraproject.org

Reply via email to