rust: 1.47.0

This commit is contained in:
Dylan Araps 2020-10-09 11:55:38 +03:00
parent 6a64ced8bb
commit a14d883d70
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
13 changed files with 31 additions and 295 deletions

View File

@ -1,33 +1,33 @@
#!/bin/sh -e
for patch in *.patch; do
patch -p1 < "$patch"
done
patch -p1 < libressl.patch
# This package mimics the download process of rust's 'x.py'
# bootstrap library to allow for the removal of the internet
# connection requirement per build.
{
mkdir -p "${cache_dir:=build/cache/2020-08-03}"
mkdir -p "${cache_dir:=build/cache/2020-08-27}"
for tarball in *.tar.xz\?no-extract; do
mv -f "$tarball" "$cache_dir/${tarball%%\?no-extract}"
done
}
# 'rust' checksums files in 'vendor/', but we patch a few.
for vendor in libc openssl-sys; do
sed -i 's/\("files":{\)[^}]*/\1/' "vendor/$vendor/.cargo-checksum.json"
done
# We modified openssl-sys.
sed -i 's/\("files":{\)[^}]*/\1/' \
vendor/openssl-sys/.cargo-checksum.json
sed -i 's/crt_static_default = true/crt_static_default = false/' \
src/librustc_target/spec/linux_musl_base.rs
cat > config.toml <<EOF
[llvm]
link-shared = true
[build]
build = "x86_64-unknown-linux-musl"
host = [ "x86_64-unknown-linux-musl" ]
target = [ "x86_64-unknown-linux-musl" ]
build = "x86_64-unknown-linux-musl"
host = [ "x86_64-unknown-linux-musl" ]
target = [ "x86_64-unknown-linux-musl" ]
docs = false
compiler-docs = false
@ -44,15 +44,15 @@ full-bootstrap = false
prefix = "/usr"
[rust]
channel = "stable"
rpath = false
codegen-units = 1
debuginfo-level = 0
debug = false
backtrace = false
jemalloc = false
debug-assertions = false
codegen-tests = false
channel = "stable"
rpath = false
debuginfo-level = 0
debug = false
backtrace = false
jemalloc = false
debug-assertions = false
codegen-tests = false
codegen-units-std = 1
[target.x86_64-unknown-linux-musl]
llvm-config = "/usr/bin/llvm-config"

View File

@ -1,6 +1,5 @@
865dae1290a205f16ded8818c6a0254cc32862985fc250a602a70285b7d92b82
e8081032d53baa129c41c4c2bfb025648ac321c9c809f377110f8a26f7ce1cdb
9a971ff29e01243b08f6f3c220ab5d608489637a6b5d81ba2e8a78007901ced0
895a3b6928a5bf7b1ac28c339a85ddd078dd719f54245b8d845370baf8255368
f878342018a41aaf591ace0c47e07db9d480fc56b176003bd51648d17e3878fc
341a4e9e2bb0f1e62cfcd52e87e3e311c0653b38d994c64ca96555657bb8c529
ec2c81d2d34890486094a6407589be96161e4e301c238332d32c6dbae4f38ea2
9e7107082c5b47b8931f65d5d6a9c97b1540e67533a2e69f480d9d83e8d05d57
130fb0ef33324996bd87abcc5d6835b0fea97d9786f53c90af5986a80c1d97da
bc5539c333bda74094aa59a9d08b12e435eb1936389afe58d61673951c07b7ed
5e00f619c609d03fba09f0c44d8f667d3ab16b7ea2ef7935a1656a8845a930ec

View File

@ -1,17 +0,0 @@
diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs
index 162e11a66..9f3544313 100644
--- a/vendor/openssl-sys/build/main.rs
+++ b/vendor/openssl-sys/build/main.rs
@@ -204,6 +204,12 @@ See rust-openssl README for more information:
(3, 0, 0) => ('3', '0', '0'),
(3, 0, 1) => ('3', '0', '1'),
(3, 0, _) => ('3', '0', 'x'),
+ (3, 1, 0) => ('3', '1', '0'),
+ (3, 1, 1) => ('3', '1', '0'),
+ (3, 1, _) => ('3', '1', 'x'),
+ (3, 2, 0) => ('3', '2', '0'),
+ (3, 2, 1) => ('3', '2', '1'),
+ (3, 2, _) => ('3', '2', 'x'),
_ => version_error(),
};

View File

