[arch-commits] Commit in julia/repos/community-x86_64 (10 files)
Antonio Rojas
arojas at archlinux.org
Wed Mar 31 22:05:18 UTC 2021
Date: Wednesday, March 31, 2021 @ 22:05:18
Author: arojas
Revision: 910747
archrelease: copy trunk to community-x86_64
Added:
julia/repos/community-x86_64/PKGBUILD
(from rev 910746, julia/trunk/PKGBUILD)
julia/repos/community-x86_64/julia-hardcoded-libs.patch
(from rev 910746, julia/trunk/julia-hardcoded-libs.patch)
julia/repos/community-x86_64/julia-system-cblas.patch
(from rev 910746, julia/trunk/julia-system-cblas.patch)
julia/repos/community-x86_64/julia-system-gcc-libs.patch
(from rev 910746, julia/trunk/julia-system-gcc-libs.patch)
julia/repos/community-x86_64/make-install-no-build.patch
(from rev 910746, julia/trunk/make-install-no-build.patch)
Deleted:
julia/repos/community-x86_64/PKGBUILD
julia/repos/community-x86_64/julia-hardcoded-libs.patch
julia/repos/community-x86_64/julia-system-cblas.patch
julia/repos/community-x86_64/julia-system-gcc-libs.patch
julia/repos/community-x86_64/make-install-no-build.patch
-----------------------------+
PKGBUILD | 230 ++++++++---------
julia-hardcoded-libs.patch | 99 +++----
julia-system-cblas.patch | 266 ++++++++++----------
julia-system-gcc-libs.patch | 542 +++++++++++++++++++++---------------------
make-install-no-build.patch | 28 +-
5 files changed, 576 insertions(+), 589 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2021-03-31 22:02:44 UTC (rev 910746)
+++ PKGBUILD 2021-03-31 22:05:18 UTC (rev 910747)
@@ -1,115 +0,0 @@
-# Maintainer: Alexander F. Rødseth <xyproto at archlinux.org>
-# Contributor: Eli Schwartz <eschwartz at archlinux.org>
-# Contributor: Lex Black <autumn-wind at web.de>
-# Contributor: Michael Jakl <jakl.michael at gmail.com>
-# Contributor: devmotion <nospam-archlinux.org at devmotion.de>
-# Contributor: Valentin Churavy <v.churavy at gmail.com>
-
-pkgname=julia
-epoch=2
-pkgver=1.6.0
-pkgrel=6
-arch=(x86_64)
-pkgdesc='High-level, high-performance, dynamic programming language'
-url='https://julialang.org/'
-license=(MIT)
-depends=(cblas fftw hicolor-icon-theme libgit2 libunwind libutf8proc openblas
- suitesparse mbedtls openlibm pcre2 llvm-libs p7zip)
-makedepends=(cmake gcc-fortran python llvm patchelf)
-optdepends=('gnuplot: If using the Gaston Package from julia')
-replaces=(julia-docs)
-source=("https://github.com/JuliaLang/julia/releases/download/v$pkgver/$pkgname-$pkgver-full.tar.gz"{,.asc}
- julia-system-cblas.patch
- julia-hardcoded-libs.patch
- make-install-no-build.patch
- julia-system-gcc-libs.patch)
-backup=(etc/julia/startup.jl)
-sha256sums=('c4c6872ee79fbe6391991057c3d0007e578b28d42572b0b35dace4107fe8bdf4'
- 'SKIP'
- 'e44c260e4111908337caa82e1c3fef563b9d40e0a30da68d6e91405bf6db24dc'
- '692a51efc1a9608720a8ec8899ad62e48f0f2bf43b71e495e16f0429e8a80441'
- '8be4605f92a009072ca7e843549c225fc4e959893498e7c4f8f79e861e63714d'
- '5c264736dd0339973537473520cb377da9e52ecb10d14750146c42e7767d56a3')
-validpgpkeys=('3673DF529D9049477F76B37566E3C7DC03D6E495') # Julia (Binary signing key) <buildbot at julialang.org>
-
-prepare() {
- mv julia-{f9720dc2eb,$pkgver}
- cd $pkgname-$pkgver
-
-# Fix build failure with system gcc-libs
- patch -p1 -i ../julia-system-gcc-libs.patch
-# Add and use option to build with system cblas
- patch -p1 -i ../julia-system-cblas.patch # Add and use option to build with system cblas
-# Don't hardcode library names
- patch -p1 -i ../julia-hardcoded-libs.patch
-# Don't build again in install
- patch -p1 -i ../make-install-no-build.patch
-# Fix test failure
- sed -e 's|0.22314355f0 + 3.1415927f0im|0.22314355f0 - 3.1415927f0im|' -i stdlib/LinearAlgebra/test/lu.jl
-}
-
-_buildopts="prefix=/usr \
- bindir=/usr/bin \
- sysconfdir=/etc \
- libexecdir=/usr/lib \
- USE_BINARYBUILDER=0 \
- USE_SYSTEM_CSL=1 \
- USE_SYSTEM_LLVM=1 \
- USE_SYSTEM_LIBUNWIND=1 \
- USE_SYSTEM_PCRE=1 \
- USE_SYSTEM_BLAS=1 \
- USE_SYSTEM_LAPACK=1 \
- USE_SYSTEM_GMP=1 \
- USE_SYSTEM_MPFR=1 \
- USE_SYSTEM_SUITESPARSE=1 \
- USE_SYSTEM_DSFMT=0 \
- USE_SYSTEM_LIBUV=0 \
- USE_SYSTEM_UTF8PROC=1 \
- USE_SYSTEM_LIBGIT2=1 \
- USE_SYSTEM_LIBSSH2=1 \
- USE_SYSTEM_MBEDTLS=1 \
- USE_SYSTEM_CURL=1 \
- USE_SYSTEM_PATCHELF=1 \
- USE_SYSTEM_ZLIB=1 \
- USE_SYSTEM_P7ZIP=1 \
- USE_SYSTEM_OPENLIBM=1 \
- MARCH=x86-64"
-
-build() {
- cd $pkgname-$pkgver
- make release VERBOSE=1 JLDFLAGS=${LDFLAGS} $_buildopts
-}
-
-check() {
- cd $pkgname-$pkgver/test
-
- # this is the make testall target, plus the --skip option from
- # travis/appveyor/circleci (one test fails with DNS resolution errors)
- # Also skip tests that check for a hardcoded version number
- ../julia --check-bounds=yes --startup-file=no ./runtests.jl all \
- --skip Sockets \
- --skip broadcast \
- --skip Distributed \
- --skip nghttp2_jll \
- --skip GMP_jll \
- --skip LibCURL \
- --skip LibSSH2_jll \
- --skip MbedTLS_jll \
- --skip SuiteSparse_jll \
- --skip PCRE2_jll \
- --skip LibGit2_jll \
- --skip MozillaCACerts_jll \
- --skip NetworkOptions
- find ../stdlib \( -name \*.cov -o -name \*.mem \) -delete
- rm -fr ../stdlib/Artifacts/test/artifacts
-}
-
-package() {
- cd $pkgname-$pkgver
- make DESTDIR="$pkgdir" install $_buildopts
-
- ln -s /usr/lib/libopenblas.so "$pkgdir"/usr/lib/julia/libopenblas64_.so # Needed by some 3rd party packages
-
- rm "$pkgdir"/usr/lib/julia/libccalltest.so.debug # Remove debug testing library
- install -Dm644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname
-}
Copied: julia/repos/community-x86_64/PKGBUILD (from rev 910746, julia/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2021-03-31 22:05:18 UTC (rev 910747)
@@ -0,0 +1,115 @@
+# Maintainer: Alexander F. Rødseth <xyproto at archlinux.org>
+# Contributor: Eli Schwartz <eschwartz at archlinux.org>
+# Contributor: Lex Black <autumn-wind at web.de>
+# Contributor: Michael Jakl <jakl.michael at gmail.com>
+# Contributor: devmotion <nospam-archlinux.org at devmotion.de>
+# Contributor: Valentin Churavy <v.churavy at gmail.com>
+
+pkgname=julia
+epoch=2
+pkgver=1.6.0
+pkgrel=7
+arch=(x86_64)
+pkgdesc='High-level, high-performance, dynamic programming language'
+url='https://julialang.org/'
+license=(MIT)
+depends=(cblas fftw hicolor-icon-theme libgit2 libunwind libutf8proc openblas
+ suitesparse mbedtls openlibm pcre2 llvm-libs p7zip)
+makedepends=(cmake gcc-fortran python llvm patchelf)
+optdepends=('gnuplot: If using the Gaston Package from julia')
+replaces=(julia-docs)
+source=("https://github.com/JuliaLang/julia/releases/download/v$pkgver/$pkgname-$pkgver-full.tar.gz"{,.asc}
+ julia-system-cblas.patch
+ julia-hardcoded-libs.patch
+ make-install-no-build.patch
+ julia-system-gcc-libs.patch)
+backup=(etc/julia/startup.jl)
+sha256sums=('c4c6872ee79fbe6391991057c3d0007e578b28d42572b0b35dace4107fe8bdf4'
+ 'SKIP'
+ 'e44c260e4111908337caa82e1c3fef563b9d40e0a30da68d6e91405bf6db24dc'
+ '7497bff3cc6faac0a0664e620fd5525d7bb19d1bc3d2ff7f4d900dc36d476ceb'
+ '8be4605f92a009072ca7e843549c225fc4e959893498e7c4f8f79e861e63714d'
+ '5c264736dd0339973537473520cb377da9e52ecb10d14750146c42e7767d56a3')
+validpgpkeys=('3673DF529D9049477F76B37566E3C7DC03D6E495') # Julia (Binary signing key) <buildbot at julialang.org>
+
+prepare() {
+ mv julia-{f9720dc2eb,$pkgver}
+ cd $pkgname-$pkgver
+
+# Fix build failure with system gcc-libs
+ patch -p1 -i ../julia-system-gcc-libs.patch
+# Add and use option to build with system cblas
+ patch -p1 -i ../julia-system-cblas.patch # Add and use option to build with system cblas
+# Don't hardcode library names
+ patch -p1 -i ../julia-hardcoded-libs.patch
+# Don't build again in install
+ patch -p1 -i ../make-install-no-build.patch
+# Fix test failure
+ sed -e 's|0.22314355f0 + 3.1415927f0im|0.22314355f0 - 3.1415927f0im|' -i stdlib/LinearAlgebra/test/lu.jl
+}
+
+_buildopts="prefix=/usr \
+ bindir=/usr/bin \
+ sysconfdir=/etc \
+ libexecdir=/usr/lib \
+ USE_BINARYBUILDER=0 \
+ USE_SYSTEM_CSL=1 \
+ USE_SYSTEM_LLVM=1 \
+ USE_SYSTEM_LIBUNWIND=1 \
+ USE_SYSTEM_PCRE=1 \
+ USE_SYSTEM_BLAS=1 \
+ USE_SYSTEM_LAPACK=1 \
+ USE_SYSTEM_GMP=1 \
+ USE_SYSTEM_MPFR=1 \
+ USE_SYSTEM_SUITESPARSE=1 \
+ USE_SYSTEM_DSFMT=0 \
+ USE_SYSTEM_LIBUV=0 \
+ USE_SYSTEM_UTF8PROC=1 \
+ USE_SYSTEM_LIBGIT2=1 \
+ USE_SYSTEM_LIBSSH2=1 \
+ USE_SYSTEM_MBEDTLS=1 \
+ USE_SYSTEM_CURL=1 \
+ USE_SYSTEM_PATCHELF=1 \
+ USE_SYSTEM_ZLIB=1 \
+ USE_SYSTEM_P7ZIP=1 \
+ USE_SYSTEM_OPENLIBM=1 \
+ MARCH=x86-64"
+
+build() {
+ cd $pkgname-$pkgver
+ make release VERBOSE=1 JLDFLAGS=${LDFLAGS} $_buildopts
+}
+
+check() {
+ cd $pkgname-$pkgver/test
+
+ # this is the make testall target, plus the --skip option from
+ # travis/appveyor/circleci (one test fails with DNS resolution errors)
+ # Also skip tests that check for a hardcoded version number
+ ../julia --check-bounds=yes --startup-file=no ./runtests.jl all \
+ --skip Sockets \
+ --skip broadcast \
+ --skip Distributed \
+ --skip nghttp2_jll \
+ --skip GMP_jll \
+ --skip LibCURL \
+ --skip LibSSH2_jll \
+ --skip MbedTLS_jll \
+ --skip SuiteSparse_jll \
+ --skip PCRE2_jll \
+ --skip LibGit2_jll \
+ --skip MozillaCACerts_jll \
+ --skip NetworkOptions
+ find ../stdlib \( -name \*.cov -o -name \*.mem \) -delete
+ rm -fr ../stdlib/Artifacts/test/artifacts
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install $_buildopts
+
+ ln -s /usr/lib/libopenblas.so "$pkgdir"/usr/lib/julia/libopenblas64_.so # Needed by some 3rd party packages
+
+ rm "$pkgdir"/usr/lib/julia/libccalltest.so.debug # Remove debug testing library
+ install -Dm644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname
+}
Deleted: julia-hardcoded-libs.patch
===================================================================
--- julia-hardcoded-libs.patch 2021-03-31 22:02:44 UTC (rev 910746)
+++ julia-hardcoded-libs.patch 2021-03-31 22:05:18 UTC (rev 910747)
@@ -1,56 +0,0 @@
-diff --git a/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl b/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl
-index a7ca666b23..b84a42f4e7 100644
---- a/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl
-+++ b/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl
-@@ -31,9 +31,9 @@ elseif Sys.isapple()
- const libmbedtls = "@rpath/libmbedtls.13.dylib"
- const libmbedx509 = "@rpath/libmbedx509.1.dylib"
- else
-- const libmbedcrypto = "libmbedcrypto.so.5"
-- const libmbedtls = "libmbedtls.so.13"
-- const libmbedx509 = "libmbedx509.so.1"
-+ const libmbedcrypto = "libmbedcrypto.so"
-+ const libmbedtls = "libmbedtls.so"
-+ const libmbedx509 = "libmbedx509.so"
- end
-
- function __init__()
-diff --git a/stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl b/stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl
-index 4bed970f38..7ec61be8ea 100644
---- a/stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl
-+++ b/stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl
-@@ -18,7 +18,7 @@ libopenblas_handle = C_NULL
- libopenblas_path = ""
-
- if arch(HostPlatform()) in ("x86_64", "powerpc64le")
-- const libsuffix = "64_"
-+ const libsuffix = ""
- else
- const libsuffix = ""
- end
-diff --git a/stdlib/libLLVM_jll/src/libLLVM_jll.jl b/stdlib/libLLVM_jll/src/libLLVM_jll.jl
-index fa45e754e5..b51812e3a8 100644
---- a/stdlib/libLLVM_jll/src/libLLVM_jll.jl
-+++ b/stdlib/libLLVM_jll/src/libLLVM_jll.jl
-@@ -23,7 +23,7 @@ if Sys.iswindows()
- elseif Sys.isapple()
- const libLLVM = "@rpath/libLLVM.dylib"
- else
-- const libLLVM = "libLLVM-11jl.so"
-+ const libLLVM = "libLLVM.so"
- end
-
- function __init__()
-diff --git a/stdlib/nghttp2_jll/src/nghttp2_jll.jl b/stdlib/nghttp2_jll/src/nghttp2_jll.jl
-index 8b98c76ac5..77ad9e3800 100644
---- a/stdlib/nghttp2_jll/src/nghttp2_jll.jl
-+++ b/stdlib/nghttp2_jll/src/nghttp2_jll.jl
-@@ -22,7 +22,7 @@ if Sys.iswindows()
- elseif Sys.isapple()
- const libnghttp2 = "@rpath/libnghttp2.14.dylib"
- else
-- const libnghttp2 = "libnghttp2.so.14"
-+ const libnghttp2 = "libnghttp2.so"
- end
-
- function __init__()
Copied: julia/repos/community-x86_64/julia-hardcoded-libs.patch (from rev 910746, julia/trunk/julia-hardcoded-libs.patch)
===================================================================
--- julia-hardcoded-libs.patch (rev 0)
+++ julia-hardcoded-libs.patch 2021-03-31 22:05:18 UTC (rev 910747)
@@ -0,0 +1,43 @@
+diff --git a/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl b/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl
+index a7ca666b23..b84a42f4e7 100644
+--- a/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl
++++ b/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl
+@@ -31,9 +31,9 @@ elseif Sys.isapple()
+ const libmbedtls = "@rpath/libmbedtls.13.dylib"
+ const libmbedx509 = "@rpath/libmbedx509.1.dylib"
+ else
+- const libmbedcrypto = "libmbedcrypto.so.5"
+- const libmbedtls = "libmbedtls.so.13"
+- const libmbedx509 = "libmbedx509.so.1"
++ const libmbedcrypto = "libmbedcrypto.so"
++ const libmbedtls = "libmbedtls.so"
++ const libmbedx509 = "libmbedx509.so"
+ end
+
+ function __init__()
+diff --git a/stdlib/libLLVM_jll/src/libLLVM_jll.jl b/stdlib/libLLVM_jll/src/libLLVM_jll.jl
+index fa45e754e5..b51812e3a8 100644
+--- a/stdlib/libLLVM_jll/src/libLLVM_jll.jl
++++ b/stdlib/libLLVM_jll/src/libLLVM_jll.jl
+@@ -23,7 +23,7 @@ if Sys.iswindows()
+ elseif Sys.isapple()
+ const libLLVM = "@rpath/libLLVM.dylib"
+ else
+- const libLLVM = "libLLVM-11jl.so"
++ const libLLVM = "libLLVM.so"
+ end
+
+ function __init__()
+diff --git a/stdlib/nghttp2_jll/src/nghttp2_jll.jl b/stdlib/nghttp2_jll/src/nghttp2_jll.jl
+index 8b98c76ac5..77ad9e3800 100644
+--- a/stdlib/nghttp2_jll/src/nghttp2_jll.jl
++++ b/stdlib/nghttp2_jll/src/nghttp2_jll.jl
+@@ -22,7 +22,7 @@ if Sys.iswindows()
+ elseif Sys.isapple()
+ const libnghttp2 = "@rpath/libnghttp2.14.dylib"
+ else
+- const libnghttp2 = "libnghttp2.so.14"
++ const libnghttp2 = "libnghttp2.so"
+ end
+
+ function __init__()
Deleted: julia-system-cblas.patch
===================================================================
--- julia-system-cblas.patch 2021-03-31 22:02:44 UTC (rev 910746)
+++ julia-system-cblas.patch 2021-03-31 22:05:18 UTC (rev 910747)
@@ -1,133 +0,0 @@
-From 0c442318196389d653ee21eba65d8c4f7beb72a0 Mon Sep 17 00:00:00 2001
-From: Eli Schwartz <eschwartz at archlinux.org>
-Date: Fri, 5 Oct 2018 15:52:17 +0000
-Subject: [PATCH] Use a dedicated cblas library, that may or may not be in fact
- the blas one.
-
-Openblas can be built with statically compiled convenience copies of
-cblas, but if not, then the system libcblas.so should be used.
----
- Make.inc | 12 +++++++++++-
- Makefile | 3 +++
- base/Makefile | 4 ++++
- stdlib/LinearAlgebra/src/blas.jl | 15 +++++++++++++--
- 4 files changed, 31 insertions(+), 3 deletions(-)
-
-diff --git a/Make.inc b/Make.inc
-index b00a41b356d8..7bc6cd69e863 100644
---- a/Make.inc
-+++ b/Make.inc
-@@ -1109,6 +1109,7 @@ endif
- ifeq ($(USE_SYSTEM_BLAS), 1)
- ifeq ($(OS), Darwin)
- USE_BLAS64 := 0
-+USE_SYSTEM_CBLAS := 0
- USE_SYSTEM_LAPACK := 0
- LIBBLAS := -L$(build_libdir) -lgfortblas
- LIBBLASNAME := libgfortblas
-@@ -1121,12 +1122,21 @@ LIBBLAS := -L$(build_shlibdir) -lopenblas
- LIBBLASNAME := libopenblas
- endif
-
--# OpenBLAS builds LAPACK as part of its build.
-+# OpenBLAS builds cblas/LAPACK as part of its build.
- # We only need to build LAPACK if we are not using OpenBLAS.
- ifeq ($(USE_SYSTEM_BLAS), 0)
-+LIBCBLAS := $(LIBBLAS)
-+LIBCBLASNAME := $(LIBBLASNAME)
- LIBLAPACK := $(LIBBLAS)
- LIBLAPACKNAME := $(LIBBLASNAME)
- else
-+ifeq ($(USE_SYSTEM_CBLAS), 1)
-+LIBCBLAS ?= -lcblas
-+LIBCBLASNAME ?= libcblas
-+else
-+LIBCBLAS := -L$(build_shlibdir) -lcblas $(LIBBLAS)
-+LIBCBLASNAME := libcblas
-+endif
- ifeq ($(USE_SYSTEM_LAPACK), 1)
- LIBLAPACK ?= -llapack
- LIBLAPACKNAME ?= liblapack
-diff --git a/Makefile b/Makefile
-index 6063e79ae956..7df60b8170d6 100644
---- a/Makefile
-+++ b/Makefile
-@@ -198,6 +198,9 @@ endif
- endif
-
- JL_PRIVATE_LIBS-$(USE_SYSTEM_BLAS) += $(LIBBLASNAME)
-+ifneq ($(LIBCBLASNAME),$(LIBBLASNAME))
-+JL_PRIVATE_LIBS-$(USE_SYSTEM_CBLAS) += $(LIBCBLASNAME)
-+endif
- ifneq ($(LIBLAPACKNAME),$(LIBBLASNAME))
- JL_PRIVATE_LIBS-$(USE_SYSTEM_LAPACK) += $(LIBLAPACKNAME)
- endif
-diff --git a/base/Makefile b/base/Makefile
-index 70e6da933d70..8ecfa6902b59 100644
---- a/base/Makefile
-+++ b/base/Makefile
-@@ -54,6 +54,7 @@ else
- endif
- @echo "const libm_name = \"$(LIBMNAME)\"" >> $@
- @echo "const libblas_name = \"$(LIBBLASNAME)\"" >> $@
-+ @echo "const libcblas_name = \"$(LIBCBLASNAME)\"" >> $@
- @echo "const liblapack_name = \"$(LIBLAPACKNAME)\"" >> $@
- ifeq ($(USE_BLAS64), 1)
- @echo "const USE_BLAS64 = true" >> $@
-@@ -183,6 +184,9 @@ endif
- $(eval $(call symlink_system_library,PCRE,libpcre2-8))
- $(eval $(call symlink_system_library,DSFMT,libdSFMT))
- $(eval $(call symlink_system_library,BLAS,$(LIBBLASNAME)))
-+ifneq ($(LIBCBLASNAME),$(LIBBLASNAME))
-+$(eval $(call symlink_system_library,CBLAS,$(LIBCBLASNAME)))
-+endif
- ifneq ($(LIBLAPACKNAME),$(LIBBLASNAME))
- $(eval $(call symlink_system_library,LAPACK,$(LIBLAPACKNAME)))
- endif
-diff --git a/stdlib/LinearAlgebra/src/blas.jl b/stdlib/LinearAlgebra/src/blas.jl
-index fee8c9e74d7e..8c76d1acbf29 100644
---- a/stdlib/LinearAlgebra/src/blas.jl
-+++ b/stdlib/LinearAlgebra/src/blas.jl
-@@ -61,6 +61,7 @@ export
-
-
- const libblas = Base.libblas_name
-+const libcblas = Base.libcblas_name
- const liblapack = Base.liblapack_name
-
- import LinearAlgebra
-@@ -101,6 +102,16 @@ else
- end
- end
-
-+if libcblas == libblas
-+ macro cblasfunc(x)
-+ return @blasfunc(x)
-+ end
-+else
-+ macro cblasfunc(x)
-+ return Expr(:quote, x)
-+ end
-+end
-+
- openblas_get_config() = strip(unsafe_string(ccall((@blasfunc(openblas_get_config), libblas), Ptr{UInt8}, () )))
-
- """
-@@ -300,7 +311,7 @@ for (fname, elty) in ((:cblas_zdotc_sub,:ComplexF64),
- # DOUBLE PRECISION DX(*),DY(*)
- function dotc(n::Integer, DX::Union{Ptr{$elty},AbstractArray{$elty}}, incx::Integer, DY::Union{Ptr{$elty},AbstractArray{$elty}}, incy::Integer)
- result = Ref{$elty}()
-- ccall((@blasfunc($fname), libblas), Cvoid,
-+ ccall((@cblasfunc($fname), libcblas), Cvoid,
- (BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}),
- n, DX, incx, DY, incy, result)
- result[]
-@@ -318,7 +329,7 @@ for (fname, elty) in ((:cblas_zdotu_sub,:ComplexF64),
- # DOUBLE PRECISION DX(*),DY(*)
- function dotu(n::Integer, DX::Union{Ptr{$elty},AbstractArray{$elty}}, incx::Integer, DY::Union{Ptr{$elty},AbstractArray{$elty}}, incy::Integer)
- result = Ref{$elty}()
-- ccall((@blasfunc($fname), libblas), Cvoid,
-+ ccall((@cblasfunc($fname), libcblas), Cvoid,
- (BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}),
- n, DX, incx, DY, incy, result)
- result[]
Copied: julia/repos/community-x86_64/julia-system-cblas.patch (from rev 910746, julia/trunk/julia-system-cblas.patch)
===================================================================
--- julia-system-cblas.patch (rev 0)
+++ julia-system-cblas.patch 2021-03-31 22:05:18 UTC (rev 910747)
@@ -0,0 +1,133 @@
+From 0c442318196389d653ee21eba65d8c4f7beb72a0 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz at archlinux.org>
+Date: Fri, 5 Oct 2018 15:52:17 +0000
+Subject: [PATCH] Use a dedicated cblas library, that may or may not be in fact
+ the blas one.
+
+Openblas can be built with statically compiled convenience copies of
+cblas, but if not, then the system libcblas.so should be used.
+---
+ Make.inc | 12 +++++++++++-
+ Makefile | 3 +++
+ base/Makefile | 4 ++++
+ stdlib/LinearAlgebra/src/blas.jl | 15 +++++++++++++--
+ 4 files changed, 31 insertions(+), 3 deletions(-)
+
+diff --git a/Make.inc b/Make.inc
+index b00a41b356d8..7bc6cd69e863 100644
+--- a/Make.inc
++++ b/Make.inc
+@@ -1109,6 +1109,7 @@ endif
+ ifeq ($(USE_SYSTEM_BLAS), 1)
+ ifeq ($(OS), Darwin)
+ USE_BLAS64 := 0
++USE_SYSTEM_CBLAS := 0
+ USE_SYSTEM_LAPACK := 0
+ LIBBLAS := -L$(build_libdir) -lgfortblas
+ LIBBLASNAME := libgfortblas
+@@ -1121,12 +1122,21 @@ LIBBLAS := -L$(build_shlibdir) -lopenblas
+ LIBBLASNAME := libopenblas
+ endif
+
+-# OpenBLAS builds LAPACK as part of its build.
++# OpenBLAS builds cblas/LAPACK as part of its build.
+ # We only need to build LAPACK if we are not using OpenBLAS.
+ ifeq ($(USE_SYSTEM_BLAS), 0)
++LIBCBLAS := $(LIBBLAS)
++LIBCBLASNAME := $(LIBBLASNAME)
+ LIBLAPACK := $(LIBBLAS)
+ LIBLAPACKNAME := $(LIBBLASNAME)
+ else
++ifeq ($(USE_SYSTEM_CBLAS), 1)
++LIBCBLAS ?= -lcblas
++LIBCBLASNAME ?= libcblas
++else
++LIBCBLAS := -L$(build_shlibdir) -lcblas $(LIBBLAS)
++LIBCBLASNAME := libcblas
++endif
+ ifeq ($(USE_SYSTEM_LAPACK), 1)
+ LIBLAPACK ?= -llapack
+ LIBLAPACKNAME ?= liblapack
+diff --git a/Makefile b/Makefile
+index 6063e79ae956..7df60b8170d6 100644
+--- a/Makefile
++++ b/Makefile
+@@ -198,6 +198,9 @@ endif
+ endif
+
+ JL_PRIVATE_LIBS-$(USE_SYSTEM_BLAS) += $(LIBBLASNAME)
++ifneq ($(LIBCBLASNAME),$(LIBBLASNAME))
++JL_PRIVATE_LIBS-$(USE_SYSTEM_CBLAS) += $(LIBCBLASNAME)
++endif
+ ifneq ($(LIBLAPACKNAME),$(LIBBLASNAME))
+ JL_PRIVATE_LIBS-$(USE_SYSTEM_LAPACK) += $(LIBLAPACKNAME)
+ endif
+diff --git a/base/Makefile b/base/Makefile
+index 70e6da933d70..8ecfa6902b59 100644
+--- a/base/Makefile
++++ b/base/Makefile
+@@ -54,6 +54,7 @@ else
+ endif
+ @echo "const libm_name = \"$(LIBMNAME)\"" >> $@
+ @echo "const libblas_name = \"$(LIBBLASNAME)\"" >> $@
++ @echo "const libcblas_name = \"$(LIBCBLASNAME)\"" >> $@
+ @echo "const liblapack_name = \"$(LIBLAPACKNAME)\"" >> $@
+ ifeq ($(USE_BLAS64), 1)
+ @echo "const USE_BLAS64 = true" >> $@
+@@ -183,6 +184,9 @@ endif
+ $(eval $(call symlink_system_library,PCRE,libpcre2-8))
+ $(eval $(call symlink_system_library,DSFMT,libdSFMT))
+ $(eval $(call symlink_system_library,BLAS,$(LIBBLASNAME)))
++ifneq ($(LIBCBLASNAME),$(LIBBLASNAME))
++$(eval $(call symlink_system_library,CBLAS,$(LIBCBLASNAME)))
++endif
+ ifneq ($(LIBLAPACKNAME),$(LIBBLASNAME))
+ $(eval $(call symlink_system_library,LAPACK,$(LIBLAPACKNAME)))
+ endif
+diff --git a/stdlib/LinearAlgebra/src/blas.jl b/stdlib/LinearAlgebra/src/blas.jl
+index fee8c9e74d7e..8c76d1acbf29 100644
+--- a/stdlib/LinearAlgebra/src/blas.jl
++++ b/stdlib/LinearAlgebra/src/blas.jl
+@@ -61,6 +61,7 @@ export
+
+
+ const libblas = Base.libblas_name
++const libcblas = Base.libcblas_name
+ const liblapack = Base.liblapack_name
+
+ import LinearAlgebra
+@@ -101,6 +102,16 @@ else
+ end
+ end
+
++if libcblas == libblas
++ macro cblasfunc(x)
++ return @blasfunc(x)
++ end
++else
++ macro cblasfunc(x)
++ return Expr(:quote, x)
++ end
++end
++
+ openblas_get_config() = strip(unsafe_string(ccall((@blasfunc(openblas_get_config), libblas), Ptr{UInt8}, () )))
+
+ """
+@@ -300,7 +311,7 @@ for (fname, elty) in ((:cblas_zdotc_sub,:ComplexF64),
+ # DOUBLE PRECISION DX(*),DY(*)
+ function dotc(n::Integer, DX::Union{Ptr{$elty},AbstractArray{$elty}}, incx::Integer, DY::Union{Ptr{$elty},AbstractArray{$elty}}, incy::Integer)
+ result = Ref{$elty}()
+- ccall((@blasfunc($fname), libblas), Cvoid,
++ ccall((@cblasfunc($fname), libcblas), Cvoid,
+ (BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}),
+ n, DX, incx, DY, incy, result)
+ result[]
+@@ -318,7 +329,7 @@ for (fname, elty) in ((:cblas_zdotu_sub,:ComplexF64),
+ # DOUBLE PRECISION DX(*),DY(*)
+ function dotu(n::Integer, DX::Union{Ptr{$elty},AbstractArray{$elty}}, incx::Integer, DY::Union{Ptr{$elty},AbstractArray{$elty}}, incy::Integer)
+ result = Ref{$elty}()
+- ccall((@blasfunc($fname), libblas), Cvoid,
++ ccall((@cblasfunc($fname), libcblas), Cvoid,
+ (BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}),
+ n, DX, incx, DY, incy, result)
+ result[]
Deleted: julia-system-gcc-libs.patch
===================================================================
--- julia-system-gcc-libs.patch 2021-03-31 22:02:44 UTC (rev 910746)
+++ julia-system-gcc-libs.patch 2021-03-31 22:05:18 UTC (rev 910747)
@@ -1,271 +0,0 @@
-From 71d7a8a8c12b72bfa362ae955d2ce4dfbdf5b8ba Mon Sep 17 00:00:00 2001
-From: Elliot Saba <staticfloat at gmail.com>
-Date: Fri, 26 Mar 2021 18:40:07 +0000
-Subject: [PATCH 1/2] [build] Add `symlink_system_library` calls for CSL
-
-We differentiate between a `USE_BINARYBUILDER_CSL=0` configuration
-(where we copy the CSL libraries into the Julia build tree) versus a
-`USE_SYSTEM_CSL=1` configuration (where we symlink them in a manner
-similar to other system libararies)
----
- Make.inc | 23 +++++++++++++-
- base/Makefile | 88 ++++++++++++++++++++++++++++++---------------------
- deps/csl.mk | 40 ++++++++---------------
- 3 files changed, 87 insertions(+), 64 deletions(-)
-
-diff --git a/Make.inc b/Make.inc
-index 519720a861ed7..7cba05806e684 100644
---- a/Make.inc
-+++ b/Make.inc
-@@ -596,6 +596,21 @@ else
- SHLIB_EXT := so
- endif
-
-+ifeq ($(OS),WINNT)
-+define versioned_libname
-+$$(if $(2),$(1)-$(2).$(SHLIB_EXT),$(1).$(SHLIB_EXT))
-+endef
-+else ifeq ($(OS),Darwin)
-+define versioned_libname
-+$$(if $(2),$(1).$(2).$(SHLIB_EXT),$(1).$(SHLIB_EXT))
-+endef
-+else
-+define versioned_libname
-+$$(if $(2),$(1).$(SHLIB_EXT).$(2),$(1).$(SHLIB_EXT))
-+endef
-+endif
-+
-+
- ifeq ($(SHLIB_EXT), so)
- define SONAME_FLAGS
- -Wl,-soname=$1
-@@ -1147,6 +1162,8 @@ BB_TRIPLET_LIBGFORTRAN := $(subst $(SPACE),-,$(filter-out cxx%,$(subst -,$(SPACE
- BB_TRIPLET_CXXABI := $(subst $(SPACE),-,$(filter-out libgfortran%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI))))
- BB_TRIPLET := $(subst $(SPACE),-,$(filter-out cxx%,$(filter-out libgfortran%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI)))))
-
-+LIBGFORTRAN_VERSION := $(subst libgfortran,,$(filter libgfortran%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN))))
-+
- # This is the set of projects that BinaryBuilder dependencies are hooked up for.
- BB_PROJECTS := BLASTRAMPOLINE OPENBLAS LLVM SUITESPARSE OPENLIBM GMP MBEDTLS LIBSSH2 NGHTTP2 MPFR CURL LIBGIT2 PCRE LIBUV LIBUNWIND DSFMT OBJCONV ZLIB P7ZIP CSL
- define SET_BB_DEFAULT
-@@ -1479,8 +1496,12 @@ ifneq ($(findstring $(OS),Linux FreeBSD),)
- LIBGCC_NAME := libgcc_s.$(SHLIB_EXT).1
- endif
-
--
-+# USE_SYSTEM_CSL causes it to get symlinked into build_private_shlibdir
-+ifeq ($(USE_SYSTEM_CSL),1)
-+LIBGCC_BUILD_DEPLIB := $(call dep_lib_path,$(build_libdir),$(build_private_shlibdir)/$(LIBGCC_NAME))
-+else
- LIBGCC_BUILD_DEPLIB := $(call dep_lib_path,$(build_libdir),$(build_shlibdir)/$(LIBGCC_NAME))
-+endif
- LIBGCC_INSTALL_DEPLIB := $(call dep_lib_path,$(libdir),$(private_shlibdir)/$(LIBGCC_NAME))
-
- # USE_SYSTEM_LIBM and USE_SYSTEM_OPENLIBM causes it to get symlinked into build_private_shlibdir
-diff --git a/base/Makefile b/base/Makefile
-index e024e546f94d3..2bef6aab7f1f4 100644
---- a/base/Makefile
-+++ b/base/Makefile
-@@ -169,53 +169,69 @@ endif
- # echo "$$P"
-
- define symlink_system_library
--symlink_$1: $$(build_private_libdir)/$1.$$(SHLIB_EXT)
--$$(build_private_libdir)/$1.$$(SHLIB_EXT):
-- REALPATH=`$$(call spawn,$$(build_depsbindir)/libwhich) -p $$(notdir $$@)` && \
-- $$(call resolve_path,REALPATH) && \
-- [ -e "$$$$REALPATH" ] && \
-- ([ ! -e "$$@" ] || rm "$$@") && \
-- echo ln -sf "$$$$REALPATH" "$$@" && \
-- ln -sf "$$$$REALPATH" "$$@"
--ifneq ($2,)
--ifneq ($$(USE_SYSTEM_$2),0)
--SYMLINK_SYSTEM_LIBRARIES += symlink_$1
--endif
-+libname_$2 := $$(notdir $(call versioned_libname,$2,$3))
-+libpath_$2 := $$(shell $$(call spawn,$$(build_depsbindir)/libwhich) -p $$(libname_$2) 2>/dev/null)
-+symlink_$2: $$(build_private_libdir)/$$(libname_$2)
-+$$(build_private_libdir)/$$(libname_$2):
-+ @if [ -e "$$(libpath_$2)" ]; then \
-+ REALPATH=$$(libpath_$2); \
-+ $$(call resolve_path,REALPATH) && \
-+ [ -e "$$$$REALPATH" ] && \
-+ ([ ! -e "$$@" ] || rm "$$@") && \
-+ echo ln -sf "$$$$REALPATH" "$$@" && \
-+ ln -sf "$$$$REALPATH" "$$@"; \
-+ else \
-+ if [ "$4" != "ALLOW_FAILURE" ]; then \
-+ echo "System library symlink failure: Unable to locate $$(libname_$2) on your system!" >&2; \
-+ false; \
-+ fi; \
-+ fi
-+ifneq ($$(USE_SYSTEM_$1),0)
-+SYMLINK_SYSTEM_LIBRARIES += symlink_$2
- endif
- endef
-
- # the following excludes: libuv.a, libutf8proc.a
-
--$(eval $(call symlink_system_library,$(LIBMNAME)))
- ifneq ($(USE_SYSTEM_LIBM),0)
--SYMLINK_SYSTEM_LIBRARIES += symlink_$(LIBMNAME)
-+$(eval $(call symlink_system_library,LIBM,$(LIBMNAME)))
- else ifneq ($(USE_SYSTEM_OPENLIBM),0)
--SYMLINK_SYSTEM_LIBRARIES += symlink_$(LIBMNAME)
-+$(eval $(call symlink_system_library,OPENLIBM,$(LIBMNAME)))
- endif
-
--$(eval $(call symlink_system_library,libpcre2-8,PCRE))
--$(eval $(call symlink_system_library,libdSFMT,DSFMT))
--$(eval $(call symlink_system_library,$(LIBBLASNAME),BLAS))
-+$(eval $(call symlink_system_library,CSL,libgcc_s,1))
-+ifneq (,$(LIBGFORTRAN_VERSION))
-+$(eval $(call symlink_system_library,CSL,libgfortran,$(LIBGFORTRAN_VERSION)))
-+endif
-+$(eval $(call symlink_system_library,CSL,libquadmath,0))
-+$(eval $(call symlink_system_library,CSL,libstdc++,6))
-+# We allow libssp, libatomic and libgomp to fail as they are not available on all systems
-+$(eval $(call symlink_system_library,CSL,libssp,0,ALLOW_FAILURE))
-+$(eval $(call symlink_system_library,CSL,libatomic,1,ALLOW_FAILURE))
-+$(eval $(call symlink_system_library,CSL,libgomp,1,ALLOW_FAILURE))
-+$(eval $(call symlink_system_library,PCRE,libpcre2-8))
-+$(eval $(call symlink_system_library,DSFMT,libdSFMT))
-+$(eval $(call symlink_system_library,BLAS,$(LIBBLASNAME)))
- ifneq ($(LIBLAPACKNAME),$(LIBBLASNAME))
--$(eval $(call symlink_system_library,$(LIBLAPACKNAME),LAPACK))
-+$(eval $(call symlink_system_library,LAPACK,$(LIBLAPACKNAME)))
- endif
--$(eval $(call symlink_system_library,libgmp,GMP))
--$(eval $(call symlink_system_library,libmpfr,MPFR))
--$(eval $(call symlink_system_library,libmbedtls,MBEDTLS))
--$(eval $(call symlink_system_library,libmbedcrypto,MBEDTLS))
--$(eval $(call symlink_system_library,libmbedx509,MBEDTLS))
--$(eval $(call symlink_system_library,libssh2,LIBSSH2))
--$(eval $(call symlink_system_library,libnghttp2,NGHTTP2))
--$(eval $(call symlink_system_library,libcurl,CURL))
--$(eval $(call symlink_system_library,libgit2,LIBGIT2))
--$(eval $(call symlink_system_library,libamd,SUITESPARSE))
--$(eval $(call symlink_system_library,libcamd,SUITESPARSE))
--$(eval $(call symlink_system_library,libccolamd,SUITESPARSE))
--$(eval $(call symlink_system_library,libcholmod,SUITESPARSE))
--$(eval $(call symlink_system_library,libcolamd,SUITESPARSE))
--$(eval $(call symlink_system_library,libumfpack,SUITESPARSE))
--$(eval $(call symlink_system_library,libspqr,SUITESPARSE))
--$(eval $(call symlink_system_library,libsuitesparseconfig,SUITESPARSE))
-+$(eval $(call symlink_system_library,GMP,libgmp))
-+$(eval $(call symlink_system_library,MPFR,libmpfr))
-+$(eval $(call symlink_system_library,MBEDTLS,libmbedtls))
-+$(eval $(call symlink_system_library,MBEDTLS,libmbedcrypto))
-+$(eval $(call symlink_system_library,MBEDTLS,libmbedx509))
-+$(eval $(call symlink_system_library,LIBSSH2,libssh2))
-+$(eval $(call symlink_system_library,NGHTTP2,libnghttp2))
-+$(eval $(call symlink_system_library,CURL,libcurl))
-+$(eval $(call symlink_system_library,LIBGIT2,libgit2))
-+$(eval $(call symlink_system_library,SUITESPARSE,libamd))
-+$(eval $(call symlink_system_library,SUITESPARSE,libcamd))
-+$(eval $(call symlink_system_library,SUITESPARSE,libccolamd))
-+$(eval $(call symlink_system_library,SUITESPARSE,libcholmod))
-+$(eval $(call symlink_system_library,SUITESPARSE,libcolamd))
-+$(eval $(call symlink_system_library,SUITESPARSE,libumfpack))
-+$(eval $(call symlink_system_library,SUITESPARSE,libspqr))
-+$(eval $(call symlink_system_library,SUITESPARSE,libsuitesparseconfig))
- # EXCLUDED LIBRARIES (installed/used, but not vendored for use with dlopen):
- # libunwind
- endif # WINNT
-diff --git a/deps/csl.mk b/deps/csl.mk
-index 095d4ceec4a1e..423201cbb5a0c 100644
---- a/deps/csl.mk
-+++ b/deps/csl.mk
-@@ -19,48 +19,34 @@ $$(build_shlibdir)/$(1): | $$(build_shlibdir)
- [ -n "$$$${SRC_LIB}" ] && cp $$$${SRC_LIB} $$(build_shlibdir)
- endef
-
--ifeq ($(OS),WINNT)
--define gen_libname
--$$(if $(2),lib$(1)-$(2).$(SHLIB_EXT),lib$(1).$(SHLIB_EXT))
--endef
--else ifeq ($(OS),Darwin)
--define gen_libname
--$$(if $(2),lib$(1).$(2).$(SHLIB_EXT),lib$(1).$(SHLIB_EXT))
--endef
--else
--define gen_libname
--$$(if $(2),lib$(1).$(SHLIB_EXT).$(2),lib$(1).$(SHLIB_EXT))
--endef
--endif
--
- # libgfortran has multiple names; we're just going to copy any version we can find
- # Since we're only looking in the location given by `$(FC)` this should only succeed for one.
--$(eval $(call copy_csl,$(call gen_libname,gfortran,3)))
--$(eval $(call copy_csl,$(call gen_libname,gfortran,4)))
--$(eval $(call copy_csl,$(call gen_libname,gfortran,5)))
-+$(eval $(call copy_csl,$(call versioned_libname,libgfortran,3)))
-+$(eval $(call copy_csl,$(call versioned_libname,libgfortran,4)))
-+$(eval $(call copy_csl,$(call versioned_libname,libgfortran,5)))
-
- # These are all libraries that we should always have
--$(eval $(call copy_csl,$(call gen_libname,quadmath,0)))
--$(eval $(call copy_csl,$(call gen_libname,stdc++,6)))
--$(eval $(call copy_csl,$(call gen_libname,ssp,0)))
--$(eval $(call copy_csl,$(call gen_libname,atomic,1)))
--$(eval $(call copy_csl,$(call gen_libname,gomp,1)))
-+$(eval $(call copy_csl,$(call versioned_libname,libquadmath,0)))
-+$(eval $(call copy_csl,$(call versioned_libname,libstdc++,6)))
-+$(eval $(call copy_csl,$(call versioned_libname,libssp,0)))
-+$(eval $(call copy_csl,$(call versioned_libname,libatomic,1)))
-+$(eval $(call copy_csl,$(call versioned_libname,libgomp,1)))
-
- ifeq ($(OS),WINNT)
- # Windwos has special gcc_s names
- ifeq ($(ARCH),i686)
--$(eval $(call copy_csl,$(call gen_libname,gcc_s_sjlj,1)))
-+$(eval $(call copy_csl,$(call versioned_libname,libgcc_s_sjlj,1)))
- else
--$(eval $(call copy_csl,$(call gen_libname,gcc_s_seh,1)))
-+$(eval $(call copy_csl,$(call versioned_libname,libgcc_s_seh,1)))
- endif
- else
--$(eval $(call copy_csl,$(call gen_libname,gcc_s,1)))
-+$(eval $(call copy_csl,$(call versioned_libname,libgcc_s,1)))
- endif
- # winpthread is only Windows, pthread is only others
- ifeq ($(OS),WINNT)
--$(eval $(call copy_csl,$(call gen_libname,winpthread,1)))
-+$(eval $(call copy_csl,$(call versioned_libname,libwinpthread,1)))
- else
--$(eval $(call copy_csl,$(call gen_libname,pthread,0)))
-+$(eval $(call copy_csl,$(call versioned_libname,libpthread,0)))
- endif
-
- get-csl:
-
-From 6536b8519b25db844f2a1866d056879cb87d1c66 Mon Sep 17 00:00:00 2001
-From: Elliot Saba <staticfloat at gmail.com>
-Date: Fri, 26 Mar 2021 22:32:04 +0000
-Subject: [PATCH 2/2] Expand `JL_PRIVATE_LIBS-1` for versioned library names as
- well
-
-Without this, we fail to install things like `libgcc_s.so.1` when
-installed into the private libdir by `symlink_system_libraries`.
----
- Makefile | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 823ff3b86339d..e08f0e959e1b3 100644
---- a/Makefile
-+++ b/Makefile
-@@ -290,8 +290,11 @@ endif
- done \
- done
- for suffix in $(JL_PRIVATE_LIBS-1) ; do \
-- lib=$(build_private_libdir)/$${suffix}.$(SHLIB_EXT); \
-- $(INSTALL_M) $$lib $(DESTDIR)$(private_libdir) ; \
-+ for lib in $(build_private_libdir)/$${suffix}.$(SHLIB_EXT)*; do \
-+ if [ "$${lib##*.}" != "dSYM" ]; then \
-+ $(INSTALL_M) $$lib $(DESTDIR)$(private_libdir) ; \
-+ fi \
-+ done \
- done
- endif
- # Install `7z` into libexec/
Copied: julia/repos/community-x86_64/julia-system-gcc-libs.patch (from rev 910746, julia/trunk/julia-system-gcc-libs.patch)
===================================================================
--- julia-system-gcc-libs.patch (rev 0)
+++ julia-system-gcc-libs.patch 2021-03-31 22:05:18 UTC (rev 910747)
@@ -0,0 +1,271 @@
+From 71d7a8a8c12b72bfa362ae955d2ce4dfbdf5b8ba Mon Sep 17 00:00:00 2001
+From: Elliot Saba <staticfloat at gmail.com>
+Date: Fri, 26 Mar 2021 18:40:07 +0000
+Subject: [PATCH 1/2] [build] Add `symlink_system_library` calls for CSL
+
+We differentiate between a `USE_BINARYBUILDER_CSL=0` configuration
+(where we copy the CSL libraries into the Julia build tree) versus a
+`USE_SYSTEM_CSL=1` configuration (where we symlink them in a manner
+similar to other system libararies)
+---
+ Make.inc | 23 +++++++++++++-
+ base/Makefile | 88 ++++++++++++++++++++++++++++++---------------------
+ deps/csl.mk | 40 ++++++++---------------
+ 3 files changed, 87 insertions(+), 64 deletions(-)
+
+diff --git a/Make.inc b/Make.inc
+index 519720a861ed7..7cba05806e684 100644
+--- a/Make.inc
++++ b/Make.inc
+@@ -596,6 +596,21 @@ else
+ SHLIB_EXT := so
+ endif
+
++ifeq ($(OS),WINNT)
++define versioned_libname
++$$(if $(2),$(1)-$(2).$(SHLIB_EXT),$(1).$(SHLIB_EXT))
++endef
++else ifeq ($(OS),Darwin)
++define versioned_libname
++$$(if $(2),$(1).$(2).$(SHLIB_EXT),$(1).$(SHLIB_EXT))
++endef
++else
++define versioned_libname
++$$(if $(2),$(1).$(SHLIB_EXT).$(2),$(1).$(SHLIB_EXT))
++endef
++endif
++
++
+ ifeq ($(SHLIB_EXT), so)
+ define SONAME_FLAGS
+ -Wl,-soname=$1
+@@ -1147,6 +1162,8 @@ BB_TRIPLET_LIBGFORTRAN := $(subst $(SPACE),-,$(filter-out cxx%,$(subst -,$(SPACE
+ BB_TRIPLET_CXXABI := $(subst $(SPACE),-,$(filter-out libgfortran%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI))))
+ BB_TRIPLET := $(subst $(SPACE),-,$(filter-out cxx%,$(filter-out libgfortran%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI)))))
+
++LIBGFORTRAN_VERSION := $(subst libgfortran,,$(filter libgfortran%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN))))
++
+ # This is the set of projects that BinaryBuilder dependencies are hooked up for.
+ BB_PROJECTS := BLASTRAMPOLINE OPENBLAS LLVM SUITESPARSE OPENLIBM GMP MBEDTLS LIBSSH2 NGHTTP2 MPFR CURL LIBGIT2 PCRE LIBUV LIBUNWIND DSFMT OBJCONV ZLIB P7ZIP CSL
+ define SET_BB_DEFAULT
+@@ -1479,8 +1496,12 @@ ifneq ($(findstring $(OS),Linux FreeBSD),)
+ LIBGCC_NAME := libgcc_s.$(SHLIB_EXT).1
+ endif
+
+-
++# USE_SYSTEM_CSL causes it to get symlinked into build_private_shlibdir
++ifeq ($(USE_SYSTEM_CSL),1)
++LIBGCC_BUILD_DEPLIB := $(call dep_lib_path,$(build_libdir),$(build_private_shlibdir)/$(LIBGCC_NAME))
++else
+ LIBGCC_BUILD_DEPLIB := $(call dep_lib_path,$(build_libdir),$(build_shlibdir)/$(LIBGCC_NAME))
++endif
+ LIBGCC_INSTALL_DEPLIB := $(call dep_lib_path,$(libdir),$(private_shlibdir)/$(LIBGCC_NAME))
+
+ # USE_SYSTEM_LIBM and USE_SYSTEM_OPENLIBM causes it to get symlinked into build_private_shlibdir
+diff --git a/base/Makefile b/base/Makefile
+index e024e546f94d3..2bef6aab7f1f4 100644
+--- a/base/Makefile
++++ b/base/Makefile
+@@ -169,53 +169,69 @@ endif
+ # echo "$$P"
+
+ define symlink_system_library
+-symlink_$1: $$(build_private_libdir)/$1.$$(SHLIB_EXT)
+-$$(build_private_libdir)/$1.$$(SHLIB_EXT):
+- REALPATH=`$$(call spawn,$$(build_depsbindir)/libwhich) -p $$(notdir $$@)` && \
+- $$(call resolve_path,REALPATH) && \
+- [ -e "$$$$REALPATH" ] && \
+- ([ ! -e "$$@" ] || rm "$$@") && \
+- echo ln -sf "$$$$REALPATH" "$$@" && \
+- ln -sf "$$$$REALPATH" "$$@"
+-ifneq ($2,)
+-ifneq ($$(USE_SYSTEM_$2),0)
+-SYMLINK_SYSTEM_LIBRARIES += symlink_$1
+-endif
++libname_$2 := $$(notdir $(call versioned_libname,$2,$3))
++libpath_$2 := $$(shell $$(call spawn,$$(build_depsbindir)/libwhich) -p $$(libname_$2) 2>/dev/null)
++symlink_$2: $$(build_private_libdir)/$$(libname_$2)
++$$(build_private_libdir)/$$(libname_$2):
++ @if [ -e "$$(libpath_$2)" ]; then \
++ REALPATH=$$(libpath_$2); \
++ $$(call resolve_path,REALPATH) && \
++ [ -e "$$$$REALPATH" ] && \
++ ([ ! -e "$$@" ] || rm "$$@") && \
++ echo ln -sf "$$$$REALPATH" "$$@" && \
++ ln -sf "$$$$REALPATH" "$$@"; \
++ else \
++ if [ "$4" != "ALLOW_FAILURE" ]; then \
++ echo "System library symlink failure: Unable to locate $$(libname_$2) on your system!" >&2; \
++ false; \
++ fi; \
++ fi
++ifneq ($$(USE_SYSTEM_$1),0)
++SYMLINK_SYSTEM_LIBRARIES += symlink_$2
+ endif
+ endef
+
+ # the following excludes: libuv.a, libutf8proc.a
+
+-$(eval $(call symlink_system_library,$(LIBMNAME)))
+ ifneq ($(USE_SYSTEM_LIBM),0)
+-SYMLINK_SYSTEM_LIBRARIES += symlink_$(LIBMNAME)
++$(eval $(call symlink_system_library,LIBM,$(LIBMNAME)))
+ else ifneq ($(USE_SYSTEM_OPENLIBM),0)
+-SYMLINK_SYSTEM_LIBRARIES += symlink_$(LIBMNAME)
++$(eval $(call symlink_system_library,OPENLIBM,$(LIBMNAME)))
+ endif
+
+-$(eval $(call symlink_system_library,libpcre2-8,PCRE))
+-$(eval $(call symlink_system_library,libdSFMT,DSFMT))
+-$(eval $(call symlink_system_library,$(LIBBLASNAME),BLAS))
++$(eval $(call symlink_system_library,CSL,libgcc_s,1))
++ifneq (,$(LIBGFORTRAN_VERSION))
++$(eval $(call symlink_system_library,CSL,libgfortran,$(LIBGFORTRAN_VERSION)))
++endif
++$(eval $(call symlink_system_library,CSL,libquadmath,0))
++$(eval $(call symlink_system_library,CSL,libstdc++,6))
++# We allow libssp, libatomic and libgomp to fail as they are not available on all systems
++$(eval $(call symlink_system_library,CSL,libssp,0,ALLOW_FAILURE))
++$(eval $(call symlink_system_library,CSL,libatomic,1,ALLOW_FAILURE))
++$(eval $(call symlink_system_library,CSL,libgomp,1,ALLOW_FAILURE))
++$(eval $(call symlink_system_library,PCRE,libpcre2-8))
++$(eval $(call symlink_system_library,DSFMT,libdSFMT))
++$(eval $(call symlink_system_library,BLAS,$(LIBBLASNAME)))
+ ifneq ($(LIBLAPACKNAME),$(LIBBLASNAME))
+-$(eval $(call symlink_system_library,$(LIBLAPACKNAME),LAPACK))
++$(eval $(call symlink_system_library,LAPACK,$(LIBLAPACKNAME)))
+ endif
+-$(eval $(call symlink_system_library,libgmp,GMP))
+-$(eval $(call symlink_system_library,libmpfr,MPFR))
+-$(eval $(call symlink_system_library,libmbedtls,MBEDTLS))
+-$(eval $(call symlink_system_library,libmbedcrypto,MBEDTLS))
+-$(eval $(call symlink_system_library,libmbedx509,MBEDTLS))
+-$(eval $(call symlink_system_library,libssh2,LIBSSH2))
+-$(eval $(call symlink_system_library,libnghttp2,NGHTTP2))
+-$(eval $(call symlink_system_library,libcurl,CURL))
+-$(eval $(call symlink_system_library,libgit2,LIBGIT2))
+-$(eval $(call symlink_system_library,libamd,SUITESPARSE))
+-$(eval $(call symlink_system_library,libcamd,SUITESPARSE))
+-$(eval $(call symlink_system_library,libccolamd,SUITESPARSE))
+-$(eval $(call symlink_system_library,libcholmod,SUITESPARSE))
+-$(eval $(call symlink_system_library,libcolamd,SUITESPARSE))
+-$(eval $(call symlink_system_library,libumfpack,SUITESPARSE))
+-$(eval $(call symlink_system_library,libspqr,SUITESPARSE))
+-$(eval $(call symlink_system_library,libsuitesparseconfig,SUITESPARSE))
++$(eval $(call symlink_system_library,GMP,libgmp))
++$(eval $(call symlink_system_library,MPFR,libmpfr))
++$(eval $(call symlink_system_library,MBEDTLS,libmbedtls))
++$(eval $(call symlink_system_library,MBEDTLS,libmbedcrypto))
++$(eval $(call symlink_system_library,MBEDTLS,libmbedx509))
++$(eval $(call symlink_system_library,LIBSSH2,libssh2))
++$(eval $(call symlink_system_library,NGHTTP2,libnghttp2))
++$(eval $(call symlink_system_library,CURL,libcurl))
++$(eval $(call symlink_system_library,LIBGIT2,libgit2))
++$(eval $(call symlink_system_library,SUITESPARSE,libamd))
++$(eval $(call symlink_system_library,SUITESPARSE,libcamd))
++$(eval $(call symlink_system_library,SUITESPARSE,libccolamd))
++$(eval $(call symlink_system_library,SUITESPARSE,libcholmod))
++$(eval $(call symlink_system_library,SUITESPARSE,libcolamd))
++$(eval $(call symlink_system_library,SUITESPARSE,libumfpack))
++$(eval $(call symlink_system_library,SUITESPARSE,libspqr))
++$(eval $(call symlink_system_library,SUITESPARSE,libsuitesparseconfig))
+ # EXCLUDED LIBRARIES (installed/used, but not vendored for use with dlopen):
+ # libunwind
+ endif # WINNT
+diff --git a/deps/csl.mk b/deps/csl.mk
+index 095d4ceec4a1e..423201cbb5a0c 100644
+--- a/deps/csl.mk
++++ b/deps/csl.mk
+@@ -19,48 +19,34 @@ $$(build_shlibdir)/$(1): | $$(build_shlibdir)
+ [ -n "$$$${SRC_LIB}" ] && cp $$$${SRC_LIB} $$(build_shlibdir)
+ endef
+
+-ifeq ($(OS),WINNT)
+-define gen_libname
+-$$(if $(2),lib$(1)-$(2).$(SHLIB_EXT),lib$(1).$(SHLIB_EXT))
+-endef
+-else ifeq ($(OS),Darwin)
+-define gen_libname
+-$$(if $(2),lib$(1).$(2).$(SHLIB_EXT),lib$(1).$(SHLIB_EXT))
+-endef
+-else
+-define gen_libname
+-$$(if $(2),lib$(1).$(SHLIB_EXT).$(2),lib$(1).$(SHLIB_EXT))
+-endef
+-endif
+-
+ # libgfortran has multiple names; we're just going to copy any version we can find
+ # Since we're only looking in the location given by `$(FC)` this should only succeed for one.
+-$(eval $(call copy_csl,$(call gen_libname,gfortran,3)))
+-$(eval $(call copy_csl,$(call gen_libname,gfortran,4)))
+-$(eval $(call copy_csl,$(call gen_libname,gfortran,5)))
++$(eval $(call copy_csl,$(call versioned_libname,libgfortran,3)))
++$(eval $(call copy_csl,$(call versioned_libname,libgfortran,4)))
++$(eval $(call copy_csl,$(call versioned_libname,libgfortran,5)))
+
+ # These are all libraries that we should always have
+-$(eval $(call copy_csl,$(call gen_libname,quadmath,0)))
+-$(eval $(call copy_csl,$(call gen_libname,stdc++,6)))
+-$(eval $(call copy_csl,$(call gen_libname,ssp,0)))
+-$(eval $(call copy_csl,$(call gen_libname,atomic,1)))
+-$(eval $(call copy_csl,$(call gen_libname,gomp,1)))
++$(eval $(call copy_csl,$(call versioned_libname,libquadmath,0)))
++$(eval $(call copy_csl,$(call versioned_libname,libstdc++,6)))
++$(eval $(call copy_csl,$(call versioned_libname,libssp,0)))
++$(eval $(call copy_csl,$(call versioned_libname,libatomic,1)))
++$(eval $(call copy_csl,$(call versioned_libname,libgomp,1)))
+
+ ifeq ($(OS),WINNT)
+ # Windwos has special gcc_s names
+ ifeq ($(ARCH),i686)
+-$(eval $(call copy_csl,$(call gen_libname,gcc_s_sjlj,1)))
++$(eval $(call copy_csl,$(call versioned_libname,libgcc_s_sjlj,1)))
+ else
+-$(eval $(call copy_csl,$(call gen_libname,gcc_s_seh,1)))
++$(eval $(call copy_csl,$(call versioned_libname,libgcc_s_seh,1)))
+ endif
+ else
+-$(eval $(call copy_csl,$(call gen_libname,gcc_s,1)))
++$(eval $(call copy_csl,$(call versioned_libname,libgcc_s,1)))
+ endif
+ # winpthread is only Windows, pthread is only others
+ ifeq ($(OS),WINNT)
+-$(eval $(call copy_csl,$(call gen_libname,winpthread,1)))
++$(eval $(call copy_csl,$(call versioned_libname,libwinpthread,1)))
+ else
+-$(eval $(call copy_csl,$(call gen_libname,pthread,0)))
++$(eval $(call copy_csl,$(call versioned_libname,libpthread,0)))
+ endif
+
+ get-csl:
+
+From 6536b8519b25db844f2a1866d056879cb87d1c66 Mon Sep 17 00:00:00 2001
+From: Elliot Saba <staticfloat at gmail.com>
+Date: Fri, 26 Mar 2021 22:32:04 +0000
+Subject: [PATCH 2/2] Expand `JL_PRIVATE_LIBS-1` for versioned library names as
+ well
+
+Without this, we fail to install things like `libgcc_s.so.1` when
+installed into the private libdir by `symlink_system_libraries`.
+---
+ Makefile | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 823ff3b86339d..e08f0e959e1b3 100644
+--- a/Makefile
++++ b/Makefile
+@@ -290,8 +290,11 @@ endif
+ done \
+ done
+ for suffix in $(JL_PRIVATE_LIBS-1) ; do \
+- lib=$(build_private_libdir)/$${suffix}.$(SHLIB_EXT); \
+- $(INSTALL_M) $$lib $(DESTDIR)$(private_libdir) ; \
++ for lib in $(build_private_libdir)/$${suffix}.$(SHLIB_EXT)*; do \
++ if [ "$${lib##*.}" != "dSYM" ]; then \
++ $(INSTALL_M) $$lib $(DESTDIR)$(private_libdir) ; \
++ fi \
++ done \
+ done
+ endif
+ # Install `7z` into libexec/
Deleted: make-install-no-build.patch
===================================================================
--- make-install-no-build.patch 2021-03-31 22:02:44 UTC (rev 910746)
+++ make-install-no-build.patch 2021-03-31 22:05:18 UTC (rev 910747)
@@ -1,14 +0,0 @@
---- julia-1.3.0/Makefile.orig 2019-12-06 12:54:23.879790955 +0000
-+++ julia-1.3.0/Makefile 2019-12-06 12:54:36.329952953 +0000
-@@ -277,11 +277,6 @@
-
-
- install: $(build_depsbindir)/stringreplace $(BUILDROOT)/doc/_build/html/en/index.html
--ifeq ($(BUNDLE_DEBUG_LIBS),1)
-- @$(MAKE) $(QUIET_MAKE) all
--else
-- @$(MAKE) $(QUIET_MAKE) release
--endif
- @for subdir in $(bindir) $(datarootdir)/julia/stdlib/$(VERSDIR) $(docdir) $(man1dir) $(includedir)/julia $(libdir) $(private_libdir) $(sysconfdir) $(libexecdir); do \
- mkdir -p $(DESTDIR)$$subdir; \
- done
Copied: julia/repos/community-x86_64/make-install-no-build.patch (from rev 910746, julia/trunk/make-install-no-build.patch)
===================================================================
--- make-install-no-build.patch (rev 0)
+++ make-install-no-build.patch 2021-03-31 22:05:18 UTC (rev 910747)
@@ -0,0 +1,14 @@
+--- julia-1.3.0/Makefile.orig 2019-12-06 12:54:23.879790955 +0000
++++ julia-1.3.0/Makefile 2019-12-06 12:54:36.329952953 +0000
+@@ -277,11 +277,6 @@
+
+
+ install: $(build_depsbindir)/stringreplace $(BUILDROOT)/doc/_build/html/en/index.html
+-ifeq ($(BUNDLE_DEBUG_LIBS),1)
+- @$(MAKE) $(QUIET_MAKE) all
+-else
+- @$(MAKE) $(QUIET_MAKE) release
+-endif
+ @for subdir in $(bindir) $(datarootdir)/julia/stdlib/$(VERSDIR) $(docdir) $(man1dir) $(includedir)/julia $(libdir) $(private_libdir) $(sysconfdir) $(libexecdir); do \
+ mkdir -p $(DESTDIR)$$subdir; \
+ done
More information about the arch-commits
mailing list