From b209915121d7d5f38fdcfcd6029c2d14d2182ad0 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Tue, 25 Jul 2023 15:10:50 -0700 Subject: [PATCH] Fix build with clang There are two instances when building the tests where OpenBLAS fails to build with OpenMP and clang due to library paths getting reset as flags are set rather than appended. This seems to only affect certain clang/libomp installations, but if it's already grabbing the correct library paths we might as well use them. --- ctest/Makefile | 2 +- test/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ctest/Makefile b/ctest/Makefile index 0fb2450d2..9e85d23b9 100644 --- a/ctest/Makefile +++ b/ctest/Makefile @@ -208,7 +208,7 @@ FLDFLAGS = $(FFLAGS:-fPIC=) $(LDFLAGS) ifeq ($(USE_OPENMP), 1) ifeq ($(F_COMPILER), GFORTRAN) ifeq ($(C_COMPILER), CLANG) -CEXTRALIB = -lomp +CEXTRALIB += -lomp endif endif ifeq ($(F_COMPILER), NAG) diff --git a/test/Makefile b/test/Makefile index 923f1537c..46a7b1158 100644 --- a/test/Makefile +++ b/test/Makefile @@ -265,7 +265,7 @@ FLDFLAGS = $(FFLAGS:-fPIC=) $(LDFLAGS) ifeq ($(USE_OPENMP), 1) ifeq ($(F_COMPILER), GFORTRAN) ifeq ($(C_COMPILER), CLANG) -CEXTRALIB = -lomp +CEXTRALIB += -lomp endif endif ifeq ($(F_COMPILER), NAG)