From 86fb95abbe5ee8c6cbfd719b1bf3c9b5198dfcba Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Thu, 12 Dec 2019 14:24:05 -0500 Subject: [PATCH] disable tests on all non-intel arches, fix powerpc64 --- R-3.6.2-ppc64-no-const-long-double.patch | 15 +++++++++++++++ R.spec | 11 ++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 R-3.6.2-ppc64-no-const-long-double.patch diff --git a/R-3.6.2-ppc64-no-const-long-double.patch b/R-3.6.2-ppc64-no-const-long-double.patch new file mode 100644 index 0000000..d1427a3 --- /dev/null +++ b/R-3.6.2-ppc64-no-const-long-double.patch @@ -0,0 +1,15 @@ +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 + } + +-#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__ + static LDOUBLE q_1_eps = 1 / LDBL_EPSILON; + #else + static double q_1_eps = 1 / DBL_EPSILON; diff --git a/R.spec b/R.spec index 76b4fae..058d56f 100644 --- a/R.spec +++ b/R.spec @@ -178,6 +178,11 @@ BuildRequires: stunnel %endif # see https://bugzilla.redhat.com/show_bug.cgi?id=1324145 Patch1: R-3.3.0-fix-java_path-in-javareconf.patch +# PowerPC64 when gcc is compiled with -mlong-double-128 +# cannot assign values to const long double vars +# because "the middle-end does not constant fold 128bit IBM long double" +# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26374 +Patch2: R-3.6.2-ppc64-no-const-long-double.patch License: GPLv2+ BuildRequires: gcc-gfortran BuildRequires: gcc-c++, tex(latex), texinfo-tex @@ -495,6 +500,7 @@ from the R project. This package provides the static libRmath library. %setup -q -n %{name}-%{version} %endif %patch1 -p1 -b .fixpath +%patch2 -p1 -b .ppc64 # Filter false positive provides. cat < %{name}-prov @@ -787,11 +793,12 @@ sed -i 's|/builddir/build/BUILD/R-%{version}/curl-%{curlv}/target%{_libdir}/:/bu mv %{buildroot}%{_libdir}/R/lib/libRblas.so %{buildroot}%{_libdir}/R/lib/libRrefblas.so %endif +# okay, look. its very clear that upstream does not run the test suite on any non-intel architectures. %check %if 0%{?zlibhack} # Most of these tests pass. Some don't. All pieces belong to you. %else -%ifnarch ppc64 ppc64le armv7hl +%ifnarch ppc64 ppc64le armv7hl s390x aarch64 # Needed by tests/ok-error.R, which will smash the stack on PPC64. This is the purpose of the test. ulimit -s 16384 TZ="Europe/Paris" make check @@ -1216,6 +1223,8 @@ R CMD javareconf \ %changelog * Thu Dec 12 2019 Tom Callaway - 3.6.2-1 - update to 3.6.2 +- disable tests on all non-intel arches +- fix powerpc64 * Fri Nov 01 2019 Pete Walter - 3.6.1-3 - Rebuild for ICU 65