From: =?utf-8?q?S=C3=A9bastien_Villemot?= <sebastien@debian.org>
Date: Tue, 27 Nov 2018 13:49:10 +0100
Subject: Fix FTBFS on i386, workaround for #901836
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

The -mieee-fp flag, that is used to test the “NaN awareness” of the compiler,
is broken on i386. As a consequence, plplot FTBFS, because it does not compile
csiro, see e.g.:
https://buildd.debian.org/status/fetch.php?pkg=plplot&arch=i386&ver=5.13.0%2Bdfsg-7%2Bb1&stamp=1529312616&raw=0

This patch simply removes the -mieee-fp flag, which is not needed on i386 to
pass the “NaN awareness” test.
Bug-Debian: https://bugs.debian.org/901836
Last-Update: 2018-06-20
---
 cmake/modules/csiro.cmake | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/cmake/modules/csiro.cmake b/cmake/modules/csiro.cmake
index cd427c4..81d663f 100644
--- a/cmake/modules/csiro.cmake
+++ b/cmake/modules/csiro.cmake
@@ -27,15 +27,13 @@ option(WITH_CSA "Enable use of the csa library" ON)
 # expanded to a lot more cases as we gain platform experience.
 set(NAN_CFLAGS ${CMAKE_C_FLAGS})
 if(PL_HAVE_QHULL OR WITH_CSA)
-  if(CMAKE_SYSTEM_PROCESSOR MATCHES "i[0-9]86" AND NOT CMAKE_C_COMPILER MATCHES "gcc")
-    set(NAN_CFLAGS "${NAN_CFLAGS} -mieee-fp")
-  elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "alpha.*")
+  if(CMAKE_SYSTEM_PROCESSOR MATCHES "alpha.*")
     if(CMAKE_C_COMPILER MATCHES "gcc")
       set(NAN_CFLAGS "${NAN_CFLAGS} -mieee")
     else(CMAKE_C_COMPILER MATCHES "gcc")
       set(NAN_CFLAGS "${NAN_CFLAGS} -ieee")
     endif(CMAKE_C_COMPILER MATCHES "gcc")
-  endif(CMAKE_SYSTEM_PROCESSOR MATCHES "i[0-9]86" AND NOT CMAKE_C_COMPILER MATCHES "gcc")
+  endif(CMAKE_SYSTEM_PROCESSOR MATCHES "alpha.*")
   if(NOT DEFINED NaNAwareCCompiler)
     message(STATUS "Check for NaN awareness in C compiler")
     try_run(RUN_RESULT COMPILE_RESULT
