Skip to content

Commit d297ffb

Browse files
committed
add osx-only objconv dependency for renaming symbols
(backport of fef2954) Conflicts: deps/Makefile Hopefully fix #8842, objconv dependency not right (backport of dbcd503) We needed to move the objconv rules to above the openblas rules Fixes #8842 (backport of 2579a64) Conflicts: deps/Makefile
1 parent bd9b63a commit d297ffb

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

LICENSE.md

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Julia builds the following libraries by default, but does not use them itself:
7474
Julia's build process uses the following external tools:
7575

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

7879

7980
Julia bundles the following external programs and libraries on some platforms:

deps/Makefile

+37-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ CONFIGURE_COMMON += F77="$(FC)" CC="$(CC)" CXX="$(CXX)"
1919
MAKE_COMMON = DESTDIR="" prefix=$(build_prefix) bindir=$(build_bindir) libdir=$(build_libdir) libexecdir=$(build_libexecdir) datarootdir=$(build_datarootdir) includedir=$(build_includedir) sysconfdir=$(build_sysconfdir)
2020

2121
#autoconf configure-driven scripts: llvm pcre arpack fftw unwind gmp mpfr patchelf uv
22-
#custom Makefile rules: openlibm Rmath double-conversion dsfmt suitesparse-wrapper suitesparse lapack openblas utf8proc
22+
#custom Makefile rules: openlibm Rmath double-conversion dsfmt suitesparse-wrapper suitesparse lapack openblas utf8proc objconv
2323

2424
# prevent installing libs into usr/lib64 on opensuse
2525
unexport CONFIG_SITE
@@ -77,6 +77,11 @@ endif
7777

7878
ifeq ($(USE_SYSTEM_BLAS), 0)
7979
STAGE1_DEPS += openblas
80+
ifeq ($(USE_BLAS64), 1)
81+
ifeq ($(OS), Darwin)
82+
STAGE1_DEPS += objconv
83+
endif
84+
endif
8085
endif
8186

8287
ifeq ($(USE_SYSTEM_FFTW), 0)
@@ -144,7 +149,7 @@ install: $(addprefix install-, $(DEP_LIBS))
144149
cleanall: $(addprefix clean-, $(DEP_LIBS))
145150
distcleanall: $(addprefix distclean-, $(DEP_LIBS))
146151
rm -rf $(build_prefix)
147-
getall: get-llvm get-uv get-pcre get-double-conversion 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-zlib get-patchelf get-utf8proc
152+
getall: get-llvm get-uv get-pcre get-double-conversion 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-zlib get-patchelf get-utf8proc get-objconv
148153

149154
## PATHS ##
150155
# sort is used to remove potential duplicates
@@ -750,6 +755,34 @@ check-Rmath: compile-Rmath
750755
install-Rmath: $(RMATH_OBJ_TARGET)
751756

752757

758+
## objconv ##
759+
760+
OBJCONV_SOURCE = objconv/objconv
761+
OBJCONV_TARGET = $(build_bindir)/objconv
762+
763+
objconv.zip:
764+
$(JLDOWNLOAD) $@ http://www.agner.org/optimize/objconv.zip
765+
objconv/config.status: objconv.zip
766+
unzip -d objconv $<
767+
cd objconv && unzip source.zip
768+
echo 1 > $@
769+
$(OBJCONV_SOURCE): objconv/config.status
770+
cd objconv && $(CXX) -o objconv -O2 *.cpp
771+
$(OBJCONV_TARGET): $(OBJCONV_SOURCE) | $(build_bindir)
772+
cp -f $< $@
773+
774+
clean-objconv:
775+
-rm -f $(OBJCONV_TARGET)
776+
distclean-objconv:
777+
-rm -rf objconv.zip objconv
778+
779+
get-objconv: objconv.zip
780+
configure-objconv: objconv/config.status
781+
compile-objconv: $(OBJCONV_SOURCE)
782+
check-objconv: compile-objconv
783+
install-objconv: $(OBJCONV_TARGET)
784+
785+
753786
## OpenBLAS ##
754787
# LAPACK is built into OpenBLAS by default
755788

@@ -792,8 +825,9 @@ endif
792825
# 64-bit BLAS interface
793826
ifeq ($(USE_BLAS64), 1)
794827
OPENBLAS_BUILD_OPTS += INTERFACE64=1 SYMBOLSUFFIX="64_"
795-
ifeq ($(OS),Darwin)
828+
ifeq ($(OS), Darwin)
796829
OPENBLAS_BUILD_OPTS += OBJCONV=$(JULIAHOME)/deps/objconv/objconv
830+
$(OPENBLAS_OBJ_SOURCE): $(OBJCONV_SOURCE)
797831
endif
798832
endif
799833

0 commit comments

Comments
 (0)