Skip to content

Commit

Permalink
as discussed in #8734, since we rename the openblas symbols we also n…
Browse files Browse the repository at this point in the history
…eed to rename the library to avoid conflicts

(cherry picked from commit b0bc951)
ref #13407
  • Loading branch information
stevengj authored and tkelman committed Oct 2, 2015
1 parent 6be2c57 commit 020adbb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# OPENBLAS build options
OPENBLAS_TARGET_ARCH=
OPENBLAS_SYMBOLSUFFIX=
OPENBLAS_LIBNAMESUFFIX=

# If OPENBLAS_TARGET_ARCH is set, we default to disabling OPENBLAS_DYNAMIC_ARCH
ifneq ($(OPENBLAS_TARGET_ARCH),)
Expand Down Expand Up @@ -836,6 +837,9 @@ endif
ifeq ($(USE_SYSTEM_BLAS), 0)
ifeq ($(USE_BLAS64), 1)
OPENBLAS_SYMBOLSUFFIX = 64_
OPENBLAS_LIBNAMESUFFIX = 64_
LIBBLASNAME = $(LIBBLASNAME)$(OPENBLAS_LIBNAMESUFFIX)
LIBLAPACKNAME = $(LIBBLASNAME)
endif
endif

Expand Down
12 changes: 6 additions & 6 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1013,10 +1013,10 @@ install-objconv: $(OBJCONV_TARGET)
# LAPACK is built into OpenBLAS by default
OPENBLAS_GIT_URL = git://github.com/xianyi/OpenBLAS.git
OPENBLAS_TAR_URL = https://api.github.com/repos/xianyi/OpenBLAS/tarball/$1
$(eval $(call git-external,openblas,OPENBLAS,Makefile,libopenblas.$(SHLIB_EXT)))
$(eval $(call git-external,openblas,OPENBLAS,Makefile,$(LIBBLASNAME).$(SHLIB_EXT)))

OPENBLAS_OBJ_SOURCE = $(OPENBLAS_SRC_DIR)/libopenblas.$(SHLIB_EXT)
OPENBLAS_OBJ_TARGET = $(build_shlibdir)/libopenblas.$(SHLIB_EXT)
OPENBLAS_OBJ_SOURCE = $(OPENBLAS_SRC_DIR)/$(LIBBLASNAME).$(SHLIB_EXT)
OPENBLAS_OBJ_TARGET = $(build_shlibdir)/$(LIBBLASNAME).$(SHLIB_EXT)
OPENBLAS_BUILD_OPTS = CC="$(CC)" FC="$(FC)" RANLIB="$(RANLIB)" FFLAGS="$(FFLAGS) $(JFFLAGS)" TARGET=$(OPENBLAS_TARGET_ARCH) BINARY=$(BINARY)

# Thread support
Expand Down Expand Up @@ -1052,7 +1052,7 @@ endif

# 64-bit BLAS interface
ifeq ($(USE_BLAS64), 1)
OPENBLAS_BUILD_OPTS += INTERFACE64=1 SYMBOLSUFFIX="$(OPENBLAS_SYMBOLSUFFIX)"
OPENBLAS_BUILD_OPTS += INTERFACE64=1 SYMBOLSUFFIX="$(OPENBLAS_SYMBOLSUFFIX)" LIBPREFIX="$(LIBBLASNAME)"
ifeq ($(OS), Darwin)
OPENBLAS_BUILD_OPTS += OBJCONV=$(JULIAHOME)/deps/objconv/objconv
$(OPENBLAS_OBJ_SOURCE): $(OBJCONV_SOURCE)
Expand Down Expand Up @@ -1093,9 +1093,9 @@ $(OPENBLAS_OBJ_TARGET): $(OPENBLAS_OBJ_SOURCE) | $(build_shlibdir)
cp -f $(OPENBLAS_SRC_DIR)/libopenblas.$(SHLIB_EXT) $(build_shlibdir)
ifeq ($(OS), Linux)
cd $(build_shlibdir) && \
ln -sf libopenblas.$(SHLIB_EXT) libopenblas.$(SHLIB_EXT).0
ln -sf $(LIBBLASNAME).$(SHLIB_EXT) $(LIBBLASNAME).$(SHLIB_EXT).0
endif
$(INSTALL_NAME_CMD)libopenblas.$(SHLIB_EXT) $(build_shlibdir)/libopenblas.$(SHLIB_EXT)
$(INSTALL_NAME_CMD)$(LIBBLASNAME).$(SHLIB_EXT) $(build_shlibdir)/$(LIBBLASNAME).$(SHLIB_EXT)

clean-openblas:
-$(MAKE) -C $(OPENBLAS_SRC_DIR) clean
Expand Down

0 comments on commit 020adbb

Please sign in to comment.