adjust ppc64 patch to reflect upstream fix

This commit is contained in:
Tom Callaway 2019-12-18 09:08:17 -05:00
parent 86fb95abbe
commit 0468c23822
2 changed files with 15 additions and 11 deletions

View File

@ -1,15 +1,16 @@
diff -up ./src/main/arithmetic.c.orig ./src/main/arithmetic.c
--- ./src/main/arithmetic.c.orig 2019-12-12 18:30:12.416334062 +0000
+++ ./src/main/arithmetic.c 2019-12-12 18:30:44.966334062 +0000
@@ -179,7 +179,10 @@ void attribute_hidden InitArithmetic()
#endif
diff -up R-3.6.2/src/main/arithmetic.c.ppc64 R-3.6.2/src/main/arithmetic.c
--- R-3.6.2/src/main/arithmetic.c.ppc64 2019-10-18 18:15:02.000000000 -0400
+++ R-3.6.2/src/main/arithmetic.c 2019-12-18 09:05:50.363220122 -0500
@@ -177,7 +177,12 @@ void attribute_hidden InitArithmetic()
}
-#if HAVE_LONG_DOUBLE && (SIZEOF_LONG_DOUBLE > SIZEOF_DOUBLE)
+/* PowerPC 64 (when gcc has -mlong-double-128) breaks here because
+ * of issues constant folding 128bit IBM long doubles.
+ */
+#if HAVE_LONG_DOUBLE && (SIZEOF_LONG_DOUBLE > SIZEOF_DOUBLE) && !__PPC64__
#if HAVE_LONG_DOUBLE && (SIZEOF_LONG_DOUBLE > SIZEOF_DOUBLE)
+# ifdef __PPC64__
+ // PowerPC 64 (when gcc has -mlong-double-128) fails constant folding with LDOUBLE
+# define q_1_eps (1 / LDBL_EPSILON)
+# else
static LDOUBLE q_1_eps = 1 / LDBL_EPSILON;
+# endif
#else
static double q_1_eps = 1 / DBL_EPSILON;
#endif

5
R.spec
View File

@ -130,7 +130,7 @@
Name: R
Version: 3.6.2
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A language for data analysis and graphics
URL: http://www.r-project.org
Source0: https://cran.r-project.org/src/base/R-3/R-%{version}.tar.gz
@ -1221,6 +1221,9 @@ R CMD javareconf \
%{_libdir}/libRmath.a
%changelog
* Wed Dec 18 2019 Tom Callaway <spot@fedoraproject.org> - 3.6.2-2
- adjust ppc64 patch to reflect upstream fix
* Thu Dec 12 2019 Tom Callaway <spot@fedoraproject.org> - 3.6.2-1
- update to 3.6.2
- disable tests on all non-intel arches