scons: Disable -mstackrealign on MinGW again.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 10 Feb 2011 12:16:26 +0000 (12:16 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 10 Feb 2011 16:29:10 +0000 (16:29 +0000)
It's still broken, however it doesn't show up on debug builds.

scons/gallium.py

index c4144273a5598a9774e32bca52883224011d3db1..322b23b2b00f4637d2972537f32fc299d479fa4c 100644 (file)
@@ -349,12 +349,15 @@ def generate(env):
                 '-m32',
                 #'-march=pentium4',
             ]
-            if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.2'):
+            if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.2') \
+               and (platform != 'windows' or env['build'] == 'debug' or True):
                 # NOTE: We need to ensure stack is realigned given that we
                 # produce shared objects, and have no control over the stack
                 # alignment policy of the application. Therefore we need
                 # -mstackrealign ore -mincoming-stack-boundary=2.
                 #
+                # XXX: -O and -mstackrealign causes stack corruption on MinGW
+                #
                 # XXX: We could have SSE without -mstackrealign if we always used
                 # __attribute__((force_align_arg_pointer)), but that's not
                 # always the case.