diff options
| author | Christoph Berg <myon@debian.org> | 2026-09-27 12:59:53 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-09-27 12:59:53 +0200 |
| commit | e40987d01bb109cd009e3bbb54e9c358225997d6 (patch) | |
| tree | a54708b8e1800aea867290678f9cd4a577c57c52 | |
| parent | 392385ccb9566c971f3502909d8dd6baa79e2005 (diff) | |
Add 0016-sse2-i386.patch: build C and Fortran with SSE2 on i386debian/3.2.0_rc1+dfsg-1
x87 80-bit extended precision breaks bit-exact comparisons between
equivalent computations in the unit tests (test_jtty_payload_correlators,
test_ft8_mtd_residual, test_jpl_resilience) and slows the Q65 LDPC
decoders until test_q65_decode_pipeline times out. SSE2 rounds every
operation to 64-bit IEEE double precision, matching the 64-bit build.
| -rw-r--r-- | debian/patches/0016-sse2-i386.patch | 32 | ||||
| -rw-r--r-- | debian/patches/series | 1 |
2 files changed, 33 insertions, 0 deletions
diff --git a/debian/patches/0016-sse2-i386.patch b/debian/patches/0016-sse2-i386.patch new file mode 100644 index 00000000..24d4a065 --- /dev/null +++ b/debian/patches/0016-sse2-i386.patch @@ -0,0 +1,32 @@ +Description: Build C and Fortran sources with SSE2 on i386 + On 32-bit Intel targets the default x87 floating point model keeps + intermediate results in 80-bit extended precision. That breaks bit-exact + comparisons between equivalent computations in the unit tests, and slows + the Q65 LDPC decoders down until test_q65_decode_pipeline times out. + Building the C and Fortran sources with SSE2 makes every operation round + to 64-bit IEEE double precision, matching the 64-bit build behaviour. +Author: Christoph Berg <myon@debian.org> +Last-Update: 2026-09-27 + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -88,6 +88,19 @@ + LANGUAGES C CXX Fortran + ) + ++# ++# On 32-bit Intel targets the default x87 floating point model keeps ++# intermediate results in 80-bit extended precision. That breaks bit-exact ++# comparisons between equivalent computations in the unit tests, and slows ++# the Q65 LDPC decoders down until test_q65_decode_pipeline times out. ++# Build the C and Fortran sources with SSE2, where every operation rounds ++# to 64-bit IEEE double precision, matching the 64-bit build behaviour. ++# ++if (UNIX AND CMAKE_SYSTEM_PROCESSOR MATCHES "i.86") ++ string (APPEND CMAKE_C_FLAGS " -msse2 -mfpmath=sse") ++ string (APPEND CMAKE_Fortran_FLAGS " -msse2 -mfpmath=sse") ++endif (UNIX) ++ + set (CMAKE_CXX_STANDARD 17) + set (CMAKE_CXX_STANDARD_REQUIRED ON) + set (CMAKE_CXX_EXTENSIONS ON) diff --git a/debian/patches/series b/debian/patches/series index 969fd1d9..ad5ef0f2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,4 +5,5 @@ 0013-qcustomplot-link.patch 0014-xsltproc-nonet-manpages.patch 0015-typos.patch +0016-sse2-i386.patch defuse-expiry |
