OSDN Git Service

scons: Pass -mstackrealign option to gcc.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 9 Sep 2009 20:45:08 +0000 (21:45 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 9 Sep 2009 20:48:50 +0000 (21:48 +0100)
It is impossible to have gcc generate SSE code without it, as thirdparty
applications often call us with an unaligned stack pointer.

scons/gallium.py

index bf6172b..47b0774 100644 (file)
@@ -340,6 +340,7 @@ def generate(env):
                 '-m32',
                 #'-march=pentium4',
                 '-mmmx', '-msse', '-msse2', # enable SIMD intrinsics
+                '-mstackrealign', # ensure stack is aligned -- do not enabled -msse without it!
                 #'-mfpmath=sse',
             ]
         if env['machine'] == 'x86_64':