fix build failure on powerpc

This commit is contained in:
Than Ngo 2016-03-11 01:02:02 +01:00
parent dcf8aac601
commit 263427c145
2 changed files with 22 additions and 1 deletions

15
gsl-test.patch Normal file
View File

@ -0,0 +1,15 @@
diff -up gsl-2.1/rstat/test.c.than gsl-2.1/rstat/test.c
diff -up gsl-2.1/test/results.c.than gsl-2.1/test/results.c
--- gsl-2.1/test/results.c.than 2016-03-10 18:08:17.013928401 -0500
+++ gsl-2.1/test/results.c 2016-03-10 18:42:45.717980023 -0500
@@ -131,6 +131,10 @@ gsl_test_rel (double result, double expe
{
status = -1;
}
+ else if (fabs(result-expected) < relative_error)
+ {
+ status = 0;
+ }
else if (expected != 0 )
{
status = (fabs(result-expected)/fabs(expected) > relative_error) ;

View File

@ -1,7 +1,7 @@
Summary: The GNU Scientific Library for numerical analysis Summary: The GNU Scientific Library for numerical analysis
Name: gsl Name: gsl
Version: 2.1 Version: 2.1
Release: 3%{?dist} Release: 4%{?dist}
URL: http://www.gnu.org/software/gsl/ URL: http://www.gnu.org/software/gsl/
# info part of this package is under GFDL license # info part of this package is under GFDL license
# eigen/nonsymmv.c and eigen/schur.c # eigen/nonsymmv.c and eigen/schur.c
@ -13,6 +13,7 @@ Source: ftp://ftp.gnu.org/gnu/gsl/%{name}-%{version}.tar.gz
Patch0: gsl-1.10-lib64.patch Patch0: gsl-1.10-lib64.patch
# http://lists.gnu.org/archive/html/bug-gsl/2015-12/msg00012.html # http://lists.gnu.org/archive/html/bug-gsl/2015-12/msg00012.html
Patch1: gsl-tol.patch Patch1: gsl-tol.patch
Patch2: gsl-test.patch
BuildRequires: pkgconfig BuildRequires: pkgconfig
%description %description
@ -35,6 +36,8 @@ developing programs using the GSL (GNU Scientific Library).
%setup -q %setup -q
%patch0 -p1 -b .lib64 %patch0 -p1 -b .lib64
%patch1 -p1 -b .tol %patch1 -p1 -b .tol
%patch2 -p1 -b .test
iconv -f windows-1252 -t utf-8 THANKS > THANKS.aux iconv -f windows-1252 -t utf-8 THANKS > THANKS.aux
touch -r THANKS THANKS.aux touch -r THANKS THANKS.aux
mv THANKS.aux THANKS mv THANKS.aux THANKS
@ -96,6 +99,9 @@ fi
%{_mandir}/man3/*.3* %{_mandir}/man3/*.3*
%changelog %changelog
* Thu Mar 10 2016 Than Ngo <than@redhat.com> - 2.1-4
- fix build failure on powerpc
* Fri Feb 26 2016 Dan Horák <dan[at]danny.cz> - 2.1-3 * Fri Feb 26 2016 Dan Horák <dan[at]danny.cz> - 2.1-3
- Disable FMA also on ppc64(le) and s390(x) - Disable FMA also on ppc64(le) and s390(x)