Accepting request 86879 from X11:XOrg
- Update Mesa-llvm-3.0.patch again to fix compilation - Update Mesa-llvm-3.0.patch for new llvm snapshot OBS-URL: https://build.opensuse.org/request/show/86879 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/Mesa?expand=0&rev=135
This commit is contained in:
commit
5fe1d1613e
@ -1,15 +1,5 @@
|
|||||||
From 4a468de2d78fc5a9e6de40a9dae09669ec556fc5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tobias Droste <tdroste@gmx.de>
|
|
||||||
Date: Sun, 04 Sep 2011 01:14:23 +0000
|
|
||||||
Subject: gallivm: fix build with LLVM 3.0svn
|
|
||||||
|
|
||||||
LLVM 3.0svn moved TargetRegistry.h and TargetSelect.h.
|
|
||||||
See revision 138450 of LLVM.
|
|
||||||
|
|
||||||
Signed-off-by: Tobias Droste <tdroste@gmx.de>
|
|
||||||
---
|
|
||||||
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/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 e252607..401e0e2 100644
|
index 29dfb86..f44749d 100644
|
||||||
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
|
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
|
||||||
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
|
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
|
||||||
@@ -27,17 +27,23 @@
|
@@ -27,17 +27,23 @@
|
||||||
@ -40,49 +30,36 @@ index e252607..401e0e2 100644
|
|||||||
|
|
||||||
#if HAVE_LLVM >= 0x0207
|
#if HAVE_LLVM >= 0x0207
|
||||||
#include <llvm/MC/MCDisassembler.h>
|
#include <llvm/MC/MCDisassembler.h>
|
||||||
--
|
@@ -193,14 +199,23 @@ lp_disassemble(const void* func)
|
||||||
cgit v0.9.0.2-2-gbebe
|
|
||||||
From 973221968117c50b141b700350d2e83befff4fce Mon Sep 17 00:00:00 2001
|
|
||||||
From: ojab <ojab@ojab.ru>
|
|
||||||
Date: Sat, 10 Sep 2011 19:23:20 +0400
|
|
||||||
Subject: [PATCH] gallivm: fix build with LLVM 3.0svn
|
|
||||||
|
|
||||||
LLVM 3.0svn refactored instprinter and mcdisassembler to take a SubtargetInfo.
|
InitializeAllDisassemblers();
|
||||||
See revision 139237 of LLVM.
|
|
||||||
---
|
|
||||||
src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 14 +++++++++++++-
|
|
||||||
1 files changed, 13 insertions(+), 1 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
|
+#if HAVE_LLVM >= 0x0300
|
||||||
index 401e0e2..b8a97da 100644
|
+ OwningPtr<const MCAsmInfo> AsmInfo(T->createMCAsmInfo(Triple));
|
||||||
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
|
+#else
|
||||||
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
|
OwningPtr<const MCAsmInfo> AsmInfo(T->createAsmInfo(Triple));
|
||||||
@@ -210,11 +210,20 @@ lp_disassemble(const void* func)
|
+#endif
|
||||||
|
|
||||||
|
if (!AsmInfo) {
|
||||||
|
debug_printf("error: no assembly info for target %s\n", Triple.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
+#if HAVE_LLVM >= 0x0300
|
+#if HAVE_LLVM >= 0x0300
|
||||||
+ const MCSubtargetInfo *STI = T->createMCSubtargetInfo(Triple.c_str(), "", "");
|
+ const MCSubtargetInfo *STI = T->createMCSubtargetInfo(Triple, sys::getHostCPUName(), "");
|
||||||
+ if (!STI) {
|
|
||||||
+ debug_printf("error: no subtarget info for target %s\n", Triple.c_str());
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ OwningPtr<const MCDisassembler> DisAsm(T->createMCDisassembler(*STI));
|
+ OwningPtr<const MCDisassembler> DisAsm(T->createMCDisassembler(*STI));
|
||||||
+#else
|
+#else
|
||||||
OwningPtr<const MCDisassembler> DisAsm(T->createMCDisassembler());
|
OwningPtr<const MCDisassembler> DisAsm(T->createMCDisassembler());
|
||||||
|
+#endif
|
||||||
if (!DisAsm) {
|
if (!DisAsm) {
|
||||||
debug_printf("error: no disassembler for target %s\n", Triple.c_str());
|
debug_printf("error: no disassembler for target %s\n", Triple.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
@@ -213,7 +228,11 @@ lp_disassemble(const void* func)
|
||||||
+#endif
|
|
||||||
|
|
||||||
raw_debug_ostream Out;
|
|
||||||
|
|
||||||
@@ -223,7 +232,10 @@ lp_disassemble(const void* func)
|
|
||||||
#else
|
#else
|
||||||
int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
|
int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
|
||||||
#endif
|
#endif
|
||||||
-#if HAVE_LLVM >= 0x0208
|
-#if HAVE_LLVM >= 0x0208
|
||||||
|
+
|
||||||
+#if HAVE_LLVM >= 0x0300
|
+#if HAVE_LLVM >= 0x0300
|
||||||
+ OwningPtr<MCInstPrinter> Printer(
|
+ OwningPtr<MCInstPrinter> Printer(
|
||||||
+ T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI));
|
+ T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI));
|
||||||
@ -90,6 +67,39 @@ index 401e0e2..b8a97da 100644
|
|||||||
OwningPtr<MCInstPrinter> Printer(
|
OwningPtr<MCInstPrinter> Printer(
|
||||||
T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo));
|
T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo));
|
||||||
#else
|
#else
|
||||||
--
|
@@ -253,7 +272,11 @@ lp_disassemble(const void* func)
|
||||||
1.7.6
|
|
||||||
|
|
||||||
|
if (!DisAsm->getInstruction(Inst, Size, memoryObject,
|
||||||
|
pc,
|
||||||
|
- nulls())) {
|
||||||
|
+#if HAVE_LLVM >= 0x0300
|
||||||
|
+ nulls(), nulls())) {
|
||||||
|
+#else
|
||||||
|
+ nulls())) {
|
||||||
|
+#endif
|
||||||
|
debug_printf("invalid\n");
|
||||||
|
pc += 1;
|
||||||
|
}
|
||||||
|
@@ -276,7 +299,9 @@ lp_disassemble(const void* func)
|
||||||
|
* Print the instruction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
-#if HAVE_LLVM >= 0x208
|
||||||
|
+#if HAVE_LLVM >= 0x0300
|
||||||
|
+ Printer->printInst(&Inst, Out, "");
|
||||||
|
+#elif HAVE_LLVM >= 0x208
|
||||||
|
Printer->printInst(&Inst, Out);
|
||||||
|
#else
|
||||||
|
Printer->printInst(&Inst);
|
||||||
|
@@ -289,7 +314,11 @@
|
||||||
|
|
||||||
|
pc += Size;
|
||||||
|
|
||||||
|
+#if HAVE_LLVM >= 0x0300
|
||||||
|
+ const MCInstrDesc &TID = TII->get(Inst.getOpcode());
|
||||||
|
+#else
|
||||||
|
const TargetInstrDesc &TID = TII->get(Inst.getOpcode());
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keep track of forward jumps to a nearby address.
|
||||||
|
10
Mesa.changes
10
Mesa.changes
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 06 21:58:00 UTC 2011 - idonmez@suse.com
|
||||||
|
|
||||||
|
- Update Mesa-llvm-3.0.patch again to fix compilation
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 29 20:53:53 UTC 2011 - idonmez@suse.com
|
||||||
|
|
||||||
|
- Update Mesa-llvm-3.0.patch for new llvm snapshot
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Sep 15 06:15:04 UTC 2011 - idonmez@suse.com
|
Thu Sep 15 06:15:04 UTC 2011 - idonmez@suse.com
|
||||||
|
|
||||||
|
@ -1,34 +1,6 @@
|
|||||||
Makes Mesa work with LLVM3 (also pre-releases).
|
Makes Mesa work with LLVM3 (also pre-releases).
|
||||||
|
|
||||||
Included in Mesa in post-11.7
|
Included in Mesa in post-11.7
|
||||||
Index: src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
|
|
||||||
===================================================================
|
|
||||||
--- src/gallium/auxiliary/gallivm/lp_bld_debug.cpp.orig
|
|
||||||
+++ src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
|
|
||||||
@@ -193,7 +193,11 @@ lp_disassemble(const void* func)
|
|
||||||
|
|
||||||
InitializeAllDisassemblers();
|
|
||||||
|
|
||||||
+#if HAVE_LLVM >= 0x0300
|
|
||||||
+ OwningPtr<const MCAsmInfo> AsmInfo(T->createMCAsmInfo(Triple));
|
|
||||||
+#else
|
|
||||||
OwningPtr<const MCAsmInfo> AsmInfo(T->createAsmInfo(Triple));
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
if (!AsmInfo) {
|
|
||||||
debug_printf("error: no assembly info for target %s\n", Triple.c_str());
|
|
||||||
@@ -289,7 +293,11 @@ lp_disassemble(const void* func)
|
|
||||||
|
|
||||||
pc += Size;
|
|
||||||
|
|
||||||
+#if HAVE_LLVM >= 0x0300
|
|
||||||
+ const MCInstrDesc &TID = TII->get(Inst.getOpcode());
|
|
||||||
+#else
|
|
||||||
const TargetInstrDesc &TID = TII->get(Inst.getOpcode());
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Keep track of forward jumps to a nearby address.
|
|
||||||
Index: src/gallium/auxiliary/gallivm/lp_bld_type.c
|
Index: src/gallium/auxiliary/gallivm/lp_bld_type.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- src/gallium/auxiliary/gallivm/lp_bld_type.c.orig
|
--- src/gallium/auxiliary/gallivm/lp_bld_type.c.orig
|
||||||
|
Loading…
Reference in New Issue
Block a user