rust: update to 1.40.0

This commit is contained in:
q66 2019-12-21 16:27:02 +01:00 committed by Daniel Kolesa
parent 809a2724e7
commit abbcb852d9
22 changed files with 337 additions and 236 deletions

View file

@ -1,17 +1,17 @@
From 0a19456e2445def4cfe99dd02cf8292c1db5d4d4 Mon Sep 17 00:00:00 2001 From d2d990a812ef31f34c84325d33b0e42e900c8ebe Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org> From: Samuel Holland <samuel@sholland.org>
Date: Fri, 8 Sep 2017 00:04:29 -0500 Date: Fri, 8 Sep 2017 00:04:29 -0500
Subject: [PATCH 02/16] Fix LLVM build Subject: [PATCH 01/18] Fix LLVM build
--- ---
src/bootstrap/lib.rs | 3 ++- src/bootstrap/lib.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-) 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 4d297fa918a..867df81d972 100644 index 39d7ea92..39cb804c 100644
--- a/src/bootstrap/lib.rs --- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs
@@ -769,7 +769,8 @@ impl Build { @@ -750,7 +750,8 @@ impl Build {
// cc-rs because the build scripts will determine that for themselves. // cc-rs because the build scripts will determine that for themselves.
let mut base = self.cc[&target].args().iter() let mut base = self.cc[&target].args().iter()
.map(|s| s.to_string_lossy().into_owned()) .map(|s| s.to_string_lossy().into_owned())
@ -22,5 +22,5 @@ index 4d297fa918a..867df81d972 100644
// If we're compiling on macOS then we add a few unconditional flags // If we're compiling on macOS then we add a few unconditional flags
-- --
2.21.0 2.24.0

View file

@ -1,7 +1,7 @@
From 2200debf48b6ef4c87e258cf8a968a89903f8723 Mon Sep 17 00:00:00 2001 From 027f5cc36df353efa443739b2827b45555b5ed23 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org> From: Samuel Holland <samuel@sholland.org>
Date: Sat, 2 Dec 2017 17:25:44 -0600 Date: Sat, 2 Dec 2017 17:25:44 -0600
Subject: [PATCH 03/16] Allow rustdoc to work when cross-compiling on musl Subject: [PATCH 02/18] Allow rustdoc to work when cross-compiling on musl
musl can't handle foreign-architecture libraries in LD_LIBRARY_PATH. musl can't handle foreign-architecture libraries in LD_LIBRARY_PATH.
--- ---
@ -9,10 +9,10 @@ musl can't handle foreign-architecture libraries in LD_LIBRARY_PATH.
1 file changed, 2 insertions(+), 5 deletions(-) 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
index 1c9f6e1ab28..7e90be8d8cc 100644 index a13ff69a..471b60f5 100644
--- a/src/bootstrap/bin/rustdoc.rs --- a/src/bootstrap/bin/rustdoc.rs
+++ b/src/bootstrap/bin/rustdoc.rs +++ b/src/bootstrap/bin/rustdoc.rs
@@ -23,9 +23,6 @@ fn main() { @@ -22,9 +22,6 @@ fn main() {
Err(_) => 0, Err(_) => 0,
}; };
@ -22,7 +22,7 @@ index 1c9f6e1ab28..7e90be8d8cc 100644
//FIXME(misdreavus): once stdsimd uses cfg(rustdoc) instead of cfg(dox), remove the `--cfg dox` //FIXME(misdreavus): once stdsimd uses cfg(rustdoc) instead of cfg(dox), remove the `--cfg dox`
//arguments here //arguments here
let mut cmd = Command::new(rustdoc); let mut cmd = Command::new(rustdoc);
@@ -37,7 +34,7 @@ fn main() { @@ -36,7 +33,7 @@ fn main() {
.arg("--sysroot") .arg("--sysroot")
.arg(&sysroot) .arg(&sysroot)
.env(bootstrap::util::dylib_path_var(), .env(bootstrap::util::dylib_path_var(),
@ -31,7 +31,7 @@ index 1c9f6e1ab28..7e90be8d8cc 100644
// Force all crates compiled by this compiler to (a) be unstable and (b) // Force all crates compiled by this compiler to (a) be unstable and (b)
// allow the `rustc_private` feature to link to other unstable crates // allow the `rustc_private` feature to link to other unstable crates
@@ -86,7 +83,7 @@ fn main() { @@ -87,7 +84,7 @@ fn main() {
eprintln!( eprintln!(
"rustdoc command: {:?}={:?} {:?}", "rustdoc command: {:?}={:?} {:?}",
bootstrap::util::dylib_path_var(), bootstrap::util::dylib_path_var(),
@ -41,5 +41,5 @@ index 1c9f6e1ab28..7e90be8d8cc 100644
); );
eprintln!("sysroot: {:?}", sysroot); eprintln!("sysroot: {:?}", sysroot);
-- --
2.21.0 2.24.0

View file

@ -1,7 +1,7 @@
From 10bd267ac2621267e1f537a5a7df34cb87354cd3 Mon Sep 17 00:00:00 2001 From df589c69c091b7a4900463a3c4db3b8d4b3c43f0 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org> From: Samuel Holland <samuel@sholland.org>
Date: Fri, 8 Sep 2017 00:05:18 -0500 Date: Fri, 8 Sep 2017 00:05:18 -0500
Subject: [PATCH 04/16] Require static native libraries when linking static Subject: [PATCH 03/18] Require static native libraries when linking static
executables executables
On ELF targets like Linux, gcc/ld will create a dynamically-linked On ELF targets like Linux, gcc/ld will create a dynamically-linked
@ -16,10 +16,10 @@ Fixes #54243
1 file changed, 14 insertions(+), 4 deletions(-) 1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/librustc_codegen_ssa/back/link.rs b/src/librustc_codegen_ssa/back/link.rs diff --git a/src/librustc_codegen_ssa/back/link.rs b/src/librustc_codegen_ssa/back/link.rs
index e3d297e7862..974e8c0239b 100644 index a2b50ea8..3250ec4d 100644
--- a/src/librustc_codegen_ssa/back/link.rs --- a/src/librustc_codegen_ssa/back/link.rs
+++ b/src/librustc_codegen_ssa/back/link.rs +++ b/src/librustc_codegen_ssa/back/link.rs
@@ -1602,9 +1602,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(cmd: &mut dyn Linker, @@ -1610,9 +1610,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(
} }
} }
@ -30,7 +30,7 @@ index e3d297e7862..974e8c0239b 100644
// //
// 1. The upstream crate is an rlib. In this case we *must* link in the // 1. The upstream crate is an rlib. In this case we *must* link in the
// native dependency because the rlib is just an archive. // native dependency because the rlib is just an archive.
@@ -1647,7 +1645,19 @@ pub fn add_upstream_native_libraries(cmd: &mut dyn Linker, @@ -1659,7 +1657,19 @@ pub fn add_upstream_native_libraries(
continue continue
} }
match lib.kind { match lib.kind {
@ -51,3 +51,6 @@ index e3d297e7862..974e8c0239b 100644
NativeLibraryKind::NativeFramework => cmd.link_framework(name), NativeLibraryKind::NativeFramework => cmd.link_framework(name),
NativeLibraryKind::NativeStaticNobundle => { NativeLibraryKind::NativeStaticNobundle => {
// Link "static-nobundle" native libs only if the crate they originate from // Link "static-nobundle" native libs only if the crate they originate from
--
2.24.0

View file

@ -1,43 +1,33 @@
Updated from: From ce1d0500b190f39c5bd9c34deed8b8d8af537c90 Mon Sep 17 00:00:00 2001
From e8ef432c23ea9fb70b28bea07042b33f1050569b Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org> From: Samuel Holland <samuel@sholland.org>
Date: Fri, 8 Sep 2017 22:11:14 -0500 Date: Sat, 21 Dec 2019 16:46:22 +0100
Subject: [PATCH 05/16] Remove -nostdlib and musl_root from musl targets Subject: [PATCH 04/18] Remove -nostdlib and musl_root from musl targets
--- ---
config.toml.example | 6 ---- config.toml.example | 3 ---
src/bootstrap/bin/rustc.rs | 10 ------- src/bootstrap/cc_detect.rs | 27 +++-----------------
src/bootstrap/cc_detect.rs | 27 ++---------------- src/bootstrap/compile.rs | 22 +---------------
src/bootstrap/compile.rs | 21 +------------- src/bootstrap/config.rs | 7 ------
src/bootstrap/config.rs | 7 ----- src/bootstrap/configure.py | 28 ---------------------
src/bootstrap/configure.py | 22 --------------- src/bootstrap/lib.rs | 8 ------
src/bootstrap/lib.rs | 8 ------ src/bootstrap/sanity.rs | 24 ------------------
src/bootstrap/sanity.rs | 28 ------------------- src/librustc_target/spec/linux_musl_base.rs | 16 ------------
.../dist-i586-gnu-i586-i686-musl/Dockerfile | 2 -- 8 files changed, 4 insertions(+), 131 deletions(-)
src/ci/docker/dist-various-1/Dockerfile | 7 -----
src/ci/docker/dist-x86_64-musl/Dockerfile | 1 -
src/ci/docker/test-various/Dockerfile | 1 -
src/librustc_target/spec/linux_musl_base.rs | 16 -----------
13 files changed, 4 insertions(+), 152 deletions(-)
diff --git a/config.toml.example b/config.toml.example diff --git a/config.toml.example b/config.toml.example
index 848147c2..2aea23d4 100644 index e832570e..81cc3a99 100644
--- a/config.toml.example --- a/config.toml.example
+++ b/config.toml.example +++ b/config.toml.example
@@ -469,12 +469,6 @@ @@ -340,9 +340,6 @@
# only use static libraries. If unset, the target's default linkage is used. # nightly features
#crt-static = false #channel = "dev"
-# The root location of the MUSL installation directory. The library directory -# The root location of the MUSL installation directory.
-# will also need to contain libunwind.a for an unwinding implementation. Note
-# that this option only makes sense for MUSL targets that produce statically
-# linked binaries
-#musl-root = "..." -#musl-root = "..."
- -
# The root location of the `wasm32-wasi` sysroot. # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
#wasi-root = "..." # platforms to ensure that the compiler is usable by default from the build
# directory (as it links to a number of dynamic libraries). This may not be
diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
index a4cb81d3..b4247e74 100644 index a4cb81d3..b4247e74 100644
--- a/src/bootstrap/cc_detect.rs --- a/src/bootstrap/cc_detect.rs
@ -98,12 +88,12 @@ index a4cb81d3..b4247e74 100644
} }
} }
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index 6ea32edf..afdf6fcf 100644 index 8e5fe252..47372c97 100644
--- a/src/bootstrap/compile.rs --- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs
@@ -116,20 +116,7 @@ impl Step for Std { @@ -130,18 +130,7 @@ fn copy_third_party_objects(builder: &Builder<'_>, compiler: &Compiler, target:
fn copy_third_party_objects(builder: &Builder<'_>, compiler: &Compiler, target: Interned<String>) { target_deps.push(target);
let libdir = builder.sysroot_libdir(*compiler, target); };
- // Copies the crt(1,i,n).o startup objects - // Copies the crt(1,i,n).o startup objects
- // - //
@ -112,18 +102,16 @@ index 6ea32edf..afdf6fcf 100644
- // files. As those shipped with glibc won't work, copy the ones provided by - // files. As those shipped with glibc won't work, copy the ones provided by
- // musl so we have them on linux-gnu hosts. - // musl so we have them on linux-gnu hosts.
- if target.contains("musl") { - if target.contains("musl") {
- let srcdir = builder.musl_root(target).unwrap().join("lib");
- for &obj in &["crt1.o", "crti.o", "crtn.o"] { - for &obj in &["crt1.o", "crti.o", "crtn.o"] {
- builder.copy( - copy_and_stamp(&srcdir, obj);
- &builder.musl_root(target).unwrap().join("lib").join(obj),
- &libdir.join(obj),
- );
- } - }
- } else if target.ends_with("-wasi") { - } else if target.ends_with("-wasi") {
+ if target.ends_with("-wasi") { + if target.ends_with("-wasi") {
for &obj in &["crt1.o"] { let srcdir = builder.wasi_root(target).unwrap().join("lib/wasm32-wasi");
builder.copy( copy_and_stamp(&srcdir, "crt1.o");
&builder.wasi_root(target).unwrap().join("lib/wasm32-wasi").join(obj), }
@@ -220,15 +207,6 @@ pub fn std_cargo(builder: &Builder<'_>, @@ -227,15 +216,6 @@ pub fn std_cargo(builder: &Builder<'_>,
.arg("--manifest-path") .arg("--manifest-path")
.arg(builder.src.join("src/libtest/Cargo.toml")); .arg(builder.src.join("src/libtest/Cargo.toml"));
@ -140,7 +128,7 @@ index 6ea32edf..afdf6fcf 100644
if let Some(p) = builder.wasi_root(target) { if let Some(p) = builder.wasi_root(target) {
let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap()); let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap());
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index 52b5cd88..cc191271 100644 index d1bdfa0a..51b2bc62 100644
--- a/src/bootstrap/config.rs --- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs
@@ -131,8 +131,6 @@ pub struct Config { @@ -131,8 +131,6 @@ pub struct Config {
@ -160,16 +148,16 @@ index 52b5cd88..cc191271 100644
pub wasi_root: Option<PathBuf>, pub wasi_root: Option<PathBuf>,
pub qemu_rootfs: Option<PathBuf>, pub qemu_rootfs: Option<PathBuf>,
pub no_std: bool, pub no_std: bool,
@@ -305,7 +302,6 @@ struct Rust { @@ -307,7 +304,6 @@ struct Rust {
backtrace: Option<bool>, parallel_compiler: Option<bool>,
default_linker: Option<String>, default_linker: Option<String>,
channel: Option<String>, channel: Option<String>,
- musl_root: Option<String>, - musl_root: Option<String>,
rpath: Option<bool>, rpath: Option<bool>,
verbose_tests: Option<bool>,
optimize_tests: Option<bool>, optimize_tests: Option<bool>,
codegen_tests: Option<bool>,
@@ -342,7 +338,6 @@ struct TomlTarget { @@ -342,7 +338,6 @@ struct TomlTarget {
linker: Option<String>, llvm_filecheck: Option<String>,
android_ndk: Option<String>, android_ndk: Option<String>,
crt_static: Option<bool>, crt_static: Option<bool>,
- musl_root: Option<String>, - musl_root: Option<String>,
@ -193,10 +181,10 @@ index 52b5cd88..cc191271 100644
target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from); target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);
diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
index 346f0cb2..80409781 100755 index bb6041d7..73f3781c 100755
--- a/src/bootstrap/configure.py --- a/src/bootstrap/configure.py
+++ b/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py
@@ -110,30 +110,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk", @@ -109,34 +109,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
"aarch64-linux-android NDK standalone path") "aarch64-linux-android NDK standalone path")
v("x86_64-linux-android-ndk", "target.x86_64-linux-android.android-ndk", v("x86_64-linux-android-ndk", "target.x86_64-linux-android.android-ndk",
"x86_64-linux-android NDK standalone path") "x86_64-linux-android NDK standalone path")
@ -224,14 +212,18 @@ index 346f0cb2..80409781 100755
- "mips-unknown-linux-musl install directory") - "mips-unknown-linux-musl install directory")
-v("musl-root-mipsel", "target.mipsel-unknown-linux-musl.musl-root", -v("musl-root-mipsel", "target.mipsel-unknown-linux-musl.musl-root",
- "mipsel-unknown-linux-musl install directory") - "mipsel-unknown-linux-musl install directory")
-v("musl-root-mips64", "target.mips64-unknown-linux-muslabi64.musl-root",
- "mips64-unknown-linux-muslabi64 install directory")
-v("musl-root-mips64el", "target.mips64el-unknown-linux-muslabi64.musl-root",
- "mips64el-unknown-linux-muslabi64 install directory")
v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs", v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs",
"rootfs in qemu testing, you probably don't want to use this") "rootfs in qemu testing, you probably don't want to use this")
v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs", v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs",
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index d292609f..ff5f7e16 100644 index 39cb804c..8e36118a 100644
--- a/src/bootstrap/lib.rs --- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs
@@ -835,14 +835,6 @@ impl Build { @@ -828,14 +828,6 @@ impl Build {
} }
} }
@ -282,7 +274,7 @@ index bffe748f..3b109548 100644
// There are three builds of cmake on windows: MSVC, MinGW, and // There are three builds of cmake on windows: MSVC, MinGW, and
// Cygwin. The Cygwin build does not have generators for Visual // Cygwin. The Cygwin build does not have generators for Visual
diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/spec/linux_musl_base.rs diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/spec/linux_musl_base.rs
index 17fecb3b..18732066 100644 index e294e639..58ae91a9 100644
--- a/src/librustc_target/spec/linux_musl_base.rs --- a/src/librustc_target/spec/linux_musl_base.rs
+++ b/src/librustc_target/spec/linux_musl_base.rs +++ b/src/librustc_target/spec/linux_musl_base.rs
@@ -3,28 +3,12 @@ use crate::spec::{LinkerFlavor, TargetOptions}; @@ -3,28 +3,12 @@ use crate::spec::{LinkerFlavor, TargetOptions};
@ -314,3 +306,6 @@ index 17fecb3b..18732066 100644
// These targets statically link libc by default // These targets statically link libc by default
base.crt_static_default = true; base.crt_static_default = true;
// These targets allow the user to choose between static and dynamic linking. // These targets allow the user to choose between static and dynamic linking.
--
2.24.0

View file

@ -1,28 +1,16 @@
Additions for build.rs by q66, necessary for our musl setup. From 4f0e42ef109e688861abc33ae28dbb0bcba055aa Mon Sep 17 00:00:00 2001
From 1eb558f246269606c6d8d73824ef6b44fa10764e Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org> From: Samuel Holland <samuel@sholland.org>
Date: Sat, 9 Sep 2017 00:14:16 -0500 Date: Sat, 21 Dec 2019 16:49:07 +0100
Subject: [PATCH 06/16] Prefer libgcc_eh over libunwind for musl Subject: [PATCH 05/18] Prefer libgcc_eh over libunwind for musl
+ @q66 changes to smaeul's original patch for Void's musl setup
--- ---
src/libunwind/lib.rs | 2 +- src/libunwind/build.rs | 17 ++---------------
1 file changed, 1 insertion(+), 1 deletion(-) src/libunwind/lib.rs | 2 +-
2 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs
index 9182e349b19..0377fbb58fc 100644
--- a/src/libunwind/lib.rs
+++ b/src/libunwind/lib.rs
@@ -23,6 +23,6 @@ cfg_if::cfg_if! {
}
#[cfg(target_env = "musl")]
-#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
+#[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
#[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
extern {}
diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs
index f24d957..28828e5 100644 index b8db16f8..0c69b9d2 100644
--- a/src/libunwind/build.rs --- a/src/libunwind/build.rs
+++ b/src/libunwind/build.rs +++ b/src/libunwind/build.rs
@@ -5,15 +5,11 @@ fn main() { @@ -5,15 +5,11 @@ fn main() {
@ -43,7 +31,7 @@ index f24d957..28828e5 100644
println!("cargo:rustc-link-lib=gcc_s"); println!("cargo:rustc-link-lib=gcc_s");
} }
} else if target.contains("freebsd") { } else if target.contains("freebsd") {
@@ -99,15 +95,6 @@ mod llvm_libunwind { @@ -105,15 +101,6 @@ mod llvm_libunwind {
cfg.file(root.join("src").join(src)); cfg.file(root.join("src").join(src));
} }
@ -59,3 +47,19 @@ index f24d957..28828e5 100644
cfg.compile("unwind"); cfg.compile("unwind");
} }
} }
diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs
index 8d916447..6d653d41 100644
--- a/src/libunwind/lib.rs
+++ b/src/libunwind/lib.rs
@@ -21,7 +21,7 @@ cfg_if::cfg_if! {
}
#[cfg(target_env = "musl")]
-#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
+#[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
#[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
extern {}
--
2.24.0

View file

@ -1,7 +1,7 @@
From c9a914f48652de22832a40ef9639ff8d57c57f31 Mon Sep 17 00:00:00 2001 From b99ae159cca4c92146e07a4184064634ed4bd52d Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org> From: Samuel Holland <samuel@sholland.org>
Date: Wed, 4 Sep 2019 20:40:18 -0500 Date: Sat, 21 Dec 2019 16:50:55 +0100
Subject: [PATCH 07/16] Fix C aggregate-passing ABI on powerpc Subject: [PATCH 06/18] Fix C aggregate-passing ABI on powerpc
The existing code (which looks like it was copied from MIPS) passes The existing code (which looks like it was copied from MIPS) passes
aggregates by value in registers. This is wrong. According to the SVR4 aggregates by value in registers. This is wrong. According to the SVR4
@ -12,10 +12,10 @@ powerpc psABI, all aggregates are passed indirectly.
2 files changed, 11 insertions(+), 32 deletions(-) 2 files changed, 11 insertions(+), 32 deletions(-)
diff --git a/src/librustc_target/abi/call/mod.rs b/src/librustc_target/abi/call/mod.rs diff --git a/src/librustc_target/abi/call/mod.rs b/src/librustc_target/abi/call/mod.rs
index fbbd120f934..f4d98177072 100644 index 17bad189..81175fc0 100644
--- a/src/librustc_target/abi/call/mod.rs --- a/src/librustc_target/abi/call/mod.rs
+++ b/src/librustc_target/abi/call/mod.rs +++ b/src/librustc_target/abi/call/mod.rs
@@ -562,7 +562,7 @@ impl<'a, Ty> FnType<'a, Ty> { @@ -554,7 +554,7 @@ impl<'a, Ty> FnType<'a, Ty> {
"arm" => arm::compute_abi_info(cx, self), "arm" => arm::compute_abi_info(cx, self),
"mips" => mips::compute_abi_info(cx, self), "mips" => mips::compute_abi_info(cx, self),
"mips64" => mips64::compute_abi_info(cx, self), "mips64" => mips64::compute_abi_info(cx, self),
@ -23,9 +23,9 @@ index fbbd120f934..f4d98177072 100644
+ "powerpc" => powerpc::compute_abi_info(self), + "powerpc" => powerpc::compute_abi_info(self),
"powerpc64" => powerpc64::compute_abi_info(cx, self), "powerpc64" => powerpc64::compute_abi_info(cx, self),
"s390x" => s390x::compute_abi_info(cx, self), "s390x" => s390x::compute_abi_info(cx, self),
"asmjs" => asmjs::compute_abi_info(cx, self), "msp430" => msp430::compute_abi_info(self),
diff --git a/src/librustc_target/abi/call/powerpc.rs b/src/librustc_target/abi/call/powerpc.rs diff --git a/src/librustc_target/abi/call/powerpc.rs b/src/librustc_target/abi/call/powerpc.rs
index d496abf8e8b..f20defd6f5b 100644 index d496abf8..f20defd6 100644
--- a/src/librustc_target/abi/call/powerpc.rs --- a/src/librustc_target/abi/call/powerpc.rs
+++ b/src/librustc_target/abi/call/powerpc.rs +++ b/src/librustc_target/abi/call/powerpc.rs
@@ -1,49 +1,28 @@ @@ -1,49 +1,28 @@
@ -89,5 +89,5 @@ index d496abf8e8b..f20defd6f5b 100644
} }
} }
-- --
2.21.0 2.24.0

View file

@ -1,7 +1,7 @@
From f67f0ab40f1328e04916512b9af858ca1b7faa24 Mon Sep 17 00:00:00 2001 From 8eb44a3bf861523e31b962db8c7fd1e7b6225e89 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org> From: Samuel Holland <samuel@sholland.org>
Date: Wed, 4 Sep 2019 20:44:30 -0500 Date: Sat, 21 Dec 2019 16:55:07 +0100
Subject: [PATCH 08/16] Fix zero-sized aggregate ABI on powerpc Subject: [PATCH 07/18] Fix zero-sized aggregate ABI on powerpc
For targets that pass zero-sized aggregates indirectly (generally For targets that pass zero-sized aggregates indirectly (generally
those that pass all aggregates indirectly), we must allocate a register those that pass all aggregates indirectly), we must allocate a register
@ -20,10 +20,10 @@ updating each implementation of `compute_abi_info` to handle ZSTs.
1 file changed, 9 insertions(+), 11 deletions(-) 1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/src/librustc/ty/layout.rs b/src/librustc/ty/layout.rs diff --git a/src/librustc/ty/layout.rs b/src/librustc/ty/layout.rs
index 4af26e19b37..163db9778e5 100644 index e82232ac..8bdf3436 100644
--- a/src/librustc/ty/layout.rs --- a/src/librustc/ty/layout.rs
+++ b/src/librustc/ty/layout.rs +++ b/src/librustc/ty/layout.rs
@@ -2667,12 +2667,11 @@ where @@ -2638,12 +2638,11 @@ where
}; };
let target = &cx.tcx().sess.target.target; let target = &cx.tcx().sess.target.target;
@ -41,7 +41,7 @@ index 4af26e19b37..163db9778e5 100644
let rust_abi = match sig.abi { let rust_abi = match sig.abi {
RustIntrinsic | PlatformIntrinsic | Rust | RustCall => true, RustIntrinsic | PlatformIntrinsic | Rust | RustCall => true,
_ => false, _ => false,
@@ -2742,11 +2741,10 @@ where @@ -2705,11 +2704,10 @@ where
let is_return = arg_idx.is_none(); let is_return = arg_idx.is_none();
let mut arg = mk_arg_type(ty, arg_idx); let mut arg = mk_arg_type(ty, arg_idx);
if arg.layout.is_zst() { if arg.layout.is_zst() {
@ -54,9 +54,9 @@ index 4af26e19b37..163db9778e5 100644
+ // Zero-sized struct arguments cannot be ignored in the C ABI + // Zero-sized struct arguments cannot be ignored in the C ABI
+ // if they are passed indirectly. + // if they are passed indirectly.
+ if is_return || rust_abi || !indirect_zst { + if is_return || rust_abi || !indirect_zst {
arg.mode = PassMode::Ignore(IgnoreMode::Zst); arg.mode = PassMode::Ignore;
} }
} }
-- --
2.21.0 2.24.0

View file

@ -1,14 +1,14 @@
From f0fce1130ffe6b5a7666979aedd956becc4d7c25 Mon Sep 17 00:00:00 2001 From a460f9c88e14ed904f5502a2e496e9906e6b0c78 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org> From: Samuel Holland <samuel@sholland.org>
Date: Sat, 6 Oct 2018 04:01:48 +0000 Date: Sat, 6 Oct 2018 04:01:48 +0000
Subject: [PATCH 11/16] test/use-extern-for-plugins: Don't assume multilib Subject: [PATCH 08/18] test/use-extern-for-plugins: Don't assume multilib
--- ---
src/test/run-make-fulldeps/use-extern-for-plugins/Makefile | 7 +------ src/test/run-make-fulldeps/use-extern-for-plugins/Makefile | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-) 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile b/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile diff --git a/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile b/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile
index 838b1a2719b..94fa9f6d067 100644 index 838b1a27..94fa9f6d 100644
--- a/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile --- a/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile
+++ b/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile +++ b/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile
@@ -4,12 +4,7 @@ @@ -4,12 +4,7 @@
@ -26,5 +26,5 @@ index 838b1a2719b..94fa9f6d067 100644
all: all:
$(RUSTC) foo.rs -C extra-filename=-host $(RUSTC) foo.rs -C extra-filename=-host
-- --
2.21.0 2.24.0

View file

@ -1,7 +1,7 @@
From 93835653d45142c17adcf3087d2a8e512053bccf Mon Sep 17 00:00:00 2001 From aea48e1f9131c7b83c60c78bd1c965865832430b Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org> From: Samuel Holland <samuel@sholland.org>
Date: Mon, 17 Sep 2018 01:32:20 +0000 Date: Mon, 17 Sep 2018 01:32:20 +0000
Subject: [PATCH 12/16] test/sysroot-crates-are-unstable: Fix test when rpath Subject: [PATCH 09/18] test/sysroot-crates-are-unstable: Fix test when rpath
is disabled is disabled
Without this environment var, the test can't run rustc to find Without this environment var, the test can't run rustc to find
@ -11,7 +11,7 @@ the sysroot path.
1 file changed, 3 insertions(+), 1 deletion(-) 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
index a35174b3c2a..9e770706857 100644 index a35174b3..9e770706 100644
--- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile --- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
+++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile +++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
@@ -1,2 +1,4 @@ @@ -1,2 +1,4 @@
@ -21,5 +21,5 @@ index a35174b3c2a..9e770706857 100644
- python2.7 test.py - python2.7 test.py
+ env '$(HOST_RPATH_ENV)' python2.7 test.py + env '$(HOST_RPATH_ENV)' python2.7 test.py
-- --
2.21.0 2.24.0

View file

@ -1,7 +1,7 @@
From 8eb87a7b794e649003bc8f4bed6c6d6739f65e43 Mon Sep 17 00:00:00 2001 From b1c843d5cefae7d341b84043249736cf93094971 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org> From: Samuel Holland <samuel@sholland.org>
Date: Sun, 16 Sep 2018 16:38:48 +0000 Date: Sat, 21 Dec 2019 17:00:40 +0100
Subject: [PATCH 13/16] Ignore broken and non-applicable tests Subject: [PATCH 10/18] Ignore broken and non-applicable tests
c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475 c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox) env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
@ -13,16 +13,14 @@ sysroot-crates-are-unstable: can't run rustc without RPATH
--- ---
src/test/codegen/sparc-struct-abi.rs | 1 + src/test/codegen/sparc-struct-abi.rs | 1 +
src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile | 2 ++ src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile | 2 ++
src/test/run-make-fulldeps/linker-output-non-utf8/Makefile | 2 ++
src/test/run-make-fulldeps/long-linker-command-lines/Makefile | 2 ++ src/test/run-make-fulldeps/long-linker-command-lines/Makefile | 2 ++
src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 2 ++ src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 2 ++
src/test/run-pass/env-funky-keys.rs | 1 + src/test/ui/env-funky-keys.rs | 1 +
src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs | 2 ++ src/test/ui/simd/simd-intrinsic-generic-bitmask.rs | 2 ++
src/test/run-pass/simd/simd-intrinsic-generic-select.rs | 2 ++ 6 files changed, 10 insertions(+)
8 files changed, 14 insertions(+)
diff --git a/src/test/codegen/sparc-struct-abi.rs b/src/test/codegen/sparc-struct-abi.rs diff --git a/src/test/codegen/sparc-struct-abi.rs b/src/test/codegen/sparc-struct-abi.rs
index 78e5b14a212..6f93e93286b 100644 index 78e5b14a..6f93e932 100644
--- a/src/test/codegen/sparc-struct-abi.rs --- a/src/test/codegen/sparc-struct-abi.rs
+++ b/src/test/codegen/sparc-struct-abi.rs +++ b/src/test/codegen/sparc-struct-abi.rs
@@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
@ -34,7 +32,7 @@ index 78e5b14a212..6f93e93286b 100644
#![no_core] #![no_core]
diff --git a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile diff --git a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
index f124ca2ab61..363b18f0985 100644 index f124ca2a..363b18f0 100644
--- a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile --- a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
+++ b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile +++ b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
@@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
@ -43,21 +41,8 @@ index f124ca2ab61..363b18f0985 100644
-include ../tools.mk -include ../tools.mk
all: all:
diff --git a/src/test/run-make-fulldeps/linker-output-non-utf8/Makefile b/src/test/run-make-fulldeps/linker-output-non-utf8/Makefile
index b47ce17ec8b..59c44fcf438 100644
--- a/src/test/run-make-fulldeps/linker-output-non-utf8/Makefile
+++ b/src/test/run-make-fulldeps/linker-output-non-utf8/Makefile
@@ -13,6 +13,8 @@
# This also does not work on Apple APFS due to the filesystem requiring
# valid UTF-8 paths.
+# ignore-musl
+
# The zzz it to allow humans to tab complete or glob this thing.
bad_dir := $(TMPDIR)/zzz$$'\xff'
diff --git a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile diff --git a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
index 5876fbc94bc..5f167ece1a2 100644 index 5876fbc9..5f167ece 100644
--- a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile --- a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
+++ b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile +++ b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
@@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
@ -67,7 +52,7 @@ index 5876fbc94bc..5f167ece1a2 100644
all: all:
diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
index 9e770706857..6d92ec5cec8 100644 index 9e770706..6d92ec5c 100644
--- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile --- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
+++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile +++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
@@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
@ -76,19 +61,20 @@ index 9e770706857..6d92ec5cec8 100644
-include ../tools.mk -include ../tools.mk
all: all:
diff --git a/src/test/run-pass/env-funky-keys.rs b/src/test/run-pass/env-funky-keys.rs diff --git a/src/test/ui/env-funky-keys.rs b/src/test/ui/env-funky-keys.rs
index 3b236e2b3af..7284d25de48 100644 index 4faceb53..09764dc3 100644
--- a/src/test/ui/env-funky-keys.rs --- a/src/test/ui/env-funky-keys.rs
+++ b/src/test/ui/env-funky-keys.rs +++ b/src/test/ui/env-funky-keys.rs
@@ -1,5 +1,6 @@ @@ -1,6 +1,7 @@
// run-pass
// Ignore this test on Android, because it segfaults there. // Ignore this test on Android, because it segfaults there.
+// ignore-test +// ignore-test
// ignore-android // ignore-android
// ignore-windows // ignore-windows
// ignore-cloudabi no execve // ignore-cloudabi no execve
diff --git a/src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs b/src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs diff --git a/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs b/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs
index b28f742a92e..3ee4ccce731 100644 index b28f742a..3ee4ccce 100644
--- a/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs --- a/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs
+++ b/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs +++ b/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs
@@ -2,6 +2,8 @@ @@ -2,6 +2,8 @@
@ -101,5 +87,5 @@ index b28f742a92e..3ee4ccce731 100644
// Test that the simd_bitmask intrinsic produces correct results. // Test that the simd_bitmask intrinsic produces correct results.
-- --
2.21.0 2.24.0

View file

@ -1,15 +1,23 @@
From 99685056ca517da59642a551744cb43b57615aba Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sat, 21 Dec 2019 17:01:59 +0100
Subject: [PATCH 11/18] Link stage2 tools dynamically to libstd
Replaces an older patch by Samuel Holland. The RUSTC_NO_PREFER_DYNAMIC Replaces an older patch by Samuel Holland. The RUSTC_NO_PREFER_DYNAMIC
env var was removed and replaced with the following logic in builder.rs. env var was removed and replaced with the following logic in builder.rs.
The idea for this patch is to link stage2 tools dynamically as these will The idea for this patch is to link stage2 tools dynamically as these will
be distributed (if built). Intermediate tools from previous stages will be distributed (if built). Intermediate tools from previous stages will
be statically linked for convenience. be statically linked for convenience.
---
src/bootstrap/builder.rs | 2 ++
1 file changed, 2 insertions(+)
@q66 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 2edcef20..ab308426 100644
--- a/src/bootstrap/builder.rs --- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs
@@ -1228,6 +1228,8 @@ impl<'a> Builder<'a> { @@ -1251,6 +1251,8 @@ impl<'a> Builder<'a> {
// linking all deps statically into the dylib. // linking all deps statically into the dylib.
if let Mode::Std | Mode::Rustc | Mode::Codegen = mode { if let Mode::Std | Mode::Rustc | Mode::Codegen = mode {
rustflags.arg("-Cprefer-dynamic"); rustflags.arg("-Cprefer-dynamic");
@ -18,3 +26,6 @@ be statically linked for convenience.
} }
Cargo { Cargo {
--
2.24.0

View file

@ -1,7 +1,7 @@
From 1d81148c7b7c048cb1c586ece96bd326ae0f72ec Mon Sep 17 00:00:00 2001 From 423842fd809f8f2bafa2225745174c0b8d5a9fc9 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org> From: Samuel Holland <samuel@sholland.org>
Date: Mon, 17 Sep 2018 02:09:10 +0000 Date: Mon, 17 Sep 2018 02:09:10 +0000
Subject: [PATCH 15/16] Move debugger scripts to /usr/share/rust Subject: [PATCH 12/18] Move debugger scripts to /usr/share/rust
--- ---
src/bootstrap/dist.rs | 2 +- src/bootstrap/dist.rs | 2 +-
@ -10,10 +10,10 @@ Subject: [PATCH 15/16] Move debugger scripts to /usr/share/rust
3 files changed, 3 insertions(+), 3 deletions(-) 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 45bc77ec97d..9e82352ef65 100644 index 67907bc8..5abe9554 100644
--- a/src/bootstrap/dist.rs --- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs
@@ -593,7 +593,7 @@ impl Step for DebuggerScripts { @@ -603,7 +603,7 @@ impl Step for DebuggerScripts {
fn run(self, builder: &Builder<'_>) { fn run(self, builder: &Builder<'_>) {
let host = self.host; let host = self.host;
let sysroot = self.sysroot; let sysroot = self.sysroot;
@ -23,7 +23,7 @@ index 45bc77ec97d..9e82352ef65 100644
let cp_debugger_script = |file: &str| { let cp_debugger_script = |file: &str| {
builder.install(&builder.src.join("src/etc/").join(file), &dst, 0o644); builder.install(&builder.src.join("src/etc/").join(file), &dst, 0o644);
diff --git a/src/etc/rust-gdb b/src/etc/rust-gdb diff --git a/src/etc/rust-gdb b/src/etc/rust-gdb
index 23ba93da8e5..dc51b16c572 100755 index 23ba93da..dc51b16c 100755
--- a/src/etc/rust-gdb --- a/src/etc/rust-gdb
+++ b/src/etc/rust-gdb +++ b/src/etc/rust-gdb
@@ -4,7 +4,7 @@ set -e @@ -4,7 +4,7 @@ set -e
@ -36,10 +36,10 @@ index 23ba93da8e5..dc51b16c572 100755
# Run GDB with the additional arguments that load the pretty printers # Run GDB with the additional arguments that load the pretty printers
# Set the environment variable `RUST_GDB` to overwrite the call to a # Set the environment variable `RUST_GDB` to overwrite the call to a
diff --git a/src/etc/rust-lldb b/src/etc/rust-lldb diff --git a/src/etc/rust-lldb b/src/etc/rust-lldb
index 0eb99423df5..f069300dafe 100755 index 7b9b40e6..e471db36 100755
--- a/src/etc/rust-lldb --- a/src/etc/rust-lldb
+++ b/src/etc/rust-lldb +++ b/src/etc/rust-lldb
@@ -26,7 +26,7 @@ display the contents of local variables!" @@ -31,7 +31,7 @@ EOF
fi fi
# Prepare commands that will be loaded before any file on the command line has been loaded # Prepare commands that will be loaded before any file on the command line has been loaded
@ -49,5 +49,5 @@ index 0eb99423df5..f069300dafe 100755
category_enable="type category enable Rust" category_enable="type category enable Rust"
-- --
2.21.0 2.24.0

View file

@ -0,0 +1,26 @@
From 5f6e96316b489a4bc71f2b54dd0bf0b94a708374 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sat, 21 Dec 2019 17:04:13 +0100
Subject: [PATCH 13/18] Dynamically link libc on musl by default
---
src/librustc_target/spec/linux_musl_base.rs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/spec/linux_musl_base.rs
index 58ae91a9..1fae72d6 100644
--- a/src/librustc_target/spec/linux_musl_base.rs
+++ b/src/librustc_target/spec/linux_musl_base.rs
@@ -9,8 +9,7 @@ pub fn opts() -> TargetOptions {
// argument is *not* necessary for normal builds, but it can't hurt!
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string());
- // These targets statically link libc by default
- base.crt_static_default = true;
+ base.crt_static_default = false;
// These targets allow the user to choose between static and dynamic linking.
base.crt_static_respected = true;
--
2.24.0

View file

@ -1,6 +1,18 @@
--- rustc-1.38.0-src/vendor/libc/src/lib.rs From fae4aa3f952fc61880b71416527346a70fc69b4f Mon Sep 17 00:00:00 2001
+++ rustc-1.38.0-src/vendor/libc/src/lib.rs From: q66 <daniel@octaforge.org>
@@ -27,6 +27,7 @@ Date: Sat, 21 Dec 2019 17:04:55 +0100
Subject: [PATCH 14/18] Fix dynamic linkage of musl libc for the libc crate
---
vendor/libc/src/lib.rs | 1 +
vendor/libc/src/unix/mod.rs | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/vendor/libc/src/lib.rs b/vendor/libc/src/lib.rs
index 3255303e..bfbd2d7a 100644
--- a/vendor/libc/src/lib.rs
+++ b/vendor/libc/src/lib.rs
@@ -33,6 +33,7 @@
#![deny(missing_copy_implementations, safe_packed_borrows)] #![deny(missing_copy_implementations, safe_packed_borrows)]
#![no_std] #![no_std]
#![cfg_attr(feature = "rustc-dep-of-std", no_core)] #![cfg_attr(feature = "rustc-dep-of-std", no_core)]
@ -8,9 +20,11 @@
#![cfg_attr(target_os = "redox", feature(static_nobundle))] #![cfg_attr(target_os = "redox", feature(static_nobundle))]
#[macro_use] #[macro_use]
--- rustc-1.38.0-src/vendor/libc/src/unix/mod.rs diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
+++ rustc-1.38.0-src/vendor/libc/src/unix/mod.rs index 238da24b..ffb05ee7 100644
@@ -297,11 +297,11 @@ cfg_if! { --- a/vendor/libc/src/unix/mod.rs
+++ b/vendor/libc/src/unix/mod.rs
@@ -299,11 +299,11 @@ cfg_if! {
// cargo build, don't pull in anything extra as the libstd dep // cargo build, don't pull in anything extra as the libstd dep
// already pulls in all libs. // already pulls in all libs.
} else if #[cfg(target_env = "musl")] { } else if #[cfg(target_env = "musl")] {
@ -25,3 +39,6 @@
extern {} extern {}
} else if #[cfg(target_os = "emscripten")] { } else if #[cfg(target_os = "emscripten")] {
#[link(name = "c")] #[link(name = "c")]
--
2.24.0

View file

@ -1,7 +1,7 @@
From a2062b2ec252bb8be9337a6d5b384c8cdda4463d Mon Sep 17 00:00:00 2001 From 26364551a44c99b060b805a11acf34eb1333f151 Mon Sep 17 00:00:00 2001
From: Michael Hudson-Doyle <michael.hudson@canonical.com> From: Michael Hudson-Doyle <michael.hudson@canonical.com>
Date: Wed, 13 Mar 2019 15:55:30 +1300 Date: Wed, 13 Mar 2019 15:55:30 +1300
Subject: [PATCH] round result of (highest as f64).log(2.0) Subject: [PATCH 15/18] round result of (highest as f64).log(2.0)
Even though (1024f64).log(2.0) has an exact, representable, value, with Even though (1024f64).log(2.0) has an exact, representable, value, with
rustc 1.32 on i386 it comes out as +9.999999999999999985 with rustc 1.32 on i386 it comes out as +9.999999999999999985 with
@ -11,10 +11,10 @@ for U1024 etc.
vendor/typenum/build/main.rs | 2 +- vendor/typenum/build/main.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git rustc-1.36.0-src/vendor/typenum/build/main.rs rustc-1.36.0-src/vendor/typenum/build/main.rs diff --git a/vendor/typenum/build/main.rs b/vendor/typenum/build/main.rs
index 9c9f237cd..153031a2f 100644 index 9c9f237c..153031a2 100644
--- rustc-1.36.0-src/vendor/typenum/build/main.rs --- a/vendor/typenum/build/main.rs
+++ rustc-1.36.0-src/vendor/typenum/build/main.rs +++ b/vendor/typenum/build/main.rs
@@ -77,7 +77,7 @@ pub fn no_std() {} @@ -77,7 +77,7 @@ pub fn no_std() {}
fn main() { fn main() {
let highest: u64 = 1024; let highest: u64 = 1024;
@ -25,4 +25,5 @@ index 9c9f237cd..153031a2f 100644
let uints = (0..(highest + 1)) let uints = (0..(highest + 1))
.chain((first2..64).map(|i| 2u64.pow(i))) .chain((first2..64).map(|i| 2u64.pow(i)))
-- --
2.22.0 2.24.0

View file

@ -0,0 +1,28 @@
From d9bb87c68c7db5377be751ae736bcd5864e3ad6e Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sat, 21 Dec 2019 17:06:17 +0100
Subject: [PATCH 16/18] Void: fix linkage against host/target LLVM in cross
setups
---
src/librustc_llvm/build.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/librustc_llvm/build.rs b/src/librustc_llvm/build.rs
index c5d5f066..91799142 100644
--- a/src/librustc_llvm/build.rs
+++ b/src/librustc_llvm/build.rs
@@ -225,8 +225,8 @@ fn main() {
println!("cargo:rustc-link-search=native={}", &lib[9..]);
} else if is_crossed {
if lib.starts_with("-L") {
- println!("cargo:rustc-link-search=native={}",
- lib[2..].replace(&host, &target));
+ println!("cargo:rustc-link-search=native={}{}",
+ env::var("XBPS_CROSS_BASE").unwrap(), &lib[2..]);
}
} else if lib.starts_with("-l") {
println!("cargo:rustc-link-lib={}", &lib[2..]);
--
2.24.0

View file

@ -1,10 +1,21 @@
From 7344f8a173bb0c90591d1eb1d18cd4eb1553051e Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sat, 21 Dec 2019 17:06:55 +0100
Subject: [PATCH 17/18] Use ELFv2 ABI on all powerpc64 targets
This patches librustc_target so that ELFv2 is used everywhere, matching our This patches librustc_target so that ELFv2 is used everywhere, matching our
LLVM. While this is not perfect (it does not allow rustc to compile legacy LLVM. While this is not perfect (it does not allow rustc to compile legacy
binaries), rustc never requests specific ABI from llvm in the first place, binaries), rustc never requests specific ABI from llvm in the first place,
so at least match the environment we have. so at least match the environment we have.
---
src/librustc_target/abi/call/powerpc64.rs | 2 +-
src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
2 files changed, 2 insertions(+), 6 deletions(-)
--- rustc-1.36.0-src/src/librustc_target/abi/call/powerpc64.rs diff --git a/src/librustc_target/abi/call/powerpc64.rs b/src/librustc_target/abi/call/powerpc64.rs
+++ rustc-1.36.0-src/src/librustc_target/abi/call/powerpc64.rs index a9683104..98e44af3 100644
--- a/src/librustc_target/abi/call/powerpc64.rs
+++ b/src/librustc_target/abi/call/powerpc64.rs
@@ -124,7 +124,7 @@ pub fn compute_abi_info<'a, Ty, C>(cx: &C, fty: &mut FnType<'a, Ty>) @@ -124,7 +124,7 @@ pub fn compute_abi_info<'a, Ty, C>(cx: &C, fty: &mut FnType<'a, Ty>)
where Ty: TyLayoutMethods<'a, C> + Copy, where Ty: TyLayoutMethods<'a, C> + Copy,
C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout + HasTargetSpec C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout + HasTargetSpec
@ -14,8 +25,10 @@ so at least match the environment we have.
ELFv2 ELFv2
} else { } else {
match cx.data_layout().endian { match cx.data_layout().endian {
--- rustc-1.36.0-src/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs diff --git a/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs b/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs
+++ rustc-1.36.0-src/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs index 89e68ab3..77659cdd 100644
--- a/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs
+++ b/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
-use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult, RelroLevel}; -use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult, RelroLevel};
+use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult}; +use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
@ -33,3 +46,6 @@ so at least match the environment we have.
Ok(Target { Ok(Target {
llvm_target: "powerpc64-unknown-linux-gnu".to_string(), llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
target_endian: "big".to_string(), target_endian: "big".to_string(),
--
2.24.0

View file

@ -1,7 +1,7 @@
From 194307936110470487c41637684d4b09b3516af5 Mon Sep 17 00:00:00 2001 From 3cf50196b429a6912452ad6e43218b5f6b7922cf Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org> From: Samuel Holland <samuel@sholland.org>
Date: Sun, 3 Nov 2019 10:52:00 -0600 Date: Sun, 3 Nov 2019 10:52:00 -0600
Subject: [PATCH] Configure LLVM module PIC level Subject: [PATCH 18/18] Configure LLVM module PIC level
As of LLVM 9, this is required for 32-bit PowerPC to properly generate As of LLVM 9, this is required for 32-bit PowerPC to properly generate
PLT references. Previously, only BigPIC was supported; now LLVM supports PLT references. Previously, only BigPIC was supported; now LLVM supports
@ -13,7 +13,7 @@ both BigPIC and SmallPIC, and there is no default value provided.
3 files changed, 9 insertions(+) 3 files changed, 9 insertions(+)
diff --git a/src/librustc_codegen_llvm/context.rs b/src/librustc_codegen_llvm/context.rs diff --git a/src/librustc_codegen_llvm/context.rs b/src/librustc_codegen_llvm/context.rs
index 2da938771721..4a40349cb73e 100644 index 2da93877..4a40349c 100644
--- a/src/librustc_codegen_llvm/context.rs --- a/src/librustc_codegen_llvm/context.rs
+++ b/src/librustc_codegen_llvm/context.rs +++ b/src/librustc_codegen_llvm/context.rs
@@ -203,6 +203,10 @@ pub unsafe fn create_module( @@ -203,6 +203,10 @@ pub unsafe fn create_module(
@ -28,7 +28,7 @@ index 2da938771721..4a40349cb73e 100644
llvm::LLVMRustSetModulePIELevel(llmod); llvm::LLVMRustSetModulePIELevel(llmod);
} }
diff --git a/src/librustc_codegen_llvm/llvm/ffi.rs b/src/librustc_codegen_llvm/llvm/ffi.rs diff --git a/src/librustc_codegen_llvm/llvm/ffi.rs b/src/librustc_codegen_llvm/llvm/ffi.rs
index c69942ef3f2d..7f7b5b22d9af 100644 index c69942ef..7f7b5b22 100644
--- a/src/librustc_codegen_llvm/llvm/ffi.rs --- a/src/librustc_codegen_llvm/llvm/ffi.rs
+++ b/src/librustc_codegen_llvm/llvm/ffi.rs +++ b/src/librustc_codegen_llvm/llvm/ffi.rs
@@ -1805,6 +1805,7 @@ extern "C" { @@ -1805,6 +1805,7 @@ extern "C" {
@ -40,7 +40,7 @@ index c69942ef3f2d..7f7b5b22d9af 100644
pub fn LLVMRustModuleBufferCreate(M: &Module) -> &'static mut ModuleBuffer; pub fn LLVMRustModuleBufferCreate(M: &Module) -> &'static mut ModuleBuffer;
pub fn LLVMRustModuleBufferPtr(p: &ModuleBuffer) -> *const u8; pub fn LLVMRustModuleBufferPtr(p: &ModuleBuffer) -> *const u8;
diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp
index 0cda3465dc09..4c5bc20b86db 100644 index 0cda3465..4c5bc20b 100644
--- a/src/rustllvm/PassWrapper.cpp --- a/src/rustllvm/PassWrapper.cpp
+++ b/src/rustllvm/PassWrapper.cpp +++ b/src/rustllvm/PassWrapper.cpp
@@ -754,6 +754,10 @@ LLVMRustSetDataLayoutFromTargetMachine(LLVMModuleRef Module, @@ -754,6 +754,10 @@ LLVMRustSetDataLayoutFromTargetMachine(LLVMModuleRef Module,
@ -54,3 +54,6 @@ index 0cda3465dc09..4c5bc20b86db 100644
extern "C" void LLVMRustSetModulePIELevel(LLVMModuleRef M) { extern "C" void LLVMRustSetModulePIELevel(LLVMModuleRef M) {
unwrap(M)->setPIELevel(PIELevel::Level::Large); unwrap(M)->setPIELevel(PIELevel::Level::Large);
} }
--
2.24.0

View file

@ -1,12 +0,0 @@
Reason: https://gist.github.com/ab75b3796a9383423deecc0828494ac5
--- rustc-1.36.0-src/src/librustc_target/spec/linux_musl_base.rs
+++ rustc-1.36.0-src/src/librustc_target/spec/linux_musl_base.rs
@@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string());
// These targets statically link libc by default
- base.crt_static_default = true;
+ base.crt_static_default = false;
// These targets allow the user to choose between static and dynamic linking.
base.crt_static_respected = true;

View file

@ -1,14 +0,0 @@
Reason: rustc_codegen_llvm attempts to link against the host's llvm without this patch
--- rustc-1.36.0-src/src/librustc_llvm/build.rs
+++ rustc-1.36.0-src/src/librustc_llvm/build.rs
@@ -224,8 +224,8 @@ fn main() {
println!("cargo:rustc-link-search=native={}", &lib[9..]);
} else if is_crossed {
if lib.starts_with("-L") {
- println!("cargo:rustc-link-search=native={}",
- lib[2..].replace(&host, &target));
+ println!("cargo:rustc-link-search=native={}{}",
+ env::var("XBPS_CROSS_BASE").unwrap(), &lib[2..]);
}
} else if lib.starts_with("-l") {
println!("cargo:rustc-link-lib={}", &lib[2..]);

View file

@ -0,0 +1,32 @@
We need this as the rust-installer tool would otherwise
generate corrupt tarballs on big endian targets. This
matters when generating bootstrap tar.xz tarballs.
From f01c8060310ab3456f93567cb819384c4ae4e117 Mon Sep 17 00:00:00 2001
From: Alex Crichton <alex@alexcrichton.com>
Date: Thu, 22 Aug 2019 22:46:47 -0700
Subject: [PATCH] Fix tests on big-endian targets
Turns out liblzma wants to be compiled with options to indicate that
it's big endian!
---
lzma-sys/build.rs | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lzma-sys/build.rs b/lzma-sys/build.rs
index 7366d9c..a1e28b4 100644
--- a/vendor/lzma-sys/build.rs
+++ b/vendor/lzma-sys/build.rs
@@ -53,6 +53,12 @@ fn main() {
build.flag("-std=c99").flag("-pthread");
}
+ if let Ok(s) = env::var("CARGO_CFG_TARGET_ENDIAN") {
+ if s == "big" {
+ build.define("WORDS_BIGENDIAN", None);
+ }
+ }
+
build.compile("liblzma.a");
}

View file

@ -1,10 +1,10 @@
# Template file for 'rust' # Template file for 'rust'
# partially adapted from Alpine/Adélie's Rust APKBUILD # partially adapted from Alpine/Adélie's Rust APKBUILD
pkgname=rust pkgname=rust
version=1.39.0 version=1.40.0
revision=1 revision=1
_rust_dist_version=1.38.0 _rust_dist_version=1.39.0
_cargo_dist_version=0.39.0 _cargo_dist_version=0.40.0
# Always make sure custom distfiles used for bootstrap are # Always make sure custom distfiles used for bootstrap are
# uploaded to https://alpha.de.repo.voidlinux.org/distfiles/ # uploaded to https://alpha.de.repo.voidlinux.org/distfiles/
wrksrc="rustc-${version}-src" wrksrc="rustc-${version}-src"
@ -16,7 +16,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
license="MIT, Apache-2.0" license="MIT, Apache-2.0"
homepage="https://www.rust-lang.org/" homepage="https://www.rust-lang.org/"
distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz" distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
checksum=b4a1f6b6a93931f270691aba4fc85eee032fecda973e6b9c774cd06857609357 checksum=dd97005578defc10a482bff3e4e728350d2099c60ffcf1f5e189540c39a549ad
lib32disabled=yes lib32disabled=yes
patch_args="-Np1" patch_args="-Np1"
@ -47,57 +47,57 @@ else
case "$XBPS_MACHINE" in case "$XBPS_MACHINE" in
i686) i686)
checksum+=" checksum+="
183dca6a4d746b833804e658267c1a60cdb446a36d4e4f8d29b04cfd29d886d5 cb2e8afccfdc7e32fdbb1e106e3cedb0bd4ba1a6f060417f41c1e35a9ac8968d
a3248cf8cf7e33afb0a2508c7c204ffe5db2e515c3d3d31ffd9a2146ffa3bad3 e108d2f3ba7f5986e08cd7f2b295110243d1b715d5722d276aad7b0469418626
2996b0fb41506e87d9b07851f40b41fed94725cf53c3d251e4e1c78eea08df4c" d2a7ab28f0ff82a482ff24425f844b917a74059dbce550a96f0ab9fe1c131ef9"
;; ;;
x86_64) x86_64)
checksum+=" checksum+="
0fedde3406cf3367ceb00f493698e6bfc3264bd7f7253c85de7a042b45f873fa 5b2a435a4c034615d70cfc383abe9924cbd1ffd4669caa55ce6539f22ed979ed
51b334337804baeff7524e5496d396f254894d7529860d236975e9ed8fcca371 b629952ec9e3e750137d7b8a922de145c97c1dc372dd616e86e4e501da13910b
80bcb1368ce98d13cb371df89cbbed9007fb98843f34d07f2abd2c03b8f2747a" 7b9ba52c252964724f49aab49e42bec62fca929297ef058412c7e727b0794620"
;; ;;
x86_64-musl) x86_64-musl)
checksum+=" checksum+="
9bc0b51bdfca3ed7b298021e2ec768bd28ea3af138d9dc1854a70e3866f06c0d bd3e2964d171eafc95668f675b521669b89abc32129214bb4c3b2509e4c66247
efcc1779f9815c1d99010ef9eb66a2439f3993bc4d5accd7566e669d1b182373 4ac886aab08eae7c67edc0be3ffd808a0a6fa599b9aa52f52f0a48fdb8b56435
1d7d881a5af73fb7c3f632278d47a7d174f8347673e2263c4cd6a2f7d0278733" 9c17f3f43c77e3cf002b3b54f871718b0a4fca30e83dca0a76a037d4943806c7"
;; ;;
ppc64le) ppc64le)
checksum+=" checksum+="
d7c011dae42ba4498493488385d3ab00d793124866baa8310cc6414b66c9d2d2 542d2bd00f1af6b2108e052b8f9cfd7afdf787d47b313d7b67d8dcd3bfafe96c
937d2ece46539ba149cdce307718dadbc4b038a3c751bd75749430bd421a6249 e4ad2ed0a6de954788d27355a1f178000735bf2b7120f2aa3af49839ab405f16
456d019511cfe015152a7a4c1c2f518fdeb10e0c610c9bc3ef44d73861ca967e" e420f7078262bd0735c6d368e0e46b064ea39fdbc86690932b86274616e838e6"
;; ;;
ppc64le-musl) ppc64le-musl)
checksum+=" checksum+="
37420069fc877a430c32b8b5a533483fdb7cc1a28d0d9e0c1f0579a111aec888 aeb989553eb6b1e8a7473369d491c1ac4ff27a553743f19a042d759b1cbfbad9
f4b6f37b1f914a2ca086a7e806d7552275a20982b139670ecb2bc1be2d33df2f d7bf5bab6cd80d387fa1b9d41dd5a5825fc5de520048cc89a8d621760c44e6df
5725c42c8356443db15f378d88f2ccb67e363ebf4beacc96ae1eac9ba36f8fe7" e930b7da1f3ae1e0d3568c06cd4cc5f68a61813a8c53adf0e97d9592f3e3425e"
;; ;;
ppc64) ppc64)
checksum+=" checksum+="
7821de7c49e6c26606f2248f8cd126bef92661e149f0a67cc87f08e359685d4e fa5fe636f502cd5a6af97281656dba59295d76e91158c19b59d6a970987fce8f
b4d2a800fef9ca53208d16c5d5e215b01849d2f34eb476fa9d05457adf1b67ae 74f5deadb1052abf5475b3d7b204101a52337a89867daf3efde2adcd8dee78b2
73a4f13b8edda6b4c9c1818341c5d936f7b11a04f892358039d072b80ccd41dc" d516be75b7cde33aa69db1e4fd99b222b868df3f642dada3bfed34d1db585380"
;; ;;
ppc64-musl) ppc64-musl)
checksum+=" checksum+="
a607da72ea9ae81149d563e5e07c03bfc9fcf819ad079f5193f86fcab376315c f1fd45b8570bff03e22c70dcfc8cfa6e7657ab41ce082687f4bd294e08dad152
4f3b8f8d3e07b27096224131816668c7f34a2d80b5f2c0353905dcd878c50f12 c3455841abfb9e59ae0709fe5f0fa171212e8628bf464214734eafb46f97c4c2
ac18707b8df5d1f64b7e15dabd73eb7a3b0f9ef5976ef7c6ceb462b5d3feb9cd" af226341d50cebc5af608375b6b200a1c10e14139812dc77a928140fe5120be9"
;; ;;
ppc) ppc)
checksum+=" checksum+="
e4f088461db79b75c55210a1c70fd3127675287138196322a8416d078045468d ed91f1e60b56e6bd09b003fda0aef5b99e014663033f3b2ede44a51e5b574b13
94a2a2fc17adec46daf913e0c71280f03c12048f5224e39c7a77c533a4582f08 2cb595dd95d5f557b3d36006ce6fe283f324e721ad8f92e1f7772cc261787cae
02c07b741062e75556f5993a05eefe6dace70fee4a45542f1c6997fa69624d7e" a2a64bba73102caadf819dd268f5710c978ece0efa05aaa89cbae45a5443e880"
;; ;;
ppc-musl) ppc-musl)
checksum+=" checksum+="
80428db030216eea9117d131acdb1293404e78b71d26746dceeed3bb30629d32 3a83a55b11774af98f199ca47bf7429338a2f1e1df5fdbffbdee6bc5ffcae5c9
ca6253605d6eafafa9c2fbf27504b3c5d3f8efcaab69852a22ae080c265f03a9 4b16d538a5a3ff8d85bd0a2bb28896ab170a340f40e40e06a8f59028285d57f6
b06306fc164bffa73afd2d21d96381a28d38446e58cf01a0d1585e92b4656a23" bbbf7037590fd38c5d4b2e2ac7ddddcc13213d05885d7c1fc2eacbffa4d920f5"
;; ;;
esac esac
fi fi
@ -135,6 +135,7 @@ post_patch() {
_clear_vendor_checksums libc _clear_vendor_checksums libc
_clear_vendor_checksums typenum _clear_vendor_checksums typenum
_clear_vendor_checksums backtrace-sys _clear_vendor_checksums backtrace-sys
_clear_vendor_checksums lzma-sys
} }
do_configure() { do_configure() {
@ -269,13 +270,17 @@ do_install() {
-C "$DESTDIR/usr" --strip-components=2 --exclude=manifest.in -C "$DESTDIR/usr" --strip-components=2 --exclude=manifest.in
tar xf build/dist/rust-std-${version}-${RUST_TARGET}.tar.gz \ tar xf build/dist/rust-std-${version}-${RUST_TARGET}.tar.gz \
-C "$DESTDIR/usr/lib" --strip-components=3 --exclude=manifest.in -C "$DESTDIR/usr/lib" --strip-components=3 --exclude=manifest.in
tar xf build/dist/rustc-dev-${version}-${RUST_TARGET}.tar.gz \
-C "$DESTDIR/usr/lib" --strip-components=3 --exclude=manifest.in
vlicense COPYRIGHT vlicense COPYRIGHT
vlicense LICENSE-APACHE vlicense LICENSE-APACHE
vlicense LICENSE-MIT vlicense LICENSE-MIT
cd ${DESTDIR}/usr/lib cd ${DESTDIR}/usr/lib
ln -sf rustlib/*/lib/*.so . # symlinks instead of copies # symlinks instead of copies
mv *.so rustlib/${RUST_TARGET}/lib
ln -sf rustlib/${RUST_TARGET}/lib/*.so .
} }
rust-doc_package() { rust-doc_package() {