Accepting request 356468 from home:namtrac:branches:devel:tools:compiler

- Add U_clover-Fix-build-against-LLVM-3.8.patch to fix build
  against llvm 3.8

OBS-URL: https://build.opensuse.org/request/show/356468
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=500
This commit is contained in:
Stefan Dirsch 2016-01-28 10:19:02 +00:00 committed by Git OBS Bridge
parent 420f67df52
commit 0c861e09e6
3 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jan 28 09:37:21 UTC 2016 - idonmez@suse.com
- Add U_clover-Fix-build-against-LLVM-3.8.patch to fix build
against llvm 3.8
-------------------------------------------------------------------
Wed Jan 20 16:40:10 UTC 2016 - eich@suse.com

View File

@ -68,6 +68,8 @@ Patch15: u_mesa-8.0-llvmpipe-shmget.patch
Patch17: u_st-va-hardlink-driver-instances-to-gallium_drv_video.patch
# never to be upstreamed
Patch18: n_VDPAU-XVMC-libs-Replace-hardlinks-with-copies.patch
# Already upstream
Patch19: U_clover-Fix-build-against-LLVM-3.8.patch
BuildRequires: autoconf >= 2.60
BuildRequires: automake
BuildRequires: bison
@ -560,6 +562,7 @@ rm -rf docs/README.{VMS,WIN32,OS2}
#%patch13 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%build
%if 0%{?suse_version} >= 1310

View File

@ -0,0 +1,16 @@
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index 3b37f08..4d11c24 100644
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -661,7 +661,11 @@ namespace {
if (dump_asm) {
LLVMSetTargetMachineAsmVerbosity(tm, true);
+#if HAVE_LLVM >= 0x0308
+ LLVMModuleRef debug_mod = wrap(llvm::CloneModule(mod).release());
+#else
LLVMModuleRef debug_mod = wrap(llvm::CloneModule(mod));
+#endif
emit_code(tm, debug_mod, LLVMAssemblyFile, &out_buffer, r_log);
buffer_size = LLVMGetBufferSize(out_buffer);
buffer_data = LLVMGetBufferStart(out_buffer);