From 988d3a1a0d0bff2d1ddeca461d9f4f09bdea6692 Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Thu, 7 May 2020 15:26:10 +0200 Subject: [PATCH 1/2] Do not set math errno --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e3ae3b7ff..532353a8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -128,6 +128,9 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PROC_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=unused-label") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=delete-incomplete") +# Do net set math errno, as we never check its value. +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-math-errno") + # Special treatment for x87 and x86-32 SSE (see GitHub issue #4324) include(FindX87Math) if(HAVE_X87_MATH) From 8c851a1b3f389c2198ee5d85d3f0441d6f25d281 Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Fri, 8 May 2020 14:02:40 +0200 Subject: [PATCH 2/2] Also tweak CMAKE_C_FLAGS, fixes #5742 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 532353a8b..cbddde251 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,6 +130,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=delete-incomplete") # Do net set math errno, as we never check its value. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-math-errno") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-math-errno") # Special treatment for x87 and x86-32 SSE (see GitHub issue #4324) include(FindX87Math)