Mesa (master): scons: mingw is broken with -O1 and higher

Keith Whitwell keithw at kemper.freedesktop.org
Fri May 8 09:04:21 UTC 2009


Module: Mesa
Branch: master
Commit: 5f5181021e50e830bc4a88cfd3f5249ad962619b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5f5181021e50e830bc4a88cfd3f5249ad962619b

Author: Keith Whitwell <keithw at vmware.com>
Date:   Thu May  7 08:00:42 2009 +0100

scons: mingw is broken with -O1 and higher

---

 scons/gallium.py |    2 ++
 scons/generic.py |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/scons/gallium.py b/scons/gallium.py
index 696ddd0..c7e74d7 100644
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -317,6 +317,8 @@ def generate(env):
     if gcc:
         if debug:
             cflags += ['-O0', '-g3']
+        elif env['toolchain'] == 'crossmingw':
+            cflags += ['-O0', '-g3'] # mingw 4.2.1 optimizer is broken
         else:
             cflags += ['-O3', '-g3']
         if env['profile']:
diff --git a/scons/generic.py b/scons/generic.py
index 03563e4..29ddf76 100644
--- a/scons/generic.py
+++ b/scons/generic.py
@@ -398,6 +398,8 @@ def generate(env):
     if gcc:
         if debug:
             ccflags += ['-O0', '-g3']
+        elif env['toolchain'] == 'crossmingw':
+            ccflags += ['-O0', '-g3'] # mingw 4.2.1 optimizer is broken
         else:
             ccflags += ['-O3', '-g0']
         if env['profile']:




More information about the mesa-commit mailing list