diff --git a/modules/etc/SCsub b/modules/etc/SCsub index 31d8f00ef303..4a3ce41f4d57 100644 --- a/modules/etc/SCsub +++ b/modules/etc/SCsub @@ -36,7 +36,3 @@ env_etc.add_source_files(env.modules_sources, "*.cpp") # upstream uses c++11 if (not env_etc.msvc): env_etc.Append(CCFLAGS="-std=c++11") -# -ffast-math seems to be incompatible with ec2comp on recent versions of -# GCC and Clang -if '-ffast-math' in env_etc['CCFLAGS']: - env_etc['CCFLAGS'].remove('-ffast-math') diff --git a/platform/android/detect.py b/platform/android/detect.py index 72ae6b47c66d..9558597a8f97 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -150,7 +150,7 @@ def mySpawn(sh, escape, cmd, args, env): if (env["target"].startswith("release")): env.Append(LINKFLAGS=['-O2']) - env.Append(CPPFLAGS=['-O2', '-DNDEBUG', '-ffast-math', '-funsafe-math-optimizations', '-fomit-frame-pointer']) + env.Append(CPPFLAGS=['-O2', '-DNDEBUG', '-fomit-frame-pointer']) if (can_vectorize): env.Append(CPPFLAGS=['-ftree-vectorize']) if (env["target"] == "release_debug"): diff --git a/platform/haiku/detect.py b/platform/haiku/detect.py index 7c62654ef613..b290a2ab2775 100644 --- a/platform/haiku/detect.py +++ b/platform/haiku/detect.py @@ -37,14 +37,14 @@ def configure(env): ## Build type if (env["target"] == "release"): - env.Prepend(CCFLAGS=['-O3', '-ffast-math']) + env.Prepend(CCFLAGS=['-O3']) if (env["debug_symbols"] == "yes"): env.Prepend(CCFLAGS=['-g1']) if (env["debug_symbols"] == "full"): env.Prepend(CCFLAGS=['-g2']) elif (env["target"] == "release_debug"): - env.Prepend(CCFLAGS=['-O2', '-ffast-math', '-DDEBUG_ENABLED']) + env.Prepend(CCFLAGS=['-O2', '-DDEBUG_ENABLED']) if (env["debug_symbols"] == "yes"): env.Prepend(CCFLAGS=['-g1']) if (env["debug_symbols"] == "full"): diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py index 772ad91f1956..ac9ec4d3c964 100644 --- a/platform/iphone/detect.py +++ b/platform/iphone/detect.py @@ -47,7 +47,7 @@ def configure(env): if (env["target"].startswith("release")): env.Append(CPPFLAGS=['-DNDEBUG', '-DNS_BLOCK_ASSERTIONS=1']) - env.Append(CPPFLAGS=['-O2', '-ftree-vectorize', '-fomit-frame-pointer', '-ffast-math', '-funsafe-math-optimizations']) + env.Append(CPPFLAGS=['-O2', '-ftree-vectorize', '-fomit-frame-pointer']) env.Append(LINKFLAGS=['-O2']) if env["target"] == "release_debug": diff --git a/platform/osx/detect.py b/platform/osx/detect.py index 7676840f9770..52f04b7048f1 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -39,7 +39,7 @@ def configure(env): ## Build type if (env["target"] == "release"): - env.Prepend(CCFLAGS=['-O3', '-ffast-math', '-fomit-frame-pointer', '-ftree-vectorize', '-msse2']) + env.Prepend(CCFLAGS=['-O3', '-fomit-frame-pointer', '-ftree-vectorize', '-msse2']) if (env["debug_symbols"] == "yes"): env.Prepend(CCFLAGS=['-g1']) if (env["debug_symbols"] == "full"): diff --git a/platform/server/detect.py b/platform/server/detect.py index b09b3b8bbda7..6bb96a6fa861 100644 --- a/platform/server/detect.py +++ b/platform/server/detect.py @@ -39,10 +39,10 @@ def configure(env): ## Build type if (env["target"] == "release"): - env.Append(CCFLAGS=['-O2', '-ffast-math', '-fomit-frame-pointer']) + env.Append(CCFLAGS=['-O2', '-fomit-frame-pointer']) elif (env["target"] == "release_debug"): - env.Append(CCFLAGS=['-O2', '-ffast-math', '-DDEBUG_ENABLED']) + env.Append(CCFLAGS=['-O2', '-DDEBUG_ENABLED']) elif (env["target"] == "debug"): env.Append(CCFLAGS=['-g2', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED']) diff --git a/platform/x11/detect.py b/platform/x11/detect.py index a565b5e11fff..ae89677e1317 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -70,16 +70,14 @@ def configure(env): ## Build type if (env["target"] == "release"): - # -O3 -ffast-math is identical to -Ofast. We need to split it out so we can selectively disable - # -ffast-math in code for which it generates wrong results. - env.Prepend(CCFLAGS=['-O3', '-ffast-math']) + env.Prepend(CCFLAGS=['-O3']) if (env["debug_symbols"] == "yes"): env.Prepend(CCFLAGS=['-g1']) if (env["debug_symbols"] == "full"): env.Prepend(CCFLAGS=['-g2']) elif (env["target"] == "release_debug"): - env.Prepend(CCFLAGS=['-O2', '-ffast-math', '-DDEBUG_ENABLED']) + env.Prepend(CCFLAGS=['-O2', '-DDEBUG_ENABLED']) if (env["debug_symbols"] == "yes"): env.Prepend(CCFLAGS=['-g1']) if (env["debug_symbols"] == "full"):