summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-02-11 18:21:53 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-02-11 18:21:53 +0000
commita6b97d5cda784c2143406e21c62be1a8d8ca07bd (patch)
treeb94c633a6734d3b3b8b86ebacaf4b1bb8351d7be
parent6dd3a6cbb1c7ba09ca3853da2f03502560d22b67 (diff)
dev-lang/rust : version bump
-rw-r--r--dev-lang/rust/Manifest4
-rw-r--r--dev-lang/rust/files/1.36.0-libressl.patch42
-rw-r--r--dev-lang/rust/files/1.38.0-fix-custom-libdir.patch90
-rw-r--r--dev-lang/rust/files/1.38.0-fix-multiple-llvm-rebuilds.patch75
-rw-r--r--dev-lang/rust/files/1.40.0-add-soname.patch36
-rw-r--r--dev-lang/rust/files/llvm-gcc10.patch34
-rw-r--r--dev-lang/rust/rust-1.41.0-r10.ebuild (renamed from dev-lang/rust/rust-1.38.0-r314.ebuild)161
7 files changed, 171 insertions, 271 deletions
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index a27e34e8..bd7c15d2 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -1,2 +1,2 @@
-DIST rust-1.37.0-x86_64-unknown-linux-gnu.tar.xz 165034364 BLAKE2B 3047fff28da00e01179d3a648cb4e5636fa15ac7f4cb9ddc14e1df86d045b69ff3e41691b4a6ef4227c4cb58137524c5e029ba21a2c3a3a171fdb6f46b44f4ff SHA512 c4d48aa12cb929d6600f9cce81bb612c504aa1b3b3f8e76352af3a76b737dcbe0d31e8d139c17884b11aef9f12a55c4908fb8f3ff63dfa92533e4bd0a729914f
-DIST rustc-1.38.0-src.tar.xz 96163304 BLAKE2B 1e900b44db64727477ccf8e58e0ebb9ec209bbeb349816b5f7937e58c165db8befae33c5667732e5aaaa677c5a6c1e0229d9969ab8967fda9b8d7a593e6c5eb6 SHA512 b756d29a7a222bc7b5c7f42ff397346ab840f78e559f93e6e36b65e76eea525cf429899fe4de9fb8966623a2225b552feef9fa831bee50f9e25c976fa2af8c0a
+DIST rustc-1.40.0-x86_64-unknown-linux-gnu.tar.xz 60589652 BLAKE2B 72352e9f6b31af2a202026e50abb63309afdbc9eb05038592c947cc86a7ab4fa7c45843aaf9110923e24e7c1e3f52f0878aa59d25b4d367ddcd471ab39502661 SHA512 a461885cac4430dcd718f59b8528820a194c5b5e9e2289b3be9af1f19db49627207c0d83d506b89dcbdcd0ea0ff5cd29777337de791aab8d79e81547f6442f9c
+DIST rustc-1.41.0-src.tar.xz 93763052 BLAKE2B a68524fb6e3abb43d52ae6676a1e9de1c5d33606eaea6e93bb518f10b196d620f2f370c631c32e39a624af71a3bf6911662a9df7eecb8dde78a20c8054a349fc SHA512 0e30fe53b77860085bea0f1f60315eb835b00dd796c5d1b98ed44fe6fc27336dfb064908c86e1669a9cbe81c9ca1495e1c259a8a268bef23b23805a719cef0dd
diff --git a/dev-lang/rust/files/1.36.0-libressl.patch b/dev-lang/rust/files/1.36.0-libressl.patch
deleted file mode 100644
index 9b176f4d..00000000
--- a/dev-lang/rust/files/1.36.0-libressl.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From e6f2c934bc25ec04a61c58c3e0ffb9c5194ee388 Mon Sep 17 00:00:00 2001
-From: Jory Pratt <anarchy@gentoo.org>
-Date: Tue, 9 Jul 2019 09:48:36 -0500
-Subject: [PATCH] Update libressl support
-
----
- vendor/openssl-sys/.cargo-checksum.json | 2 +-
- vendor/openssl-sys/build/main.rs | 3 ++-
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/vendor/openssl-sys/.cargo-checksum.json b/vendor/openssl-sys/.cargo-checksum.json
-index 5c961bcbc..8430a26c5 100644
---- a/vendor/openssl-sys/.cargo-checksum.json
-+++ b/vendor/openssl-sys/.cargo-checksum.json
-@@ -1 +1 @@
--{"files":{"CHANGELOG.md":"a3e7e4750fe6130a93e9423d5b1b68c659dd29246602f71583c7a101c4d647be","Cargo.toml":"5fdba4ce7cf40abec303651694e79a5ae551f040a7bbaad134ed9ab54d26a613","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"61b741c4fe9612f5a70b19bec53d3ab7ec2d7038b163c35b54f0664caa104a31","build/expando.c":"c4fa8a4424b2321f1857edfc5ce1ac1f03eda54440367d3142310c0eb5553004","build/find_normal.rs":"0a2dc417eace7fc72c27b9046ebaf53c75e418b27baa877434925a81fe6c23ed","build/find_vendored.rs":"d88c47f4cf851aa67c0e3dec679910c5c7ba239bc5a1aa89e507a875b4c4ca0f","build/main.rs":"681a1f8a8f389c82bbd3d2498a3692c201c63db658e7c3d162f09d5d81892fd4","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"f72d6871d38865d9e7378882135cdc6f1acd66c48a4fc846502b7f488dbbf111","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"95a0803286d1efbe709a3668443b5001f5cce6f9db216165b1e08950972e0bfd","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"7cc334e86d16b3eae165dfa3a6c8e488bc0fe590c17beda38893d2e9d784d5a6","src/dsa.rs":"ae79baf231681900ea76304285b3ffacf5298c90b8c04d371269cf4adbb5b9fa","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"5341787b108f4e9acb12428fbf993aa507e9d77b97284912f7eab414ec6aeff9","src/err.rs":"f6641be5df397086a9db80667e191fb1d92972c29151e617df86672c1a16d3ad","src/evp.rs":"300007bcf00eaff03cb1d113547a79c9495b498ede9e1b2f709a9e6e1ba42ac1","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"e8931dd7e59a56a247823201f52828ec15d0b8dbd15ba297cacd3dcb3ca747cf","src/macros.rs":"638fb9098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"fc7366e75c78707650c8667593ed183eca6a8ce8dd6b911e342f644d1bcf98bd","src/pem.rs":"83bb7745615a99fe2a8d5f8f51addba2024c7e6be847ab6c9244bfd04388c4f9","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"0e8c1f0bc37620a9208175542143bfd411ae88188974d2d5b37a2b8b77d0e2c8","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"18c0c0c5ef02329be90fd279968da61d3e1a6b3a3aec102d6fefd99021d1822a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"60ca3dea1bbfda645bde563b4a878dac129c3f760e3ad572381000fc7a8ef522","src/x509.rs":"20e221731587221aab00aef21b4e4bebb7635603d265d424f3dd3c60d4c511e2","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"30c58ce7d80670cc597d041e0f59862c1100e38743fc9dde2aec6dc811a4a558"},"package":"33c86834957dd5b915623e94f2f4ab2c70dd8f6b70679824155d5ae21dbd495d"}
-\ No newline at end of file
-+{"files":{"CHANGELOG.md":"a3e7e4750fe6130a93e9423d5b1b68c659dd29246602f71583c7a101c4d647be","Cargo.toml":"5fdba4ce7cf40abec303651694e79a5ae551f040a7bbaad134ed9ab54d26a613","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"61b741c4fe9612f5a70b19bec53d3ab7ec2d7038b163c35b54f0664caa104a31","build/expando.c":"c4fa8a4424b2321f1857edfc5ce1ac1f03eda54440367d3142310c0eb5553004","build/find_normal.rs":"0a2dc417eace7fc72c27b9046ebaf53c75e418b27baa877434925a81fe6c23ed","build/find_vendored.rs":"d88c47f4cf851aa67c0e3dec679910c5c7ba239bc5a1aa89e507a875b4c4ca0f","build/main.rs":"cae729f449030ee86fc8e97215a2639c03f87a44d2399c84be8d41c1a6b624f3","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"f72d6871d38865d9e7378882135cdc6f1acd66c48a4fc846502b7f488dbbf111","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"95a0803286d1efbe709a3668443b5001f5cce6f9db216165b1e08950972e0bfd","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"7cc334e86d16b3eae165dfa3a6c8e488bc0fe590c17beda38893d2e9d784d5a6","src/dsa.rs":"ae79baf231681900ea76304285b3ffacf5298c90b8c04d371269cf4adbb5b9fa","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"5341787b108f4e9acb12428fbf993aa507e9d77b97284912f7eab414ec6aeff9","src/err.rs":"f6641be5df397086a9db80667e191fb1d92972c29151e617df86672c1a16d3ad","src/evp.rs":"300007bcf00eaff03cb1d113547a79c9495b498ede9e1b2f709a9e6e1ba42ac1","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"e8931dd7e59a56a247823201f52828ec15d0b8dbd15ba297cacd3dcb3ca747cf","src/macros.rs":"638fb9098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"fc7366e75c78707650c8667593ed183eca6a8ce8dd6b911e342f644d1bcf98bd","src/pem.rs":"83bb7745615a99fe2a8d5f8f51addba2024c7e6be847ab6c9244bfd04388c4f9","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"0e8c1f0bc37620a9208175542143bfd411ae88188974d2d5b37a2b8b77d0e2c8","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"18c0c0c5ef02329be90fd279968da61d3e1a6b3a3aec102d6fefd99021d1822a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"60ca3dea1bbfda645bde563b4a878dac129c3f760e3ad572381000fc7a8ef522","src/x509.rs":"20e221731587221aab00aef21b4e4bebb7635603d265d424f3dd3c60d4c511e2","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"30c58ce7d80670cc597d041e0f59862c1100e38743fc9dde2aec6dc811a4a558"},"package":"33c86834957dd5b915623e94f2f4ab2c70dd8f6b70679824155d5ae21dbd495d"}
-\ No newline at end of file
-diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs
-index 02b93b90a..0b8c96dcc 100644
---- a/vendor/openssl-sys/build/main.rs
-+++ b/vendor/openssl-sys/build/main.rs
-@@ -199,6 +199,7 @@ See rust-openssl README for more information:
- (8, 1) => ('8', '1'),
- (8, _) => ('8', 'x'),
- (9, 0) => ('9', '0'),
-+ (9, _) => ('9', 'x'),
- _ => version_error(),
- };
-
-@@ -239,7 +240,7 @@ fn version_error() -> ! {
- "
-
- This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
--through 2.9.0, but a different version of OpenSSL was found. The build is now aborting
-+through 2.9.x, but a different version of OpenSSL was found. The build is now aborting
- due to this version mismatch.
-
- "
---
-2.22.0
diff --git a/dev-lang/rust/files/1.38.0-fix-custom-libdir.patch b/dev-lang/rust/files/1.38.0-fix-custom-libdir.patch
deleted file mode 100644
index b2b14876..00000000
--- a/dev-lang/rust/files/1.38.0-fix-custom-libdir.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 8553cc0681db7fb6b58b25bb3fbd520604a0cc3a Mon Sep 17 00:00:00 2001
-From: O01eg <o01eg@yandex.ru>
-Date: Wed, 7 Aug 2019 23:37:55 +0300
-Subject: [PATCH] Fix double resolving custom libdir
-
----
- src/bootstrap/builder.rs | 20 +++++++++++++-------
- src/bootstrap/dist.rs | 13 +++++++++----
- 2 files changed, 22 insertions(+), 11 deletions(-)
-
-diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 5a75497173eb..06ccdd8e7f0f 100644
---- a/src/bootstrap/builder.rs
-+++ b/src/bootstrap/builder.rs
-@@ -627,13 +627,7 @@ impl<'a> Builder<'a> {
- }
-
- fn run(self, builder: &Builder<'_>) -> Interned<PathBuf> {
-- let compiler = self.compiler;
-- let config = &builder.build.config;
-- let lib = if compiler.stage >= 1 && config.libdir_relative().is_some() {
-- builder.build.config.libdir_relative().unwrap()
-- } else {
-- Path::new("lib")
-- };
-+ let lib = builder.sysroot_libdir_relative(self.compiler);
- let sysroot = builder
- .sysroot(self.compiler)
- .join(lib)
-@@ -687,6 +681,18 @@ impl<'a> Builder<'a> {
- }
- }
-
-+ /// Returns the compiler's relative libdir where the standard library and other artifacts are
-+ /// found for a compiler's sysroot.
-+ ///
-+ /// For example this returns `lib` on Unix and Windows.
-+ pub fn sysroot_libdir_relative(&self, compiler: Compiler) -> &Path {
-+ match self.config.libdir_relative() {
-+ Some(relative_libdir) if compiler.stage >= 1
-+ => relative_libdir,
-+ _ => Path::new("lib")
-+ }
-+ }
-+
- /// Adds the compiler's directory of dynamic libraries to `cmd`'s dynamic
- /// library lookup path.
- pub fn add_rustc_lib_path(&self, compiler: Compiler, cmd: &mut Command) {
-diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index bd012a887c26..213ceb194a81 100644
---- a/src/bootstrap/dist.rs
-+++ b/src/bootstrap/dist.rs
-@@ -469,7 +469,6 @@ impl Step for Rustc {
- fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) {
- let host = compiler.host;
- let src = builder.sysroot(compiler);
-- let libdir = builder.rustc_libdir(compiler);
-
- // Copy rustc/rustdoc binaries
- t!(fs::create_dir_all(image.join("bin")));
-@@ -481,11 +480,14 @@ impl Step for Rustc {
-
- // Copy runtime DLLs needed by the compiler
- if libdir_relative.to_str() != Some("bin") {
-+ let libdir = builder.rustc_libdir(compiler);
- for entry in builder.read_dir(&libdir) {
- let name = entry.file_name();
- if let Some(s) = name.to_str() {
- if is_dylib(s) {
-- builder.install(&entry.path(), &image.join(&libdir_relative), 0o644);
-+ // Don't use custom libdir here because ^lib/ will be resolved again
-+ // with installer
-+ builder.install(&entry.path(), &image.join("lib"), 0o644);
- }
- }
- }
-@@ -493,8 +495,11 @@ impl Step for Rustc {
-
- // Copy over the codegen backends
- let backends_src = builder.sysroot_codegen_backends(compiler);
-- let backends_rel = backends_src.strip_prefix(&src).unwrap();
-- let backends_dst = image.join(&backends_rel);
-+ let backends_rel = backends_src.strip_prefix(&src).unwrap()
-+ .strip_prefix(builder.sysroot_libdir_relative(compiler)).unwrap();
-+ // Don't use custom libdir here because ^lib/ will be resolved again with installer
-+ let backends_dst = image.join("lib").join(&backends_rel);
-+
- t!(fs::create_dir_all(&backends_dst));
- builder.cp_r(&backends_src, &backends_dst);
-
diff --git a/dev-lang/rust/files/1.38.0-fix-multiple-llvm-rebuilds.patch b/dev-lang/rust/files/1.38.0-fix-multiple-llvm-rebuilds.patch
deleted file mode 100644
index 235b9562..00000000
--- a/dev-lang/rust/files/1.38.0-fix-multiple-llvm-rebuilds.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 53fe76479aab03b1fbe5b7184f45484886f769b1 Mon Sep 17 00:00:00 2001
-From: Josh Stone <jistone@redhat.com>
-Date: Wed, 4 Sep 2019 16:02:31 -0700
-Subject: [PATCH] Assume non-git LLVM is fresh if the stamp file exists
-
-Rustbuild usually writes the LLVM submodule commit in a stamp file, so
-we can avoid rebuilding it unnecessarily. However, for builds from a
-source tarball (non-git), we were assuming a rebuild is always needed.
-This can cause a lot of extra work if any environment like `CFLAGS`
-changed between steps like build and install, which are often separate
-in distro builds.
-
-Now we also write an empty stamp file if the git commit is unknown, and
-its presence is trusted to indicate that no rebuild is needed. An info
-message reports that this is happening, along with the stamp file path
-that can be deleted to force a rebuild anyway.
----
- src/bootstrap/native.rs | 27 ++++++++++++++-------------
- 1 file changed, 14 insertions(+), 13 deletions(-)
-
-diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
-index f02def3e1b05..7bf9ea2688f4 100644
---- a/src/bootstrap/native.rs
-+++ b/src/bootstrap/native.rs
-@@ -81,26 +81,29 @@ impl Step for Llvm {
- (info, "src/llvm-project/llvm", builder.llvm_out(target), dir.join("bin"))
- };
-
-- if !llvm_info.is_git() {
-- println!(
-- "git could not determine the LLVM submodule commit hash. \
-- Assuming that an LLVM build is necessary.",
-- );
-- }
--
- let build_llvm_config = llvm_config_ret_dir
- .join(exe("llvm-config", &*builder.config.build));
- let done_stamp = out_dir.join("llvm-finished-building");
-
-- if let Some(llvm_commit) = llvm_info.sha() {
-- if done_stamp.exists() {
-+ if done_stamp.exists() {
-+ if let Some(llvm_commit) = llvm_info.sha() {
- let done_contents = t!(fs::read(&done_stamp));
-
- // If LLVM was already built previously and the submodule's commit didn't change
- // from the previous build, then no action is required.
- if done_contents == llvm_commit.as_bytes() {
-- return build_llvm_config
-+ return build_llvm_config;
- }
-+ } else {
-+ builder.info(
-+ "Could not determine the LLVM submodule commit hash. \
-+ Assuming that an LLVM rebuild is not necessary.",
-+ );
-+ builder.info(&format!(
-+ "To force LLVM to rebuild, remove the file `{}`",
-+ done_stamp.display()
-+ ));
-+ return build_llvm_config;
- }
- }
-
-@@ -303,9 +306,7 @@ impl Step for Llvm {
-
- cfg.build();
-
-- if let Some(llvm_commit) = llvm_info.sha() {
-- t!(fs::write(&done_stamp, llvm_commit));
-- }
-+ t!(fs::write(&done_stamp, llvm_info.sha().unwrap_or("")));
-
- build_llvm_config
- }
diff --git a/dev-lang/rust/files/1.40.0-add-soname.patch b/dev-lang/rust/files/1.40.0-add-soname.patch
new file mode 100644
index 00000000..7a5c0189
--- /dev/null
+++ b/dev-lang/rust/files/1.40.0-add-soname.patch
@@ -0,0 +1,36 @@
+Description: Set DT_SONAME when building dylibs
+ In Rust, library filenames include a version-specific hash to help
+ the run-time linker find the correct version. Unlike in C/C++, the
+ compiler looks for all libraries matching a glob that ignores the
+ hash and reads embedded metadata to work out versions, etc.
+ .
+ The upshot is that there is no need for the usual "libfoo.so ->
+ libfoo-1.2.3.so" symlink common with C/C++ when building with Rust,
+ and no need to communicate an alternate filename to use at run-time
+ vs compile time. If linking to a Rust dylib from C/C++ however, a
+ "libfoo.so -> libfoo-$hash.so" symlink may well be useful and in
+ this case DT_SONAME=libfoo-$hash.so would be required. More
+ mundanely, various tools (eg: dpkg-shlibdeps) complain if they don't
+ find DT_SONAME on shared libraries in public directories.
+ .
+ This patch passes -Wl,-soname=$outfile when building dylibs (and
+ using a GNU linker).
+Author: Angus Lees <gus@debian.org>
+Forwarded: no
+
+--- a/src/librustc_codegen_ssa/back/link.rs
++++ b/src/librustc_codegen_ssa/back/link.rs
+@@ -1034,6 +1034,13 @@
+ cmd.args(&rpath::get_rpath_flags(&mut rpath_config));
+ }
+
++ if (crate_type == config::CrateType::Dylib || crate_type == config::CrateType::Cdylib)
++ && t.options.linker_is_gnu {
++ let filename = String::from(out_filename.file_name().unwrap().to_str().unwrap());
++ let soname = [String::from("-Wl,-soname=") + &filename];
++ cmd.args(&soname);
++ }
++
+ // Finally add all the linker arguments provided on the command line along
+ // with any #[link_args] attributes found inside the crate
+ if let Some(ref args) = sess.opts.cg.link_args {
diff --git a/dev-lang/rust/files/llvm-gcc10.patch b/dev-lang/rust/files/llvm-gcc10.patch
new file mode 100644
index 00000000..8fbaa923
--- /dev/null
+++ b/dev-lang/rust/files/llvm-gcc10.patch
@@ -0,0 +1,34 @@
+From b288d90b39f4b905c02092a9bfcfd6d78f99b191 Mon Sep 17 00:00:00 2001
+From: Than McIntosh <thanm@google.com>
+Date: Fri, 19 Jul 2019 13:13:54 +0000
+Subject: [PATCH] [NFC] include cstdint/string prior to using uint8_t/string
+
+Summary: include proper header prior to use of uint8_t typedef
+and std::string.
+
+Subscribers: llvm-commits
+
+Reviewers: cherry
+
+Tags: #llvm
+
+Differential Revision: https://reviews.llvm.org/D64937
+
+llvm-svn: 366572
+---
+ llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/llbm-project/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h b/src/llvm-project/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h
+index da9d9d5bfdc0..3d47471f0ef0 100644
+--- a/src/llvm-project/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h
++++ b/src/llvm-project/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h
+@@ -16,6 +16,8 @@
+ #include "llvm/Demangle/DemangleConfig.h"
+ #include "llvm/Demangle/StringView.h"
+ #include <array>
++#include <cstdint>
++#include <string>
+
+ namespace llvm {
+ namespace itanium_demangle {
diff --git a/dev-lang/rust/rust-1.38.0-r314.ebuild b/dev-lang/rust/rust-1.41.0-r10.ebuild
index 86f55184..cf4a1209 100644
--- a/dev-lang/rust/rust-1.38.0-r314.ebuild
+++ b/dev-lang/rust/rust-1.41.0-r10.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy )
+PYTHON_COMPAT=( python3_{6,7} )
-inherit check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
if [[ ${PV} = *beta* ]]; then
betaver=${PV//*beta}
@@ -14,7 +14,7 @@ if [[ ${PV} = *beta* ]]; then
SLOT="beta/${PV}"
SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
else
- ABI_VER="1.38"
+ ABI_VER="1.41"
SLOT="stable/${ABI_VER}"
MY_P="rustc-${PV}"
SRC="${MY_P}-src.tar.xz"
@@ -26,8 +26,10 @@ RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
DESCRIPTION="Systems programming language from Mozilla"
HOMEPAGE="https://www.rust-lang.org/"
-SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
- $(rust_arch_uri x86_64-unknown-linux-gnu rust-${RUST_STAGE0_VERSION})"
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
+ !system-bootstrap? ( $(rust_arch_uri x86_64-unknown-linux-gnu rustc-${RUST_STAGE0_VERSION}) )
+"
ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
@@ -36,7 +38,7 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-IUSE="clippy cpu_flags_x86_sse2 debug doc libressl rls rustfmt system-llvm wasm ${ALL_LLVM_TARGETS[*]}"
+IUSE="clippy cpu_flags_x86_sse2 debug doc libressl nightly parallel-compiler rls rustfmt system-bootstrap system-llvm wasm ${ALL_LLVM_TARGETS[*]}"
# Please keep the LLVM dependency block separate. Since LLVM is slotted,
# we need to *really* make sure we're not pulling more than one slot
@@ -44,8 +46,8 @@ IUSE="clippy cpu_flags_x86_sse2 debug doc libressl rls rustfmt system-llvm wasm
# How to use it:
# 1. List all the working slots (with min versions) in ||, newest first.
-# 2. Update the := to specify *max* version, e.g. < 9.
-# 3. Specify LLVM_MAX_SLOT, e.g. 8.
+# 2. Update the := to specify *max* version, e.g. < 10.
+# 3. Specify LLVM_MAX_SLOT, e.g. 9.
LLVM_DEPEND="
|| (
sys-devel/llvm:9[llvm_targets_WebAssembly?]
@@ -55,13 +57,16 @@ LLVM_DEPEND="
"
LLVM_MAX_SLOT=9
+BOOTSTRAP_DEPEND="|| ( >=dev-lang/rust-1.$(($(ver_cut 2) - 1)).0-r1 >=dev-lang/rust-bin-1.$(($(ver_cut 2) - 1)) )"
+
COMMON_DEPEND="
- sys-libs/zlib
+ net-libs/libssh2:=
+ net-libs/http-parser:=
+ net-misc/curl:=[ssl]
+ sys-libs/zlib:=
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
- net-libs/libssh2
- net-libs/http-parser:=
- net-misc/curl[ssl]
+ elibc_musl? ( sys-libs/libunwind )
system-llvm? (
${LLVM_DEPEND}
)
@@ -73,24 +78,33 @@ DEPEND="${COMMON_DEPEND}
>=sys-devel/gcc-4.7
>=sys-devel/clang-3.5
)
- dev-util/cmake
+ system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
+ system-llvm? (
+ dev-util/cmake
+ dev-util/ninja
+ )
"
-RDEPEND="${COMMON_DEPEND}
- !dev-util/cargo
- rustfmt? ( !dev-util/rustfmt )
-"
+RDEPEND="${COMMON_DEPEND}"
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ parallel-compiler? ( nightly )
wasm? ( llvm_targets_WebAssembly )
x86? ( cpu_flags_x86_sse2 )
"
-QA_FLAGS_IGNORED="usr/bin/* usr/lib*/${P}"
+
+QA_FLAGS_IGNORED="
+ usr/bin/*-${PV}
+ usr/lib*/lib*.so
+ usr/lib/rustlib/*/codegen-backends/librustc_codegen_llvm-llvm.so
+ usr/lib/rustlib/*/lib/lib*.so
+"
+
+QA_SONAME="usr/lib.*/librustc_macros.*.so"
PATCHES=(
- "${FILESDIR}"/1.38.0-fix-custom-libdir.patch
- "${FILESDIR}"/1.38.0-fix-multiple-llvm-rebuilds.patch
- "${FILESDIR}"/1.36.0-libressl.patch
+ "${FILESDIR}"/1.40.0-add-soname.patch
+ "${FILESDIR}"/llvm-gcc10.patch
)
S="${WORKDIR}/${MY_P}-src"
@@ -100,10 +114,10 @@ toml_usex() {
}
pre_build_checks() {
- CHECKREQS_DISK_BUILD="9G"
+ CHECKREQS_DISK_BUILD="10G"
eshopts_push -s extglob
if is-flagq '-g?(gdb)?([1-9])'; then
- CHECKREQS_DISK_BUILD="14G"
+ CHECKREQS_DISK_BUILD="15G"
fi
eshopts_pop
check-reqs_pkg_setup
@@ -116,15 +130,31 @@ pkg_pretend() {
pkg_setup() {
pre_build_checks
python-any-r1_pkg_setup
- use system-llvm && llvm_pkg_setup
+
+ # use bundled for now, #707746
+ # will need dev-libs/libgit2 slotted dep if re-enabled
+ #export LIBGIT2_SYS_USE_PKG_CONFIG=1
+ export LIBSSH2_SYS_USE_PKG_CONFIG=1
+ export PKG_CONFIG_ALLOW_CROSS=1
+
+ if use system-llvm; then
+ llvm_pkg_setup
+
+ local llvm_config="$(get_llvm_prefix "$LLVM_MAX_SLOT")/bin/llvm-config"
+
+ export LLVM_LINK_SHARED=1
+ export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
+ fi
}
src_prepare() {
- local rust_stage0_root="${WORKDIR}"/rust-stage0
-
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
+ if ! use system-bootstrap; then
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+ local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
default
}
@@ -152,7 +182,12 @@ src_configure() {
tools="\"rustfmt\",$tools"
fi
- local rust_stage0_root="${WORKDIR}"/rust-stage0
+ local rust_stage0_root
+ if use system-bootstrap; then
+ rust_stage0_root="$(rustc --print sysroot)"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
rust_target="$(rust_abi)"
@@ -171,6 +206,7 @@ src_configure() {
cargo = "${rust_stage0_root}/bin/cargo"
rustc = "${rust_stage0_root}/bin/rustc"
docs = $(toml_usex doc)
+ compiler-docs = $(toml_usex doc)
submodules = false
python = "${EPYTHON}"
locked-deps = true
@@ -180,17 +216,20 @@ src_configure() {
verbose = 2
[install]
prefix = "${EPREFIX}/usr"
- libdir = "$(get_libdir)/${P}"
- docdir = "share/doc/${P}"
- mandir = "share/${P}/man"
+ libdir = "lib"
+ docdir = "share/doc/${PF}"
+ mandir = "share/man"
[rust]
optimize = $(toml_usex !debug)
debug = $(toml_usex debug)
debug-assertions = $(toml_usex debug)
default-linker = "$(tc-getCC)"
- channel = "stable"
+ parallel-compiler = $(toml_usex parallel-compiler)
+ channel = "$(usex nightly nightly stable)"
rpath = false
lld = $(usex system-llvm false $(toml_usex wasm))
+ [dist]
+ src-tarball = false
EOF
for v in $(multilib_get_enabled_abi_pairs); do
@@ -208,6 +247,12 @@ src_configure() {
linker = "$(tc-getCC)"
ar = "$(tc-getAR)"
EOF
+ # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ if use elibc_musl; then
+ cat <<- EOF >> "${S}"/config.toml
+ crt-static = false
+ EOF
+ fi
if use system-llvm; then
cat <<- EOF >> "${S}"/config.toml
llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
@@ -230,39 +275,26 @@ src_compile() {
}
src_install() {
- local rust_target abi_libdir
-
env DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml \
--exclude src/tools/miri || die
- # Copy shared library versions of standard libraries for all targets
- # into the system's abi-dependent lib directories because the rust
- # installer only does so for the native ABI.
- for v in $(multilib_get_enabled_abi_pairs); do
- if [ ${v##*.} = ${DEFAULT_ABI} ]; then
- continue
- fi
- abi_libdir=$(get_abi_LIBDIR ${v##*.})
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- mkdir -p "${ED}/usr/${abi_libdir}/${P}"
- cp "${ED}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
- "${ED}/usr/${abi_libdir}/${P}" || die
- done
+ # bug #689562, #689160
+ rm "${D}/etc/bash_completion.d/cargo" || die
+ rmdir "${D}"/etc{/bash_completion.d,} || die
+ dobashcomp build/tmp/dist/cargo-image/etc/bash_completion.d/cargo
+
+ # Move public shared libs to abi specific libdir
+ # Private and target specific libs MUST stay in /usr/lib/rustlib/${rust_target}/lib
+ if [[ $(get_libdir) != lib ]]; then
+ dodir /usr/$(get_libdir)
+ mv "${ED}/usr/lib"/*.so "${ED}/usr/$(get_libdir)/" || die
+ fi
dodoc COPYRIGHT
- # FIXME:
- # Really not sure if that env is needed, specailly LDPATH
- cat <<-EOF > "${T}"/50${P}
- LDPATH="${EPREFIX}/usr/$(get_libdir)/${P}"
- MANPATH="${EPREFIX}/usr/share/${P}/man"
- EOF
- doenvd "${T}"/50${P}
}
pkg_postinst() {
- eselect rust update --if-unset
-
elog "Rust installs a helper script for calling GDB and LLDB,"
elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
@@ -270,15 +302,20 @@ pkg_postinst() {
ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some"
ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'."
- if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ if has_version app-editors/emacs; then
elog "install app-emacs/rust-mode to get emacs support for rust."
fi
if has_version app-editors/gvim || has_version app-editors/vim; then
elog "install app-vim/rust-vim to get vim support for rust."
fi
-}
-pkg_postrm() {
- eselect rust cleanup
+ if use elibc_musl; then
+ ewarn "${PN} on *-musl targets is configured with crt-static"
+ ewarn ""
+ ewarn "you will need to set RUSTFLAGS=\"-C target-feature=-crt-static\" in make.conf"
+ ewarn "to use it with portage, otherwise you may see failures like"
+ ewarn "error: cannot produce proc-macro for serde_derive v1.0.98 as the target "
+ ewarn "x86_64-unknown-linux-musl does not support these crate types"
+ fi
}