diff options
author | Vincent Grande | 2021-02-26 22:37:10 -0500 |
---|---|---|
committer | Vincent Grande | 2021-02-26 22:37:10 -0500 |
commit | df0b44ef37c49e317f91321d3871fafb78dd6e44 (patch) | |
tree | 961eec2290e1026d92c6e48c733da7ee8e89d48d | |
parent | 8aa3e4d9fe33d191ec40f3d046d2cc5949e0229d (diff) | |
download | aur-df0b44ef37c49e317f91321d3871fafb78dd6e44.tar.gz |
add patches
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | 0001-clover-llvm13-use-FixedVectorType.patch | 16 | ||||
-rw-r--r-- | 8543 clover Fix build with llvm-12.patch | 42 | ||||
-rw-r--r-- | PKGBUILD | 10 |
4 files changed, 71 insertions, 1 deletions
@@ -55,6 +55,10 @@ pkgbase = mesa-minimal+-git conflicts = mesa-vdpau source = mesa::git+https://gitlab.freedesktop.org/mesa/mesa.git source = LICENSE + source = 8543 clover Fix build with llvm-12.patch + source = 0001-clover-llvm13-use-FixedVectorType.patch + sha512sums = SKIP + sha512sums = SKIP sha512sums = SKIP sha512sums = SKIP diff --git a/0001-clover-llvm13-use-FixedVectorType.patch b/0001-clover-llvm13-use-FixedVectorType.patch new file mode 100644 index 000000000000..78c4dda78a81 --- /dev/null +++ b/0001-clover-llvm13-use-FixedVectorType.patch @@ -0,0 +1,16 @@ +diff --unified --recursive --text mesa.orig/src/gallium/frontends/clover/llvm/metadata.hpp mesa.new/src/gallium/frontends/clover/llvm/metadata.hpp +--- mesa.orig/src/gallium/frontends/clover/llvm/metadata.hpp 2021-02-14 13:15:16.994404651 +0100 ++++ mesa.new/src/gallium/frontends/clover/llvm/metadata.hpp 2021-02-14 13:19:11.096855317 +0100 +@@ -129,7 +129,11 @@ + break; + } + if (type->isVectorTy()) +- data += std::to_string(((::llvm::VectorType*)type)->getNumElements()); ++#if LLVM_VERSION_MAJOR >= 13 ++ data += std::to_string(((::llvm::FixedVectorType*)type)->getNumElements()); ++#else ++ data += std::to_string(((::llvm::VectorType*)type)->getNumElements()) ++#endif + + } else { + ::llvm::raw_string_ostream os { data }; diff --git a/8543 clover Fix build with llvm-12.patch b/8543 clover Fix build with llvm-12.patch new file mode 100644 index 000000000000..4c221d544461 --- /dev/null +++ b/8543 clover Fix build with llvm-12.patch @@ -0,0 +1,42 @@ +From 67b36d1e81dcdce97daa6eab4a6a7e60c6d3949a Mon Sep 17 00:00:00 2001 +From: Vinson Lee <vlee@freedesktop.org> +Date: Sat, 16 Jan 2021 22:55:41 -0800 +Subject: [PATCH] clover: Fix build with llvm-12. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fix build error after LLVM commit c495dfe0268b ("[clang][cli] NFC: +Decrease the scope of ParseLangArgs parameters"). + +../src/gallium/frontends/clover/llvm/invocation.cpp: In function ‘std::unique_ptr<clang::CompilerInstance> {anonymous}::create_compiler_instance(const clover::device&, const string&, const std::vector<std::__cxx11::basic_string<char> >&, std::string&)’: +../src/gallium/frontends/clover/llvm/invocation.cpp:252:55: error: cannot convert ‘clang::PreprocessorOptions’ to ‘std::vector<std::__cxx11::basic_string<char> >&’ + 252 | c->getPreprocessorOpts(), + | ~~~~~~~~~~~~~~~~~~~~~~^~ + | | + | clang::PreprocessorOptions + +Signed-off-by: Vinson Lee <vlee@freedesktop.org> +--- + src/gallium/frontends/clover/llvm/invocation.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/gallium/frontends/clover/llvm/invocation.cpp b/src/gallium/frontends/clover/llvm/invocation.cpp +index be0f3976b92..bcbec21cd1c 100644 +--- a/src/gallium/frontends/clover/llvm/invocation.cpp ++++ b/src/gallium/frontends/clover/llvm/invocation.cpp +@@ -249,7 +249,11 @@ namespace { + + c->getInvocation().setLangDefaults(c->getLangOpts(), + compat::ik_opencl, ::llvm::Triple(target.triple), ++#if LLVM_VERSION_MAJOR >= 12 ++ c->getPreprocessorOpts().Includes, ++#else + c->getPreprocessorOpts(), ++#endif + get_language_version(opts, device_clc_version)); + + c->createDiagnostics(new clang::TextDiagnosticPrinter( +-- +GitLab + @@ -30,8 +30,12 @@ conflicts=('mesa' 'opencl-mesa' 'vulkan-intel' 'vulkan-radeon' 'vulkan-mesa-laye url="https://www.mesa3d.org" license=('custom') source=('mesa::git+https://gitlab.freedesktop.org/mesa/mesa.git' - 'LICENSE') + 'LICENSE' + '8543 clover Fix build with llvm-12.patch' + '0001-clover-llvm13-use-FixedVectorType.patch') sha512sums=('SKIP' + 'SKIP' + 'SKIP' 'SKIP') # ninja grabs all available cores and leaves almost nothing for other processes. @@ -94,6 +98,10 @@ prepare() { if [ -d _build ]; then rm -rf _build fi + + cd mesa + patch --forward --strip=1 --input="${srcdir}/8543 clover: Fix build with llvm-12.patch" + patch --forward --strip=1 --input="${srcdir}/0001-clover-llvm13-use-FixedVectorType.patch" } build () { |