[arch-commits] Commit in mesa/trunk (PKGBUILD mesa-8.0.3-llvm-3.1-fixes.patch)
Evangelos Foutras
foutrelis at archlinux.org
Tue May 22 16:52:06 UTC 2012
Date: Tuesday, May 22, 2012 @ 12:52:06
Author: foutrelis
Revision: 159360
Fix build with LLVM 3.1.
Added:
mesa/trunk/mesa-8.0.3-llvm-3.1-fixes.patch
Modified:
mesa/trunk/PKGBUILD
---------------------------------+
PKGBUILD | 6 ++++
mesa-8.0.3-llvm-3.1-fixes.patch | 46 ++++++++++++++++++++++++++++++++++++++
2 files changed, 51 insertions(+), 1 deletion(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2012-05-22 14:33:28 UTC (rev 159359)
+++ PKGBUILD 2012-05-22 16:52:06 UTC (rev 159360)
@@ -21,7 +21,8 @@
'gcc-libs>=4.6.1' 'dri2proto>=2.6' 'python2' 'libxml2' 'imake' 'llvm' 'udev')
url="http://mesa3d.sourceforge.net"
license=('custom')
-source=(LICENSE)
+source=(LICENSE
+ mesa-8.0.3-llvm-3.1-fixes.patch)
if [ "${_git}" = "true" ]; then
# mesa git shot from 7.11 branch - see for state: http://cgit.freedesktop.org/mesa/mesa/commit/?h=7.11&id=1ae00c5960af83bea9545a18a1754bad83d5cbd0
#source=(${source[@]} 'ftp://ftp.archlinux.org/other/mesa/mesa-1ae00c5960af83bea9545a18a1754bad83d5cbd0.tar.bz2')
@@ -33,11 +34,14 @@
)
fi
md5sums=('5c65a0fe315dd347e09b1f2826a1df5a'
+ 'c452ed3392468170726c004c2f4e02ca'
'cc5ee15e306b8c15da6a478923797171')
build() {
cd ${srcdir}/?esa-*
+ patch -Np1 -i "${srcdir}/mesa-8.0.3-llvm-3.1-fixes.patch"
+
if [ "${_git}" = "true" ]; then
autoreconf -vfi
./autogen.sh --prefix=/usr \
Added: mesa-8.0.3-llvm-3.1-fixes.patch
===================================================================
--- mesa-8.0.3-llvm-3.1-fixes.patch (rev 0)
+++ mesa-8.0.3-llvm-3.1-fixes.patch 2012-05-22 16:52:06 UTC (rev 159360)
@@ -0,0 +1,46 @@
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+index a50a51d..f1bb4d9 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
++++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+@@ -235,7 +235,24 @@ 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;
++ }
++
++ 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, *MII, *MRI, *STI));
++#elif HAVE_LLVM == 0x0300
+ OwningPtr<MCInstPrinter> Printer(
+ T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI));
+ #elif HAVE_LLVM >= 0x0208
+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
+ }
+
+
More information about the arch-commits
mailing list