28 lines
1.3 KiB
Diff
28 lines
1.3 KiB
Diff
|
diff --git a/scons/gallium.py b/scons/gallium.py
|
||
|
index 2fa80db..b99e753 100755
|
||
|
--- a/scons/gallium.py
|
||
|
+++ b/scons/gallium.py
|
||
|
@@ -327,7 +327,7 @@ def generate(env):
|
||
|
#'-march=pentium4',
|
||
|
]
|
||
|
if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.2') \
|
||
|
- and (platform != 'windows' or env['build'] == 'debug' or True):
|
||
|
+ and platform not in ['windows', 'haiku']:
|
||
|
# 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
|
||
|
@@ -343,6 +343,13 @@ def generate(env):
|
||
|
'-mmmx', '-msse', '-msse2', # enable SIMD intrinsics
|
||
|
#'-mfpmath=sse',
|
||
|
]
|
||
|
+ if platform in ['haiku']:
|
||
|
+ ccflags += [
|
||
|
+ '-mstackrealign', # ensure stack is aligned
|
||
|
+ '-march=i586', # Haiku target is Pentium
|
||
|
+ '-mtune=i686', # Use i686 where we can
|
||
|
+ '-mmmx', # Use mmx math where we can
|
||
|
+ ]
|
||
|
if platform in ['windows', 'darwin']:
|
||
|
# Workaround http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216
|
||
|
ccflags += ['-fno-common']
|