summaryrefslogtreecommitdiffstats
path: root/patches/media-libs/osl/8682211d0bfe5c4be63a4a003d06037ff9721e66.patch
blob: 34adf4c95503c4dce84d0b143f52a398f2d47e1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From 8682211d0bfe5c4be63a4a003d06037ff9721e66 Mon Sep 17 00:00:00 2001
From: Luya Tshimbalanga <luya@fedoraproject.org>
Date: Tue, 28 Sep 2021 10:08:01 -0700
Subject: [PATCH] Fix compatibility with LLVM 12 and up (#1412)

Upstream LLVM stopped using the compatibility
spellings of OF_{None,Text,Append} from version 12 and up.

https://reviews.llvm.org/D101650

Signed-off-by: Luya Tshimbalanga <luya@fedoraproject.org>
---
 src/liboslexec/llvm_util.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/liboslexec/llvm_util.cpp b/src/liboslexec/llvm_util.cpp
index 4bd0dca35..4d0e1752d 100644
--- a/src/liboslexec/llvm_util.cpp
+++ b/src/liboslexec/llvm_util.cpp
@@ -1407,7 +1407,9 @@ LLVM_Util::make_jit_execengine (std::string *err,
 
     options.NoZerosInBSS = false;
     options.GuaranteedTailCallOpt = false;
+#if OSL_LLVM_VERSION < 120
     options.StackAlignmentOverride = 0;
+#endif
     options.FunctionSections = true;
     options.UseInitArray = false;
     options.FloatABIType = llvm::FloatABI::Default;
@@ -5385,7 +5387,7 @@ void
 LLVM_Util::write_bitcode_file (const char *filename, std::string *err)
 {
     std::error_code local_error;
-    llvm::raw_fd_ostream out (filename, local_error, llvm::sys::fs::F_None);
+    llvm::raw_fd_ostream out (filename, local_error, llvm::sys::fs::OF_None);
     if (! out.has_error()) {
         llvm::WriteBitcodeToFile (*module(), out);
         if (err && local_error)
@@ -5447,7 +5449,9 @@ LLVM_Util::ptx_compile_group (llvm::Module* lib_module, const std::string& name,
     options.AllowFPOpFusion                        = llvm::FPOpFusion::Fast;
     options.NoZerosInBSS                           = 0;
     options.GuaranteedTailCallOpt                  = 0;
+#if OSL_LLVM_VERSION < 120
     options.StackAlignmentOverride                 = 0;
+#endif
     options.UseInitArray                           = 0;
 
     llvm::TargetMachine* target_machine = llvm_target->createTargetMachine(