summaryrefslogtreecommitdiff
path: root/media-libs/mesa
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-10-24 08:30:58 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-10-24 08:30:58 +0300
commit08a6a8060d5ac2fae4c465e5f7f0204f004e1d38 (patch)
treea1b82d57bb7051fb62e3d13c8ae8814f2ff63ecf /media-libs/mesa
parentadab67861f1c442920817e4c57291f3a87d769dc (diff)
mesa: build fix with llvm6+ and gcc7+
Diffstat (limited to 'media-libs/mesa')
-rw-r--r--media-libs/mesa/files/clover-Fix-compiling-with-LLVM-r315871.patch29
-rw-r--r--media-libs/mesa/mesa-scm.ebuild6
2 files changed, 34 insertions, 1 deletions
diff --git a/media-libs/mesa/files/clover-Fix-compiling-with-LLVM-r315871.patch b/media-libs/mesa/files/clover-Fix-compiling-with-LLVM-r315871.patch
new file mode 100644
index 0000000..9ccfafb
--- /dev/null
+++ b/media-libs/mesa/files/clover-Fix-compiling-with-LLVM-r315871.patch
@@ -0,0 +1,29 @@
+diff --git a/src/gallium/state_trackers/clover/llvm/codegen/common.cpp b/src/gallium/state_trackers/clover/llvm/codegen/common.cpp
+index 075183400a..8bb9e0e47a 100644
+--- a/src/gallium/state_trackers/clover/llvm/codegen/common.cpp
++++ b/src/gallium/state_trackers/clover/llvm/codegen/common.cpp
+@@ -128,8 +128,9 @@ namespace {
+ const unsigned address_space =
+ cast< ::llvm::PointerType>(actual_type)->getAddressSpace();
+
+- if (address_space == address_spaces[clang::LangAS::opencl_local
+- - compat::lang_as_offset]) {
++ if (address_space == address_spaces[
++ static_cast<unsigned>(clang::LangAS::opencl_local) -
++ static_cast<unsigned>(compat::lang_as_offset)]) {
+ args.emplace_back(module::argument::local, arg_api_size,
+ target_size, target_align,
+ module::argument::zero_ext);
+diff --git a/src/gallium/state_trackers/clover/llvm/compat.hpp b/src/gallium/state_trackers/clover/llvm/compat.hpp
+index f8b56516d5..ef173ea56f 100644
+--- a/src/gallium/state_trackers/clover/llvm/compat.hpp
++++ b/src/gallium/state_trackers/clover/llvm/compat.hpp
+@@ -70,7 +70,7 @@ namespace clover {
+ #endif
+
+ #if HAVE_LLVM >= 0x0500
+- const auto lang_as_offset = 0;
++ const auto lang_as_offset = clang::LangAS::Default;
+ const clang::InputKind ik_opencl = clang::InputKind::OpenCL;
+ #else
+ const auto lang_as_offset = clang::LangAS::Offset;
diff --git a/media-libs/mesa/mesa-scm.ebuild b/media-libs/mesa/mesa-scm.ebuild
index 62ed12c..ed1f676 100644
--- a/media-libs/mesa/mesa-scm.ebuild
+++ b/media-libs/mesa/mesa-scm.ebuild
@@ -195,8 +195,12 @@ src_unpack() {
git-r3_src_unpack
}
-src_prepare() {
+PATCHES=(
+ "$FILESDIR/clover-Fix-compiling-with-LLVM-r315871.patch"
+)
+src_prepare() {
+ default
eautoreconf
}