summaryrefslogtreecommitdiffstats
path: root/debian/patches/u-disable-fp-precision-test-on-i386.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:37 +0000
commit2d0ec380bae2ec8d51b6193fee6577188c6bb2ec (patch)
tree00f9136b2844d7e9ddc861b845ccc309aaa6091a /debian/patches/u-disable-fp-precision-test-on-i386.patch
parentMerging upstream version 1.70.0+dfsg1. (diff)
downloadrustc-debian/1.70.0+dfsg1-7.tar.xz
rustc-debian/1.70.0+dfsg1-7.zip
Adding debian version 1.70.0+dfsg1-7.debian/1.70.0+dfsg1-7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/u-disable-fp-precision-test-on-i386.patch')
-rw-r--r--debian/patches/u-disable-fp-precision-test-on-i386.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/debian/patches/u-disable-fp-precision-test-on-i386.patch b/debian/patches/u-disable-fp-precision-test-on-i386.patch
new file mode 100644
index 000000000..cb6144650
--- /dev/null
+++ b/debian/patches/u-disable-fp-precision-test-on-i386.patch
@@ -0,0 +1,26 @@
+From: liushuyu <liushuyu011@gmail.com>
+Date: Tue, 25 Jul 2023 09:48:12 +0800
+Subject: [PATCH] core library: Disable fpmath tests for i386 ...
+
+This patch disables the floating-point epsilon test for i386 since
+x87 registers are too imprecise and can't produce the expected
+results.
+
+Forwarded: https://github.com/rust-lang/rust/pull/114042
+---
+ library/core/src/num/f32.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/library/core/src/num/f32.rs b/library/core/src/num/f32.rs
+index d050d21c8c57..f5c2d1c6bf68 100644
+--- a/library/core/src/num/f32.rs
++++ b/library/core/src/num/f32.rs
+@@ -800,7 +800,7 @@ impl f32 {
+ /// let angle = std::f32::consts::PI;
+ ///
+ /// let abs_difference = (angle.to_degrees() - 180.0).abs();
+- ///
++ /// # #[cfg(not(target_arch = "x86"))]
+ /// assert!(abs_difference <= f32::EPSILON);
+ /// ```
+ #[must_use = "this returns the result of the operation, \