From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8BFC3138334 for ; Fri, 3 May 2019 14:05:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8C584E0953; Fri, 3 May 2019 14:05:12 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BFF7EE0953 for ; Fri, 3 May 2019 14:05:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DC2793433DD for ; Fri, 3 May 2019 14:05:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DFB7B55B for ; Fri, 3 May 2019 14:05:07 +0000 (UTC) From: "Marek Szuba" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Marek Szuba" Message-ID: <1556892296.6a1910e3df8b982c4386d98edf1d596a8a1d843c.marecki@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/spirv-llvm-translator/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/spirv-llvm-translator/Manifest dev-util/spirv-llvm-translator/spirv-llvm-translator-8.0.0.1-r1.ebuild X-VCS-Directories: dev-util/spirv-llvm-translator/ X-VCS-Committer: marecki X-VCS-Committer-Name: Marek Szuba X-VCS-Revision: 6a1910e3df8b982c4386d98edf1d596a8a1d843c X-VCS-Branch: master Date: Fri, 3 May 2019 14:05:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 8a96cd6d-9a65-4e64-ae23-d6ba9e9ed6e3 X-Archives-Hash: 57f1416171759b412a89adcb10c31fd8 commit: 6a1910e3df8b982c4386d98edf1d596a8a1d843c Author: Marek Szuba gentoo org> AuthorDate: Fri May 3 14:03:39 2019 +0000 Commit: Marek Szuba gentoo org> CommitDate: Fri May 3 14:04:56 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a1910e3 dev-util/spirv-llvm-translator: support new OpenCL block representation Without this patch, offline compilation of certain kernels used by dev-libs/intel-neo unit tests fails with "LLVM ERROR: unknown argument number for an object"; some real-world kernels would presumably be affected as well. The patch has been retrieved from https://github.com/intel/opencl-clang/blob/ocl-open-80/patches/spirv/0001-Update-LowerOpenCL-pass-to-handle-new-blocks-represn.patch (commit 912a9cc8d30b773372ce58d4fc17bf38fd388692 i.e. latest version as of 2019-05-02). See-Also: https://github.com/intel/compute-runtime/issues/156 Signed-off-by: Marek Szuba gentoo.org> Package-Manager: Portage-2.3.62, Repoman-2.3.11 dev-util/spirv-llvm-translator/Manifest | 1 + .../spirv-llvm-translator-8.0.0.1-r1.ebuild | 67 ++++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/dev-util/spirv-llvm-translator/Manifest b/dev-util/spirv-llvm-translator/Manifest index 33846447d84..336d1277a9f 100644 --- a/dev-util/spirv-llvm-translator/Manifest +++ b/dev-util/spirv-llvm-translator/Manifest @@ -1 +1,2 @@ +DIST spirv-llvm-translator-8.0.0.1-LowerOpenCL_new_block_representation.patch.xz 10108 BLAKE2B 96492a7d3ab25e1fe837ced225d50c7450595af52bc3aa6c17e02dc08c1cccaf7ca8dc5949da17da7cc6ea5fcae8688a5994a50bb7693a52493520e57981bc48 SHA512 574ca7b7fe054e82ee154556555e2d184f102faa7da08ce9d6ca5d2ca37463c7a86b3861b93969f9c886544551af8c8f95e57363ea017f7fc426b56d97eb7cf2 DIST spirv-llvm-translator-8.0.0.1.tar.gz 437384 BLAKE2B bca52bfec04d0adc08b00f5fdbcb6cf953be00f835d2a393545e77bd8776063ef91e8fb62c232b50cbeab58a0a01bea6e47b89c1756699bf35481e87823995de SHA512 85faf176d1ce79d19f10c88055f4a102a5952dcdcd6709e5e5cfdbf69eb958d51020a3ad34198c7c874b42ee8e318f1ce3169ea92853134dfff3dc5843f84414 diff --git a/dev-util/spirv-llvm-translator/spirv-llvm-translator-8.0.0.1-r1.ebuild b/dev-util/spirv-llvm-translator/spirv-llvm-translator-8.0.0.1-r1.ebuild new file mode 100644 index 00000000000..3412d8cf4a0 --- /dev/null +++ b/dev-util/spirv-llvm-translator/spirv-llvm-translator-8.0.0.1-r1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-multilib flag-o-matic llvm eapi7-ver + +MY_PN="SPIRV-LLVM-Translator" +MY_PV="$(ver_rs 3 -)" +MY_P="${MY_PN}-${MY_PV}" + +DESCRIPTION="Bi-directional translator between SPIR-V and LLVM IR" +HOMEPAGE="https://github.com/KhronosGroup/SPIRV-LLVM-Translator" +SRC_URI="https://github.com/KhronosGroup/${MY_PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~marecki/dists/${PN}/${PN}-8.0.0.1-LowerOpenCL_new_block_representation.patch.xz" + +LICENSE="UoI-NCSA" +SLOT="8" +KEYWORDS="~amd64" +IUSE="test" + +S="${WORKDIR}/${MY_P}" + +COMMON="sys-devel/llvm:8=[${MULTILIB_USEDEP}]" +DEPEND="${COMMON} + test? ( dev-python/lit )" +RDEPEND="${COMMON}" + +LLVM_MAX_SLOT=8 + +PATCHES=( + "${WORKDIR}"/${PN}-8.0.0.1-LowerOpenCL_new_block_representation.patch + "${FILESDIR}"/${PN}-8.0.0.1-no_pkgconfig_files.patch +) + +src_prepare() { + append-flags -fPIC + cmake-utils_src_prepare +} + +multilib_src_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_PREFIX="$(get_llvm_prefix)" + $(usex test "-DLLVM_INCLUDE_TESTS=ON" "") + ) + cmake-utils_src_configure +} + +multilib_src_compile() { + cmake-utils_src_compile llvm-spirv +} + +multilib_src_install() { + cmake-utils_src_install + # CMake does not install the executable so do it by hand + if multilib_is_native_abi; then + exeinto "$(get_llvm_prefix)"/bin + doexe "${BUILD_DIR}"/tools/llvm-spirv/llvm-spirv + fi +} + +multilib_src_test() { + # TODO: figure out why some tests fail on amd64 when ABI==x86 + if multilib_is_native_abi; then + lit "${BUILD_DIR}/test" || die "Error running tests for ABI ${ABI}" + fi +}