diff --git a/srcpkgs/mesa/patches/d1eab2b1eb1dec10197db7d25e27d97f6ca1a2ea.patch b/srcpkgs/mesa/patches/d1eab2b1eb1dec10197db7d25e27d97f6ca1a2ea.patch new file mode 100644 index 00000000000..0b1e5fdc043 --- /dev/null +++ b/srcpkgs/mesa/patches/d1eab2b1eb1dec10197db7d25e27d97f6ca1a2ea.patch @@ -0,0 +1,87 @@ +From d1eab2b1eb1dec10197db7d25e27d97f6ca1a2ea Mon Sep 17 00:00:00 2001 +From: Karol Herbst +Date: Wed, 24 Feb 2021 12:44:41 +0100 +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 + +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4114 +Signed-off-by: Karol Herbst +Reviewed-by: Francisco Jerez +Part-of: +--- + src/gallium/frontends/clover/llvm/compat.hpp | 22 +++++++++++++++---- + .../frontends/clover/llvm/invocation.cpp | 5 ++--- + 2 files changed, 20 insertions(+), 7 deletions(-) + +diff --git a/src/gallium/frontends/clover/llvm/compat.hpp b/src/gallium/frontends/clover/llvm/compat.hpp +index 78eb8c982a8..d537819f292 100644 +--- src/gallium/frontends/clover/llvm/compat.hpp ++++ src/gallium/frontends/clover/llvm/compat.hpp +@@ -38,14 +38,14 @@ + + #include + ++#include ++#include ++#include + #include + #include ++#include + #include + #include +-#include +- +-#include +-#include + + #include + #include +@@ -88,6 +88,20 @@ namespace clover { + cinv, copts.data(), copts.data() + copts.size(), diag); + #endif + } ++ ++ static inline void ++ compiler_set_lang_defaults(std::unique_ptr &c, ++ clang::InputKind ik, const ::llvm::Triple& triple, ++ clang::LangStandard::Kind d) ++ { ++ c->getInvocation().setLangDefaults(c->getLangOpts(), ik, triple, ++#if LLVM_VERSION_MAJOR >= 12 ++ c->getPreprocessorOpts().Includes, ++#else ++ c->getPreprocessorOpts(), ++#endif ++ d); ++ } + } + } + } +diff --git a/src/gallium/frontends/clover/llvm/invocation.cpp b/src/gallium/frontends/clover/llvm/invocation.cpp +index 536e952b100..30592e4343b 100644 +--- src/gallium/frontends/clover/llvm/invocation.cpp ++++ src/gallium/frontends/clover/llvm/invocation.cpp +@@ -247,9 +247,8 @@ namespace { + // http://www.llvm.org/bugs/show_bug.cgi?id=19735 + c->getDiagnosticOpts().ShowCarets = false; + +- c->getInvocation().setLangDefaults(c->getLangOpts(), +- compat::ik_opencl, ::llvm::Triple(target.triple), +- c->getPreprocessorOpts(), ++ compat::compiler_set_lang_defaults(c, compat::ik_opencl, ++ ::llvm::Triple(target.triple), + get_language_version(opts, device_clc_version)); + + c->createDiagnostics(new clang::TextDiagnosticPrinter( diff --git a/srcpkgs/mesa/patches/f0dccd957879ff642cfd921dda6e8b04dd35fec4.patch b/srcpkgs/mesa/patches/f0dccd957879ff642cfd921dda6e8b04dd35fec4.patch new file mode 100644 index 00000000000..84b0f9e018c --- /dev/null +++ b/srcpkgs/mesa/patches/f0dccd957879ff642cfd921dda6e8b04dd35fec4.patch @@ -0,0 +1,25 @@ +From f0dccd957879ff642cfd921dda6e8b04dd35fec4 Mon Sep 17 00:00:00 2001 +From: Karol Herbst +Date: Tue, 2 Mar 2021 20:09:39 +0100 +Subject: [PATCH] clover: Add missing include for llvm-12 build fix + +Fixes: d1eab2b1eb1 ("clover: Fix build with llvm-12.") +Signed-off-by: Karol Herbst +Reviewed-by: Francisco Jerez +Part-of: +--- + src/gallium/frontends/clover/llvm/compat.hpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/gallium/frontends/clover/llvm/compat.hpp b/src/gallium/frontends/clover/llvm/compat.hpp +index d537819f292..380d16a8346 100644 +--- src/gallium/frontends/clover/llvm/compat.hpp ++++ src/gallium/frontends/clover/llvm/compat.hpp +@@ -49,6 +49,7 @@ + + #include + #include ++#include + + #if LLVM_VERSION_MAJOR >= 10 + #include diff --git a/srcpkgs/mesa/template b/srcpkgs/mesa/template index 267419298ba..45da25b78dd 100644 --- a/srcpkgs/mesa/template +++ b/srcpkgs/mesa/template @@ -1,7 +1,7 @@ # Template file for 'mesa' pkgname=mesa version=21.0.3 -revision=2 +revision=3 wrksrc="mesa-${version}" build_style=meson configure_args="-Dglvnd=true -Dshared-glapi=enabled -Dgbm=enabled -Degl=enabled