scons: mingw is broken with -O1 and higher
authorKeith Whitwell <keithw@vmware.com>
Thu, 7 May 2009 07:00:42 +0000 (08:00 +0100)
committerKeith Whitwell <keithw@vmware.com>
Fri, 8 May 2009 13:57:30 +0000 (14:57 +0100)
scons/gallium.py
scons/generic.py

index 696ddd025ff5bf4c5f4b601e97a466ab0a8e526c..c7e74d7e599fa882514f3629cd21342e48d7b3b9 100644 (file)
@@ -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']:
index 03563e4c62021ff6bc9975754fc423fd6eabb544..29ddf76d6ff3e32134254472abde73c2fae9972a 100644 (file)
@@ -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']: