From 57e2be19d17640729372235c4c73171e069d2cca Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 10 Jun 2020 22:29:20 -0400 Subject: sci-libs/openblas: fix tests with fortran bounds checking enabled. One OpenBLAS test fails when you enable bounds checks in your fortran compiler via e.g. either "-fbounds-check" or "-fcheck=bounds" with gfortran. This was reported upstream at https://github.com/xianyi/OpenBLAS/issues/2657 but in the meantime the easiest thing to do for *our* users is to filter out those flags when USE=test is set. Thanks to Bernd for reporting the problem on bug 726474. Closes: https://bugs.gentoo.org/726474 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Michael Orlitzky --- sci-libs/openblas/openblas-0.3.9.ebuild | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'sci-libs/openblas') diff --git a/sci-libs/openblas/openblas-0.3.9.ebuild b/sci-libs/openblas/openblas-0.3.9.ebuild index 15ee8cf93eab..6427d994b302 100644 --- a/sci-libs/openblas/openblas-0.3.9.ebuild +++ b/sci-libs/openblas/openblas-0.3.9.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit fortran-2 toolchain-funcs +inherit flag-o-matic fortran-2 toolchain-funcs DESCRIPTION="Optimized BLAS library based on GotoBLAS2" HOMEPAGE="http://xianyi.github.com/OpenBLAS/" @@ -11,8 +11,9 @@ SRC_URI="https://github.com/xianyi/OpenBLAS/archive/v${PV} -> ${P}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" -IUSE="dynamic eselect-ldso index-64bit openmp pthread" +IUSE="dynamic eselect-ldso index-64bit openmp pthread test" REQUIRED_USE="?? ( openmp pthread )" +RESTRICT="!test? ( test )" RDEPEND=" eselect-ldso? ( >=app-eselect/eselect-blas-0.2 @@ -26,6 +27,12 @@ PATCHES=( "${FILESDIR}/shared-blas-lapack.patch" ) pkg_setup() { fortran-2_pkg_setup use openmp && tc-check-openmp + + # We need to filter these while building the library, and not just + # while building the test suite. Will hopefully get fixed upstream: + # https://github.com/xianyi/OpenBLAS/issues/2657 + use test && filter-flags "-fbounds-check" "-fcheck=bounds" + export CC=$(tc-getCC) FC=$(tc-getFC) use dynamic && \ -- cgit v1.2.3-65-gdbad