summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
authorHein-Pieter van Braam <hp@tmm.cx>2017-08-30 02:42:10 +0200
committerHein-Pieter van Braam <hp@tmm.cx>2017-08-30 11:51:24 +0200
commitd44414c7112336fddbbb1eee782982b638690e70 (patch)
treea70d6908c7aec949de64c57fd935939d59e1d513 /platform/x11
parent181420f3b229f8e40a1bfe7bfafd3f3a19af0d32 (diff)
Disable -ffast-math for etc2comp
Apparently -ffast-math generates incorrect code with recent versions of GCC and Clang. The manual page for GCC warns about this possibility. In my tests it doesn't actually appear to be measurably slower in this case, and this is used in a batch process so it seems safe to disable this. This fixes #10758 and fixes #10070
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/detect.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 79778136ad..f355de0eb3 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -74,7 +74,9 @@ def configure(env):
## Build type
if (env["target"] == "release"):
- env.Prepend(CCFLAGS=['-Ofast'])
+ # -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'])
if (env["debug_release"] == "yes"):
env.Prepend(CCFLAGS=['-g2'])