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

Jose Fonseca jfonseca at vmware.com
Mon Jun 11 21:04:08 CEST 2012



----- Original Message -----
> From 44fa55d3f49884c824306504943ca2a1382601f0 Mon Sep 17 00:00:00
> 2001
> 
> * 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']:

This doesn't look correct. I don't remember the story of True here, but to avoid chaning windows behavior, it should be 

                  and platform != '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

Any reason not to set -msse and -msse2 ?

> +                ]
>          if env['machine'] == 'x86_64':
>              ccflags += ['-m64']
>              if platform == 'darwin':
> --
> 1.7.7.2
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list