Skip to content

Commit

Permalink
add osx-only objconv dependency for renaming symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
tkelman committed Oct 21, 2014
1 parent 02ff762 commit fef2954
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
1 change: 1 addition & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Julia builds the following libraries by default, but does not use them itself:
Julia's build process uses the following external tools:

- [PATCHELF](http:https://hydra.nixos.org/build/1524660/download/1/README)
- [OBJCONV](http:https://www.agner.org/optimize/#objconv)


Julia bundles the following external programs and libraries on some platforms:
Expand Down
39 changes: 36 additions & 3 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CONFIGURE_COMMON += F77="$(FC)" CC="$(CC)" CXX="$(CXX)"
MAKE_COMMON = DESTDIR="" prefix=$(build_prefix) bindir=$(build_bindir) libdir=$(build_libdir) libexecdir=$(build_libexecdir) datarootdir=$(build_datarootdir) includedir=$(build_includedir) sysconfdir=$(build_sysconfdir)

#autoconf configure-driven scripts: llvm pcre arpack fftw unwind gmp mpfr patchelf uv
#custom Makefile rules: openlibm Rmath dsfmt suitesparse-wrapper suitesparse lapack openblas mojibake
#custom Makefile rules: openlibm Rmath dsfmt suitesparse-wrapper suitesparse lapack openblas mojibake objconv

# prevent installing libs into usr/lib64 on opensuse
unexport CONFIG_SITE
Expand Down Expand Up @@ -77,6 +77,11 @@ endif

ifeq ($(USE_SYSTEM_BLAS), 0)
STAGE1_DEPS += openblas
ifeq ($(USE_BLAS64), 1)
ifeq ($(OS), Darwin)
STAGE1_DEPS += objconv
endif
endif
endif

ifeq ($(USE_SYSTEM_FFTW), 0)
Expand Down Expand Up @@ -140,7 +145,7 @@ install: $(addprefix install-, $(DEP_LIBS))
cleanall: $(addprefix clean-, $(DEP_LIBS))
distcleanall: $(addprefix distclean-, $(DEP_LIBS))
rm -rf $(build_prefix)
getall: get-llvm get-uv get-pcre get-openlibm get-openspecfun get-dsfmt get-Rmath get-openblas get-lapack get-fftw get-suitesparse get-arpack get-unwind get-osxunwind get-gmp get-mpfr get-patchelf get-mojibake get-virtualenv
getall: get-llvm get-uv get-pcre get-openlibm get-openspecfun get-dsfmt get-Rmath get-openblas get-lapack get-fftw get-suitesparse get-arpack get-unwind get-osxunwind get-gmp get-mpfr get-patchelf get-mojibake get-virtualenv get-objconv

## PATHS ##
# sort is used to remove potential duplicates
Expand Down Expand Up @@ -830,8 +835,9 @@ endif
# 64-bit BLAS interface
ifeq ($(USE_BLAS64), 1)
OPENBLAS_BUILD_OPTS += INTERFACE64=1 SYMBOLSUFFIX="64_"
ifeq ($(OS),Darwin)
ifeq ($(OS), Darwin)
OPENBLAS_BUILD_OPTS += OBJCONV=$(JULIAHOME)/deps/objconv/objconv
$(OPENBLAS_OBJ_SOURCE): $(OBJCONV_SOURCE)
endif
endif

Expand Down Expand Up @@ -1693,6 +1699,33 @@ compile-virtualenv: $(VIRTUALENV_SOURCE)
check-virtualenv: compile-virtualenv
install-virtualenv: $(VIRTUALENV_TARGET)

## objconv ##

OBJCONV_SOURCE = objconv/objconv
OBJCONV_TARGET = $(build_bindir)/objconv

objconv.zip:
$(JLDOWNLOAD) $@ http:https://www.agner.org/optimize/objconv.zip
objconv/config.status: objconv.zip
unzip -d objconv $<
cd objconv && unzip source.zip
echo 1 > $@
$(OBJCONV_SOURCE): objconv/config.status
cd objconv && $(CXX) -o objconv -O2 *.cpp
$(OBJCONV_TARGET): $(OBJCONV_SOURCE) | $(build_bindir)
cp -f $< $@

clean-objconv:
-rm -f $(OBJCONV_TARGET)
distclean-objconv:
-rm -rf objconv.zip objconv

get-objconv: objconv.zip
configure-objconv: objconv/config.status
compile-objconv: $(OBJCONV_SOURCE)
check-objconv: compile-objconv
install-objconv: $(OBJCONV_TARGET)

## phony targets ##

.PHONY: default compile install cleanall distcleanall \
Expand Down

0 comments on commit fef2954

Please sign in to comment.