diff -Naur Mesa-9.0.1/scons/gallium.py Mesa-9.0.1-haiku/scons/gallium.py --- Mesa-9.0.1/scons/gallium.py 2012-11-09 12:16:31.041680896 -0600 +++ Mesa-9.0.1-haiku/scons/gallium.py 2012-12-19 16:03:56.564658176 -0600 @@ -361,8 +361,7 @@ 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 + '-mtune=i686' # use i686 where we can ] if env['machine'] == 'x86_64': ccflags += ['-m64'] diff -Naur Mesa-9.0.1/scons/llvm.py Mesa-9.0.1-haiku/scons/llvm.py --- Mesa-9.0.1/scons/llvm.py 2012-08-31 18:33:41.041680896 -0500 +++ Mesa-9.0.1-haiku/scons/llvm.py 2012-12-18 23:05:50.677642240 -0600 @@ -183,6 +183,9 @@ if llvm_version >= distutils.version.LooseVersion('3.1'): components.append('mcjit') + if llvm_version >= distutils.version.LooseVersion('3.2'): + env.Append(CXXFLAGS = ('-fno-rtti',)) + env.ParseConfig('llvm-config --libs ' + ' '.join(components)) env.ParseConfig('llvm-config --ldflags') except OSError: diff -Naur Mesa-9.0.1/src/gallium/auxiliary/Makefile Mesa-9.0.1-haiku/src/gallium/auxiliary/Makefile --- Mesa-9.0.1/src/gallium/auxiliary/Makefile 2012-08-31 18:33:41.050331648 -0500 +++ Mesa-9.0.1-haiku/src/gallium/auxiliary/Makefile 2012-12-18 23:06:31.179306496 -0600 @@ -15,6 +15,10 @@ $(GALLIVM_CPP_SOURCES) endif +# LLVM >= 3.2 requires -fno-rtti +ifeq ($(shell expr `echo $(LLVM_VERSION) | sed -e 's/\([0-9]\)\.\([0-9]\)/\10\2/g'` \>= 302),1) +CXXFLAGS += -fno-rtti +endif include ../Makefile.template diff -Naur Mesa-9.0.1/src/mesa/SConscript Mesa-9.0.1-haiku/src/mesa/SConscript --- Mesa-9.0.1/src/mesa/SConscript 2012-11-09 12:16:31.015728640 -0600 +++ Mesa-9.0.1-haiku/src/mesa/SConscript 2012-12-19 16:32:37.285736960 -0600 @@ -371,7 +371,7 @@ # # Assembly sources # -if env['gcc'] and env['platform'] not in ('darwin', 'windows'): +if env['gcc'] and env['platform'] not in ('darwin', 'windows', 'haiku'): if env['machine'] == 'x86': env.Append(CPPDEFINES = [ 'USE_X86_ASM',