[Mesa-dev] [PATCH] scons: Fix Haiku binary compatibility

Alexander von Gluck IV kallisti5 at unixzen.com
Thu Jun 7 17:21:36 CEST 2012


* Our binary compatibility is targeted to Pentimum or higher,
  these changes ensure we keep proper optimizations
* Fixes strange if statement
  '! windows or debug or True'
---
 scons/gallium.py |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/scons/gallium.py b/scons/gallium.py
index 2fa80db..f60c2d4 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
@@ -346,6 +346,13 @@ def generate(env):
             if platform in ['windows', 'darwin']:
                 # Workaround http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216
                 ccflags += ['-fno-common']
+            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 env['machine'] == 'x86_64':
             ccflags += ['-m64']
             if platform == 'darwin':
-- 
1.7.7.2



More information about the mesa-dev mailing list