commit:     ad524a0e30e6a7841e75f0669d2fbc7cbd571c06
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  6 22:22:31 2020 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Tue Apr  7 09:08:13 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad524a0e

dev-libs/opencl-icd-loader: build with -fno-common / gcc-10

Just force -fcommon in CFLAGS if tests are enabled (loader code hasn't
got any problems with -fno-common) until the next release, the problem has
already been fixed upstream but the patch is rather large.

Closes: https://bugs.gentoo.org/716410
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../opencl-icd-loader/opencl-icd-loader-2020.03.13.ebuild     | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/dev-libs/opencl-icd-loader/opencl-icd-loader-2020.03.13.ebuild 
b/dev-libs/opencl-icd-loader/opencl-icd-loader-2020.03.13.ebuild
index 354e60244a5..617e29a65dd 100644
--- a/dev-libs/opencl-icd-loader/opencl-icd-loader-2020.03.13.ebuild
+++ b/dev-libs/opencl-icd-loader/opencl-icd-loader-2020.03.13.ebuild
@@ -4,7 +4,7 @@
 EAPI=7
 
 CMAKE_ECLASS=cmake
-inherit cmake-multilib
+inherit cmake-multilib flag-o-matic
 
 MY_PN="OpenCL-ICD-Loader"
 MY_P="${MY_PN}-${PV}"
@@ -26,6 +26,15 @@ RDEPEND="${DEPEND}
 
 S="${WORKDIR}/${MY_P}"
 
+src_prepare() {
+       # Until the next upstream release. Bug #716410
+       if use test; then
+               append-cflags $(test-flags-CC -fcommon)
+       fi
+
+       cmake_src_prepare
+}
+
 multilib_src_configure() {
        local ocl_dir="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
 

Reply via email to