<commit_before>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/sources.mak Mesa-9.0.1-haiku/src/mesa/sources.mak
--- Mesa-9.0.1/src/mesa/sources.mak	2012-11-09 12:16:31.037486592 -0600
+++ Mesa-9.0.1-haiku/src/mesa/sources.mak	2012-12-18 23:07:00.535560192 -0600
@@ -281,7 +281,6 @@
 	$(SRCDIR)x86/x86_xform.c \
 	$(SRCDIR)x86/3dnow.c \
 	$(SRCDIR)x86/sse.c \
-	$(SRCDIR)x86/rtasm/x86sse.c \
 	$(SRCDIR)sparc/sparc.c \
 	$(SRCDIR)x86-64/x86-64.c
 
diff -Naur Mesa-9.0.1/src/mesa/tnl/t_vertex_sse.c Mesa-9.0.1-haiku/src/mesa/tnl/t_vertex_sse.c
--- Mesa-9.0.1/src/mesa/tnl/t_vertex_sse.c	2012-08-31 18:33:41.058982400 -0500
+++ Mesa-9.0.1-haiku/src/mesa/tnl/t_vertex_sse.c	2012-12-18 23:07:00.538181632 -0600
@@ -36,7 +36,7 @@
 
 #if defined(USE_SSE_ASM)
 
-#include "x86/rtasm/x86sse.h"
+#include "rtasm/rtasm_x86sse.h"
 #include "x86/common_x86_asm.h"
 
 
@@ -356,7 +356,7 @@
    struct x86_reg vp0 = x86_make_reg(file_XMM, 1);
    struct x86_reg vp1 = x86_make_reg(file_XMM, 2);
    struct x86_reg temp2 = x86_make_reg(file_XMM, 3);
-   GLubyte *fixup, *label;
+   GLuint fixup, label;
 
    /* Push a few regs?
     */
@@ -658,7 +658,8 @@
    p.identity = x86_make_reg(file_XMM, 6);
    p.chan0 = x86_make_reg(file_XMM, 7);
 
-   if (!x86_init_func_size(&p.func, MAX_SSE_CODE_SIZE)) {
+   x86_init_func_size(&p.func, MAX_SSE_CODE_SIZE);
+   if (p.func.caps == 0) {
       vtx->emit = NULL;
       return;
    }
<commit_msg>Mesa 9.0.1: Changes to how our GL works<commit_after>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 11:37:28.289144832 -0600
@@ -331,6 +331,14 @@
     statetracker_sources
 )
 
+mesa_gallium_sources = (
+    main_sources +
+    math_sources +
+    vbo_sources +
+    program_sources,
+    'x86/common_x86.c'
+)
+
 GLAPI = '#src/mapi/glapi/'
 
 if env['gles']:
@@ -495,8 +503,15 @@
     source = mesa_sources,
 )
 
+mesagallium = env.ConvenienceLibrary(
+    target = 'mesagallium',
+    source = mesa_gallium_sources,
+)
+
 env.Alias('mesa', mesa)
+env.Alias('mesagallium', mesagallium)
 
 Export('mesa')
+Export('mesagallium')
 
 SConscript('drivers/SConscript')

{'fraction_non_alphanumeric': 0.19427811044577512, 'fraction_numerical': 0.14238190286094476, 'mean_word_length': 2.9423076923076925, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6068606', 'n_tokens_mistral': 2446, 'n_tokens_neox': 2061, 'n_words': 265}