Browse Source

Merge pull request #4718 from martin-frbg/issue4713

Override Intel icx's default fp-model to ensure correct handling on NaNs
tags/v0.3.28^2
Martin Kroeker GitHub 1 year ago
parent
commit
834e633d79
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions
  1. +5
    -0
      Makefile.x86_64
  2. +4
    -0
      cmake/cc.cmake

+ 5
- 0
Makefile.x86_64 View File

@@ -8,6 +8,11 @@ endif
endif
endif

ifeq ($(C_COMPILER), CLANG)
ifeq ($(findstring icx,$(CC)),icx)
CCOMMON_OPT += -fp-model=consistent
endif
endif

ifneq ($(DYNAMIC_ARCH),1)
ADD_CPUFLAGS = 1


+ 4
- 0
cmake/cc.cmake View File

@@ -4,6 +4,10 @@
## Sets C related variables.
include(CheckCCompilerFlag)

if (${CMAKE_C_COMPILER_ID} MATCHES "IntelLLVM")
set(CCOMMON_OPT "${CCOMMON_OPT} -fp-model=consistent")
endif ()

if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_C_COMPILER_ID} STREQUAL "LSB" OR ${CMAKE_C_COMPILER_ID} MATCHES "Clang")
set(CCOMMON_OPT "${CCOMMON_OPT} -Wall")
set(COMMON_PROF "${COMMON_PROF} -fno-inline")


Loading…
Cancel
Save