From 2d33e12a119f0cf97e5c41ff4f6499e9229d9bd5 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Thu, 30 Sep 2021 03:14:15 -0400 Subject: [PATCH] Make sure that Netlib LAPACK respects FFLAGS OpenBLAS allows users to specify `FFLAGS` and then uses `override` to append additional options. However, without such an override in lapack's make.inc, lapack would use the external FFLAGS, rather than the ones being computed by OpenBLAS. For example the `DEBUG=1` flag would not apply to LAPACK code. This is all a bit messy but forced by the integration with netlib lapack. Note that `CFLAGS` already has this override for the same reason. It is possible that other variables here should have a similar override, but I think for most of the other ones, OpenBLAS's build system does not append to the flags passed in by the user. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 555d1c467..49fd57ff2 100644 --- a/Makefile +++ b/Makefile @@ -269,7 +269,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 "FFLAGS_DRV = $(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