From 0838a7ed482f29ddf71cf05e7ec6cf7c2728ce34 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 18 Jun 2012 00:01:40 +0000 Subject: Mon Jun 18 00:01:40 UTC 2012 --- .../mesa-8.0.3-llvm-3.1-fixes.patch | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 multilib/lib32-nouveau-dri/mesa-8.0.3-llvm-3.1-fixes.patch (limited to 'multilib/lib32-nouveau-dri/mesa-8.0.3-llvm-3.1-fixes.patch') diff --git a/multilib/lib32-nouveau-dri/mesa-8.0.3-llvm-3.1-fixes.patch b/multilib/lib32-nouveau-dri/mesa-8.0.3-llvm-3.1-fixes.patch new file mode 100644 index 000000000..a567b5926 --- /dev/null +++ b/multilib/lib32-nouveau-dri/mesa-8.0.3-llvm-3.1-fixes.patch @@ -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 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 + } + + -- cgit v1.2.3-54-g00ecf