From 0228d362112fd586b7dbe37f4fec54fe73f69668 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Mon, 30 Sep 2024 21:38:05 +0200 Subject: [PATCH 1/3] move -fopenmp to CFLAGS --- cmake/openblas.pc.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/openblas.pc.in b/cmake/openblas.pc.in index 9526d2df6e..374221b47f 100644 --- a/cmake/openblas.pc.in +++ b/cmake/openblas.pc.in @@ -9,5 +9,5 @@ Name: OpenBLAS Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version Version: @OpenBLAS_VERSION@ URL: https://github.com/OpenMathLib/OpenBLAS -Libs: @OpenMP_C_FLAGS@ -L${libdir} -l${libnameprefix}openblas${libnamesuffix}${libsuffix} -Cflags: -I${includedir} +Libs: -L${libdir} -l${libnameprefix}openblas${libnamesuffix}${libsuffix} +Cflags: -I${includedir} @OpenMP_C_FLAGS@ From 176107d23ab42f11e94c940790876fec76006611 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 1 Oct 2024 13:31:14 +0200 Subject: [PATCH 2/3] Add -fopenmp to cflags in pkgconfig file if set --- Makefile.install | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile.install b/Makefile.install index 6892efa510..129ed9a137 100644 --- a/Makefile.install +++ b/Makefile.install @@ -14,6 +14,9 @@ endif ifeq ($(INTERFACE64),1) USE_64BITINT=1 endif +ifeq ($(USE_OPENMP),1) + FOMP_OPT:= -fopenmp +endif PREFIX ?= /opt/OpenBLAS @@ -178,6 +181,7 @@ endif @echo 'libnamesuffix='$(LIBNAMESUFFIX) >> "$(PKGFILE)" @echo 'libsuffix='$(SYMBOLSUFFIX) >> "$(PKGFILE)" @echo 'includedir='$(OPENBLAS_INCLUDE_DIR) >> "$(PKGFILE)" + @echo 'omp_opt='$(FOMP_OPT) >> "$(PKGFILE)" @echo 'openblas_config= USE_64BITINT='$(INTERFACE64) 'DYNAMIC_ARCH='$(DYNAMIC_ARCH) 'DYNAMIC_OLDER='$(DYNAMIC_OLDER) 'NO_CBLAS='$(NO_CBLAS) 'NO_LAPACK='$(NO_LAPACK) 'NO_LAPACKE='$(NO_LAPACKE) 'NO_AFFINITY='$(NO_AFFINITY) 'USE_OPENMP='$(USE_OPENMP) $(TARGET) 'MAX_THREADS='$(NUM_THREADS)>> "$(PKGFILE)" @echo 'version='$(VERSION) >> "$(PKGFILE)" @echo 'extralib='$(PKG_EXTRALIB) >> "$(PKGFILE)" From fa775613966c2e770f7f4da58e170dcd1cfc2d4b Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 1 Oct 2024 13:32:45 +0200 Subject: [PATCH 3/3] add openmp option to pkgconfig template --- openblas.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openblas.pc.in b/openblas.pc.in index 23804f4a2a..d9bb845499 100644 --- a/openblas.pc.in +++ b/openblas.pc.in @@ -4,4 +4,4 @@ Version: ${version} URL: https://github.com/xianyi/OpenBLAS Libs: -L${libdir} -l${libprefix}openblas${libnamesuffix} Libs.private: ${extralib} -Cflags: -I${includedir} +Cflags: -I${includedir} ${omp_opt}