diff options
Diffstat (limited to 'dev-libs/ocl-icd')
-rw-r--r-- | dev-libs/ocl-icd/Manifest | 4 | ||||
-rw-r--r-- | dev-libs/ocl-icd/files/ocl-icd-2.2.12-gcc-10.patch | 39 | ||||
-rw-r--r-- | dev-libs/ocl-icd/ocl-icd-2.2.12-r2.ebuild (renamed from dev-libs/ocl-icd/ocl-icd-2.2.12-r1.ebuild) | 5 | ||||
-rw-r--r-- | dev-libs/ocl-icd/ocl-icd-2.2.12-r3.ebuild | 49 |
4 files changed, 95 insertions, 2 deletions
diff --git a/dev-libs/ocl-icd/Manifest b/dev-libs/ocl-icd/Manifest index 3d668ce4ec40..9028efaa31af 100644 --- a/dev-libs/ocl-icd/Manifest +++ b/dev-libs/ocl-icd/Manifest @@ -1,4 +1,6 @@ +AUX ocl-icd-2.2.12-gcc-10.patch 1551 BLAKE2B 0a2b6c66e83e67db9ba08af5311da65fc8795e36c9de1b25e53db8c593796c3f5903452bc3cc5c9e36c8fc32e286a588b942d9687c38d95133f125054cfbba48 SHA512 4d0a9168d31efe845c20623802aadc91bdf87524700708ba6ffcacd563344f4eb952eed99326ccd7d44b6ffbed145edae7d453b32a70362531d416c1b521bd4a DIST ocl-icd-2.2.12.tar.gz 80718 BLAKE2B 524f9eea9782323eafa2f41858c4970333c029898c651bbf15624331e184d1b439d2259532b02defd67c9ab434a35b1b9a64a28e1515b3f42f09b3a270975df7 SHA512 f1668c3a39ecfbc089ee5a5f61f44ceb86ab80e504e58064dec306ce907daf77936c5403b4af15ed8714068891d68346c86725f285cfbc90c4fcb35d18db4048 -EBUILD ocl-icd-2.2.12-r1.ebuild 1217 BLAKE2B d9dd84a5913a41d4995838ee1becf2b16f87a574efbc282716d7cba300e3df095649fe8b40ffc99a4556daa217e09d854c8994e17e5f05f7deebe39b193b027d SHA512 01763dfd367317f53867729f6fb43791ae407e1a5d5465f5f94a241e9f5586db2ad8b7898ef9d66aa4257a3bd68b54f0f9f9672d5a2bb4a6fd54aadcb4a62da5 +EBUILD ocl-icd-2.2.12-r2.ebuild 1289 BLAKE2B 65b27579e5479f321cd239a96f0bcd6ed28370c7500b5adbf25c45c4989e7cf1f653409727eecd14726ee6de007777d6776cab463c736760bb648a09bd3d1991 SHA512 6a9b659fc0b7d28183c377ffe9bd78894d42d4f927e5933646ea14ec8ff99ebb245106b251e32c1d98fa5a40c238f8b178f3d225494e84994478920a891d9caa +EBUILD ocl-icd-2.2.12-r3.ebuild 1328 BLAKE2B d5a90f66a72d04b5929bb4c9bf68cc7b4ee1b89cebe9687caacb50b68325ad14a6cd3de502f6a22888e04bb078fbe5937db4507ba257285a40e14f7bb548b96e SHA512 555a8b7a4bfdf252206965446c10fc2aa651093149a939593c5bbe3eb526a9b2aebfd01eabdc74b72ac81422eca60594b28a5fd4f81125699f6c118afd394ee8 EBUILD ocl-icd-2.2.12.ebuild 1207 BLAKE2B 05ddc8149f9a60bd1de2862be075fbd9d815352e68bc1c35315d72c2d32a7a54de4da2786adca0e919f46a2e1686e06112d6f666c97a898a971fb04c8cde4136 SHA512 9852a177d53bcdaabc0f36b6bcbcfcef587e34e97131cd4e97d5494efa58abb34595e57defc0916596f9a7035b1d4bf84daa964462458fc6a6b025deb2e624a4 MISC metadata.xml 396 BLAKE2B e87119ee4f6793c9fa1229c9c2430f8eba749df95522f5f658a6bc26fa22265bdcaa185e8338eef057320342beea263b64f162b2a8ad3c6aa4db73307b949244 SHA512 69effb7af79439eae9702055f6f1e20318f30ef76827e5be6d69ae63ff39a6bafbb177c681f76ac9bdf861a9921d7c897cecaea320d796e6d104dbcab9a24b79 diff --git a/dev-libs/ocl-icd/files/ocl-icd-2.2.12-gcc-10.patch b/dev-libs/ocl-icd/files/ocl-icd-2.2.12-gcc-10.patch new file mode 100644 index 000000000000..64948d5b05e3 --- /dev/null +++ b/dev-libs/ocl-icd/files/ocl-icd-2.2.12-gcc-10.patch @@ -0,0 +1,39 @@ +https://bugs.gentoo.org/706098 + +From 4667bddd365bcc1dc66c483835971f0083b44b1d Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyfox@gentoo.org> +Date: Wed, 22 Jan 2020 19:38:23 +0000 +Subject: [PATCH] icd_generator.rb: fix build failure against gcc-10 + +On gcc-10 (and gcc-9 -fno-common) build fails as: + +``` +libtool: link: gcc -shared -fPIC -DPIC .libs/libdummy_icd.o .libs/libdummy_icd_gen.o \ + -ldl -g -O2 -Wl,-soname -Wl,libdummycl.so.0 -o .libs/libdummycl.so.0.0.0 +ld: .libs/libdummy_icd_gen.o:/home/slyfox/dev/git/ocl-icd/libdummy_icd_gen.h:226: + multiple definition of `master_dispatch'; .libs/libdummy_icd.o:/home/slyfox/dev/git/ocl-icd/libdummy_icd_gen.h:226: first defined here +``` + +gcc-10 will change the default from -fcommon to fno-common: +https://gcc.gnu.org/PR85678. + +The error also happens if CFLAGS=-fno-common passed explicitly. + +Reported-by: Anthony Parsons +Bug: https://bugs.gentoo.org/706098 +Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> +--- + icd_generator.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/icd_generator.rb ++++ b/icd_generator.rb +@@ -207,7 +207,7 @@ def self.generate_libdummy_icd_header + } + libdummy_icd_structures += "};\n\n" + libdummy_icd_structures += "#pragma GCC visibility push(hidden)\n\n" +- libdummy_icd_structures += "struct _cl_icd_dispatch master_dispatch; \n\n" ++ libdummy_icd_structures += "extern struct _cl_icd_dispatch master_dispatch; \n\n" + $use_name_in_test.each { |k, f| + libdummy_icd_structures += "typeof(#{f}) INT#{f};\n" + } diff --git a/dev-libs/ocl-icd/ocl-icd-2.2.12-r1.ebuild b/dev-libs/ocl-icd/ocl-icd-2.2.12-r2.ebuild index aebd6ac1e7e9..192d49e15487 100644 --- a/dev-libs/ocl-icd/ocl-icd-2.2.12-r1.ebuild +++ b/dev-libs/ocl-icd/ocl-icd-2.2.12-r2.ebuild @@ -16,7 +16,10 @@ KEYWORDS="~amd64 ~x86" IUSE="+khronos-headers" BDEPEND="${RUBY_DEPS}" -RDEPEND="app-eselect/eselect-opencl" +RDEPEND="app-eselect/eselect-opencl + !dev-libs/opencl-icd-loader" + +PATCHES=("${FILESDIR}"/${P}-gcc-10.patch) src_prepare() { replace-flags -Os -O2 # bug 646122 diff --git a/dev-libs/ocl-icd/ocl-icd-2.2.12-r3.ebuild b/dev-libs/ocl-icd/ocl-icd-2.2.12-r3.ebuild new file mode 100644 index 000000000000..980cac2e7506 --- /dev/null +++ b/dev-libs/ocl-icd/ocl-icd-2.2.12-r3.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +USE_RUBY="ruby24 ruby25 ruby26 ruby27" +inherit autotools flag-o-matic multilib-minimal ruby-single + +DESCRIPTION="Alternative to vendor specific OpenCL ICD loaders" +HOMEPAGE="https://github.com/OCL-dev/ocl-icd" +SRC_URI="https://github.com/OCL-dev/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +# Does nothing now but by keeping it here we avoid having to have virtual/opencl +# handle ebuilds both with and without this flag. +IUSE="+khronos-headers" + +BDEPEND="${RUBY_DEPS}" +DEPEND="dev-util/opencl-headers" +# nvidia-drivers block is hopefully temporary, until it has ceased +# to depend on eselect-opencl +RDEPEND="${DEPEND} + !app-eselect/eselect-opencl + !dev-libs/opencl-icd-loader + !x11-drivers/nvidia-drivers" + +PATCHES=("${FILESDIR}"/${P}-gcc-10.patch) + +src_prepare() { + replace-flags -Os -O2 # bug 646122 + + default + eautoreconf +} + +multilib_src_configure() { + # dev-util/opencl-headers ARE official Khronos Group headers, what this option + # does is disable the use of the bundled ones + ECONF_SOURCE="${S}" econf --enable-pthread-once --disable-official-khronos-headers +} + +multilib_src_install() { + default + + # Drop .la files + find "${ED}" -name '*.la' -delete || die +} |