From 05c96dad9b26cc1f00831661dc55139dcc9d5680 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky 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