Merge branch 'master' into epel8

This commit is contained in:
Tom Callaway 2019-12-12 15:06:36 -05:00
commit 42bfa27a28
2 changed files with 25 additions and 1 deletions

View File

@ -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;

11
R.spec
View File

@ -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 <<EOF > %{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 <spot@fedoraproject.org> - 3.6.2-1
- update to 3.6.2
- disable tests on all non-intel arches
- fix powerpc64
* Fri Nov 01 2019 Pete Walter <pwalter@fedoraproject.org> - 3.6.1-3
- Rebuild for ICU 65