@ -1,78 +0,0 @@
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index 9b4926f28..8555d904b 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -176,7 +176,7 @@ fn copy_self_contained_objects(
// to using gcc from a glibc-targeting toolchain for linking.
// To do that we have to distribute musl startup objects as a part of Rust toolchain
// and link with them manually in the self-contained mode.
- if target.contains("musl") {
+ if target.contains("noop") {
let srcdir = builder.musl_libdir(target).unwrap();
for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
copy_and_stamp(
diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
index 3301d41cf..1c9e0083a 100644
--- a/src/bootstrap/sanity.rs
+++ b/src/bootstrap/sanity.rs
@@ -192,7 +192,7 @@ pub fn check(build: &mut Build) {
}
// Make sure musl-root is valid
- if target.contains("musl") {
+ if target.contains("noop") {
// If this is a native target (host is also musl) and no musl-root is given,
// fall back to the system toolchain in /usr before giving up
if build.musl_root(*target).is_none() && build.config.build == *target {
diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/spec/linux_musl_base.rs
index b90e91d29..ad098a47e 100644
--- a/src/librustc_target/spec/linux_musl_base.rs
+++ b/src/librustc_target/spec/linux_musl_base.rs
@@ -9,7 +9,7 @@ pub fn opts() -> TargetOptions {
base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
// 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;
diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs
index 31d235cf6..1ebec47ed 100644
--- a/src/libunwind/build.rs
+++ b/src/libunwind/build.rs
@@ -12,7 +12,7 @@ fn main() {
} else if target.contains("x86_64-fortanix-unknown-sgx") {
llvm_libunwind::compile();
} else if target.contains("linux") {
- if target.contains("musl") {
+ if target.contains("noop") {
// linking for musl is handled in lib.rs
llvm_libunwind::compile();
} else if !target.contains("android") {
diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs
index cc025da1a..0506db514 100644
--- a/src/libunwind/lib.rs
+++ b/src/libunwind/lib.rs
@@ -18,7 +18,7 @@ cfg_if::cfg_if! {
}
}
-#[cfg(target_env = "musl")]
+#[cfg(target_env = "noop")]
#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
#[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
extern "C" {}
diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
index 55b892f7e..e03ce90e2 100644
--- a/vendor/libc/src/unix/mod.rs
+++ b/vendor/libc/src/unix/mod.rs
@@ -298,7 +298,7 @@ cfg_if! {
} else if #[cfg(feature = "std")] {
// cargo build, don't pull in anything extra as the libstd dep
// already pulls in all libs.
- } else if #[cfg(target_env = "musl")] {
+ } else if #[cfg(target_env = "noop")] {
#[cfg_attr(feature = "rustc-dep-of-std",
link(name = "c", kind = "static",
cfg(target_feature = "crt-static")))]

View File

@ -1,6 +1,5 @@
https://static.rust-lang.org/dist/rustc-1.46.0-src.tar.xz
https://static.rust-lang.org/dist/2020-08-03/rust-std-1.45.2-x86_64-unknown-linux-musl.tar.xz?no-extract
https://static.rust-lang.org/dist/2020-08-03/rustc-1.45.2-x86_64-unknown-linux-musl.tar.xz?no-extract
https://static.rust-lang.org/dist/2020-08-03/cargo-0.46.1-x86_64-unknown-linux-musl.tar.xz?no-extract
patches/musl.patch
patches/libressl-3.1.X.patch
https://static.rust-lang.org/dist/rustc-1.47.0-src.tar.xz
https://static.rust-lang.org/dist/2020-08-27/rust-std-1.46.0-x86_64-unknown-linux-musl.tar.xz?no-extract
https://static.rust-lang.org/dist/2020-08-27/rustc-1.46.0-x86_64-unknown-linux-musl.tar.xz?no-extract
https://static.rust-lang.org/dist/2020-08-27/cargo-0.47.0-x86_64-unknown-linux-musl.tar.xz?no-extract
patches/libressl.patch

View File

@ -1 +1 @@
1.46.0 1
1.47.0 1

View File

@ -1,68 +0,0 @@
#!/bin/sh -e
for patch in *.patch; do
patch -p1 < "$patch"
done
# This package mimics the download process of rust's 'x.py'
# bootstrap library to allow for the removal of the internet
# connection requirement per build.
{
mkdir -p "${cache_dir:=build/cache/2020-08-27}"
for tarball in *.tar.xz\?no-extract; do
mv -f "$tarball" "$cache_dir/${tarball%%\?no-extract}"
done
}
# 'rust' checksums files in 'vendor/', but we patch a few.
for vendor in libc openssl-sys; do
sed -i 's/\("files":{\)[^}]*/\1/' "vendor/$vendor/.cargo-checksum.json"
done
cat > config.toml <<EOF
[llvm]
link-shared = true
[build]
build = "x86_64-unknown-linux-musl"
host = [ "x86_64-unknown-linux-musl" ]
target = [ "x86_64-unknown-linux-musl" ]
docs = false
compiler-docs = false
extended = true
submodules = false
python = "python3"
locked-deps = true
vendor = true
sanitizers = false
profiler = false
full-bootstrap = false
[install]
prefix = "/usr"
[rust]
channel = "stable"
rpath = false
codegen-units = 1
debuginfo-level = 0
debug = false
backtrace = false
jemalloc = false
debug-assertions = false
codegen-tests = false
[target.x86_64-unknown-linux-musl]
llvm-config = "/usr/bin/llvm-config"
crt-static = false
EOF
export DESTDIR="$1"
python3 ./x.py build -j "$(nproc)"
python3 ./x.py install
rm -rf "$1/usr/lib/rustlib/src/"
rm -f "$1/usr/lib/rustlib/uninstall.sh"

View File

@ -1,6 +0,0 @@
ec2c81d2d34890486094a6407589be96161e4e301c238332d32c6dbae4f38ea2
9e7107082c5b47b8931f65d5d6a9c97b1540e67533a2e69f480d9d83e8d05d57
130fb0ef33324996bd87abcc5d6835b0fea97d9786f53c90af5986a80c1d97da
bc5539c333bda74094aa59a9d08b12e435eb1936389afe58d61673951c07b7ed
502d9c4eac4db3fb5e6413514ba6407bf990d297ca8de7fa8101d0325aeb0e12
5e00f619c609d03fba09f0c44d8f667d3ab16b7ea2ef7935a1656a8845a930ec

View File

@ -1,8 +0,0 @@
cmake make
curl make
libressl
llvm
pkgconf make
python make
xz
zlib

View File

@ -1,78 +0,0 @@
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index 9b4926f28..8555d904b 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -176,7 +176,7 @@ fn copy_self_contained_objects(
// to using gcc from a glibc-targeting toolchain for linking.
// To do that we have to distribute musl startup objects as a part of Rust toolchain
// and link with them manually in the self-contained mode.
- if target.contains("musl") {
+ if target.contains("noop") {
let srcdir = builder.musl_libdir(target).unwrap();
for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
copy_and_stamp(
diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
index 3301d41cf..1c9e0083a 100644
--- a/src/bootstrap/sanity.rs
+++ b/src/bootstrap/sanity.rs
@@ -192,7 +192,7 @@ pub fn check(build: &mut Build) {
}
// Make sure musl-root is valid
- if target.contains("musl") {
+ if target.contains("noop") {
// If this is a native target (host is also musl) and no musl-root is given,
// fall back to the system toolchain in /usr before giving up
if build.musl_root(*target).is_none() && build.config.build == *target {
diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/spec/linux_musl_base.rs
index b90e91d29..ad098a47e 100644
--- a/src/librustc_target/spec/linux_musl_base.rs
+++ b/src/librustc_target/spec/linux_musl_base.rs
@@ -9,7 +9,7 @@ pub fn opts() -> TargetOptions {
base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
// 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;
diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
index 55b892f7e..e03ce90e2 100644
--- a/vendor/libc/src/unix/mod.rs
+++ b/vendor/libc/src/unix/mod.rs
@@ -298,7 +298,7 @@ cfg_if! {
} else if #[cfg(feature = "std")] {
// cargo build, don't pull in anything extra as the libstd dep
// already pulls in all libs.
- } else if #[cfg(target_env = "musl")] {
+ } else if #[cfg(target_env = "noop")] {
#[cfg_attr(feature = "rustc-dep-of-std",
link(name = "c", kind = "static",
cfg(target_feature = "crt-static")))]
diff --git a/library/unwind/build.rs b/library/unwind/build.rs
index ab09a6e32..316ecadf4 100644
--- a/library/unwind/build.rs
+++ b/library/unwind/build.rs
@@ -12,7 +12,7 @@ fn main() {
} else if target.contains("x86_64-fortanix-unknown-sgx") {
llvm_libunwind::compile();
} else if target.contains("linux") {
- if target.contains("musl") {
+ if target.contains("noop") {
// linking for musl is handled in lib.rs
llvm_libunwind::compile();
} else if !target.contains("android") {
diff --git a/library/unwind/src/lib.rs b/library/unwind/src/lib.rs
index 20a2ca984..3bd5a14a7 100644
--- a/library/unwind/src/lib.rs
+++ b/library/unwind/src/lib.rs
@@ -37,7 +37,7 @@ cfg_if::cfg_if! {
}
}
-#[cfg(target_env = "musl")]
+#[cfg(target_env = "noop")]
#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
#[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
extern "C" {}

View File

@ -1,6 +0,0 @@
https://static.rust-lang.org/dist/rustc-1.47.0-src.tar.xz
https://static.rust-lang.org/dist/2020-08-27/rust-std-1.46.0-x86_64-unknown-linux-musl.tar.xz?no-extract
https://static.rust-lang.org/dist/2020-08-27/rustc-1.46.0-x86_64-unknown-linux-musl.tar.xz?no-extract
https://static.rust-lang.org/dist/2020-08-27/cargo-0.47.0-x86_64-unknown-linux-musl.tar.xz?no-extract
patches/musl.patch
patches/libressl-3.1.X.patch

View File

@ -1 +0,0 @@
1.47.0 1