Skip to content

Commit 044e0d5

Browse files
committed
dev-lang/rust: reimport rust-1.39.0 from smauel overlay
Signed-off-by: Steffen Kuhn <[email protected]>
1 parent ce0fb6f commit 044e0d5

29 files changed

+2103
-0
lines changed

dev-lang/rust/Manifest

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,11 @@ DIST rust-1.33.0-i686-gentoo-linux-musl.tar.xz 116133752 BLAKE2B a9cf13caa12da6a
44
DIST rust-1.33.0-powerpc-gentoo-linux-musl.tar.xz 104602692 BLAKE2B bef7cacfd7d9e411f18f6b64403c3bdc33bb17270f966aa9cb6ff99e80d8da9bd1346e8c3e3081df7bee3f367d3940b3badd6aeec6859f4a3de75cfeb108de1a SHA512 2314b5d31c9cc31b28a3668ebd4e1a88a4f090c60b141c8e3e4fb06b4c311ef64ab9217acbdb34417e1f3aaf74fda2087ba90ad70075b7197471bf8bfc804370
55
DIST rust-1.33.0-powerpc64-gentoo-linux-musl.tar.xz 98455708 BLAKE2B fde1ca61ddcfe1091aa2c39ffb9ea47ef4ef2b63557059eeda4df6c90bcf30b22bf09e0bd301d7993d27d18e0c5dbc84db123613a8ac31c68abcb56d1b3892bc SHA512 9dbe37abd4edd519ac3596d405b9af7a4a3de1da56161bed66f9f2f40d505beaa9d7c998c6775d6c86d4e086e5cb085f65702b6be7a182663c1e0c6b2095a242
66
DIST rust-1.33.0-x86_64-gentoo-linux-musl.tar.xz 113838416 BLAKE2B 2d118520a118746ca16aac7b336e03805c3a02df20b2abdd2e9f6a4fcc062c17b0d057347447027287f8fdceeaa34a171835e6f22d45098097b540c97cee23a1 SHA512 cd2a6277af99cfaf84f5d293a09e0af9189e1d9148bc4031dd32620f0eb086695e175c6a04e6cceb673af976566114e4a75d42654505d295135a8fc95eb2f850
7+
DIST rust-1.38.0-aarch64-gentoo-linux-musl.tar.xz 197994668 BLAKE2B 4029c97c7c1202c539919f73318db3faa350f4a99f7ea53ba6052249f783a845c7fb4c1722ef901a504111d1a63b794b909147d281864e91f0d7dc23b3748ff2 SHA512 1e7fd09dd52cb5e1e0c9f7f65d90d80a20860ed0186259cb996fe21a742e57c3af471e77384c870d9a5c5c85a042cbdf4418681773445cea7b7db73267c597e0
8+
DIST rust-1.38.0-armv7a-unknown-linux-musleabihf.tar.xz 198006500 BLAKE2B 0a99c5e41949da067524cd030297bdcaae829b916d2f47c6962b811a73c29958e14cf0b00d5f0f16a5201335ecd13ac554299ce91f7e3b1987a05a6966c88adc SHA512 afa16200fd11e427fd7056d58b00be13ffb384b1b9cf8fb8fa38fdaee889d88aaa58f4429ed29ee4326581ddb24e09f8a9af3abd2247019ebe942ed96e3820b1
9+
DIST rust-1.38.0-i686-gentoo-linux-musl.tar.xz 208659212 BLAKE2B 2a233ab2566a256ebf5a535276c8212f3746c1ecfe9e1579fab7e46e09d243137ef2d6fa2b24fc90312b3825e355b2d9f92b33c10ea1c6ebd1bc3405285f2a1a SHA512 4de4a808c5f3109f9651c2b11ccef9d65e3bb1c6f6a4e221b1a4679ef571c0b94fb4fcb2943de2d483db939573cabe05c7a7cde4ebb379060010bcf1d4eb1e6c
10+
DIST rust-1.38.0-powerpc-gentoo-linux-musl.tar.xz 202029564 BLAKE2B ee732fd714d6d1d554fffbb0c560e1b8fa5d5a4acf6d7ccaa2665ce02b273740f477395a8ca93225bcaec6a71b0f5d5fe302975d038ba248b93f242a05f8133a SHA512 c997c24ca9ae780b51125d13476ef2b2a996a67a24f647f8ccff65543674a29d351835fafd818b80f7bc8f3def4d5a1bf499bef47ba6c91d156df2336a411bfe
11+
DIST rust-1.38.0-powerpc64-gentoo-linux-musl.tar.xz 182117568 BLAKE2B d3d84572efe21adc3739eac13b8084fce293d417b383de9037d6e78aba9de1fbff9cb6636e0992179eb74c5ed708d39b1aad18d2b3ab4915c8768939fc25eed4 SHA512 4b9d7b143cc3c5114476c1369e0de22f42f4b312331ad6fe1f18d8edba8e5b9ac67284748c1b20ce935be5f7b4741552aa1f7070cec70bffee639f591182e090
12+
DIST rust-1.38.0-x86_64-gentoo-linux-musl.tar.xz 205761400 BLAKE2B 2c62d7564c56e6c356dd5a8253658efce455d23c2d6d5ee1e4327f77bea654250ac276afa2da91a0d6ed919787d215280c2f79fb6577a4ed2d838e756411f512 SHA512 c62618f9b748221f99b2a26d0001729a0c6093d3bbd31d7a156a1087a0e324873891f8c1cc40e56dc333bd6fee7e229c5143f0e7bd750d768e31545c05060645
713
DIST rustc-1.34.2-src.tar.xz 95048792 BLAKE2B e81e4bfda87ddfb09ab8a74792346970aa440c678d2bb1279c329db4929282f761ada6fea9d81ceeecfd513613025c8e636487626fc36bd0b33559e045bb1b15 SHA512 f1bd2b226d90aae8a4657e6117b9a8451d4ce8129f79cc0fce0da7613a3b7800e690bc0ede8fec20a2f5f32c13fa8e22ac97d3838e0d36936793535a75d9c381
14+
DIST rustc-1.39.0-src.tar.xz 96495140 BLAKE2B 6df6bf0c3b38c28753713acdc477ea6929740c32893171dd9b8620992439e45730ef6f9489a6fc411ff5884c661ac4c07b7b93f5a4174207ed53351d2dea09bf SHA512 8610b2ec77722087c572bd84ac562a5b7c5f1a644aea58c5d5daa07a9aed242703b7816e73e2eaa049f773d5907859e259744a0de700622df005584fd798dab0
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From 799529380ffbd6ffb51afd09cbcebba99a28f7ee Mon Sep 17 00:00:00 2001
2+
From: Samuel Holland <[email protected]>
3+
Date: Wed, 10 Jan 2018 13:36:41 -0600
4+
Subject: [PATCH 01/19] Don't pass CFLAGS to the C++ compiler
5+
6+
---
7+
src/bootstrap/builder.rs | 3 +--
8+
1 file changed, 1 insertion(+), 2 deletions(-)
9+
10+
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
11+
index 5d586f0c461..6b1b1e62a2c 100644
12+
--- a/src/bootstrap/builder.rs
13+
+++ b/src/bootstrap/builder.rs
14+
@@ -1129,8 +1129,7 @@ impl<'a> Builder<'a> {
15+
if let Ok(cxx) = self.cxx(target) {
16+
let cxx = ccacheify(&cxx);
17+
cargo
18+
- .env(format!("CXX_{}", target), &cxx)
19+
- .env(format!("CXXFLAGS_{}", target), cflags);
20+
+ .env(format!("CXX_{}", target), &cxx);
21+
}
22+
}
23+
24+
--
25+
2.23.0
26+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From c39f4eb79c5320ef322919d76e27648c5680b610 Mon Sep 17 00:00:00 2001
2+
From: Samuel Holland <[email protected]>
3+
Date: Fri, 8 Sep 2017 00:04:29 -0500
4+
Subject: [PATCH 02/19] Fix LLVM build
5+
6+
---
7+
src/bootstrap/lib.rs | 3 ++-
8+
1 file changed, 2 insertions(+), 1 deletion(-)
9+
10+
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
11+
index 9203a558f64..d292609f57c 100644
12+
--- a/src/bootstrap/lib.rs
13+
+++ b/src/bootstrap/lib.rs
14+
@@ -757,7 +757,8 @@ impl Build {
15+
// cc-rs because the build scripts will determine that for themselves.
16+
let mut base = self.cc[&target].args().iter()
17+
.map(|s| s.to_string_lossy().into_owned())
18+
- .filter(|s| !s.starts_with("-O") && !s.starts_with("/O"))
19+
+ .filter(|s| !s.starts_with("-O") && !s.starts_with("/O")
20+
+ && !s.starts_with("-static"))
21+
.collect::<Vec<String>>();
22+
23+
// If we're compiling on macOS then we add a few unconditional flags
24+
--
25+
2.23.0
26+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
From e9000315746f99444ad125e75b07ae1b1840c398 Mon Sep 17 00:00:00 2001
2+
From: Samuel Holland <[email protected]>
3+
Date: Sat, 2 Dec 2017 17:25:44 -0600
4+
Subject: [PATCH 03/19] Allow rustdoc to work when cross-compiling on musl
5+
6+
musl can't handle foreign-architecture libraries in LD_LIBRARY_PATH.
7+
---
8+
src/bootstrap/bin/rustdoc.rs | 7 ++-----
9+
1 file changed, 2 insertions(+), 5 deletions(-)
10+
11+
diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
12+
index a13ff69a7b5..471b60f55a7 100644
13+
--- a/src/bootstrap/bin/rustdoc.rs
14+
+++ b/src/bootstrap/bin/rustdoc.rs
15+
@@ -22,9 +22,6 @@ fn main() {
16+
Err(_) => 0,
17+
};
18+
19+
- let mut dylib_path = bootstrap::util::dylib_path();
20+
- dylib_path.insert(0, PathBuf::from(libdir.clone()));
21+
-
22+
//FIXME(misdreavus): once stdsimd uses cfg(rustdoc) instead of cfg(dox), remove the `--cfg dox`
23+
//arguments here
24+
let mut cmd = Command::new(rustdoc);
25+
@@ -36,7 +33,7 @@ fn main() {
26+
.arg("--sysroot")
27+
.arg(&sysroot)
28+
.env(bootstrap::util::dylib_path_var(),
29+
- env::join_paths(&dylib_path).unwrap());
30+
+ PathBuf::from(libdir.clone()));
31+
32+
// Force all crates compiled by this compiler to (a) be unstable and (b)
33+
// allow the `rustc_private` feature to link to other unstable crates
34+
@@ -87,7 +84,7 @@ fn main() {
35+
eprintln!(
36+
"rustdoc command: {:?}={:?} {:?}",
37+
bootstrap::util::dylib_path_var(),
38+
- env::join_paths(&dylib_path).unwrap(),
39+
+ PathBuf::from(libdir.clone()),
40+
cmd,
41+
);
42+
eprintln!("sysroot: {:?}", sysroot);
43+
--
44+
2.23.0
45+
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
From c218d539346be8589fc99a0ff5aee6f6ce7eee2f Mon Sep 17 00:00:00 2001
2+
From: Samuel Holland <[email protected]>
3+
Date: Fri, 8 Sep 2017 00:05:18 -0500
4+
Subject: [PATCH 04/19] Require static native libraries when linking static
5+
executables
6+
7+
On ELF targets like Linux, gcc/ld will create a dynamically-linked
8+
executable without warning, even when passed `-static`, when asked to
9+
link to a `.so`. Avoid this confusing and unintended behavior by always
10+
using the static version of libraries when trying to link static
11+
executables.
12+
13+
Fixes #54243
14+
---
15+
src/librustc_codegen_ssa/back/link.rs | 18 ++++++++++++++----
16+
1 file changed, 14 insertions(+), 4 deletions(-)
17+
18+
diff --git a/src/librustc_codegen_ssa/back/link.rs b/src/librustc_codegen_ssa/back/link.rs
19+
index 9b044d9b453..e225301378b 100644
20+
--- a/src/librustc_codegen_ssa/back/link.rs
21+
+++ b/src/librustc_codegen_ssa/back/link.rs
22+
@@ -1602,9 +1602,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(cmd: &mut dyn Linker,
23+
}
24+
}
25+
26+
-// Link in all of our upstream crates' native dependencies. Remember that
27+
-// all of these upstream native dependencies are all non-static
28+
-// dependencies. We've got two cases then:
29+
+// Link in all of our upstream crates' native dependencies. We have two cases:
30+
//
31+
// 1. The upstream crate is an rlib. In this case we *must* link in the
32+
// native dependency because the rlib is just an archive.
33+
@@ -1647,7 +1645,19 @@ pub fn add_upstream_native_libraries(cmd: &mut dyn Linker,
34+
continue
35+
}
36+
match lib.kind {
37+
- NativeLibraryKind::NativeUnknown => cmd.link_dylib(name),
38+
+ NativeLibraryKind::NativeUnknown => {
39+
+ // On some targets, like Linux, linking a static executable inhibits using
40+
+ // dylibs at all. Force native libraries to be static, even if for example
41+
+ // an upstream rlib was originally linked against a native shared library.
42+
+ if crate_type == config::CrateType::Executable
43+
+ && sess.crt_static()
44+
+ && !sess.target.target.options.crt_static_allows_dylibs
45+
+ {
46+
+ cmd.link_staticlib(name)
47+
+ } else {
48+
+ cmd.link_dylib(name)
49+
+ }
50+
+ },
51+
NativeLibraryKind::NativeFramework => cmd.link_framework(name),
52+
NativeLibraryKind::NativeStaticNobundle => {
53+
// Link "static-nobundle" native libs only if the crate they originate from
54+
--
55+
2.23.0
56+

0 commit comments

Comments
 (0)