aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2021-03-28 11:59:03 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2021-03-28 11:59:03 +0000
commit96bac3a61140b4099434eb9437eb851cb1e2cb72 (patch)
tree32cd09f9585340801e25c8f09cc29f6d14b9958b /math
parentabe07fce7cea3ab2315ce4a2c9cdd5b173537738 (diff)
downloadports-96bac3a61140b4099434eb9437eb851cb1e2cb72.tar.gz
ports-96bac3a61140b4099434eb9437eb851cb1e2cb72.zip
math/R: remove obsolete fpsetmask
src/unix/sys-unix.c uses fpsetmask to workaround a bug that is not present since FreeBSD 4.0. This issue also affected Firefox and was resolved 9 years ago https://bugzilla.mozilla.org/show_bug.cgi?id=789436#c27 fpsetmask executions cause R build to crash on powerpc64(le), since new SIGFPE kernel code doesn't take into account old workarounds. PR: 254621 Approved by: jrm (maintainer)
Notes
Notes: svn path=/head/; revision=569385
Diffstat (limited to 'math')
-rw-r--r--math/R/files/patch-src_unix_sys-unix.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/math/R/files/patch-src_unix_sys-unix.c b/math/R/files/patch-src_unix_sys-unix.c
new file mode 100644
index 000000000000..72b3529359e8
--- /dev/null
+++ b/math/R/files/patch-src_unix_sys-unix.c
@@ -0,0 +1,34 @@
+--- src/unix/sys-unix.c.orig 2021-03-28 00:59:38 UTC
++++ src/unix/sys-unix.c
+@@ -909,12 +909,6 @@ void R_ProcessEvents(void)
+ * helpers for start-up code
+ */
+
+-#ifdef __FreeBSD__
+-# ifdef HAVE_FLOATINGPOINT_H
+-# include <floatingpoint.h>
+-# endif
+-#endif
+-
+ /* patch from Ei-ji Nakama for Intel compilers on ix86.
+ From http://www.nakama.ne.jp/memo/ia32_linux/R-2.1.1.iccftzdaz.patch.txt.
+ Since updated to include x86_64.
+@@ -928,9 +922,6 @@ void R_ProcessEvents(void)
+ void fpu_setup(Rboolean start)
+ {
+ if (start) {
+-#ifdef __FreeBSD__
+- fpsetmask(0);
+-#endif
+
+ #if (defined(__i386) || defined(__x86_64)) && defined(__INTEL_COMPILER) && __INTEL_COMPILER > 800
+ _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_OFF);
+@@ -953,8 +944,5 @@ void fpu_setup(Rboolean start)
+ asm volatile("msr fpcr, %0" : : "r"(fpcr));
+ #endif
+ } else {
+-#ifdef __FreeBSD__
+- fpsetmask(~0);
+-#endif
+ }
+ }