[arch-commits] Commit in julia/repos/community-x86_64 (13 files)

Antonio Rojas arojas at gemini.archlinux.org
Thu Dec 2 22:12:15 UTC 2021


    Date: Thursday, December 2, 2021 @ 22:12:15
  Author: arojas
Revision: 1062776

archrelease: copy trunk to community-x86_64

Added:
  julia/repos/community-x86_64/PKGBUILD
    (from rev 1062775, julia/trunk/PKGBUILD)
  julia/repos/community-x86_64/julia-hardcoded-libs.patch
    (from rev 1062775, julia/trunk/julia-hardcoded-libs.patch)
  julia/repos/community-x86_64/julia-libgit-1.2.patch
    (from rev 1062775, julia/trunk/julia-libgit-1.2.patch)
  julia/repos/community-x86_64/julia-llvm-patchelf.patch
    (from rev 1062775, julia/trunk/julia-llvm-patchelf.patch)
  julia/repos/community-x86_64/julia-llvm13.patch
    (from rev 1062775, julia/trunk/julia-llvm13.patch)
  julia/repos/community-x86_64/julia-system-cblas.patch
    (from rev 1062775, julia/trunk/julia-system-cblas.patch)
  julia/repos/community-x86_64/make-install-no-build.patch
    (from rev 1062775, 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-libgit-1.2.patch
  julia/repos/community-x86_64/julia-llvm13.patch
  julia/repos/community-x86_64/julia-system-cblas.patch
  julia/repos/community-x86_64/make-install-no-build.patch

-----------------------------+
 PKGBUILD                    |  278 +++++++--------
 julia-hardcoded-libs.patch  |  138 +++----
 julia-libgit-1.2.patch      |   28 -
 julia-llvm-patchelf.patch   |   15 
 julia-llvm13.patch          |  744 +++++++++++++++++++++---------------------
 julia-system-cblas.patch    |  266 +++++++--------
 make-install-no-build.patch |   28 -
 7 files changed, 753 insertions(+), 744 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-12-02 22:11:47 UTC (rev 1062775)
+++ PKGBUILD	2021-12-02 22:12:15 UTC (rev 1062776)
@@ -1,142 +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.4
-pkgrel=1
-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}
-        https://github.com/JuliaLang/julia/commit/7df16be0.patch
-        https://github.com/JuliaLang/julia/commit/677ce6d3.patch
-        https://github.com/JuliaLang/julia/commit/a2d85f6d.patch
-        https://github.com/JuliaLang/julia/commit/47f9139e.patch
-        https://github.com/JuliaLang/julia/commit/0f7d183c.patch
-        https://github.com/JuliaLang/julia/commit/d6a655bc.patch
-        julia-llvm13.patch
-        julia-libgit-1.2.patch
-        julia-system-cblas.patch
-        julia-hardcoded-libs.patch
-        make-install-no-build.patch)
-backup=(etc/julia/startup.jl)
-sha256sums=('954578b973fdb891c88fa1eedd931129e215ab928ecc416dd0bdf6c70549d2fc'
-            'SKIP'
-            '764582f5ac30e694ee99aba6b0ad6cbf45d1ad53e90005678eb3fe7b30781e64'
-            'a798c58ab518def84e4112538de59a10802e7dc854c20b08990a1619ba2aa95b'
-            '8d0dd9693a2db66ac09b8f08e162bee74a8f4aebbdb3aa422a677d688671d00b'
-            'c76c6fbb4e04b185d11e3c3e0aec99a2088f3b06621ce61d29cd21227a044a7a'
-            '67053b0da6fe46f82dc676b78adbdf2e6939d851316fefe328c6de6baa58e338'
-            '1d636ab9f93dd0a509d2a365fb6a975d87b5df7667f1d9f6844741818e37fbc9'
-            'ab8a8ec61963661dca5bb2fa965dccaa36c500d55ef7b6767b8faef5fff461b5'
-            'c57ea92a11fa8dac72229e6a912d2372ec0d98d63486426fe3bdeeb795de48f7'
-            'e44c260e4111908337caa82e1c3fef563b9d40e0a30da68d6e91405bf6db24dc'
-            'a8e664f39f3efaeea63e99c2f5727a28ab7eca01e9164b464c66e991426d7e90'
-            '8be4605f92a009072ca7e843549c225fc4e959893498e7c4f8f79e861e63714d')
-validpgpkeys=('3673DF529D9049477F76B37566E3C7DC03D6E495') # Julia (Binary signing key) <buildbot at julialang.org>
-
-prepare() {
-  cd $pkgname-$pkgver
-
-# fix bad performance with LLVM 12
-  patch -p1 -i ../7df16be0.patch
-# fix build with LLVM 13
-  patch -p1 -i ../677ce6d3.patch
-  patch -p1 -i ../a2d85f6d.patch
-  patch -p1 -i ../47f9139e.patch
-# Adapt to LLVM 13 type changes
-  patch -p1 -i ../julia-llvm13.patch
-# Fix LazyArtifacts tests
-  patch -p1 -i ../d6a655bc.patch
-# libgit2 1.2 compatibility
-  patch -p1 -i ../julia-libgit-1.2.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
-
-  ln -s /usr/lib/libopenblas.so usr/lib/julia/libopenblas64_.so # Needed for tests
-}
-
-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 MPFR_jll \
-    --skip SuiteSparse_jll \
-    --skip PCRE2_jll \
-    --skip LibGit2_jll \
-    --skip MozillaCACerts_jll \
-    --skip NetworkOptions \
-    --skip Downloads
-  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 1062775, julia/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-12-02 22:12:15 UTC (rev 1062776)
@@ -0,0 +1,136 @@
+# 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.7.0
+pkgrel=1
+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 libblastrampoline)
+makedepends=(cmake gcc-fortran python llvm patchelf libwhich)
+checkdepends=(git)
+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}
+        https://github.com/JuliaLang/julia/commit/677ce6d3.patch
+        https://github.com/JuliaLang/julia/commit/47f9139e.patch
+        https://github.com/JuliaLang/julia/commit/0f7d183c.patch
+        julia-llvm13.patch
+        julia-libgit-1.2.patch
+        julia-system-cblas.patch
+        julia-hardcoded-libs.patch
+        make-install-no-build.patch
+        julia-llvm-patchelf.patch)
+backup=(etc/julia/startup.jl)
+sha256sums=('d40d83944f8e1709de1d6f7544e1a6721e091f70ba06b44c25b89bdba754dfa6'
+            'SKIP'
+            'a798c58ab518def84e4112538de59a10802e7dc854c20b08990a1619ba2aa95b'
+            'c76c6fbb4e04b185d11e3c3e0aec99a2088f3b06621ce61d29cd21227a044a7a'
+            '67053b0da6fe46f82dc676b78adbdf2e6939d851316fefe328c6de6baa58e338'
+            'ab8a8ec61963661dca5bb2fa965dccaa36c500d55ef7b6767b8faef5fff461b5'
+            'c57ea92a11fa8dac72229e6a912d2372ec0d98d63486426fe3bdeeb795de48f7'
+            '8f8c12853ce847f5d1b5a4a461ddec701decdb81dae7bb31d66560c1deaed97a'
+            '03043f005c133ac9af1d4dc113ea8b525ad3b393690625be77975f0e29dd6457'
+            '8be4605f92a009072ca7e843549c225fc4e959893498e7c4f8f79e861e63714d'
+            '6048c69c987f33f2b17d78b63368b0762d1d6a1e531ef9932d0c23bda49d1384')
+validpgpkeys=('3673DF529D9049477F76B37566E3C7DC03D6E495') # Julia (Binary signing key) <buildbot at julialang.org>
+
+prepare() {
+  cd $pkgname-$pkgver
+
+# fix build with LLVM 13
+  patch -p1 -i ../677ce6d3.patch
+  patch -p1 -i ../47f9139e.patch
+# Adapt to LLVM 13 type changes
+  patch -p1 -i ../julia-llvm13.patch
+# libgit2 1.2 compatibility
+  patch -p1 -i ../julia-libgit-1.2.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
+# Don't try to run patchelf on system LLVM
+  patch -p1 -i ../julia-llvm-patchelf.patch
+}
+
+_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_LIBSUITESPARSE=1 \
+    USE_SYSTEM_LIBBLASTRAMPOLINE=1 \
+    USE_SYSTEM_LIBWHICH=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 \
+    --skip Sockets \
+    --skip broadcast \
+    --skip Distributed \
+    --skip nghttp2_jll \
+    --skip GMP_jll \
+    --skip LibCURL \
+    --skip LibSSH2_jll \
+    --skip MbedTLS_jll \
+    --skip MPFR_jll \
+    --skip SuiteSparse_jll \
+    --skip PCRE2_jll \
+    --skip LibGit2_jll \
+    --skip MozillaCACerts_jll \
+    --skip NetworkOptions \
+    --skip Downloads
+  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-12-02 22:11:47 UTC (rev 1062775)
+++ julia-hardcoded-libs.patch	2021-12-02 22:12:15 UTC (rev 1062776)
@@ -1,69 +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/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__()
-diff --git a/stdlib/LibGit2_jll/src/LibGit2_jll.jl b/stdlib/LibGit2_jll/src/LibGit2_jll.jl
-index f0d4b5dda6..2ed3017b51 100644
---- a/stdlib/LibGit2_jll/src/LibGit2_jll.jl
-+++ b/stdlib/LibGit2_jll/src/LibGit2_jll.jl
-@@ -23,7 +23,7 @@ if Sys.iswindows()
- elseif Sys.isapple()
-     const libgit2 = "@rpath/libgit2.1.1.dylib"
- else
--    const libgit2 = "libgit2.so.1.1"
-+    const libgit2 = "libgit2.so"
- end
- 
- function __init__()
-diff --git a/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl b/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl
-index 215de8aed6..918d1ffdc2 100644
---- a/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl
-+++ b/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl
-@@ -22,7 +22,7 @@ if Sys.iswindows()
- elseif Sys.isapple()
-     const libopenlibm = "@rpath/libopenlibm.3.dylib"
- else
--    const libopenlibm = "libopenlibm.so.3"
-+    const libopenlibm = "libopenlibm.so"
- end
- 
- function __init__()

