dev-util/intel-graphics-compiler: Bump version to 1.0.3445
authorJan Vesely <jano.vesely@gmail.com>
Wed, 11 Mar 2020 01:02:25 +0000 (21:02 -0400)
committerMarek Szuba <marecki@gentoo.org>
Thu, 12 Mar 2020 11:32:57 +0000 (12:32 +0100)
Add patch and enable opencl-clang:9 and llvm:9.

Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/14925
Signed-off-by: Marek Szuba <marecki@gentoo.org>
dev-util/intel-graphics-compiler/Manifest
dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.3445-Fix-for-building-separated-dynamic-llvm-libs.patch [new file with mode: 0644]
dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.3445.ebuild [new file with mode: 0644]

index cc17dcf05fce3ebc7d9a3350b28c483a2c8817f9..025fd957a00362fdd85d31a46e4525af71852421 100644 (file)
@@ -1,3 +1,4 @@
 DIST intel-graphics-compiler-1.0.2878.tar.gz 5920418 BLAKE2B 99522118d08183836c6e62f80c98b2cc716dd22d7dc82d05841e87e42f10025508c6254cebe2f886da8454cc4cc4b3a9ee06ce5a3bc04246c88f499f63f8f1ae SHA512 3b6dc9b945fddb3d0bc716f4598c4dacb6431c342b580c90f7e9ff8682bdcbde410a960adbfd9e67601d121adc70d2cf23de01bc99c1d0cb86d14b4db77afde5
 DIST intel-graphics-compiler-1.0.2990.tar.gz 5930890 BLAKE2B 038761e74dde52de53eed511a74a39d9b4c69a510ef289d2941b859aea018d6776b5179d2be006b12d3245ffe43a06bfacd9d03ee2d227c2ba2ea39805bf40d2 SHA512 65287348e98f09096418afa02262ad6ce07dd918aa040ac1fb49f7176545c0a6449e68c5e74a11c41641d90495edc7be8e24b32e68d798df906ea3b16e675827
 DIST intel-graphics-compiler-1.0.3151.tar.gz 5950502 BLAKE2B 8ccbfc5d3cd6307eb5db602822d42e8744e6ca7696494a0dd349847aff0defde2434b9192f17645f1fcbf732ec98a66dbdcc7d03eed48702d90911f912135fc1 SHA512 a6e04a3a90aae9046f2698bf15d5f60862c93e7a87a6e4ae6b6c43c65490583608f201e94a2ef32fc2f72e9fa0da7d6c202f64ef610f03a81384ac537541df14
+DIST intel-graphics-compiler-1.0.3445.tar.gz 6026437 BLAKE2B 4a4708109d125891dfe967186efbc2ebe70ce59dc0302f534dad74c0b1f2af36de0d7ee7cb69059e776ab4669236f5d62750159a44d44a6444ab85a205273563 SHA512 044b941adb921b25a1ab6da3ebe0f7c4d67769b43e5b855ae94871281cf387ce45351b8b46a6e98e3bd573022d7cfd9316629d590327c8f4007e1b1ae9f7071e
diff --git a/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.3445-Fix-for-building-separated-dynamic-llvm-libs.patch b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.3445-Fix-for-building-separated-dynamic-llvm-libs.patch
new file mode 100644 (file)
index 0000000..931ba44
--- /dev/null
@@ -0,0 +1,45 @@
+From 5a07111005b570875da8796f91b385edc483c0da Mon Sep 17 00:00:00 2001
+From: "Wesierski, Lukasz" <lukasz.wesierski@intel.com>
+Date: Mon, 24 Feb 2020 05:27:13 -0800
+Subject: [PATCH] Fix for building separated dynamic llvm libs
+
+Change-Id: I3796e7a925e32bfee2dfda60fbaa3f21122e62cb
+---
+ IGC/CMakeLists.txt | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/IGC/CMakeLists.txt b/IGC/CMakeLists.txt
+index 8634c456..891a3f5b 100644
+--- a/IGC/CMakeLists.txt
++++ b/IGC/CMakeLists.txt
+@@ -82,7 +82,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
+ # ================================================ Flags ===============================================
+-
+ # Escapes text for regular expressions.
+ #
+ # @param retValName Name of variable placeholder where result will be returned.
+@@ -3309,12 +3308,18 @@ else()
+         "LLVMDemangle"
+         )
+-    if(LLVM_VERSION_MAJOR EQUAL 8)
++    if(LLVM_VERSION_MAJOR GREATER_EQUAL 8)
+         list(APPEND IGC_BUILD__LLVM_LIBS_TO_LINK
+           "LLVMInstCombine"
+           )
+     endif()
++    if(LLVM_VERSION_MAJOR GREATER_EQUAL 9)
++        list(APPEND IGC_BUILD__LLVM_LIBS_TO_LINK
++          "LLVMBitstreamReader"
++          )
++    endif()
++
+ endif()
+ # ==================================== WrapperLLVM package =============================================
+-- 
+2.24.1
+
diff --git a/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.3445.ebuild b/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.3445.ebuild
new file mode 100644 (file)
index 0000000..7076388
--- /dev/null
@@ -0,0 +1,46 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS=cmake
+inherit cmake-multilib 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"
+
+LLVM_MAX_SLOT=9
+
+COMMON="<=sys-devel/llvm-${LLVM_MAX_SLOT}.9999:=[${MULTILIB_USEDEP}]
+       <=dev-libs/opencl-clang-${LLVM_MAX_SLOT}.9999:=[${MULTILIB_USEDEP}]"
+DEPEND="${COMMON}"
+RDEPEND="${COMMON}"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.0.9-no_Werror.patch
+       "${FILESDIR}"/${PN}-1.0.3445-Fix-for-building-separated-dynamic-llvm-libs.patch
+)
+
+S="${WORKDIR}"/${PN}-igc-${PV}
+
+multilib_src_configure() {
+       # 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"
+       local llvm_slot=$(ver_cut 5 $ocl_clang_ver)
+       # opencl-clang brings the right slot as dep
+       has_version -d sys-devel/llvm:$llvm_slot || die "LLVM slot matching $ocl_clang_ver not found ($llvm_slot)"
+       einfo "Selecting LLVM SLOT $llvm_slot: $(best_version -d sys-devel/llvm:$llvm_slot)"
+
+       local mycmakeargs=(
+               -DCMAKE_LIBRARY_PATH=$(get_llvm_prefix ${llvm_slot})/$(get_libdir)
+               -DIGC_OPTION__FORCE_SYSTEM_LLVM=ON
+               -DIGC_PREFERRED_LLVM_VERSION=${llvm_slot}
+       )
+       cmake_src_configure
+}