diff options
author | Niccolò Belli <niccolo.belli@linuxsystems.it> | 2023-04-12 09:05:43 +0200 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2023-05-12 13:18:42 -0400 |
commit | 1423ea88c441acee76b8687096a862a697646df1 (patch) | |
tree | 3351e14dfe4e95d432d4e20f69fdf11422c9a090 /media-libs/mesa | |
parent | media-libs/mesa: use rusticl instead of clover (diff) | |
download | gentoo-1423ea88c441acee76b8687096a862a697646df1.tar.gz gentoo-1423ea88c441acee76b8687096a862a697646df1.tar.bz2 gentoo-1423ea88c441acee76b8687096a862a697646df1.zip |
media-libs/mesa: workaround hardcoded clang directory
Closes: https://github.com/gentoo/gentoo/pull/28209
Signed-off-by: Niccolò Belli <niccolo.belli@linuxsystems.it>
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'media-libs/mesa')
-rw-r--r-- | media-libs/mesa/files/clang_resource_dir.patch | 24 | ||||
-rw-r--r-- | media-libs/mesa/mesa-9999.ebuild | 5 |
2 files changed, 29 insertions, 0 deletions
diff --git a/media-libs/mesa/files/clang_resource_dir.patch b/media-libs/mesa/files/clang_resource_dir.patch new file mode 100644 index 000000000000..6e0c3c7cb745 --- /dev/null +++ b/media-libs/mesa/files/clang_resource_dir.patch @@ -0,0 +1,24 @@ +https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19232#note_1776640 +https://gitlab.freedesktop.org/mesa/mesa/-/issues/7717#note_1832122 + +diff --git a/src/compiler/clc/clc_helpers.cpp b/src/compiler/clc/clc_helpers.cpp +index 80bc84831e4..34d156bf227 100644 +--- a/src/compiler/clc/clc_helpers.cpp ++++ b/src/compiler/clc/clc_helpers.cpp +@@ -39,6 +39,7 @@ + #include <llvm-c/Target.h> + #include <LLVMSPIRVLib/LLVMSPIRVLib.h> + ++#include <clang/Config/config.h> + #include <clang/Driver/Driver.h> + #include <clang/CodeGen/CodeGenAction.h> + #include <clang/Lex/PreprocessorOptions.h> +@@ -866,7 +867,7 @@ clc_compile_to_llvm_module(LLVMContext &llvm_ctx, + // because we might have linked clang statically. + auto libclang_path = fs::path(LLVM_LIB_DIR) / "libclang.so"; + auto clang_res_path = +- fs::path(clang::driver::Driver::GetResourcesPath(libclang_path.string())) / "include"; ++ fs::path(clang::driver::Driver::GetResourcesPath(libclang_path.string(), CLANG_RESOURCE_DIR)) / "include"; + + c->getHeaderSearchOpts().UseBuiltinIncludes = true; + c->getHeaderSearchOpts().UseStandardSystemIncludes = true; diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild index ca386dd38126..80d191b25459 100644 --- a/media-libs/mesa/mesa-9999.ebuild +++ b/media-libs/mesa/mesa-9999.ebuild @@ -172,6 +172,11 @@ llvm_check_deps() { has_version "sys-devel/llvm:${LLVM_SLOT}[${LLVM_USE_DEPS}]" } +PATCHES=( + # Temporary rusticl workaround: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7717#note_1832122 + "${FILESDIR}/clang_resource_dir.patch" +) + pkg_pretend() { if use vulkan; then if ! use video_cards_d3d12 && |