Copied: julia/repos/community-x86_64/julia-hardcoded-libs.patch (from rev 1062775, julia/trunk/julia-hardcoded-libs.patch)
===================================================================
--- julia-hardcoded-libs.patch	                        (rev 0)
+++ julia-hardcoded-libs.patch	2021-12-02 22:12:15 UTC (rev 1062776)
@@ -0,0 +1,69 @@
+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-12jl.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__()
+diff --git a/stdlib/LibGit2_jll/src/LibGit2_jll.jl b/stdlib/LibGit2_jll/src/LibGit2_jll.jl
+index f0d4b5dda6..2ed3017b51 100644
+--- a/stdlib/LibGit2_jll/src/LibGit2_jll.jl
++++ b/stdlib/LibGit2_jll/src/LibGit2_jll.jl
+@@ -23,7 +23,7 @@ if Sys.iswindows()
+ elseif Sys.isapple()
+     const libgit2 = "@rpath/libgit2.1.1.dylib"
+ else
+-    const libgit2 = "libgit2.so.1.1"
++    const libgit2 = "libgit2.so"
+ end
+ 
+ function __init__()
+diff --git a/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl b/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl
+index 215de8aed6..918d1ffdc2 100644
+--- a/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl
++++ b/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl
+@@ -22,7 +22,7 @@ if Sys.iswindows()
+ elseif Sys.isapple()
+     const libopenlibm = "@rpath/libopenlibm.3.dylib"
+ else
+-    const libopenlibm = "libopenlibm.so.3"
++    const libopenlibm = "libopenlibm.so"
+ end
+ 
+ function __init__()

