-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from mattip/patch-external
create a single shared object libscipy_openblas64_.so or libscipy_openblas.so
- Loading branch information
Showing
10 changed files
with
210 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule OpenBLAS
updated
from 9d425a to 6c77e5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
From 258ad2ccebe93fa9c5ad74a17c603b3fb8925190 Mon Sep 17 00:00:00 2001 | ||
From: mattip <matti.picus@gmail.com> | ||
Date: Sun, 21 Jan 2024 22:34:48 +0200 | ||
Subject: [PATCH] create a single shared object | ||
|
||
--- | ||
Makefile | 10 ---------- | ||
Makefile.install | 16 +--------------- | ||
Makefile.system | 3 +++ | ||
exports/Makefile | 4 ++-- | ||
openblas.pc.in | 2 +- | ||
5 files changed, 7 insertions(+), 28 deletions(-) | ||
|
||
diff --git a/Makefile b/Makefile | ||
index 8621a8b3f..56a449306 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -134,17 +134,12 @@ shared : libs netlib $(RELA) | ||
ifneq ($(NO_SHARED), 1) | ||
ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS Android Haiku FreeBSD DragonFly)) | ||
@$(MAKE) -C exports so | ||
- @ln -fs $(LIBSONAME) $(LIBPREFIX).so | ||
- @ln -fs $(LIBSONAME) $(LIBPREFIX).so.$(MAJOR_VERSION) | ||
endif | ||
ifeq ($(OSNAME), $(filter $(OSNAME),OpenBSD NetBSD)) | ||
@$(MAKE) -C exports so | ||
- @ln -fs $(LIBSONAME) $(LIBPREFIX).so | ||
endif | ||
ifeq ($(OSNAME), Darwin) | ||
@$(MAKE) -C exports dyn | ||
- @ln -fs $(LIBDYNNAME) $(LIBPREFIX).dylib | ||
- @ln -fs $(LIBDYNNAME) $(LIBPREFIX).$(MAJOR_VERSION).dylib | ||
endif | ||
ifeq ($(OSNAME), WINNT) | ||
@$(MAKE) -C exports dll | ||
@@ -229,13 +225,11 @@ endif | ||
endif | ||
@echo THELIBNAME=$(LIBNAME) >> Makefile.conf_last | ||
@echo THELIBSONAME=$(LIBSONAME) >> Makefile.conf_last | ||
- @-ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX) | ||
@touch lib.grd | ||
|
||
prof : prof_blas prof_lapack | ||
|
||
prof_blas : | ||
- ln -fs $(LIBNAME_P) $(LIBPREFIX)_p.$(LIBSUFFIX) | ||
for d in $(SUBDIRS) ; \ | ||
do if test -d $$d; then \ | ||
$(MAKE) -C $$d prof || exit 1 ; \ | ||
@@ -230,7 +223,6 @@ ifeq ($(DYNAMIC_ARCH), 1) | ||
endif | ||
|
||
blas : | ||
- ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX) | ||
for d in $(BLASDIRS) ; \ | ||
do if test -d $$d; then \ | ||
$(MAKE) -C $$d libs || exit 1 ; \ | ||
@@ -238,7 +230,6 @@ blas : | ||
done | ||
|
||
hpl : | ||
- ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX) | ||
for d in $(BLASDIRS) ../laswp exports ; \ | ||
do if test -d $$d; then \ | ||
$(MAKE) -C $$d $(@F) || exit 1 ; \ | ||
@@ -252,7 +243,6 @@ ifeq ($(DYNAMIC_ARCH), 1) | ||
endif | ||
|
||
hpl_p : | ||
- ln -fs $(LIBNAME_P) $(LIBPREFIX)_p.$(LIBSUFFIX) | ||
for d in $(SUBDIRS) ../laswp exports ; \ | ||
do if test -d $$d; then \ | ||
$(MAKE) -C $$d $(@F) || exit 1 ; \ | ||
diff --git a/Makefile.install b/Makefile.install | ||
index 01899b970..cf3c8acce 100644 | ||
--- a/Makefile.install | ||
+++ b/Makefile.install | ||
@@ -90,30 +90,20 @@ endif | ||
ifneq ($(NO_STATIC),1) | ||
@echo Copying the static library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR) | ||
@install -m644 $(LIBNAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" | ||
- @cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \ | ||
- ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX) | ||
endif | ||
#for install shared library | ||
ifneq ($(NO_SHARED),1) | ||
@echo Copying the shared library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR) | ||
ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS Android Haiku FreeBSD DragonFly)) | ||
@install -m755 $(LIBSONAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" | ||
- @cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \ | ||
- ln -fs $(LIBSONAME) $(LIBPREFIX).so ; \ | ||
- ln -fs $(LIBSONAME) $(LIBPREFIX).so.$(MAJOR_VERSION) | ||
endif | ||
|
||
ifeq ($(OSNAME), $(filter $(OSNAME),OpenBSD NetBSD)) | ||
@cp $(LIBSONAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" | ||
- @cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \ | ||
- ln -fs $(LIBSONAME) $(LIBPREFIX).so | ||
endif | ||
ifeq ($(OSNAME), Darwin) | ||
@-cp $(LIBDYNNAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" | ||
@-install_name_tool -id "$(OPENBLAS_LIBRARY_DIR)/$(LIBPREFIX).$(MAJOR_VERSION).dylib" "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)/$(LIBDYNNAME)" | ||
- @cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \ | ||
- ln -fs $(LIBDYNNAME) $(LIBPREFIX).dylib ; \ | ||
- ln -fs $(LIBDYNNAME) $(LIBPREFIX).$(MAJOR_VERSION).dylib | ||
endif | ||
ifeq ($(OSNAME), WINNT) | ||
@-cp $(LIBDLLNAME) "$(DESTDIR)$(OPENBLAS_BINARY_DIR)" | ||
@@ -140,16 +130,11 @@ endif | ||
ifneq ($(NO_STATIC),1) | ||
@echo Copying the static library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR) | ||
@installbsd -c -m 644 $(LIBNAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" | ||
- @cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \ | ||
- ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX) | ||
endif | ||
#for install shared library | ||
ifneq ($(NO_SHARED),1) | ||
@echo Copying the shared library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR) | ||
@installbsd -c -m 755 $(LIBSONAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" | ||
- @cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \ | ||
- ln -fs $(LIBSONAME) $(LIBPREFIX).so ; \ | ||
- ln -fs $(LIBSONAME) $(LIBPREFIX).so.$(MAJOR_VERSION) | ||
endif | ||
|
||
endif | ||
@@ -162,6 +147,7 @@ endif | ||
|
||
@echo Generating $(LIBSONAMEBASE)$(SUFFIX64).pc in "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)" | ||
@echo 'libdir='$(OPENBLAS_LIBRARY_DIR) > "$(PKGFILE)" | ||
+ @echo 'libprefix='$(SYMBOLPREFIX) >> "$(PKGFILE)" | ||
@echo 'libsuffix='$(SYMBOLSUFFIX) >> "$(PKGFILE)" | ||
@echo 'includedir='$(OPENBLAS_INCLUDE_DIR) >> "$(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) $(CORE) 'MAX_THREADS='$(NUM_THREADS)>> "$(PKGFILE)" | ||
diff --git a/Makefile.system b/Makefile.system | ||
index 30b0ddec2..b2c92b99a 100644 | ||
--- a/Makefile.system | ||
+++ b/Makefile.system | ||
@@ -1695,6 +1695,9 @@ LIBNAME_P = $(LIBPREFIX)p$(REVISION)_p.$(LIBSUFFIX) | ||
endif | ||
endif | ||
|
||
+# Override for scipy-openblas: don't put the revision into the so name | ||
+LIBNAME = $(LIBPREFIX).$(LIBSUFFIX) | ||
+LIBNAME_P = $(LIBPREFIX)_p.$(LIBSUFFIX) | ||
|
||
LIBDLLNAME = $(LIBPREFIX).dll | ||
IMPLIBNAME = lib$(LIBNAMEBASE).dll.a | ||
diff --git a/exports/Makefile b/exports/Makefile | ||
index 7682f851d..632fa324b 100644 | ||
--- a/exports/Makefile | ||
+++ b/exports/Makefile | ||
@@ -132,7 +132,7 @@ libgoto_hpl.def : $(GENSYM) | ||
./$(GENSYM) win2khpl $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" $(BUILD_LAPACK_DEPRECATED) $(BUILD_BFLOAT16) $(BUILD_SINGLE) $(BUILD_DOUBLE) $(BUILD_COMPLEX) $(BUILD_COMPLEX16) > $(@F) | ||
|
||
ifeq ($(OSNAME), Darwin) | ||
-INTERNALNAME = $(LIBPREFIX).$(MAJOR_VERSION).dylib | ||
+INTERNALNAME = $(LIBPREFIX).dylib | ||
endif | ||
|
||
ifeq (, $(SYMBOLPREFIX)$(SYMBOLSUFFIX)) | ||
@@ -169,7 +169,7 @@ INTERNALNAME = $(LIBPREFIX).so | ||
FEXTRALIB += -lm | ||
EXTRALIB += -lm | ||
else | ||
-INTERNALNAME = $(LIBPREFIX).so.$(MAJOR_VERSION) | ||
+INTERNALNAME = $(LIBPREFIX).so | ||
endif | ||
|
||
ifeq (, $(SYMBOLPREFIX)$(SYMBOLSUFFIX)) | ||
diff --git a/openblas.pc.in b/openblas.pc.in | ||
index 8ad6e8bee..33209293d 100644 | ||
--- a/openblas.pc.in | ||
+++ b/openblas.pc.in | ||
@@ -2,6 +2,6 @@ Name: openblas | ||
Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version | ||
Version: ${version} | ||
URL: https://github.com/xianyi/OpenBLAS | ||
-Libs: -L${libdir} -lopenblas${libsuffix} | ||
+Libs: -L${libdir} -l${libprefix}openblas${libsuffix} | ||
Libs.private: ${extralib} | ||
Cflags: -I${includedir} | ||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters