summaryrefslogtreecommitdiffstats
path: root/scons/gallium.py
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-09-02 13:44:29 +0100
committerJosé Fonseca <[email protected]>2010-09-05 10:17:51 +0100
commit30c5d5d9d866749f55730117011f18f3f217b6d5 (patch)
tree45aaa2f36e80ee7a35bee1efe5ee74faffb8887c /scons/gallium.py
parent6ed726b8fc6210a41fe325591e1428d19f419108 (diff)
scons: Re-enable SSE on MinGW.
It seems to be working correctly with gcc 4.4, and enabling it allows to test some of the llvmpipe instrinsics on Windows.
Diffstat (limited to 'scons/gallium.py')
-rw-r--r--scons/gallium.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/scons/gallium.py b/scons/gallium.py
index d9a5fe0eeaf..f5de4718eea 100644
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -271,24 +271,24 @@ def generate(env):
ccflags += [
'-m32',
#'-march=pentium4',
- #'-mfpmath=sse',
]
- if platform != 'windows':
- # XXX: -mstackrealign causes stack corruption on MinGW. Ditto
- # for -mincoming-stack-boundary=2. Still enable it on other
- # platforms for now, but we can't rely on it for cross platform
- # code. We have to use __attribute__((force_align_arg_pointer))
- # instead.
+ if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.2'):
+ # 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: We could have SSE without -mstackrealign if we always used
+ # __attribute__((force_align_arg_pointer)), but that's not
+ # always the case.
ccflags += [
+ '-mstackrealign', # ensure stack is aligned
'-mmmx', '-msse', '-msse2', # enable SIMD intrinsics
+ #'-mfpmath=sse',
]
if platform in ['windows', 'darwin']:
# Workaround http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216
ccflags += ['-fno-common']
- if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.2'):
- ccflags += [
- '-mstackrealign', # ensure stack is aligned
- ]
if env['machine'] == 'x86_64':
ccflags += ['-m64']
if platform == 'darwin':