summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2020-06-11 18:39:32 -0400
committerMichael Orlitzky <mjo@gentoo.org>2020-06-11 19:25:13 -0400
commit6926ff3a439ed76c74d1493cbe28ed3ddda5d952 (patch)
treedac086bd14b51afd59fbf3474bb2e11292a4949c /sci-libs
parentsys-devel/gcc: 10.1.0: cut 2 patchset (diff)
downloadgentoo-6926ff3a439ed76c74d1493cbe28ed3ddda5d952.tar.gz
gentoo-6926ff3a439ed76c74d1493cbe28ed3ddda5d952.tar.bz2
gentoo-6926ff3a439ed76c74d1493cbe28ed3ddda5d952.zip
sci-libs/openblas: don't clobber FFLAGS while building lapack.
Nothing's ever easy, and bug 726474 is turning out to be no exception. The problem goes deeper than I originally thought; this commit adds a patch that prevents "rare and hard to reproduce crashes" when the user has custom FFLAGS set. A new revision was made to force rebuilds in case some user has mis-compiled the package. https://bugs.gentoo.org/726474 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/openblas/files/dont-clobber-fflags.patch31
-rw-r--r--sci-libs/openblas/openblas-0.3.9-r1.ebuild (renamed from sci-libs/openblas/openblas-0.3.9.ebuild)5
2 files changed, 35 insertions, 1 deletions
diff --git a/sci-libs/openblas/files/dont-clobber-fflags.patch b/sci-libs/openblas/files/dont-clobber-fflags.patch
new file mode 100644
index 000000000000..21bbec4b1b3b
--- /dev/null
+++ b/sci-libs/openblas/files/dont-clobber-fflags.patch
@@ -0,0 +1,31 @@
+From 05c96dad9b26cc1f00831661dc55139dcc9d5680 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 11 Jun 2020 18:32:17 -0400
+Subject: [PATCH 1/1] Makefile: don't clobber fortran flags while building
+ lapack.
+
+When a user has the FFLAGS environment variable set, it clobbers the
+flags used to compile lapack. This can lead to "rare and hard to
+reproduce crashes" or test failures, as we have observed in Gentoo.
+
+Issue: https://github.com/xianyi/OpenBLAS/issues/2657
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index a22e16ba..2bae565e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -248,7 +248,7 @@ prof_lapack : lapack_prebuild
+ lapack_prebuild :
+ ifeq ($(NOFORTRAN), $(filter 0,$(NOFORTRAN)))
+ -@echo "FC = $(FC)" > $(NETLIB_LAPACK_DIR)/make.inc
+- -@echo "FFLAGS = $(LAPACK_FFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc
++ -@echo "override FFLAGS = $(LAPACK_FFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc
+ -@echo "POPTS = $(LAPACK_FPFLAGS)" >> $(NETLIB_LAPACK_DIR)/make.inc
+ -@echo "FFLAGS_NOOPT = -O0 $(LAPACK_NOOPT)" >> $(NETLIB_LAPACK_DIR)/make.inc
+ -@echo "PNOOPT = $(LAPACK_FPFLAGS) -O0" >> $(NETLIB_LAPACK_DIR)/make.inc
+--
+2.26.2
+
diff --git a/sci-libs/openblas/openblas-0.3.9.ebuild b/sci-libs/openblas/openblas-0.3.9-r1.ebuild
index 6427d994b302..c47011a3fa64 100644
--- a/sci-libs/openblas/openblas-0.3.9.ebuild
+++ b/sci-libs/openblas/openblas-0.3.9-r1.ebuild
@@ -22,7 +22,10 @@ RDEPEND="
DEPEND="virtual/pkgconfig"
-PATCHES=( "${FILESDIR}/shared-blas-lapack.patch" )
+PATCHES=(
+ "${FILESDIR}/shared-blas-lapack.patch"
+ "${FILESDIR}/dont-clobber-fflags.patch"
+)
pkg_setup() {
fortran-2_pkg_setup