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@gentoo.org>
EAPI=7
CMAKE_ECLASS=cmake
-inherit cmake-multilib
+inherit cmake-multilib flag-o-matic
MY_PN="OpenCL-ICD-Loader"
MY_P="${MY_PN}-${PV}"
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}"