Accepting request 115850 from home:rwooninck:Xorg-NoCK

Added upstream patches from Master to resolve build issues with llvm 3.1.

OBS-URL: https://build.opensuse.org/request/show/115850
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=211
This commit is contained in:
Factory Maintainer 2012-05-08 11:53:21 +00:00 committed by Git OBS Bridge
parent dc14ad2135
commit 9e10f503c6
3 changed files with 117 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Apr 25 14:14:35 UTC 2012 - tittiatcoke@gmail.com
- Added patches from upstream Master to enable building with
llvm 3.1
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Apr 25 13:17:59 UTC 2012 - sndirsch@suse.com Wed Apr 25 13:17:59 UTC 2012 - sndirsch@suse.com

View File

@ -86,6 +86,8 @@ Source6: %name-rpmlintrc
Patch1: Mesa-nodate.diff Patch1: Mesa-nodate.diff
# to be upstreamed # to be upstreamed
Patch11: u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch Patch11: u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch
# Patch from upstream master to resolve build issues with llvm 3.1
Patch12: upstream-llvm-patch.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
@ -393,6 +395,7 @@ packages.
# remove some docs # remove some docs
rm -rf docs/README.{VMS,WIN32,OS2} rm -rf docs/README.{VMS,WIN32,OS2}
#%patch11 -p1 #%patch11 -p1
%patch12 -p1
%build %build

108
upstream-llvm-patch.diff Normal file
View File

@ -0,0 +1,108 @@
From fe34006908f1ff99ada34d52c06fd80197e452ec Mon Sep 17 00:00:00 2001
From: Vinson Lee <vlee@freedesktop.org>
Date: Wed, 14 Mar 2012 05:40:52 +0000
Subject: gallivm: Fix createOProfileJITEventListener namespace with llvm-3.1.
llvm-3.1svn r152620 refactored the OProfile profiling code.
createOProfileJITEventListener was moved from the llvm namespace to the
llvm::JITEventListener namespace.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
---
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index fe7616b..68f8808 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -62,7 +62,11 @@
extern "C" void
lp_register_oprofile_jit_event_listener(LLVMExecutionEngineRef EE)
{
+#if HAVE_LLVM >= 0x0301
+ llvm::unwrap(EE)->RegisterJITEventListener(llvm::JITEventListener::createOProfileJITEventListener());
+#else
llvm::unwrap(EE)->RegisterJITEventListener(llvm::createOProfileJITEventListener());
+#endif
}
--
cgit v0.9.0.2-2-gbebe
From 1633dcd890d97bd5e4d125d57f2f529f04d14477 Mon Sep 17 00:00:00 2001
From: Vinson Lee <vlee@freedesktop.org>
Date: Tue, 06 Mar 2012 06:00:40 +0000
Subject: gallivm: Pass in a MCRegisterInfo to MCInstPrinter on llvm-3.1.
llvm-3.1svn r152043 changes createMCInstPrinter to take an additional
MCRegisterInfo argument.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
---
(limited to 'src/gallium/auxiliary/gallivm/lp_bld_debug.cpp')
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
index 11209da..b6849cb 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
@@ -235,7 +235,18 @@ lp_disassemble(const void* func)
int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
#endif
-#if HAVE_LLVM >= 0x0300
+#if HAVE_LLVM >= 0x0301
+ OwningPtr<const MCRegisterInfo> MRI(T->createMCRegInfo(Triple));
+ if (!MRI) {
+ debug_printf("error: no register info for target %s\n", Triple.c_str());
+ return;
+ }
+#endif
+
+#if HAVE_LLVM >= 0x0301
+ OwningPtr<MCInstPrinter> Printer(
+ T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MRI, *STI));
+#elif HAVE_LLVM == 0x0300
OwningPtr<MCInstPrinter> Printer(
T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI));
#elif HAVE_LLVM >= 0x0208
--
cgit v0.9.0.2-2-gbebe
From 4f513002f65c629576252b34efedf3c8c4531dfd Mon Sep 17 00:00:00 2001
From: Vinson Lee <vlee@freedesktop.org>
Date: Tue, 03 Apr 2012 05:14:15 +0000
Subject: gallivm: Pass in a MCInstrInfo to createMCInstPrinter on llvm-3.1.
llvm-3.1svn r153860 makes MCInstrInfo available to the MCInstPrinter.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
---
(limited to 'src/gallium/auxiliary/gallivm/lp_bld_debug.cpp')
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
index c5afff0..9cf2094 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
@@ -241,11 +241,17 @@ lp_disassemble(const void* func)
debug_printf("error: no register info for target %s\n", Triple.c_str());
return;
}
+
+ OwningPtr<const MCInstrInfo> MII(T->createMCInstrInfo());
+ if (!MII) {
+ debug_printf("error: no instruction info for target %s\n", Triple.c_str());
+ return;
+ }
#endif
#if HAVE_LLVM >= 0x0301
OwningPtr<MCInstPrinter> Printer(
- T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MRI, *STI));
+ T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MII, *MRI, *STI));
#elif HAVE_LLVM == 0x0300
OwningPtr<MCInstPrinter> Printer(
T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI));
--
cgit v0.9.0.2-2-gbebe