summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2022-05-02 16:14:39 +0200
committerJoonas Niilola <juippis@gentoo.org>2022-05-20 14:25:11 +0300
commit32003b5f8de209e47294f95b2c0557b04f099290 (patch)
tree61542c9faf0e7ede48c62ff6b87097af350a06e8 /media-libs/osl
parentdev-lang/ispc: Bump supported LLVM versions (diff)
downloadgentoo-32003b5f8de209e47294f95b2c0557b04f099290.tar.gz
gentoo-32003b5f8de209e47294f95b2c0557b04f099290.tar.bz2
gentoo-32003b5f8de209e47294f95b2c0557b04f099290.zip
media-libs/osl: Backport LLVM 14 patch to the stable release
Signed-off-by: Sebastian Parborg <darkdefende@gmail.com> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'media-libs/osl')
-rw-r--r--media-libs/osl/files/osl-1.11.17.0-llvm14.patch35
-rw-r--r--media-libs/osl/osl-1.11.17.0-r3.ebuild6
2 files changed, 40 insertions, 1 deletions
diff --git a/media-libs/osl/files/osl-1.11.17.0-llvm14.patch b/media-libs/osl/files/osl-1.11.17.0-llvm14.patch
new file mode 100644
index 000000000000..6a20ce31c589
--- /dev/null
+++ b/media-libs/osl/files/osl-1.11.17.0-llvm14.patch
@@ -0,0 +1,35 @@
+Backport of the following patch from git main to 1.11.17.0:
+
+From 8a8c2fd5e6c016eb2d22d2522bdeb9f165f319fa Mon Sep 17 00:00:00 2001
+From: Larry Gritz <lg@larrygritz.com>
+Date: Mon, 18 Apr 2022 11:45:34 -0700
+Subject: [PATCH 1/3] Support for LLVM 14
+
+API changes we had to take into account:
+* TargetRegistry.h location
+* No more DisableTailCalls field in PassManagerBuilder.
+
+Signed-off-by: Larry Gritz <lg@larrygritz.com>
+---
+ .github/workflows/ci.yml | 10 +++++-----
+ INSTALL.md | 2 +-
+ src/build-scripts/build_llvm.bash | 2 +-
+ src/liboslexec/llvm_util.cpp | 7 ++++++-
+ 4 files changed, 13 insertions(+), 8 deletions(-)
+
+diff --git a/src/liboslexec/llvm_util.cpp b/src/liboslexec/llvm_util.cpp
+index b30c89318..22d4134ba 100644
+--- a/src/liboslexec/llvm_util.cpp
++++ b/src/liboslexec/llvm_util.cpp
+@@ -45,7 +45,11 @@
+ #include <llvm/Support/raw_os_ostream.h>
+ #include <llvm/IR/LegacyPassManager.h>
+ #include <llvm/IR/ValueSymbolTable.h>
++#if OSL_LLVM_VERSION < 140
+ #include <llvm/Support/TargetRegistry.h>
++#else
++#include <llvm/MC/TargetRegistry.h>
++#endif
+
+ #include <llvm/Bitcode/BitcodeReader.h>
+ #include <llvm/Bitcode/BitcodeWriter.h>
diff --git a/media-libs/osl/osl-1.11.17.0-r3.ebuild b/media-libs/osl/osl-1.11.17.0-r3.ebuild
index 3f98563dd7a0..0a1926fb5a2d 100644
--- a/media-libs/osl/osl-1.11.17.0-r3.ebuild
+++ b/media-libs/osl/osl-1.11.17.0-r3.ebuild
@@ -6,7 +6,7 @@ EAPI=7
PYTHON_COMPAT=( python3_{8,9,10} )
# check this on updates
-LLVM_MAX_SLOT=13
+LLVM_MAX_SLOT=14
CMAKE_REMOVE_MODULES_LIST=()
@@ -64,6 +64,10 @@ RESTRICT="test"
S="${WORKDIR}/OpenShadingLanguage-Release-${PV}"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.11.17.0-llvm14.patch
+)
+
llvm_check_deps() {
has_version -r "sys-devel/clang:${LLVM_SLOT}"
}