1 |
commit: d72bc570d77c3aae6ca74a509311be211000919b |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 7 10:56:14 2020 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 7 11:09:28 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d72bc570 |
7 |
|
8 |
dev-util/intel-graphics-compiler: bypass opencl-clang version check |
9 |
|
10 |
Ebuilds already make sure we have a new-enough version of |
11 |
dev-libs/opencl-clang present, besides we have never even had versions |
12 |
older than 5.0.0 in the tree. No opencl-clang version check in CMake - |
13 |
no need to call readelf - no more issues on USE=-native-symlinks |
14 |
systems. |
15 |
|
16 |
Closes: https://bugs.gentoo.org/739138 |
17 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
18 |
|
19 |
...cs-compiler-1.0.4111-opencl-clang_version.patch | 27 ++++++++++++++++++++++ |
20 |
.../intel-graphics-compiler-1.0.4111.ebuild | 2 ++ |
21 |
2 files changed, 29 insertions(+) |
22 |
|
23 |
diff --git a/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.4111-opencl-clang_version.patch b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.4111-opencl-clang_version.patch |
24 |
new file mode 100644 |
25 |
index 00000000000..8996466275c |
26 |
--- /dev/null |
27 |
+++ b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.4111-opencl-clang_version.patch |
28 |
@@ -0,0 +1,27 @@ |
29 |
+--- a/IGC/BiFModule/CMakeLists.txt |
30 |
++++ b/IGC/BiFModule/CMakeLists.txt |
31 |
+@@ -160,20 +160,10 @@ |
32 |
+ |
33 |
+ if(UNIX) |
34 |
+ if(NOT ${CCLANG_BUILD_INTREE_LLVM}) |
35 |
+- # Get common clang library soname |
36 |
+- get_target_property(CCLANG_LIB_PATH opencl-clang-lib "IMPORTED_LOCATION") |
37 |
+- execute_process( |
38 |
+- COMMAND readelf -d ${CCLANG_LIB_PATH} |
39 |
+- OUTPUT_VARIABLE CCLANG_READELF_CALL) |
40 |
+- string(REGEX MATCH "\\[${COMMON_CLANG_LIB_FULL_NAME}\\.([0-9](\\.[0-9]*)*[a-zA-Z0-9]*)\\]" CCLANG_SONAME_VERSION "${CCLANG_READELF_CALL}") |
41 |
+- set(CCLANG_SONAME_VERSION "${CMAKE_MATCH_1}") |
42 |
+- |
43 |
+- # Check if common clang library is newer than 5.0.0 version on which we have SPIR-V support |
44 |
+- if("${CCLANG_SONAME_VERSION}" VERSION_GREATER "5.0.0") |
45 |
+- set_property(TARGET opencl-clang-lib PROPERTY "IMPORTED_SONAME" "${COMMON_CLANG_LIB_FULL_NAME}.${CCLANG_SONAME_VERSION}") |
46 |
+- else() |
47 |
+- message(FATAL_ERROR "[IGC\\BiFModule] : Version ${CCLANG_SONAME_VERSION} of library ${COMMON_CLANG_LIB_FULL_NAME} is below version 5.0.0 (where it's starts support of SPIR-V), please upgrade this library at least to version 5.0.0") |
48 |
+- endif() |
49 |
++ # Workaround for https://bugs.gentoo.org/739138 : instead of checking |
50 |
++ # the version of opencl-clang, have ebuilds set CCLANG_SONAME_VERSION |
51 |
++ # for us. |
52 |
++ set_property(TARGET opencl-clang-lib PROPERTY "IMPORTED_SONAME" "${COMMON_CLANG_LIB_FULL_NAME}.${CCLANG_SONAME_VERSION}") |
53 |
+ endif() |
54 |
+ if (NOT CCLANG_FROM_SYSTEM) |
55 |
+ install(FILES $<TARGET_FILE:opencl-clang-lib> DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} COMPONENT igc-opencl) |
56 |
|
57 |
diff --git a/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.4111.ebuild b/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.4111.ebuild |
58 |
index 3bdf70d334d..b5113c4912d 100644 |
59 |
--- a/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.4111.ebuild |
60 |
+++ b/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.4111.ebuild |
61 |
@@ -27,6 +27,7 @@ RDEPEND="${COMMON}" |
62 |
|
63 |
PATCHES=( |
64 |
"${FILESDIR}"/${PN}-1.0.9-no_Werror.patch |
65 |
+ "${FILESDIR}"/${PN}-1.0.4111-opencl-clang_version.patch |
66 |
) |
67 |
|
68 |
S="${WORKDIR}"/${PN}-igc-${PV} |
69 |
@@ -45,6 +46,7 @@ multilib_src_configure() { |
70 |
use debug || append-cppflags -DNDEBUG |
71 |
|
72 |
local mycmakeargs=( |
73 |
+ -DCCLANG_SONAME_VERSION=${llvm_slot} |
74 |
-DCMAKE_LIBRARY_PATH=$(get_llvm_prefix ${llvm_slot})/$(get_libdir) |
75 |
-DIGC_OPTION__FORCE_SYSTEM_LLVM=ON |
76 |
-DIGC_PREFERRED_LLVM_VERSION=${llvm_slot} |