Merged update from upstream sources
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/mesa.git#ab645f461051a6314e6143aa8a9d85379845718e
This commit is contained in:
parent
824bcf13de
commit
d1863d4286
118
mesa-llvm12.patch
Normal file
118
mesa-llvm12.patch
Normal file
@ -0,0 +1,118 @@
|
||||
From d1eab2b1eb1dec10197db7d25e27d97f6ca1a2ea Mon Sep 17 00:00:00 2001
|
||||
From: Karol Herbst <kherbst@redhat.com>
|
||||
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<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
|
||||
|
||||
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4114
|
||||
Signed-off-by: Karol Herbst <kherbst@redhat.com>
|
||||
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
|
||||
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8543>
|
||||
---
|
||||
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
|
||||
--- a/src/gallium/frontends/clover/llvm/compat.hpp
|
||||
+++ b/src/gallium/frontends/clover/llvm/compat.hpp
|
||||
@@ -38,14 +38,14 @@
|
||||
|
||||
#include <llvm/Config/llvm-config.h>
|
||||
|
||||
+#include <llvm/ADT/Triple.h>
|
||||
+#include <llvm/Analysis/TargetLibraryInfo.h>
|
||||
+#include <llvm/IR/LegacyPassManager.h>
|
||||
#include <llvm/IR/LLVMContext.h>
|
||||
#include <llvm/Linker/Linker.h>
|
||||
+#include <llvm/Target/TargetMachine.h>
|
||||
#include <llvm/Transforms/IPO.h>
|
||||
#include <llvm/Transforms/Utils/Cloning.h>
|
||||
-#include <llvm/Target/TargetMachine.h>
|
||||
-
|
||||
-#include <llvm/IR/LegacyPassManager.h>
|
||||
-#include <llvm/Analysis/TargetLibraryInfo.h>
|
||||
|
||||
#include <clang/Basic/TargetInfo.h>
|
||||
#include <clang/Frontend/CompilerInstance.h>
|
||||
@@ -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<clang::CompilerInstance> &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
|
||||
--- a/src/gallium/frontends/clover/llvm/invocation.cpp
|
||||
+++ b/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(
|
||||
--
|
||||
GitLab
|
||||
|
||||
From f0dccd957879ff642cfd921dda6e8b04dd35fec4 Mon Sep 17 00:00:00 2001
|
||||
From: Karol Herbst <kherbst@redhat.com>
|
||||
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 <kherbst@redhat.com>
|
||||
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
|
||||
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9372>
|
||||
---
|
||||
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
|
||||
--- a/src/gallium/frontends/clover/llvm/compat.hpp
|
||||
+++ b/src/gallium/frontends/clover/llvm/compat.hpp
|
||||
@@ -49,6 +49,7 @@
|
||||
|
||||
#include <clang/Basic/TargetInfo.h>
|
||||
#include <clang/Frontend/CompilerInstance.h>
|
||||
+#include <clang/Lex/PreprocessorOptions.h>
|
||||
|
||||
#if LLVM_VERSION_MAJOR >= 10
|
||||
#include <llvm/Support/CodeGen.h>
|
||||
--
|
||||
GitLab
|
||||
|
11
mesa.spec
11
mesa.spec
@ -50,7 +50,7 @@
|
||||
|
||||
Name: mesa
|
||||
Summary: Mesa graphics libraries
|
||||
%global ver 21.0.0
|
||||
%global ver 21.0.1
|
||||
Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)}
|
||||
Release: 1%{?dist}
|
||||
License: MIT
|
||||
@ -62,6 +62,9 @@ Source0: https://mesa.freedesktop.org/archive/%{name}-%{ver}.tar.xz
|
||||
# Fedora opts to ignore the optional part of clause 2 and treat that code as 2 clause BSD.
|
||||
Source1: Mesa-MLAA-License-Clarification-Email.txt
|
||||
|
||||
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/4442
|
||||
Patch0: mesa-llvm12.patch
|
||||
|
||||
BuildRequires: meson >= 0.45
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
@ -595,6 +598,12 @@ popd
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Mar 24 2021 Pete Walter <pwalter@fedoraproject.org> - 21.0.1-1
|
||||
- Update to 21.0.1
|
||||
|
||||
* Tue Mar 23 2021 Pete Walter <pwalter@fedoraproject.org> - 21.0.0-2
|
||||
- Rebuild for llvm 12
|
||||
|
||||
* Fri Mar 12 2021 Pete Walter <pwalter@fedoraproject.org> - 21.0.0-1
|
||||
- Update to 21.0.0
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (mesa-21.0.0.tar.xz) = 32f4a74fbc1456dac478fdc3a85e37cedb9ac1e1b7c5434706dc24930a70bc9e857ba6b5bf1e7e05798e259f8ff0b05bad5252c07253cb5d6a9707c7c2e147ad
|
||||
SHA512 (mesa-21.0.1.tar.xz) = b31b78778b6092dfaf0712f90de3074217574389c4236f8379c127739874f6bd1b47883140a26445d25e58df87e6207278efd048453096ee710d334b1dcfe419
|
||||
|
Loading…
Reference in New Issue
Block a user