summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Mollier <emollier@debian.org>2022-04-14 14:09:45 +0200
committerÉtienne Mollier <emollier@debian.org>2022-04-14 14:09:45 +0200
commit5de4cb91d77c88c15388973431e8f7df318e7fb6 (patch)
treefe55a9a92264c82e0d74eb47000feab38176bfdc
parenta6b6468e35429b34dad6fede1e4f493289698b94 (diff)
Add i386.patch: removing -ffast-math fixes NaN errors on i387 FPU.
-rw-r--r--debian/patches/i386.patch22
-rw-r--r--debian/patches/series1
2 files changed, 23 insertions, 0 deletions
diff --git a/debian/patches/i386.patch b/debian/patches/i386.patch
new file mode 100644
index 0000000..63dfb58
--- /dev/null
+++ b/debian/patches/i386.patch
@@ -0,0 +1,22 @@
+Description: fix "nan" test failures on i386 caused by -ffast-math
+Author: Étienne Mollier <emollier@debian.org>
+Bug: https://github.com/FePhyFoFum/phyx/issues/145#issuecomment-824866619
+Last-Update: 2022-04-14
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- phyx.orig/src/Makefile.in
++++ phyx/src/Makefile.in
+@@ -32,7 +32,12 @@
+ endif
+
+ ifneq "$(CXX)" "icc"
+- OPT_FLAGS += -ffast-math -ftree-vectorize
++ OPT_FLAGS += -ftree-vectorize
++ ifeq "$(shell uname -m)" "i686"
++ OPT_FLAGS += -ffloat-store
++ else
++ OPT_FLAGS += -ffast-math
++ endif
+ endif
+
+ NLOPT_PROGRAMS :=
diff --git a/debian/patches/series b/debian/patches/series
index 951865b..70dd5c1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
hardening.patch
build-more-programs.patch
+i386.patch