From 616cc28d82da8981b853cccf365439905f8efdba Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sun, 26 May 2024 12:59:11 +0200 Subject: [PATCH] Override icx's default fast math mode to ensure correct NaN handling --- Makefile.x86_64 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile.x86_64 b/Makefile.x86_64 index c0dbe84c8..e9831327f 100644 --- a/Makefile.x86_64 +++ b/Makefile.x86_64 @@ -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