1 |
commit: 9aced71f9c7a94363b4fd52c72eaa8936a4ac596 |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 11 11:04:43 2021 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 11 11:04:43 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9aced71f |
7 |
|
8 |
dev-util/intel-graphics-compiler: switch to LLVM11 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/812536 |
11 |
Package-Manager: Portage-3.0.22, Repoman-3.0.3 |
12 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
13 |
|
14 |
.../intel-graphics-compiler-1.0.8517-r1.ebuild | 82 ++++++++++++++++++++++ |
15 |
1 file changed, 82 insertions(+) |
16 |
|
17 |
diff --git a/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.8517-r1.ebuild b/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.8517-r1.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..c9940c5bd13 |
20 |
--- /dev/null |
21 |
+++ b/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.8517-r1.ebuild |
22 |
@@ -0,0 +1,82 @@ |
23 |
+# Copyright 1999-2021 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=7 |
27 |
+ |
28 |
+CMAKE_BUILD_TYPE="Release" |
29 |
+LLVM_MAX_SLOT="11" |
30 |
+MY_PN="igc" |
31 |
+MY_P="${MY_PN}-${PV}" |
32 |
+PYTHON_COMPAT=( python3_{8..10} ) |
33 |
+ |
34 |
+inherit cmake flag-o-matic llvm python-any-r1 |
35 |
+ |
36 |
+DESCRIPTION="LLVM-based OpenCL compiler for OpenCL targetting Intel Gen graphics hardware" |
37 |
+HOMEPAGE="https://github.com/intel/intel-graphics-compiler" |
38 |
+SRC_URI="https://github.com/intel/${PN}/archive/${MY_P}.tar.gz -> ${P}.tar.gz" |
39 |
+S="${WORKDIR}/${PN}-${MY_P}" |
40 |
+ |
41 |
+LICENSE="MIT" |
42 |
+SLOT="0" |
43 |
+KEYWORDS="~amd64" |
44 |
+IUSE="debug" |
45 |
+ |
46 |
+DEPEND=" |
47 |
+ dev-libs/opencl-clang:${LLVM_MAX_SLOT}= |
48 |
+ sys-devel/llvm:${LLVM_MAX_SLOT}= |
49 |
+" |
50 |
+ |
51 |
+RDEPEND="${DEPEND}" |
52 |
+ |
53 |
+BDEPEND=" |
54 |
+ ${PYTHON_DEPS} |
55 |
+ >=sys-devel/lld-${LLVM_MAX_SLOT} |
56 |
+" |
57 |
+ |
58 |
+PATCHES=( |
59 |
+ "${FILESDIR}/${PN}-1.0.9-no_Werror.patch" |
60 |
+ "${FILESDIR}/${PN}-1.0.8173-opencl-clang_version.patch" |
61 |
+ "${FILESDIR}/${PN}-1.0.8173-fix-missing-limits.patch" |
62 |
+ "${FILESDIR}/${PN}-1.0.8365-disable-git.patch" |
63 |
+ "${FILESDIR}/${PN}-1.0.8365-cmake-project.patch" |
64 |
+ "${FILESDIR}/${PN}-1.0.8365-cmake-minimum-version.patch" |
65 |
+ "${FILESDIR}/${PN}-1.0.8517-fix-missing-limits.patch" |
66 |
+) |
67 |
+ |
68 |
+pkg_setup() { |
69 |
+ llvm_pkg_setup |
70 |
+ python-any-r1_pkg_setup |
71 |
+} |
72 |
+ |
73 |
+src_configure() { |
74 |
+ # Since late March 2020 cmake.eclass does not set -DNDEBUG any more, |
75 |
+ # and the way IGC uses this definition causes problems for some users. |
76 |
+ # See bug #718824 for more information. |
77 |
+ ! use debug && append-cppflags -DNDEBUG |
78 |
+ |
79 |
+ # Get LLVM version |
80 |
+ local llvm_version="$(best_version -d sys-devel/llvm:${LLVM_MAX_SLOT})" |
81 |
+ |
82 |
+ local mycmakeargs=( |
83 |
+ # Those options are ensuring, that we are using |
84 |
+ # the system LLVM with the correct slot. |
85 |
+ -DCCLANG_SONAME_VERSION="${LLVM_MAX_SLOT}" |
86 |
+ -DCMAKE_LIBRARY_PATH="$(get_llvm_prefix ${LLVM_MAX_SLOT})/$(get_libdir)" |
87 |
+ -DIGC_OPTION__ARCHITECTURE_TARGET="Linux64" |
88 |
+ -DIGC_OPTION__CLANG_MODE="Prebuilds" |
89 |
+ -DIGC_OPTION__LLD_MODE="Prebuilds" |
90 |
+ -DIGC_OPTION__LLDELF_H_DIR="${EPREFIX}/usr/include/lld/Common" |
91 |
+ -DIGC_OPTION__LLVM_MODE="Prebuilds" |
92 |
+ -DIGC_OPTION__LLVM_PREFERRED_VERSION="${llvm_version##*-}" |
93 |
+ |
94 |
+ # VectorCompiler needs work, as at the moment upstream |
95 |
+ # only supports building vc-intrinsics in place. |
96 |
+ -DIGC_BUILD__VC_ENABLED="NO" |
97 |
+ |
98 |
+ # This will suspress some CMake warnings, |
99 |
+ # which cannot be fixed at the moment. |
100 |
+ -Wno-dev |
101 |
+ ) |
102 |
+ |
103 |
+ cmake_src_configure |
104 |
+} |