OSDN Git Service

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 09:04:13 +0000 (10:04 +0100)
scons/gallium.py
scons/generic.py

index 696ddd0..c7e74d7 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 03563e4..29ddf76 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']: