X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage4%2Fpatches%2Fcommon%2FMesaLib-8.0.4-llvm-3.1-fixes-1.patch;fp=stage4%2Fpatches%2Fcommon%2FMesaLib-8.0.4-llvm-3.1-fixes-1.patch;h=e906f6016bbcfd1c4b13cbfc113b2234ce1f5ea8;hb=f17ab848cb756cad27489bf0c2746e5ead466658;hp=0000000000000000000000000000000000000000;hpb=a1358efe562a4e73ef23f25c606a346f684e1c93;p=hvlinux.git diff --git a/stage4/patches/common/MesaLib-8.0.4-llvm-3.1-fixes-1.patch b/stage4/patches/common/MesaLib-8.0.4-llvm-3.1-fixes-1.patch new file mode 100644 index 0000000..e906f60 --- /dev/null +++ b/stage4/patches/common/MesaLib-8.0.4-llvm-3.1-fixes-1.patch @@ -0,0 +1,51 @@ +Submitted By: Bruce Dubbs (bdubbs_AT_linuxfromscratch_DOT_org) +Date: 2012-06-04 +Initial Package Version: 8.0.1 +Origin: https://projects.archlinux.org/svntogit/packages.git/plain/trunk/mesa-8.0.3-llvm-3.1-fixes.patch?h=packages/mesa +Upstream Status: Not applicable +Description: Needed to build with LLVM 3.1 + +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 MRI(T->createMCRegInfo(Triple)); ++ if (!MRI) { ++ debug_printf("error: no register info for target %s\n", Triple.c_str()); ++ return; ++ } ++ ++ OwningPtr 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 Printer( ++ T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MII, *MRI, *STI)); ++#elif HAVE_LLVM == 0x0300 + OwningPtr 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 + }