1 |
commit: 64d9c9ea8fa22a2160a4479c940bcc691f322d33 |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Aug 28 01:47:50 2021 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 28 01:56:58 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64d9c9ea |
7 |
|
8 |
dev-util/intel-graphics-compiler: update llvm handling |
9 |
|
10 |
The current llvm handling was broken and the wrong cmake variables were |
11 |
used to setup the toolchain, which has been now corrected. |
12 |
|
13 |
Package-Manager: Portage-3.0.22, Repoman-3.0.3 |
14 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
15 |
|
16 |
...s-compiler-1.0.8365-cmake-minimum-version.patch | 43 +++++++++++++ |
17 |
...-graphics-compiler-1.0.8365-cmake-project.patch | 27 +++++++++ |
18 |
...el-graphics-compiler-1.0.8365-disable-git.patch | 37 ++++++++++++ |
19 |
.../intel-graphics-compiler-1.0.8365-r1.ebuild | 70 ++++++++++++++++++++++ |
20 |
4 files changed, 177 insertions(+) |
21 |
|
22 |
diff --git a/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.8365-cmake-minimum-version.patch b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.8365-cmake-minimum-version.patch |
23 |
new file mode 100644 |
24 |
index 00000000000..dcf762872a1 |
25 |
--- /dev/null |
26 |
+++ b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.8365-cmake-minimum-version.patch |
27 |
@@ -0,0 +1,43 @@ |
28 |
+From 419ae48d0e2cb932a6618e9012b4164e93e58279 Mon Sep 17 00:00:00 2001 |
29 |
+From: Conrad Kostecki <conikost@g.o> |
30 |
+Date: Sat, 28 Aug 2021 00:16:23 +0200 |
31 |
+Subject: [PATCH] IGC: CMakeLists: adjust minimum_version |
32 |
+ |
33 |
+As CMake warns about possible compatibility problems, |
34 |
+the minimum version should be updated, as it should be compatible. |
35 |
+ |
36 |
+Otherwise, the warning is printed: |
37 |
+Compatibility with CMake < 2.8.12 will be removed from a future version of CMake. |
38 |
+ |
39 |
+Signed-off-by: Conrad Kostecki <conrad@××××××××.com> |
40 |
+--- |
41 |
+ visa/CMakeLists.txt | 2 +- |
42 |
+ visa/iga/GEDLibrary/GED_external/CMakeLists.txt | 2 +- |
43 |
+ 2 files changed, 2 insertions(+), 2 deletions(-) |
44 |
+ |
45 |
+diff --git a/visa/CMakeLists.txt b/visa/CMakeLists.txt |
46 |
+index c70d80d5726..3e54bd93079 100644 |
47 |
+--- a/visa/CMakeLists.txt |
48 |
++++ b/visa/CMakeLists.txt |
49 |
+@@ -68,7 +68,7 @@ if(WIN32) |
50 |
+ cmake_minimum_required(VERSION 3.1) |
51 |
+ cmake_policy(SET CMP0043 OLD) |
52 |
+ else() |
53 |
+- cmake_minimum_required(VERSION 2.8) |
54 |
++ cmake_minimum_required(VERSION 2.8.12) |
55 |
+ endif(WIN32) |
56 |
+ |
57 |
+ # In the case where this is the IGC build we need to add a dummy custom target check_headers |
58 |
+diff --git a/visa/iga/GEDLibrary/GED_external/CMakeLists.txt b/visa/iga/GEDLibrary/GED_external/CMakeLists.txt |
59 |
+index d3011ddae6a..e40313fc194 100644 |
60 |
+--- a/visa/iga/GEDLibrary/GED_external/CMakeLists.txt |
61 |
++++ b/visa/iga/GEDLibrary/GED_external/CMakeLists.txt |
62 |
+@@ -10,7 +10,7 @@ |
63 |
+ if(WIN32) |
64 |
+ cmake_minimum_required(VERSION 3.1) |
65 |
+ else() |
66 |
+- cmake_minimum_required(VERSION 2.8) |
67 |
++ cmake_minimum_required(VERSION 2.8.12) |
68 |
+ endif(WIN32) |
69 |
+ |
70 |
+ project(GEDLibrary) |
71 |
|
72 |
diff --git a/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.8365-cmake-project.patch b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.8365-cmake-project.patch |
73 |
new file mode 100644 |
74 |
index 00000000000..92683cdfb94 |
75 |
--- /dev/null |
76 |
+++ b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.8365-cmake-project.patch |
77 |
@@ -0,0 +1,27 @@ |
78 |
+From f883dc94360af37ce85c8a9215c861fdc0431dee Mon Sep 17 00:00:00 2001 |
79 |
+From: Conrad Kostecki <conikost@g.o> |
80 |
+Date: Sat, 28 Aug 2021 00:09:09 +0200 |
81 |
+Subject: [PATCH] IGC: CMakeLists: add project |
82 |
+ |
83 |
+If project is not added, CMake will warn about it: |
84 |
+No project() command is present. The top-level CMakeLists.txt file |
85 |
+must contain a literal, direct call to the project() command. |
86 |
+ |
87 |
+Signed-off-by: Conrad Kostecki <conrad@××××××××.com> |
88 |
+--- |
89 |
+ CMakeLists.txt | 2 ++ |
90 |
+ 1 file changed, 2 insertions(+) |
91 |
+ |
92 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
93 |
+index bfbcf52eca4..5b04555b21f 100644 |
94 |
+--- a/CMakeLists.txt |
95 |
++++ b/CMakeLists.txt |
96 |
+@@ -8,6 +8,8 @@ |
97 |
+ |
98 |
+ cmake_minimum_required(VERSION 3.13.4 FATAL_ERROR) |
99 |
+ |
100 |
++project(IGC) |
101 |
++ |
102 |
+ add_subdirectory(IGC) |
103 |
+ |
104 |
+ list(APPEND IGC__IGC_TARGETS "igc_dll") |
105 |
|
106 |
diff --git a/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.8365-disable-git.patch b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.8365-disable-git.patch |
107 |
new file mode 100644 |
108 |
index 00000000000..4a9a8988c5b |
109 |
--- /dev/null |
110 |
+++ b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.8365-disable-git.patch |
111 |
@@ -0,0 +1,37 @@ |
112 |
+From d0f801a178755504c2f8956841823b2aa6a124c4 Mon Sep 17 00:00:00 2001 |
113 |
+From: Conrad Kostecki <conikost@g.o> |
114 |
+Date: Sat, 28 Aug 2021 00:57:59 +0200 |
115 |
+Subject: [PATCH] IGC: CMakeLists: drop git |
116 |
+ |
117 |
+Dropping git, as we don't have any git release. |
118 |
+ |
119 |
+Signed-off-by: Conrad Kostecki <conrad@××××××××.com> |
120 |
+--- |
121 |
+ visa/iga/IGALibrary/CMakeLists.txt | 11 ----------- |
122 |
+ 1 file changed, 11 deletions(-) |
123 |
+ |
124 |
+diff --git a/visa/iga/IGALibrary/CMakeLists.txt b/visa/iga/IGALibrary/CMakeLists.txt |
125 |
+index 061476d94..2fd44807c 100644 |
126 |
+--- a/visa/iga/IGALibrary/CMakeLists.txt |
127 |
++++ b/visa/iga/IGALibrary/CMakeLists.txt |
128 |
+@@ -14,17 +14,6 @@ set(CMAKE_CXX_STANDARD 14) |
129 |
+ |
130 |
+ ############################################## |
131 |
+ # compute the version string from the git repo |
132 |
+-execute_process( |
133 |
+- COMMAND git rev-parse --short HEAD |
134 |
+- OUTPUT_VARIABLE GIT_COMMIT |
135 |
+- OUTPUT_STRIP_TRAILING_WHITESPACE |
136 |
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) |
137 |
+-# |
138 |
+-execute_process( |
139 |
+- COMMAND git diff-index --quiet HEAD -- |
140 |
+- RESULT_VARIABLE GIT_DIRTY |
141 |
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) |
142 |
+- |
143 |
+ set(IGA_VERSION_SUFFIX "") |
144 |
+ if(GIT_COMMIT) |
145 |
+ set(IGA_VERSION_DIRTY_TAG "") |
146 |
+-- |
147 |
+2.33.0 |
148 |
+ |
149 |
|
150 |
diff --git a/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.8365-r1.ebuild b/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.8365-r1.ebuild |
151 |
new file mode 100644 |
152 |
index 00000000000..c883ba1d6b6 |
153 |
--- /dev/null |
154 |
+++ b/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.8365-r1.ebuild |
155 |
@@ -0,0 +1,70 @@ |
156 |
+# Copyright 1999-2021 Gentoo Authors |
157 |
+# Distributed under the terms of the GNU General Public License v2 |
158 |
+ |
159 |
+EAPI=7 |
160 |
+ |
161 |
+CMAKE_BUILD_TYPE="Release" |
162 |
+LLVM_MAX_SLOT="10" |
163 |
+MY_PN="igc" |
164 |
+MY_P="${MY_PN}-${PV}" |
165 |
+ |
166 |
+inherit cmake flag-o-matic llvm |
167 |
+ |
168 |
+DESCRIPTION="LLVM-based OpenCL compiler for OpenCL targetting Intel Gen graphics hardware" |
169 |
+HOMEPAGE="https://github.com/intel/intel-graphics-compiler" |
170 |
+SRC_URI="https://github.com/intel/${PN}/archive/${MY_P}.tar.gz -> ${P}.tar.gz" |
171 |
+S="${WORKDIR}/${PN}-${MY_P}" |
172 |
+ |
173 |
+LICENSE="MIT" |
174 |
+SLOT="0" |
175 |
+KEYWORDS="~amd64" |
176 |
+IUSE="debug" |
177 |
+ |
178 |
+DEPEND=" |
179 |
+ dev-libs/opencl-clang:${LLVM_MAX_SLOT}= |
180 |
+ sys-devel/llvm:${LLVM_MAX_SLOT}= |
181 |
+" |
182 |
+ |
183 |
+RDEPEND="${DEPEND}" |
184 |
+ |
185 |
+BDEPEND=">=sys-devel/lld-${LLVM_MAX_SLOT}" |
186 |
+ |
187 |
+PATCHES=( |
188 |
+ "${FILESDIR}/${PN}-1.0.9-no_Werror.patch" |
189 |
+ "${FILESDIR}/${PN}-1.0.8173-opencl-clang_version.patch" |
190 |
+ "${FILESDIR}/${PN}-1.0.8173-fix-missing-limits.patch" |
191 |
+ "${FILESDIR}/${PN}-1.0.8365-disable-git.patch" |
192 |
+ "${FILESDIR}/${PN}-1.0.8365-cmake-project.patch" |
193 |
+ "${FILESDIR}/${PN}-1.0.8365-cmake-minimum-version.patch" |
194 |
+) |
195 |
+ |
196 |
+src_configure() { |
197 |
+ # Since late March 2020 cmake.eclass does not set -DNDEBUG any more, |
198 |
+ # and the way IGC uses this definition causes problems for some users. |
199 |
+ # See bug #718824 for more information. |
200 |
+ ! use debug && append-cppflags -DNDEBUG |
201 |
+ |
202 |
+ local mycmakeargs=( |
203 |
+ # Those options are ensuring, that we are using |
204 |
+ # the system LLVM with the correct slot. |
205 |
+ -DCCLANG_SONAME_VERSION="${LLVM_MAX_SLOT}" |
206 |
+ -DCMAKE_LIBRARY_PATH="$(get_llvm_prefix ${LLVM_MAX_SLOT})/$(get_libdir)" |
207 |
+ -DIGC_OPTION__ARCHITECTURE_TARGET="Linux64" |
208 |
+ -DIGC_OPTION__CLANG_MODE="Prebuilds" |
209 |
+ -DIGC_OPTION__LLD_MODE="Prebuilds" |
210 |
+ -DIGC_OPTION__LLVM_MODE="Prebuilds" |
211 |
+ -DIGC_OPTION__LLVM_PREFERRED_VERSION="${LLVM_MAX_SLOT}" |
212 |
+ -DIGC_OPTION__SPIRV_TRANSLATOR_MODE="Prebuilds" |
213 |
+ -DIGC_OPTION__USE_KHRONOS_SPIRV_TRANSLATOR_IN_VC="ON" |
214 |
+ |
215 |
+ # VectorCompiler needs work, as at the moment upstream |
216 |
+ # only supports building vc-intrinsics in place. |
217 |
+ -DIGC_BUILD__VC_ENABLED="NO" |
218 |
+ |
219 |
+ # This will suspress some CMake warnings, |
220 |
+ # which cannot be fixed at the moment. |
221 |
+ -Wno-dev |
222 |
+ ) |
223 |
+ |
224 |
+ cmake_src_configure |
225 |
+} |