From: Marek Szuba Date: Mon, 6 Apr 2020 22:22:31 +0000 (+0100) Subject: dev-libs/opencl-icd-loader: build with -fno-common / gcc-10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ad524a0e30e6a7841e75f0669d2fbc7cbd571c06;p=gentoo.git 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 --- 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 354e60244a5a..617e29a65dd2 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}"