From 84fc7f2641b650b209b152ab4c6f3d2b8d61ce0c Mon Sep 17 00:00:00 2001 From: Reza Jahanbakhshi Date: Thu, 21 Jan 2021 12:55:28 +0100 Subject: [PATCH] Applied patch required for building against llvm-git. clover: Fix build with llvm-12 --- 8543.patch | 42 ++++++++++++++++++++++++++++++++++++++++++ PKGBUILD | 14 ++++++++++---- 2 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 8543.patch diff --git a/8543.patch b/8543.patch new file mode 100644 index 0000000..4c221d5 --- /dev/null +++ b/8543.patch @@ -0,0 +1,42 @@ +From 67b36d1e81dcdce97daa6eab4a6a7e60c6d3949a Mon Sep 17 00:00:00 2001 +From: Vinson Lee +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 {anonymous}::create_compiler_instance(const clover::device&, const string&, const std::vector >&, std::string&)’: +../src/gallium/frontends/clover/llvm/invocation.cpp:252:55: error: cannot convert ‘clang::PreprocessorOptions’ to ‘std::vector >&’ + 252 | c->getPreprocessorOpts(), + | ~~~~~~~~~~~~~~~~~~~~~~^~ + | | + | clang::PreprocessorOptions + +Signed-off-by: Vinson Lee +--- + 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 + diff --git a/PKGBUILD b/PKGBUILD index c5004cd..d9f79d3 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,4 +1,5 @@ # Maintainer: Lone_Wolf +# Maintainer: Reza Jahanbakhshi # Contributor: Kristian Klausen # Contributor: Egon Ashrafinia @@ -11,7 +12,7 @@ pkgname=mesa-git pkgdesc="an open-source implementation of the OpenGL specification, git version" -pkgver=21.0.0_devel.133381.5331b1d9456 +pkgver=21.1.0_devel.133782.d74b0122600 pkgrel=1 arch=('x86_64') makedepends=('git' 'python-mako' 'xorgproto' @@ -25,11 +26,14 @@ 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.patch') md5sums=('SKIP' - '5c65a0fe315dd347e09b1f2826a1df5a') + '5c65a0fe315dd347e09b1f2826a1df5a' + 'febd615545826793ff84a016e59b516c') sha512sums=('SKIP' - '25da77914dded10c1f432ebcbf29941124138824ceecaf1367b3deedafaecabc082d463abcfa3d15abff59f177491472b505bcb5ba0c4a51bb6b93b4721a23c2') + '25da77914dded10c1f432ebcbf29941124138824ceecaf1367b3deedafaecabc082d463abcfa3d15abff59f177491472b505bcb5ba0c4a51bb6b93b4721a23c2' + '2e1b0773cee0511c5ca87a163fef5ce46e78d5a8ba99fa88eda73f5757ee00b103a072614c266fedd515d55bb5cb03c3f3b45f75869c6f0bde33c1f7f767984b') # NINJAFLAGS is an env var used to pass commandline options to ninja # NOTE: It's your responbility to validate the value of $NINJAFLAGS. If unsure, don't set it. @@ -94,6 +98,8 @@ prepare() { if [ -d _build ]; then rm -rf _build fi + cd "$srcdir/$_pkgbase/mesa" + patch --forward --strip=1 --input="${srcdir}/8543.patch" } build () {