summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHal Incandenza2016-05-30 22:35:27 -0400
committerHal Incandenza2016-05-30 22:35:27 -0400
commit6ff23ab4bae5ec3c705cc0def7aea008570db617 (patch)
tree8d40a0a22994a7037954e4d7fc9e9ce750b93af6
parenta9edf35d32c7a43c2df914af9b2b6a5ffb4e9dd4 (diff)
downloadaur-6ff23ab4bae5ec3c705cc0def7aea008570db617.tar.gz
fix clang build
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--clangfix.patch63
3 files changed, 68 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cdb76024b3e8..1390aa8583f2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Tue May 31 02:28:18 UTC 2016
+# Tue May 31 02:35:05 UTC 2016
pkgbase = beignet
pkgdesc = A GPGPU System for Intel Ivybridge GPUs
pkgver = 1.1.2
- pkgrel = 3
+ pkgrel = 4
url = http://cgit.freedesktop.org/beignet/
arch = x86_64
license = LGPL2.1
diff --git a/PKGBUILD b/PKGBUILD
index 3942f7aaf459..41a83f0af7ad 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
# Current Maintainer: Leopold Bloom <blinxwang@gmail.com>
pkgname=beignet
pkgver=1.1.2
-pkgrel=3
+pkgrel=4
pkgdesc='A GPGPU System for Intel Ivybridge GPUs'
arch=('x86_64')
url='http://cgit.freedesktop.org/beignet/'
@@ -20,9 +20,11 @@ sha256sums=('6a8d875afbb5e3c4fc57da1ea80f79abadd9136bfd87ab1f83c02784659f1d96'
prepare() {
cp isnan.patch "$srcdir/Beignet-$pkgver-Source"
cp gcc6.patch "$srcdir/Beignet-$pkgver-Source"
+ cp clangfix.patch "$srcdir/Beignet-$pkgver-Source"
cd "$srcdir/Beignet-$pkgver-Source"
patch -Np1 -i isnan.patch
patch -Np1 -i gcc6.patch
+ patch -Np1 -i clangfix.patch
cd "include/CL"
rm {opencl.h,cl_platform.h,cl_gl_ext.h,cl.h,cl.hpp,cl_egl.h,cl_ext.h,cl_gl.h}
touch dummy.hpp
diff --git a/clangfix.patch b/clangfix.patch
new file mode 100644
index 000000000000..92fdcb9b7df2
--- /dev/null
+++ b/clangfix.patch
@@ -0,0 +1,63 @@
+From c7d3c107303f5b511087aa37d20811bbd3bb4565 Mon Sep 17 00:00:00 2001
+From: Pan Xiuli <xiuli.pan@intel.com>
+Date: Fri, 29 Apr 2016 14:32:04 +0800
+Subject: Backend: Fix bug build with clang
+
+When using clang template name can not be the same with class variable.
+This bug will cause the gen ir load/store switch and casue self test
+error.
+
+Signed-off-by: Pan Xiuli <xiuli.pan@intel.com>
+Reviewed-by: Yang Rong <rong.r.yang@intel.com>
+
+diff --git a/backend/src/llvm/llvm_gen_backend.cpp b/backend/src/llvm/llvm_gen_backend.cpp
+index 51a1dab..66293fc 100644
+--- a/backend/src/llvm/llvm_gen_backend.cpp
++++ b/backend/src/llvm/llvm_gen_backend.cpp
+@@ -443,7 +443,7 @@ namespace gbe
+ void emitBatchLoadOrStore(const ir::Type type, const uint32_t elemNum, Value *llvmValues, Type * elemType);
+ ir::Register getOffsetAddress(ir::Register basePtr, unsigned offset);
+ void shootMessage(ir::Type type, ir::Register offset, ir::Tuple value, unsigned elemNum);
+- template <bool isLoad, typename T>
++ template <bool IsLoad, typename T>
+ void emitLoadOrStore(T &I);
+ private:
+ ir::Context &ctx;
+@@ -642,7 +642,7 @@ namespace gbe
+ */
+ INLINE void simplifyTerminator(BasicBlock *bb);
+ /*! Helper function to emit loads and stores */
+- template <bool isLoad, typename T> void emitLoadOrStore(T &I);
++ template <bool IsLoad, typename T> void emitLoadOrStore(T &I);
+ /*! Will try to remove MOVs due to PHI resolution */
+ void removeMOVs(const ir::Liveness &liveness, ir::Function &fn);
+ /*! Optimize phi move based on liveness information */
+@@ -712,7 +712,7 @@ namespace gbe
+ void visitUnreachableInst(UnreachableInst &I) {NOT_SUPPORTED;}
+ void visitGetElementPtrInst(GetElementPtrInst &I) {NOT_SUPPORTED;}
+ void visitInsertValueInst(InsertValueInst &I) {NOT_SUPPORTED;}
+- template <bool isLoad, typename T> void visitLoadOrStore(T &I);
++ template <bool IsLoad, typename T> void visitLoadOrStore(T &I);
+
+ INLINE void gatherBTI(Value *pointer, ir::BTI &bti);
+ // batch vec4/8/16 load/store
+@@ -4863,7 +4863,7 @@ namespace gbe
+ }
+ }
+
+- template <bool isLoad, typename T>
++ template <bool IsLoad, typename T>
+ void MemoryInstHelper::emitLoadOrStore(T &I) {
+ Value *llvmPtr = I.getPointerOperand();
+ Value *llvmValues = getLoadOrStoreValue(I);
+@@ -4873,7 +4873,7 @@ namespace gbe
+ const ir::Register pointer = writer->getRegister(llvmPtr);
+ const ir::RegisterFamily pointerFamily = ctx.getPointerFamily();
+
+- this->isLoad = isLoad;
++ this->isLoad = IsLoad;
+ Type *scalarType = llvmType;
+ if (!isScalarType(llvmType)) {
+ VectorType *vectorType = cast<VectorType>(llvmType);
+--
+cgit v0.10.2