summaryrefslogtreecommitdiff
path: root/dev-util/intel-graphics-compiler
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-09-23 10:22:15 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-09-23 10:22:15 +0100
commit8b4ace9c50842c5b83401ea7b179dcab940387e1 (patch)
tree230f3135ceaace633cf93e9838b185c4a6664c2e /dev-util/intel-graphics-compiler
parent9ee6d97c2883d42f204a533a8bc1f4562df778fb (diff)
gentoo resync : 23.09.2020
Diffstat (limited to 'dev-util/intel-graphics-compiler')
-rw-r--r--dev-util/intel-graphics-compiler/Manifest4
-rw-r--r--dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.4111.ebuild12
-rw-r--r--dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.4944.ebuild72
3 files changed, 84 insertions, 4 deletions
diff --git a/dev-util/intel-graphics-compiler/Manifest b/dev-util/intel-graphics-compiler/Manifest
index 71a4b9d1054b..2a621c9b9340 100644
--- a/dev-util/intel-graphics-compiler/Manifest
+++ b/dev-util/intel-graphics-compiler/Manifest
@@ -1,5 +1,7 @@
AUX intel-graphics-compiler-1.0.4111-opencl-clang_version.patch 1567 BLAKE2B cef900deb559e251e7fce91b8b8558e5eff846d5bab0153edb6d01ee29bdd0fd4c8dfcf3f3d732a23c357eebb119a4b833205f6e8526ef612069cec165395bf6 SHA512 984a3f26bd16d2d2db0608338f498ebefbbadb6b75552d3c3eaa0fea3456bf52e5ed0c57bedbd144e1d72bf6dea132fb21fe0d8cbca008ddd6b5456352143942
AUX intel-graphics-compiler-1.0.9-no_Werror.patch 272 BLAKE2B 079fe334413dfddb7681940f2a8920a365e8e72526cfc09ea1c7d218e8b19468f80ea9a215be125b441ee5238d7856b8dec02ebfc4bfd76b1850aa9917da35ef SHA512 d3d27943e84e228b480172b4fe91ba9aed8bb1c98700eb8c8beebafb7f1cc6265279031f56181e67eff74f55e1bbc8ee24bdc4d14fc1200c5aff670ef019410d
DIST intel-graphics-compiler-1.0.4111.tar.gz 5781246 BLAKE2B 6fe47422b31b0c73d24c3cef1265772927a57751bf5648f862f7c73528f2174268fdb2271c30c49ab038b4dfbe530bc088fe727e66babc5db0a41759e7212733 SHA512 8f589ee83a27b7a8f5abcd008e36a73fb704c20c1ae17e1ef265c59641768b75a0a08f2d6f80355442fff7625154603db3ebe9be0a4ba702b45e85db434f8110
-EBUILD intel-graphics-compiler-1.0.4111.ebuild 1759 BLAKE2B 183287bc5e3d3f93406946fed4f96b76ca57c7aec205f03ef45257a17e2099235293e549e6a8d467dc0d15773b494093092121c6b7f8c76dc402cbe5f3766b27 SHA512 a7b1fed4d705a363debebee0e8ca847b4db5b4a17d423ddb6e78cf8f82be3ce06bd2c497545b4b7193605df35c234441585de2e84276d08f0f01bee5cec03acf
+DIST intel-graphics-compiler-1.0.4944.tar.gz 6632351 BLAKE2B a3d72730b8c10fd3810fdb8206d9d92da325a094627b678bb9f8d0941e29c1697994a2d98a1b49780fae62dc421e623dea4c3a7e3061347de5f5b644cfb5e105 SHA512 34fafd5387f3b86bef17511015ff1e8daef75ebdff5d1d14ff2000b58968bb502a9ec1aee988858a2992414f6cdb222e7de19c2d877f7fc8cd84a79417e9a85e
+EBUILD intel-graphics-compiler-1.0.4111.ebuild 1949 BLAKE2B c479aa3914b8d8e03a00d76c21b5ba6bf4e3ce9ef572cbf478eb77c9dce877b6df7b78e6b4aadccebdb811b5dee7b1bf88ae87becb6a010880fd84629f10f272 SHA512 87b2d259c3ec9e1746efc29b242a9908818751b50fc2309bda3c88bdf178d488b88e0feb35209fb6fe424465fe66a3d33254d911751d7a2ac98a6d70965505e7
+EBUILD intel-graphics-compiler-1.0.4944.ebuild 2492 BLAKE2B 2a41f64fb5ab688815cbfb29c4454eabd645cfa4ae0e852ff6fe41511726dd380843a561ebe4b594971093c51f5ceab8b132d9ac766d980bd6b4a254979f996c SHA512 feaaad5029246bff1faff06c3ba9d7c4afb15be0c31656ebfcb1a9dee7127271599144d5fb118625b034f8bb86970aed83f2acc0822eff01f2791ea74c671785
MISC metadata.xml 340 BLAKE2B 6c0e5d932084dffd300a1dc70b29eb0871dfe2187ed8591a5a2f8cba001bf681e908c58a6f9471f7b08842ff538365258305da91004ed63ff97314a07fda529f SHA512 d24016b4ae0ffb05be475f86bb8d72ab4a85475655f409b8826dcd69726e048aa048e321f26ac36f2f52aec40abbfa66a95354a711332df94dc3e57e6c396a0c
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
index b5113c4912d6..4b31c121d43e 100644
--- 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
@@ -18,9 +18,7 @@ IUSE="debug"
LLVM_MAX_SLOT=10
-# Bug #738934
-#COMMON="<=sys-devel/llvm-${LLVM_MAX_SLOT}.9999:=[${MULTILIB_USEDEP}]
-COMMON="<sys-devel/llvm-10.0.1:=[${MULTILIB_USEDEP}]
+COMMON="<=sys-devel/llvm-${LLVM_MAX_SLOT}.9999:=[${MULTILIB_USEDEP}]
<=dev-libs/opencl-clang-${LLVM_MAX_SLOT}.9999:=[${MULTILIB_USEDEP}]"
DEPEND="${COMMON}"
RDEPEND="${COMMON}"
@@ -32,6 +30,14 @@ PATCHES=(
S="${WORKDIR}"/${PN}-igc-${PV}
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ if tc-is-clang && [[ $(clang-major-version) -ge 10 ]] ; then
+ die "Building IGC with clang-10 and newer is presently not supported (see Bug #738934). Please use clang-9 or gcc instead."
+ fi
+ fi
+}
+
multilib_src_configure() {
# Select the same slot as the best opencl-clang
local ocl_clang_ver="$(best_version -d dev-libs/opencl-clang:=)"
diff --git a/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.4944.ebuild b/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.4944.ebuild
new file mode 100644
index 000000000000..7651df693d6b
--- /dev/null
+++ b/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.4944.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS=cmake
+
+inherit cmake-multilib flag-o-matic llvm
+
+DESCRIPTION="LLVM-based OpenCL compiler targetting Intel Gen graphics hardware"
+HOMEPAGE="https://github.com/intel/intel-graphics-compiler"
+SRC_URI="https://github.com/intel/${PN}/archive/igc-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug"
+
+LLVM_MAX_SLOT=10
+
+# Yes, the last dependency does effectively force the use of llvm-10
+# - there are currently no SLOT=9 ebuilds of opencl-clang with mem2reg
+# support. Of course with there being no SLOT=9 ebuilds of vc-intrinsics
+# (which we'll need soon as well) at all either we are limited to llvm-10 anyway.
+COMMON="<=sys-devel/llvm-${LLVM_MAX_SLOT}.9999:=[${MULTILIB_USEDEP}]
+ <=dev-libs/opencl-clang-${LLVM_MAX_SLOT}.9999:=[${MULTILIB_USEDEP}]
+ >=dev-libs/opencl-clang-10.0.0.2:=[${MULTILIB_USEDEP}]"
+DEPEND="${COMMON}"
+RDEPEND="${COMMON}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.0.9-no_Werror.patch
+ "${FILESDIR}"/${PN}-1.0.4111-opencl-clang_version.patch
+)
+# "${FILESDIR}"/${PN}-1.0.4427-noVC_TranslateBuild_retval.patch
+
+S="${WORKDIR}"/${PN}-igc-${PV}
+
+find_best_llvm_slot() {
+ local candidate_slot
+
+ # Select the same slot as the best opencl-clang
+ local ocl_clang_ver="$(best_version -d dev-libs/opencl-clang:=)"
+ einfo "Selecting ${ocl_clang_ver}"
+ candidate_slot=$(ver_cut 5 ${ocl_clang_ver})
+
+ # Sanity check - opencl-clang brings the right LLVM slot as its
+ # dependency so if this is missing, something is very wrong.
+ has_version -d sys-devel/llvm:${candidate_slot} || die "LLVM slot matching ${ocl_clang_ver} not found (${candidate_slot})"
+
+ echo ${candidate_slot}
+}
+
+multilib_src_configure() {
+ local llvm_slot=$(find_best_llvm_slot)
+ einfo "Selecting LLVM slot ${llvm_slot}: $(best_version -d sys-devel/llvm:${llvm_slot})"
+ local llvm_prefix=$(get_llvm_prefix ${llvm_slot})
+
+ # Since late March 2020 cmake.eclass does not set -DNDEBUG any more, and the way
+ # IGC uses this definition causes problems for some users (see Bug #718824).
+ use debug || append-cppflags -DNDEBUG
+
+ # VectorCompiler needs work, at the moment upstream only supports building vc-intrinsics in place.
+ local mycmakeargs=(
+ -DCCLANG_SONAME_VERSION=${llvm_slot}
+ -DCMAKE_LIBRARY_PATH="${llvm_prefix}"/$(get_libdir)
+ -DIGC_OPTION__FORCE_SYSTEM_LLVM=ON
+ -DIGC_PREFERRED_LLVM_VERSION=${llvm_slot}
+ -DIGC_BUILD__VC_ENABLED=no
+ )
+ cmake_src_configure
+}