apply upstream fix for ppc64 infinite loop
This commit is contained in:
parent
ac049188bd
commit
8a1584b8c4
|
@ -0,0 +1,50 @@
|
||||||
|
diff -up R-4.0.0/src/main/machar.c.ppc64 R-4.0.0/src/main/machar.c
|
||||||
|
--- R-4.0.0/src/main/machar.c.ppc64 2020-06-02 14:42:18.741222048 -0400
|
||||||
|
+++ R-4.0.0/src/main/machar.c 2020-06-02 14:44:26.523106368 -0400
|
||||||
|
@@ -98,21 +98,22 @@ MACH_NAME(int *ibeta, int *it, int *irnd
|
||||||
|
{
|
||||||
|
volatile DTYPE a, b, beta, betain, betah, one,
|
||||||
|
t, temp, tempa, temp1, two, y, z, zero;
|
||||||
|
- int i, itemp, iz, j, k, mx, nxres;
|
||||||
|
+ int i, iz, j, k, mx, nxres;
|
||||||
|
|
||||||
|
one = 1;
|
||||||
|
two = one+one;
|
||||||
|
zero = one-one;
|
||||||
|
|
||||||
|
/* determine ibeta, beta ala malcolm. */
|
||||||
|
-
|
||||||
|
- a = one;
|
||||||
|
+ a = one; // a = <large> = 9.0072e+15 for 'double' is used later
|
||||||
|
do {
|
||||||
|
a = a + a;
|
||||||
|
temp = a + one;
|
||||||
|
temp1 = temp - a;
|
||||||
|
}
|
||||||
|
while(temp1 - one == zero);
|
||||||
|
+#ifdef _no_longer___did_overflow_ // on IBM PowerPPC ('Power 8')
|
||||||
|
+ int itemp;
|
||||||
|
b = one;
|
||||||
|
do {
|
||||||
|
b = b + b;
|
||||||
|
@@ -121,6 +122,9 @@ MACH_NAME(int *ibeta, int *it, int *irnd
|
||||||
|
}
|
||||||
|
while (itemp == 0);
|
||||||
|
*ibeta = itemp;
|
||||||
|
+#else
|
||||||
|
+ *ibeta = (int) FLT_RADIX;
|
||||||
|
+#endif
|
||||||
|
beta = *ibeta;
|
||||||
|
|
||||||
|
/* determine it, irnd */
|
||||||
|
diff -up R-4.0.0/src/main/platform.c.ppc64 R-4.0.0/src/main/platform.c
|
||||||
|
--- R-4.0.0/src/main/platform.c.ppc64 2020-06-02 14:44:40.940754817 -0400
|
||||||
|
+++ R-4.0.0/src/main/platform.c 2020-06-02 14:45:08.940072121 -0400
|
||||||
|
@@ -43,6 +43,7 @@
|
||||||
|
#include <Rinterface.h>
|
||||||
|
#include <Fileio.h>
|
||||||
|
#include <ctype.h> /* toupper */
|
||||||
|
+#include <float.h> // -> FLT_RADIX
|
||||||
|
#include <limits.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h> /* for realpath */
|
8
R.spec
8
R.spec
|
@ -152,7 +152,7 @@
|
||||||
|
|
||||||
Name: R
|
Name: R
|
||||||
Version: %{major_version}.%{minor_version}.%{patch_version}
|
Version: %{major_version}.%{minor_version}.%{patch_version}
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: A language for data analysis and graphics
|
Summary: A language for data analysis and graphics
|
||||||
URL: http://www.r-project.org
|
URL: http://www.r-project.org
|
||||||
Source0: https://cran.r-project.org/src/base/R-4/R-%{version}.tar.gz
|
Source0: https://cran.r-project.org/src/base/R-4/R-%{version}.tar.gz
|
||||||
|
@ -200,6 +200,8 @@ BuildRequires: stunnel
|
||||||
%endif
|
%endif
|
||||||
# see https://bugzilla.redhat.com/show_bug.cgi?id=1324145
|
# see https://bugzilla.redhat.com/show_bug.cgi?id=1324145
|
||||||
Patch1: R-3.3.0-fix-java_path-in-javareconf.patch
|
Patch1: R-3.3.0-fix-java_path-in-javareconf.patch
|
||||||
|
# https://github.com/wch/r-source/commit/6857d53313bf7a5afea4e3f0142d69a069b701d0
|
||||||
|
Patch2: R-4.0.0-ppc64-infinite-loop-fix.patch
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
BuildRequires: gcc-gfortran
|
BuildRequires: gcc-gfortran
|
||||||
BuildRequires: gcc-c++, tex(latex), texinfo-tex
|
BuildRequires: gcc-c++, tex(latex), texinfo-tex
|
||||||
|
@ -517,6 +519,7 @@ from the R project. This package provides the static libRmath library.
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
%endif
|
%endif
|
||||||
%patch1 -p1 -b .fixpath
|
%patch1 -p1 -b .fixpath
|
||||||
|
%patch2 -p1 -b .ppc64
|
||||||
|
|
||||||
# Filter false positive provides.
|
# Filter false positive provides.
|
||||||
cat <<EOF > %{name}-prov
|
cat <<EOF > %{name}-prov
|
||||||
|
@ -1243,6 +1246,9 @@ R CMD javareconf \
|
||||||
%{_libdir}/libRmath.a
|
%{_libdir}/libRmath.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 2 2020 Tom Callaway <spot@fedoraproject.org> - 4.0.0-2
|
||||||
|
- apply upstream fix for ppc64 infinite loop
|
||||||
|
|
||||||
* Fri May 8 2020 Tom Callaway <spot@fedoraproject.org> - 4.0.0-1
|
* Fri May 8 2020 Tom Callaway <spot@fedoraproject.org> - 4.0.0-1
|
||||||
- update to 4.0.0
|
- update to 4.0.0
|
||||||
NOTE: This major release update requires all installed R modules to be rebuilt in order to work.
|
NOTE: This major release update requires all installed R modules to be rebuilt in order to work.
|
||||||
|
|
Loading…
Reference in New Issue