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"