Deleted: julia-libgit-1.2.patch
===================================================================
--- julia-libgit-1.2.patch	2021-12-02 22:11:47 UTC (rev 1062775)
+++ julia-libgit-1.2.patch	2021-12-02 22:12:15 UTC (rev 1062776)
@@ -1,14 +0,0 @@
-diff --git a/stdlib/LibGit2/src/types.jl b/stdlib/LibGit2/src/types.jl
-index 9ffcaa3646..5f571e7b26 100644
---- a/stdlib/LibGit2/src/types.jl
-+++ b/stdlib/LibGit2/src/types.jl
-@@ -230,6 +230,9 @@ Matches the [`git_remote_callbacks`](https://libgit2.org/libgit2/#HEAD/type/git_
-     push_update_reference::Ptr{Cvoid}  = C_NULL
-     push_negotiation::Ptr{Cvoid}       = C_NULL
-     transport::Ptr{Cvoid}              = C_NULL
-+    @static if LibGit2.VERSION >= v"1.2.0"
-+        remote_ready::Ptr{Cvoid}       = C_NULL
-+    end
-     payload::Any                       = nothing
-     @static if LibGit2.VERSION >= v"0.99.0"
-         resolve_url::Ptr{Cvoid}        = C_NULL

Copied: julia/repos/community-x86_64/julia-libgit-1.2.patch (from rev 1062775, julia/trunk/julia-libgit-1.2.patch)
===================================================================
--- julia-libgit-1.2.patch	                        (rev 0)
+++ julia-libgit-1.2.patch	2021-12-02 22:12:15 UTC (rev 1062776)
@@ -0,0 +1,14 @@
+diff --git a/stdlib/LibGit2/src/types.jl b/stdlib/LibGit2/src/types.jl
+index 9ffcaa3646..5f571e7b26 100644
+--- a/stdlib/LibGit2/src/types.jl
++++ b/stdlib/LibGit2/src/types.jl
+@@ -230,6 +230,9 @@ Matches the [`git_remote_callbacks`](https://libgit2.org/libgit2/#HEAD/type/git_
+     push_update_reference::Ptr{Cvoid}  = C_NULL
+     push_negotiation::Ptr{Cvoid}       = C_NULL
+     transport::Ptr{Cvoid}              = C_NULL
++    @static if LibGit2.VERSION >= v"1.2.0"
++        remote_ready::Ptr{Cvoid}       = C_NULL
++    end
+     payload::Any                       = nothing
+     @static if LibGit2.VERSION >= v"0.99.0"
+         resolve_url::Ptr{Cvoid}        = C_NULL

Copied: julia/repos/community-x86_64/julia-llvm-patchelf.patch (from rev 1062775, julia/trunk/julia-llvm-patchelf.patch)
===================================================================
--- julia-llvm-patchelf.patch	                        (rev 0)
+++ julia-llvm-patchelf.patch	2021-12-02 22:12:15 UTC (rev 1062776)
@@ -0,0 +1,15 @@
+diff --git a/Makefile b/Makefile
+index a013747a97..02e566de2e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -368,10 +368,6 @@ ifeq ($(BUNDLE_DEBUG_LIBS),1)
+ endif
+ endif
+ 
+-	# Set rpath for LLVM.so which is `$ORIGIN/../lib` moving from `../lib` to `../lib/julia`.  We only need to do this for Linux/FreeBSD
+-ifneq (,$(findstring $(OS),Linux FreeBSD))
+-	$(PATCHELF) --set-rpath '$$ORIGIN:$$ORIGIN/$(reverse_private_libdir_rel)' $(DESTDIR)$(private_libdir)/libLLVM.$(SHLIB_EXT)
+-endif
+ 
+ 
+ ifneq ($(LOADER_BUILD_DEP_LIBS),$(LOADER_INSTALL_DEP_LIBS))

Deleted: julia-llvm13.patch
===================================================================
--- julia-llvm13.patch	2021-12-02 22:11:47 UTC (rev 1062775)
+++ julia-llvm13.patch	2021-12-02 22:12:15 UTC (rev 1062776)
@@ -1,372 +0,0 @@
-From 9daa25a5f331a7e1c0f0b222373a853c2ce1462d Mon Sep 17 00:00:00 2001
-From: Valentin Churavy <v.churavy at gmail.com>
-Date: Tue, 12 Oct 2021 11:56:19 -0400
-Subject: [PATCH 2/6] WIP: add Type to ByVal attribute
-
----
- src/abi_aarch64.cpp |  2 +-
- src/abi_arm.cpp     |  2 +-
- src/abi_llvm.cpp    |  2 +-
- src/abi_ppc64le.cpp |  6 +++++-
- src/abi_win32.cpp   |  6 +++++-
- src/abi_win64.cpp   |  9 +++++++--
- src/abi_x86.cpp     |  8 ++++++--
- src/abi_x86_64.cpp  | 11 ++++++++++-
- src/ccall.cpp       |  4 ++--
- 9 files changed, 38 insertions(+), 12 deletions(-)
-
-diff --git a/src/abi_aarch64.cpp b/src/abi_aarch64.cpp
-index ce94cc66f0..7ffe107d61 100644
---- a/src/abi_aarch64.cpp
-+++ b/src/abi_aarch64.cpp
-@@ -194,7 +194,7 @@ Type *isHFAorHVA(jl_datatype_t *dt, size_t &nele) const
-     return NULL;
- }
- 
--bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab) override
-+bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab, Type *Ty) override
- {
-     // B.2
-     //   If the argument type is an HFA or an HVA, then the argument is used
-diff --git a/src/abi_arm.cpp b/src/abi_arm.cpp
-index 1a5d3d0651..ed846dfafb 100644
---- a/src/abi_arm.cpp
-+++ b/src/abi_arm.cpp
-@@ -23,7 +23,7 @@
- 
- struct ABI_ARMLayout : AbiLayout {
- 
--bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab) override
-+bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab, Type *Ty) override
- {
-     return false;
- }
-diff --git a/src/abi_llvm.cpp b/src/abi_llvm.cpp
-index 1ab30da1b2..dba8f4aa8a 100644
---- a/src/abi_llvm.cpp
-+++ b/src/abi_llvm.cpp
-@@ -45,7 +45,7 @@ bool use_sret(jl_datatype_t *ty) override
-     return false;
- }
- 
--bool needPassByRef(jl_datatype_t *ty, AttrBuilder &ab) override
-+bool needPassByRef(jl_datatype_t *ty, AttrBuilder &ab, Type *Ty) override
- {
-     return false;
- }
-diff --git a/src/abi_ppc64le.cpp b/src/abi_ppc64le.cpp
-index dd6f927d9c..35e444ef77 100644
---- a/src/abi_ppc64le.cpp
-+++ b/src/abi_ppc64le.cpp
-@@ -101,12 +101,16 @@ bool use_sret(jl_datatype_t *dt) override
-     return false;
- }
- 
--bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab) override
-+bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab, Type *Ty) override
- {
-     jl_datatype_t *ty0 = NULL;
-     bool hva = false;
-     if (jl_datatype_size(dt) > 64 && isHFA(dt, &ty0, &hva) > 8) {
-+#if JL_LLVM_VERSION < 120000
-         ab.addAttribute(Attribute::ByVal);
-+#else
-+        ab.addByValAttr(Ty);
-+#endif
-         return true;
-     }
-     return false;
-diff --git a/src/abi_win32.cpp b/src/abi_win32.cpp
-index af16a0310b..0b34f840e4 100644
---- a/src/abi_win32.cpp
-+++ b/src/abi_win32.cpp
-@@ -49,11 +49,15 @@ bool use_sret(jl_datatype_t *dt) override
-     return true;
- }
- 
--bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab) override
-+bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab, Type *Ty) override
- {
-     // Use pass by reference for all structs
-     if (dt->layout->nfields > 0) {
-+#if JL_LLVM_VERSION < 120000
-         ab.addAttribute(Attribute::ByVal);
-+#else
-+        ab.addByValAttr(Ty);
-+#endif
-         return true;
-     }
-     return false;
-diff --git a/src/abi_win64.cpp b/src/abi_win64.cpp
-index 16e46a9703..f47802edf1 100644
---- a/src/abi_win64.cpp
-+++ b/src/abi_win64.cpp
-@@ -56,14 +56,19 @@ bool use_sret(jl_datatype_t *dt) override
-     return true;
- }
- 
--bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab) override
-+bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab, Type *Ty) override
- {
-     nargs++;
-     size_t size = jl_datatype_size(dt);
-     if (win64_reg_size(size))
-         return false;
--    if (nargs <= 4)
-+    if (nargs <= 4) {
-+#if JL_LLVM_VERSION < 120000
-         ab.addAttribute(Attribute::ByVal);
-+#else
-+        ab.addByValAttr(Ty);
-+#endif
-+    }
-     return true;
- }
- 
-diff --git a/src/abi_x86.cpp b/src/abi_x86.cpp
-index 7a65de028e..c6c0282602 100644
---- a/src/abi_x86.cpp
-+++ b/src/abi_x86.cpp
-@@ -67,12 +67,16 @@ bool use_sret(jl_datatype_t *dt) override
-     return true;
- }
- 
--bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab) override
-+bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab, Type *Ty) override
- {
-     size_t size = jl_datatype_size(dt);
-     if (is_complex64(dt) || is_complex128(dt) || (jl_is_primitivetype(dt) && size <= 8))
-         return false;
--    ab.addAttribute(Attribute::ByVal);
-+#if JL_LLVM_VERSION < 120000
-+        ab.addAttribute(Attribute::ByVal);
-+#else
-+        ab.addByValAttr(Ty);
-+#endif
-     return true;
- }
- 
-diff --git a/src/abi_x86_64.cpp b/src/abi_x86_64.cpp
-index ac28af3011..5f8256dee4 100644
---- a/src/abi_x86_64.cpp
-+++ b/src/abi_x86_64.cpp
-@@ -178,11 +178,15 @@ bool use_sret(jl_datatype_t *dt) override
-     return sret;
- }
- 
--bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab) override
-+bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab, Type *Ty) override
- {
-     Classification cl = classify(dt);
-     if (cl.isMemory) {
-+#if JL_LLVM_VERSION < 120000
-         ab.addAttribute(Attribute::ByVal);
-+#else
-+        ab.addByValAttr(Ty);
-+#endif
-         return true;
-     }
- 
-@@ -202,7 +206,12 @@ bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab) override
-     else if (jl_is_structtype(dt)) {
-         // spill to memory even though we would ordinarily pass
-         // it in registers
-+#if JL_LLVM_VERSION < 120000
-         ab.addAttribute(Attribute::ByVal);
-+#else
-+        Type* Ty = preferred_llvm_type(dt, false);
-+        ab.addByValAttr(Ty);
-+#endif
-         return true;
-     }
-     return false;
-diff --git a/src/ccall.cpp b/src/ccall.cpp
-index 66ab84c264..e21c717d41 100644
---- a/src/ccall.cpp
-+++ b/src/ccall.cpp
-@@ -291,7 +291,7 @@ class AbiLayout {
- public:
-     virtual ~AbiLayout() {}
-     virtual bool use_sret(jl_datatype_t *ty) = 0;
--    virtual bool needPassByRef(jl_datatype_t *ty, AttrBuilder&) = 0;
-+    virtual bool needPassByRef(jl_datatype_t *ty, AttrBuilder&, Type* llvm_t) = 0;
-     virtual Type *preferred_llvm_type(jl_datatype_t *ty, bool isret) const = 0;
- };
- 
-@@ -1077,7 +1077,7 @@ std::string generate_func_sig(const char *fname)
-         }
- 
-         // Whether or not LLVM wants us to emit a pointer to the data
--        bool byRef = abi->needPassByRef((jl_datatype_t*)tti, ab);
-+        bool byRef = abi->needPassByRef((jl_datatype_t*)tti, ab, t);
- 
-         if (jl_is_cpointer_type(tti)) {
-             pat = t;
-
-From 1fe19a197ebbe33c9e60b2ca7d30c2573772b476 Mon Sep 17 00:00:00 2001
-From: Valentin Churavy <v.churavy at gmail.com>
-Date: Thu, 21 Oct 2021 20:32:39 -0400
-Subject: [PATCH 4/6] [LLVM/Win32] Force stack alignment on module
-
----
- src/aotcompile.cpp |  3 +++
- src/ccall.cpp      |  3 +++
- src/codegen.cpp    | 11 ++++++++++-
- 3 files changed, 16 insertions(+), 1 deletion(-)
-
-diff --git a/src/aotcompile.cpp b/src/aotcompile.cpp
-index ffd43ee8d48d..d3dfc744fcd0 100644
---- a/src/aotcompile.cpp
-+++ b/src/aotcompile.cpp
-@@ -550,6 +550,9 @@ void jl_dump_native_impl(void *native_code,
-     std::unique_ptr<Module> sysimage(new Module("sysimage", Context));
-     sysimage->setTargetTriple(data->M->getTargetTriple());
-     sysimage->setDataLayout(data->M->getDataLayout());
-+#if JL_LLVM_VERSION >= 130000
-+    sysimage->setOverrideStackAlignment(data->M->getOverrideStackAlignment());
-+#endif
-     data->M.reset(); // free memory for data->M
- 
-     if (sysimg_data) {
-diff --git a/src/ccall.cpp b/src/ccall.cpp
-index fb70e53e2814..dd7626c918d0 100644
---- a/src/ccall.cpp
-+++ b/src/ccall.cpp
-@@ -891,6 +891,9 @@ static jl_cgval_t emit_llvmcall(jl_codectx_t &ctx, jl_value_t **args, size_t nar
-     // copy module properties that should always match
-     Mod->setTargetTriple(jl_Module->getTargetTriple());
-     Mod->setDataLayout(jl_Module->getDataLayout());
-+#if JL_LLVM_VERSION >= 130000
-+    Mod->setOverrideStackAlignment(jl_Module->getOverrideStackAlignment());
-+#endif
- 
-     // verify the definition
-     Function *def = Mod->getFunction(ir_name);
-diff --git a/src/codegen.cpp b/src/codegen.cpp
-index b09eb8db04e0..bc4ea7711a04 100644
---- a/src/codegen.cpp
-+++ b/src/codegen.cpp
-@@ -1707,6 +1707,14 @@ static void jl_setup_module(Module *m, const jl_cgparams_t *params = &jl_default
-             llvm::DEBUG_METADATA_VERSION);
-     m->setDataLayout(jl_data_layout);
-     m->setTargetTriple(jl_TargetMachine->getTargetTriple().str());
-+
-+#if defined(_OS_WINDOWS_) && !defined(_CPU_X86_64_) && JL_LLVM_VERSIOn >= 130000
-+    // tell Win32 to assume the stack is always 16-byte aligned,
-+    // and to ensure that it is 16-byte aligned for out-going calls,
-+    // to ensure compatibility with GCC codes
-+    m->setOverrideStackAlignment(16;)
-+#endif
-+
- }
- 
- Module *jl_create_llvm_module(StringRef name)
-@@ -8235,10 +8243,11 @@ extern "C" void jl_init_llvm(void)
- 
-     TargetOptions options = TargetOptions();
-     //options.PrintMachineCode = true; //Print machine code produced during JIT compiling
--#if defined(_OS_WINDOWS_) && !defined(_CPU_X86_64_)
-+#if defined(_OS_WINDOWS_) && !defined(_CPU_X86_64_) && JL_LLVM_VERSION <= 120000
-     // tell Win32 to assume the stack is always 16-byte aligned,
-     // and to ensure that it is 16-byte aligned for out-going calls,
-     // to ensure compatibility with GCC codes
-+    // In LLVM 13 and onwards this has turned into a module option
-     options.StackAlignmentOverride = 16;
- #endif
- #ifdef JL_DEBUG_BUILD
-
-From 7a320647976eb97fdd169b5e85397b9e493e4569 Mon Sep 17 00:00:00 2001
-From: Valentin Churavy <v.churavy at gmail.com>
-Date: Fri, 22 Oct 2021 15:35:38 -0400
-Subject: [PATCH 5/6] StackProtector is now a module flag
-
----
- src/aotcompile.cpp | 1 +
- src/ccall.cpp      | 1 +
- src/codegen.cpp    | 6 ++++--
- 3 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/src/aotcompile.cpp b/src/aotcompile.cpp
-index d3dfc744fcd0..05fcca50c4ee 100644
---- a/src/aotcompile.cpp
-+++ b/src/aotcompile.cpp
-@@ -551,6 +551,7 @@ void jl_dump_native_impl(void *native_code,
-     sysimage->setTargetTriple(data->M->getTargetTriple());
-     sysimage->setDataLayout(data->M->getDataLayout());
- #if JL_LLVM_VERSION >= 130000
-+    sysimage->setStackProtectorGuard(data->M->getStackProtectorGuard());
-     sysimage->setOverrideStackAlignment(data->M->getOverrideStackAlignment());
- #endif
-     data->M.reset(); // free memory for data->M
-diff --git a/src/ccall.cpp b/src/ccall.cpp
-index dd7626c918d0..647735edb37d 100644
---- a/src/ccall.cpp
-+++ b/src/ccall.cpp
-@@ -892,6 +892,7 @@ static jl_cgval_t emit_llvmcall(jl_codectx_t &ctx, jl_value_t **args, size_t nar
-     Mod->setTargetTriple(jl_Module->getTargetTriple());
-     Mod->setDataLayout(jl_Module->getDataLayout());
- #if JL_LLVM_VERSION >= 130000
-+    Mod->setStackProtectorGuard(jl_Module->getStackProtectorGuard());
-     Mod->setOverrideStackAlignment(jl_Module->getOverrideStackAlignment());
- #endif
- 
-diff --git a/src/codegen.cpp b/src/codegen.cpp
-index bc4ea7711a04..1a7017d3aeb7 100644
---- a/src/codegen.cpp
-+++ b/src/codegen.cpp
-@@ -1714,7 +1714,9 @@ static void jl_setup_module(Module *m, const jl_cgparams_t *params = &jl_default
-     // to ensure compatibility with GCC codes
-     m->setOverrideStackAlignment(16;)
- #endif
--
-+#if defined(JL_DEBUG_BUILD) && JL_LLVM_VERSION >= 130000
-+    m->setStackProtectorGuard("global");
-+#endif
- }
- 
- Module *jl_create_llvm_module(StringRef name)
-
-From e323fc8f7be4ce053dec613076d7dd7517515134 Mon Sep 17 00:00:00 2001
-From: Valentin Churavy <v.churavy at gmail.com>
-Date: Sun, 24 Oct 2021 15:18:23 -0400
-Subject: [PATCH 6/6] Cleanup MachineObjectFileInfo handling in disassembly
-
----
- src/disasm.cpp | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/src/disasm.cpp b/src/disasm.cpp
-index 73b394b77d0b..25e7841bde85 100644
---- a/src/disasm.cpp
-+++ b/src/disasm.cpp
-@@ -860,21 +860,21 @@ static void jl_dump_asm_internal(
-     std::unique_ptr<MCRegisterInfo> MRI(TheTarget->createMCRegInfo(TheTriple.str()));
-     assert(MRI && "Unable to create target register info!");
- 
--    std::unique_ptr<MCObjectFileInfo> MOFI(new MCObjectFileInfo());
--#if JL_LLVM_VERSION >= 130000
--    MCSubtargetInfo *MSTI = TheTarget->createMCSubtargetInfo(TheTriple.str(), cpu, features);
--    assert(MSTI && "Unable to create subtarget info!");
-+    std::unique_ptr<llvm::MCSubtargetInfo> STI(
-+      TheTarget->createMCSubtargetInfo(TheTriple.str(), cpu, features));
-+    assert(STI && "Unable to create subtarget info!");
- 
--    MCContext Ctx(TheTriple, MAI.get(), MRI.get(), MSTI, &SrcMgr);
--    MOFI->initMCObjectFileInfo(Ctx, /* PIC */ false, /* LargeCodeModel */ false);
-+#if JL_LLVM_VERSION >= 130000
-+    MCContext Ctx(TheTriple, MAI.get(), MRI.get(), STI.get(), &SrcMgr);
-+    std::unique_ptr<MCObjectFileInfo> MOFI(
-+      TheTarget->createMCObjectFileInfo(Ctx, /*PIC=*/false, /*LargeCodeModel=*/ false));
-+    Ctx.setObjectFileInfo(MOFI.get());
- #else
-+    std::unique_ptr<MCObjectFileInfo> MOFI(new MCObjectFileInfo());
-     MCContext Ctx(MAI.get(), MRI.get(), MOFI.get(), &SrcMgr);
-     MOFI->InitMCObjectFileInfo(TheTriple, /* PIC */ false, Ctx);
- #endif
- 
--    // Set up Subtarget and Disassembler
--    std::unique_ptr<MCSubtargetInfo>
--        STI(TheTarget->createMCSubtargetInfo(TheTriple.str(), cpu, features));
-     std::unique_ptr<MCDisassembler> DisAsm(TheTarget->createMCDisassembler(*STI, Ctx));
-     if (!DisAsm) {
-         rstream << "ERROR: no disassembler for target " << TheTriple.str();

Copied: julia/repos/community-x86_64/julia-llvm13.patch (from rev 1062775, julia/trunk/julia-llvm13.patch)
===================================================================
--- julia-llvm13.patch	                        (rev 0)
+++ julia-llvm13.patch	2021-12-02 22:12:15 UTC (rev 1062776)
@@ -0,0 +1,372 @@
+From 9daa25a5f331a7e1c0f0b222373a853c2ce1462d Mon Sep 17 00:00:00 2001
+From: Valentin Churavy <v.churavy at gmail.com>
+Date: Tue, 12 Oct 2021 11:56:19 -0400
+Subject: [PATCH 2/6] WIP: add Type to ByVal attribute
+
+---
+ src/abi_aarch64.cpp |  2 +-
+ src/abi_arm.cpp     |  2 +-
+ src/abi_llvm.cpp    |  2 +-
+ src/abi_ppc64le.cpp |  6 +++++-
+ src/abi_win32.cpp   |  6 +++++-
+ src/abi_win64.cpp   |  9 +++++++--
+ src/abi_x86.cpp     |  8 ++++++--
+ src/abi_x86_64.cpp  | 11 ++++++++++-
+ src/ccall.cpp       |  4 ++--
+ 9 files changed, 38 insertions(+), 12 deletions(-)
+
+diff --git a/src/abi_aarch64.cpp b/src/abi_aarch64.cpp
+index ce94cc66f0..7ffe107d61 100644
+--- a/src/abi_aarch64.cpp
++++ b/src/abi_aarch64.cpp
+@@ -194,7 +194,7 @@ Type *isHFAorHVA(jl_datatype_t *dt, size_t &nele) const
+     return NULL;
+ }
+ 
+-bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab) override
++bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab, Type *Ty) override
+ {
+     // B.2
+     //   If the argument type is an HFA or an HVA, then the argument is used
+diff --git a/src/abi_arm.cpp b/src/abi_arm.cpp
+index 1a5d3d0651..ed846dfafb 100644
+--- a/src/abi_arm.cpp
++++ b/src/abi_arm.cpp
+@@ -23,7 +23,7 @@
+ 
+ struct ABI_ARMLayout : AbiLayout {
+ 
+-bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab) override
++bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab, Type *Ty) override
+ {
+     return false;
+ }
+diff --git a/src/abi_llvm.cpp b/src/abi_llvm.cpp
+index 1ab30da1b2..dba8f4aa8a 100644
+--- a/src/abi_llvm.cpp
++++ b/src/abi_llvm.cpp
+@@ -45,7 +45,7 @@ bool use_sret(jl_datatype_t *ty) override
+     return false;
+ }
+ 
+-bool needPassByRef(jl_datatype_t *ty, AttrBuilder &ab) override
++bool needPassByRef(jl_datatype_t *ty, AttrBuilder &ab, Type *Ty) override
+ {
+     return false;
+ }
+diff --git a/src/abi_ppc64le.cpp b/src/abi_ppc64le.cpp
+index dd6f927d9c..35e444ef77 100644
+--- a/src/abi_ppc64le.cpp
++++ b/src/abi_ppc64le.cpp
+@@ -101,12 +101,16 @@ bool use_sret(jl_datatype_t *dt) override
+     return false;
+ }
+ 
+-bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab) override
++bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab, Type *Ty) override
+ {
+     jl_datatype_t *ty0 = NULL;
+     bool hva = false;
+     if (jl_datatype_size(dt) > 64 && isHFA(dt, &ty0, &hva) > 8) {
++#if JL_LLVM_VERSION < 120000
+         ab.addAttribute(Attribute::ByVal);
++#else
++        ab.addByValAttr(Ty);
++#endif
+         return true;
+     }
+     return false;
+diff --git a/src/abi_win32.cpp b/src/abi_win32.cpp
+index af16a0310b..0b34f840e4 100644
+--- a/src/abi_win32.cpp
++++ b/src/abi_win32.cpp
+@@ -49,11 +49,15 @@ bool use_sret(jl_datatype_t *dt) override
+     return true;
+ }
+ 
+-bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab) override
++bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab, Type *Ty) override
+ {
+     // Use pass by reference for all structs
+     if (dt->layout->nfields > 0) {
++#if JL_LLVM_VERSION < 120000
+         ab.addAttribute(Attribute::ByVal);
++#else
++        ab.addByValAttr(Ty);
++#endif
+         return true;
+     }
+     return false;
+diff --git a/src/abi_win64.cpp b/src/abi_win64.cpp
+index 16e46a9703..f47802edf1 100644
+--- a/src/abi_win64.cpp
++++ b/src/abi_win64.cpp
+@@ -56,14 +56,19 @@ bool use_sret(jl_datatype_t *dt) override
+     return true;
+ }
+ 
+-bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab) override
++bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab, Type *Ty) override
+ {
+     nargs++;
+     size_t size = jl_datatype_size(dt);
+     if (win64_reg_size(size))
+         return false;
+-    if (nargs <= 4)
++    if (nargs <= 4) {
++#if JL_LLVM_VERSION < 120000
+         ab.addAttribute(Attribute::ByVal);
++#else
++        ab.addByValAttr(Ty);
++#endif
++    }
+     return true;
+ }
+ 
+diff --git a/src/abi_x86.cpp b/src/abi_x86.cpp
+index 7a65de028e..c6c0282602 100644
+--- a/src/abi_x86.cpp
++++ b/src/abi_x86.cpp
+@@ -67,12 +67,16 @@ bool use_sret(jl_datatype_t *dt) override
+     return true;
+ }
+ 
+-bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab) override
++bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab, Type *Ty) override
+ {
+     size_t size = jl_datatype_size(dt);
+     if (is_complex64(dt) || is_complex128(dt) || (jl_is_primitivetype(dt) && size <= 8))
+         return false;
+-    ab.addAttribute(Attribute::ByVal);
++#if JL_LLVM_VERSION < 120000
++        ab.addAttribute(Attribute::ByVal);
++#else
++        ab.addByValAttr(Ty);
++#endif
+     return true;
+ }
+ 
+diff --git a/src/abi_x86_64.cpp b/src/abi_x86_64.cpp
+index ac28af3011..5f8256dee4 100644
+--- a/src/abi_x86_64.cpp
++++ b/src/abi_x86_64.cpp
+@@ -178,11 +178,15 @@ bool use_sret(jl_datatype_t *dt) override
+     return sret;
+ }
+ 
+-bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab) override
++bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab, Type *Ty) override
+ {
+     Classification cl = classify(dt);
+     if (cl.isMemory) {
++#if JL_LLVM_VERSION < 120000
+         ab.addAttribute(Attribute::ByVal);
++#else
++        ab.addByValAttr(Ty);
++#endif
+         return true;
+     }
+ 
+@@ -202,7 +206,12 @@ bool needPassByRef(jl_datatype_t *dt, AttrBuilder &ab) override
+     else if (jl_is_structtype(dt)) {
+         // spill to memory even though we would ordinarily pass
+         // it in registers
++#if JL_LLVM_VERSION < 120000
+         ab.addAttribute(Attribute::ByVal);
++#else
++        Type* Ty = preferred_llvm_type(dt, false);
++        ab.addByValAttr(Ty);
++#endif
+         return true;
+     }
+     return false;
+diff --git a/src/ccall.cpp b/src/ccall.cpp
+index 66ab84c264..e21c717d41 100644
+--- a/src/ccall.cpp
++++ b/src/ccall.cpp
+@@ -291,7 +291,7 @@ class AbiLayout {
+ public:
+     virtual ~AbiLayout() {}
+     virtual bool use_sret(jl_datatype_t *ty) = 0;
+-    virtual bool needPassByRef(jl_datatype_t *ty, AttrBuilder&) = 0;
++    virtual bool needPassByRef(jl_datatype_t *ty, AttrBuilder&, Type* llvm_t) = 0;
+     virtual Type *preferred_llvm_type(jl_datatype_t *ty, bool isret) const = 0;
+ };
+ 
+@@ -1077,7 +1077,7 @@ std::string generate_func_sig(const char *fname)
+         }
+ 
+         // Whether or not LLVM wants us to emit a pointer to the data
+-        bool byRef = abi->needPassByRef((jl_datatype_t*)tti, ab);
++        bool byRef = abi->needPassByRef((jl_datatype_t*)tti, ab, t);
+ 
+         if (jl_is_cpointer_type(tti)) {
+             pat = t;
+
+From 1fe19a197ebbe33c9e60b2ca7d30c2573772b476 Mon Sep 17 00:00:00 2001
+From: Valentin Churavy <v.churavy at gmail.com>
+Date: Thu, 21 Oct 2021 20:32:39 -0400
+Subject: [PATCH 4/6] [LLVM/Win32] Force stack alignment on module
+
+---
+ src/aotcompile.cpp |  3 +++
+ src/ccall.cpp      |  3 +++
+ src/codegen.cpp    | 11 ++++++++++-
+ 3 files changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/src/aotcompile.cpp b/src/aotcompile.cpp
+index ffd43ee8d48d..d3dfc744fcd0 100644
+--- a/src/aotcompile.cpp
++++ b/src/aotcompile.cpp
+@@ -550,6 +550,9 @@ void jl_dump_native_impl(void *native_code,
+     std::unique_ptr<Module> sysimage(new Module("sysimage", Context));
+     sysimage->setTargetTriple(data->M->getTargetTriple());
+     sysimage->setDataLayout(data->M->getDataLayout());
++#if JL_LLVM_VERSION >= 130000
++    sysimage->setOverrideStackAlignment(data->M->getOverrideStackAlignment());
++#endif
+     data->M.reset(); // free memory for data->M
+ 
+     if (sysimg_data) {
+diff --git a/src/ccall.cpp b/src/ccall.cpp
+index fb70e53e2814..dd7626c918d0 100644
+--- a/src/ccall.cpp
++++ b/src/ccall.cpp
+@@ -891,6 +891,9 @@ static jl_cgval_t emit_llvmcall(jl_codectx_t &ctx, jl_value_t **args, size_t nar
+     // copy module properties that should always match
+     Mod->setTargetTriple(jl_Module->getTargetTriple());
+     Mod->setDataLayout(jl_Module->getDataLayout());
++#if JL_LLVM_VERSION >= 130000
++    Mod->setOverrideStackAlignment(jl_Module->getOverrideStackAlignment());
++#endif
+ 
+     // verify the definition
+     Function *def = Mod->getFunction(ir_name);
+diff --git a/src/codegen.cpp b/src/codegen.cpp
+index b09eb8db04e0..bc4ea7711a04 100644
+--- a/src/codegen.cpp
++++ b/src/codegen.cpp
+@@ -1707,6 +1707,14 @@ static void jl_setup_module(Module *m, const jl_cgparams_t *params = &jl_default
+             llvm::DEBUG_METADATA_VERSION);
+     m->setDataLayout(jl_data_layout);
+     m->setTargetTriple(jl_TargetMachine->getTargetTriple().str());
++
++#if defined(_OS_WINDOWS_) && !defined(_CPU_X86_64_) && JL_LLVM_VERSIOn >= 130000
++    // tell Win32 to assume the stack is always 16-byte aligned,
++    // and to ensure that it is 16-byte aligned for out-going calls,
++    // to ensure compatibility with GCC codes
++    m->setOverrideStackAlignment(16;)
++#endif
++
+ }
+ 
+ Module *jl_create_llvm_module(StringRef name)
+@@ -8235,10 +8243,11 @@ extern "C" void jl_init_llvm(void)
+ 
+     TargetOptions options = TargetOptions();
+     //options.PrintMachineCode = true; //Print machine code produced during JIT compiling
+-#if defined(_OS_WINDOWS_) && !defined(_CPU_X86_64_)
++#if defined(_OS_WINDOWS_) && !defined(_CPU_X86_64_) && JL_LLVM_VERSION <= 120000
+     // tell Win32 to assume the stack is always 16-byte aligned,
+     // and to ensure that it is 16-byte aligned for out-going calls,
+     // to ensure compatibility with GCC codes
++    // In LLVM 13 and onwards this has turned into a module option
+     options.StackAlignmentOverride = 16;
+ #endif
+ #ifdef JL_DEBUG_BUILD
+
+From 7a320647976eb97fdd169b5e85397b9e493e4569 Mon Sep 17 00:00:00 2001
+From: Valentin Churavy <v.churavy at gmail.com>
+Date: Fri, 22 Oct 2021 15:35:38 -0400
+Subject: [PATCH 5/6] StackProtector is now a module flag
+
+---
+ src/aotcompile.cpp | 1 +
+ src/ccall.cpp      | 1 +
+ src/codegen.cpp    | 6 ++++--
+ 3 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/aotcompile.cpp b/src/aotcompile.cpp
+index d3dfc744fcd0..05fcca50c4ee 100644
+--- a/src/aotcompile.cpp
++++ b/src/aotcompile.cpp
+@@ -551,6 +551,7 @@ void jl_dump_native_impl(void *native_code,
+     sysimage->setTargetTriple(data->M->getTargetTriple());
+     sysimage->setDataLayout(data->M->getDataLayout());
+ #if JL_LLVM_VERSION >= 130000
++    sysimage->setStackProtectorGuard(data->M->getStackProtectorGuard());
+     sysimage->setOverrideStackAlignment(data->M->getOverrideStackAlignment());
+ #endif
+     data->M.reset(); // free memory for data->M
+diff --git a/src/ccall.cpp b/src/ccall.cpp
+index dd7626c918d0..647735edb37d 100644
+--- a/src/ccall.cpp
++++ b/src/ccall.cpp
+@@ -892,6 +892,7 @@ static jl_cgval_t emit_llvmcall(jl_codectx_t &ctx, jl_value_t **args, size_t nar
+     Mod->setTargetTriple(jl_Module->getTargetTriple());
+     Mod->setDataLayout(jl_Module->getDataLayout());
+ #if JL_LLVM_VERSION >= 130000
++    Mod->setStackProtectorGuard(jl_Module->getStackProtectorGuard());
+     Mod->setOverrideStackAlignment(jl_Module->getOverrideStackAlignment());
+ #endif
+ 
+diff --git a/src/codegen.cpp b/src/codegen.cpp
+index bc4ea7711a04..1a7017d3aeb7 100644
+--- a/src/codegen.cpp
++++ b/src/codegen.cpp
+@@ -1714,7 +1714,9 @@ static void jl_setup_module(Module *m, const jl_cgparams_t *params = &jl_default
+     // to ensure compatibility with GCC codes
+     m->setOverrideStackAlignment(16;)
+ #endif
+-
++#if defined(JL_DEBUG_BUILD) && JL_LLVM_VERSION >= 130000
++    m->setStackProtectorGuard("global");
++#endif
+ }
+ 
+ Module *jl_create_llvm_module(StringRef name)
+
+From e323fc8f7be4ce053dec613076d7dd7517515134 Mon Sep 17 00:00:00 2001
+From: Valentin Churavy <v.churavy at gmail.com>
+Date: Sun, 24 Oct 2021 15:18:23 -0400
+Subject: [PATCH 6/6] Cleanup MachineObjectFileInfo handling in disassembly
+
+---
+ src/disasm.cpp | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/src/disasm.cpp b/src/disasm.cpp
+index 73b394b77d0b..25e7841bde85 100644
+--- a/src/disasm.cpp
++++ b/src/disasm.cpp
+@@ -860,21 +860,21 @@ static void jl_dump_asm_internal(
+     std::unique_ptr<MCRegisterInfo> MRI(TheTarget->createMCRegInfo(TheTriple.str()));
+     assert(MRI && "Unable to create target register info!");
+ 
+-    std::unique_ptr<MCObjectFileInfo> MOFI(new MCObjectFileInfo());
+-#if JL_LLVM_VERSION >= 130000
+-    MCSubtargetInfo *MSTI = TheTarget->createMCSubtargetInfo(TheTriple.str(), cpu, features);
+-    assert(MSTI && "Unable to create subtarget info!");
++    std::unique_ptr<llvm::MCSubtargetInfo> STI(
++      TheTarget->createMCSubtargetInfo(TheTriple.str(), cpu, features));
++    assert(STI && "Unable to create subtarget info!");
+ 
+-    MCContext Ctx(TheTriple, MAI.get(), MRI.get(), MSTI, &SrcMgr);
+-    MOFI->initMCObjectFileInfo(Ctx, /* PIC */ false, /* LargeCodeModel */ false);
++#if JL_LLVM_VERSION >= 130000
++    MCContext Ctx(TheTriple, MAI.get(), MRI.get(), STI.get(), &SrcMgr);
++    std::unique_ptr<MCObjectFileInfo> MOFI(
++      TheTarget->createMCObjectFileInfo(Ctx, /*PIC=*/false, /*LargeCodeModel=*/ false));
++    Ctx.setObjectFileInfo(MOFI.get());
+ #else
++    std::unique_ptr<MCObjectFileInfo> MOFI(new MCObjectFileInfo());
+     MCContext Ctx(MAI.get(), MRI.get(), MOFI.get(), &SrcMgr);
+     MOFI->InitMCObjectFileInfo(TheTriple, /* PIC */ false, Ctx);
+ #endif
+ 
+-    // Set up Subtarget and Disassembler
+-    std::unique_ptr<MCSubtargetInfo>
+-        STI(TheTarget->createMCSubtargetInfo(TheTriple.str(), cpu, features));
+     std::unique_ptr<MCDisassembler> DisAsm(TheTarget->createMCDisassembler(*STI, Ctx));
+     if (!DisAsm) {
+         rstream << "ERROR: no disassembler for target " << TheTriple.str();

Deleted: julia-system-cblas.patch
===================================================================
--- julia-system-cblas.patch	2021-12-02 22:11:47 UTC (rev 1062775)
+++ julia-system-cblas.patch	2021-12-02 22:12:15 UTC (rev 1062776)
@@ -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 1062775, julia/trunk/julia-system-cblas.patch)
===================================================================
--- julia-system-cblas.patch	                        (rev 0)
+++ julia-system-cblas.patch	2021-12-02 22:12:15 UTC (rev 1062776)
@@ -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 661e9e2b15..9bc1034682 100644
+--- a/stdlib/LinearAlgebra/src/blas.jl
++++ b/stdlib/LinearAlgebra/src/blas.jl
+@@ -71,6 +71,7 @@ libblastrampoline_handle = C_NULL
+ # should not look at these, instead preferring to parse the output
+ # of BLAS.get_config()
+ const libblas = libblastrampoline
++const libcblas = Base.libcblas_name
+ const liblapack = libblastrampoline
+ 
+ import LinearAlgebra
+@@ -109,6 +110,16 @@ else
+     end
+ end
+ 
++if libcblas == libblastrampoline
++     macro cblasfunc(x)
++        return @blasfunc(x)
++    end
++else
++    macro cblasfunc(x)
++        return Expr(:quote, x)
++    end
++end
++
+ _tryparse_env_int(key) = tryparse(Int, get(ENV, key, ""))
+ 
+ 
+@@ -327,7 +338,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), libblastrampoline), Cvoid,
++            ccall((@cblasfunc($fname), libcblas), Cvoid,
+                 (BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}),
+                  n, DX, incx, DY, incy, result)
+             result[]
+@@ -345,7 +356,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), libblastrampoline), Cvoid,
++            ccall((@cblasfunc($fname), libcblas), Cvoid,
+                 (BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}),
+                  n, DX, incx, DY, incy, result)
+             result[]

Deleted: make-install-no-build.patch
===================================================================
--- make-install-no-build.patch	2021-12-02 22:11:47 UTC (rev 1062775)
+++ make-install-no-build.patch	2021-12-02 22:12:15 UTC (rev 1062776)
@@ -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 1062775, julia/trunk/make-install-no-build.patch)
===================================================================
--- make-install-no-build.patch	                        (rev 0)
+++ make-install-no-build.patch	2021-12-02 22:12:15 UTC (rev 1062776)
@@ -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