From c5e4d4f4b8f0f49617c95d8f37b35705bd47f785 Mon Sep 17 00:00:00 2001 From: Patrick Nicodemus Date: Fri, 7 Jun 2024 10:14:53 -0400 Subject: [PATCH] remove -Ofast, -ffast-math (#668) * remove -Ofast, -ffast-math * removed clang-incompatible compiler flag. --- src/owl/config/configure.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/owl/config/configure.ml b/src/owl/config/configure.ml index 588fca560..4de3b2074 100644 --- a/src/owl/config/configure.ml +++ b/src/owl/config/configure.ml @@ -146,14 +146,17 @@ let get_default_config c = let cflags = try clean_env_var "OWL_CFLAGS" with | Not_found -> - [ (* Basic optimisation *) "-g"; "-O3"; "-Ofast" ] + [ (* Basic optimisation *) "-g"; "-O3" ] @ (match arch, os with | `arm64, `mac -> [ "-march=native" ] | `x86_64, _ -> [ "-march=native"; "-mfpmath=sse"; "-msse2" ] | _ -> []) @ [ (* Experimental switches, -ffast-math may break IEEE754 semantics*) "-funroll-loops" - ; "-ffast-math" + ; "-fno-math-errno" + ; "-fno-rounding-math" + ; "-fno-signaling-nans" + ; "-fexcess-precision=fast" ; (* Configure Mersenne Twister RNG *) "-DSFMT_MEXP=19937" ; "-fno-strict-aliasing"