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
  • Loading branch information
stevengj committed Oct 1, 2015
1 parent 966850c commit b0bc951
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 @@ -8,6 +8,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 @@ -914,6 +915,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 @@ -1059,10 +1059,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),$(BUILDDIR)))
$(eval $(call git-external,openblas,OPENBLAS,Makefile,$(LIBBLASNAME).$(SHLIB_EXT),$(BUILDDIR)))

OPENBLAS_OBJ_SOURCE := $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/libopenblas.$(SHLIB_EXT)
OPENBLAS_OBJ_TARGET := $(build_shlibdir)/libopenblas.$(SHLIB_EXT)
OPENBLAS_OBJ_SOURCE := $(BUILDDIR)/$(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 @@ -1098,7 +1098,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=$(abspath $(BUILDDIR)/objconv/objconv)
$(OPENBLAS_OBJ_SOURCE): $(OBJCONV_SOURCE)
Expand Down Expand Up @@ -1139,9 +1139,9 @@ $(OPENBLAS_OBJ_TARGET): $(OPENBLAS_OBJ_SOURCE) | $(build_shlibdir)
cp -f $< $@
ifeq ($(OS), Linux)
cd $(dir $@) && \
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) $@
$(INSTALL_NAME_CMD)$(LIBBLASNAME).$(SHLIB_EXT) $@

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

0 comments on commit b0bc951

Please sign in to comment.