rust: update to 1.48.0
Additions by q66: - external cargo bootstrap is always used now - docs are enabled (for non-bindists) + removed noarch
This commit is contained in:
parent
e34aec932f
commit
c4426b14b8
14 changed files with 183 additions and 165 deletions
|
@ -1,6 +1,6 @@
|
|||
--- rustc-1.30.0-src/src/librustc_llvm/lib.rs.orig
|
||||
+++ rustc-1.30.0-src/src/librustc_llvm/lib.rs
|
||||
@@ -121,3 +121,10 @@
|
||||
--- rustc-1.48.0-src/compiler/rustc_llvm/src/lib.rs
|
||||
+++ rustc-1.48.0-src/compiler/rustc_llvm/src/lib.rs
|
||||
@@ -170,3 +170,10 @@
|
||||
LLVMInitializeWebAssemblyTargetMC,
|
||||
LLVMInitializeWebAssemblyAsmPrinter);
|
||||
}
|
||||
|
|
26
srcpkgs/rust/patches/00016-do-not-copy-libunwind.patch
Normal file
26
srcpkgs/rust/patches/00016-do-not-copy-libunwind.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
From 227096bde5283269aa1d1002860b6ec54d2cf284 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Brechtmann <johannes.brechtmann@gmail.com>
|
||||
Date: Sun, 22 Nov 2020 16:00:50 +0100
|
||||
Subject: [PATCH] Revert "Include libunwind in the rust-src component."
|
||||
|
||||
This reverts commit 9f27f3796d3487411ab035803a0757d69040649c.
|
||||
---
|
||||
src/bootstrap/dist.rs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
|
||||
index b2a590307a2..020cd665a0e 100644
|
||||
--- a/src/bootstrap/dist.rs
|
||||
+++ b/src/bootstrap/dist.rs
|
||||
@@ -1016,7 +1016,7 @@ impl Step for Src {
|
||||
copy_src_dirs(
|
||||
builder,
|
||||
&builder.src,
|
||||
- &["library", "src/llvm-project/libunwind"],
|
||||
+ &["library"],
|
||||
&[
|
||||
// not needed and contains symlinks which rustup currently
|
||||
// chokes on when unpacking.
|
||||
--
|
||||
2.29.2
|
||||
|
|
@ -17,8 +17,8 @@ Fixes #54243
|
|||
|
||||
diff --git a/src/librustc_codegen_ssa/back/link.rs b/src/librustc_codegen_ssa/back/link.rs
|
||||
index 0dd2f029..f22b4277 100644
|
||||
--- a/src/librustc_codegen_ssa/back/link.rs
|
||||
+++ b/src/librustc_codegen_ssa/back/link.rs
|
||||
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
|
||||
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
|
||||
@@ -1964,9 +1964,7 @@
|
||||
}
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
|
|||
index 56164b74..8c46334a 100644
|
||||
--- a/src/bootstrap/config.rs
|
||||
+++ b/src/bootstrap/config.rs
|
||||
@@ -135,8 +135,6 @@
|
||||
@@ -154,8 +154,6 @@
|
||||
pub print_step_timings: bool,
|
||||
pub missing_tools: bool,
|
||||
|
||||
|
@ -150,7 +150,7 @@ index 56164b74..8c46334a 100644
|
|||
pub prefix: Option<PathBuf>,
|
||||
pub sysconfdir: Option<PathBuf>,
|
||||
pub datadir: Option<PathBuf>,
|
||||
@@ -172,8 +170,6 @@
|
||||
@@ -252,8 +250,6 @@
|
||||
pub linker: Option<PathBuf>,
|
||||
pub ndk: Option<PathBuf>,
|
||||
pub crt_static: Option<bool>,
|
||||
|
@ -159,7 +159,7 @@ index 56164b74..8c46334a 100644
|
|||
pub wasi_root: Option<PathBuf>,
|
||||
pub qemu_rootfs: Option<PathBuf>,
|
||||
pub no_std: bool,
|
||||
@@ -327,7 +323,6 @@
|
||||
@@ -438,7 +434,6 @@
|
||||
parallel_compiler: Option<bool>,
|
||||
default_linker: Option<String>,
|
||||
channel: Option<String>,
|
||||
|
@ -167,7 +167,7 @@ index 56164b74..8c46334a 100644
|
|||
rpath: Option<bool>,
|
||||
verbose_tests: Option<bool>,
|
||||
optimize_tests: Option<bool>,
|
||||
@@ -363,8 +358,6 @@
|
||||
@@ -475,8 +470,6 @@
|
||||
llvm_filecheck: Option<String>,
|
||||
android_ndk: Option<String>,
|
||||
crt_static: Option<bool>,
|
||||
|
@ -176,22 +176,22 @@ index 56164b74..8c46334a 100644
|
|||
wasi_root: Option<String>,
|
||||
qemu_rootfs: Option<String>,
|
||||
no_std: Option<bool>,
|
||||
@@ -592,7 +585,6 @@
|
||||
@@ -806,7 +799,6 @@
|
||||
set(&mut config.llvm_tools_enabled, rust.llvm_tools);
|
||||
config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
|
||||
config.rustc_default_linker = rust.default_linker.clone();
|
||||
- config.musl_root = rust.musl_root.clone().map(PathBuf::from);
|
||||
config.save_toolstates = rust.save_toolstates.clone().map(PathBuf::from);
|
||||
config.rustc_default_linker = rust.default_linker;
|
||||
- config.musl_root = rust.musl_root.map(PathBuf::from);
|
||||
config.save_toolstates = rust.save_toolstates.map(PathBuf::from);
|
||||
set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings));
|
||||
set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
|
||||
@@ -632,8 +624,6 @@
|
||||
target.ranlib = cfg.ranlib.clone().map(PathBuf::from);
|
||||
target.linker = cfg.linker.clone().map(PathBuf::from);
|
||||
@@ -846,8 +838,6 @@
|
||||
target.ranlib = cfg.ranlib.map(PathBuf::from);
|
||||
target.linker = cfg.linker.map(PathBuf::from);
|
||||
target.crt_static = cfg.crt_static;
|
||||
- target.musl_root = cfg.musl_root.clone().map(PathBuf::from);
|
||||
- target.musl_libdir = cfg.musl_libdir.clone().map(PathBuf::from);
|
||||
target.wasi_root = cfg.wasi_root.clone().map(PathBuf::from);
|
||||
target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);
|
||||
- target.musl_root = cfg.musl_root.map(PathBuf::from);
|
||||
- target.musl_libdir = cfg.musl_libdir.map(PathBuf::from);
|
||||
target.wasi_root = cfg.wasi_root.map(PathBuf::from);
|
||||
target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
|
||||
|
||||
diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
|
||||
index 2a46c563..025928b9 100755
|
||||
|
@ -232,16 +232,14 @@ index 2a46c563..025928b9 100755
|
|||
v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs",
|
||||
"rootfs in qemu testing, you probably don't want to use this")
|
||||
v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs",
|
||||
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
|
||||
index c7e63990..77bbb2cd 100644
|
||||
--- a/src/bootstrap/lib.rs
|
||||
+++ b/src/bootstrap/lib.rs
|
||||
@@ -881,25 +882,6 @@
|
||||
@@ -876,25 +876,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- /// Returns the "musl root" for this `target`, if defined
|
||||
- fn musl_root(&self, target: Interned<String>) -> Option<&Path> {
|
||||
- fn musl_root(&self, target: TargetSelection) -> Option<&Path> {
|
||||
- self.config
|
||||
- .target_config
|
||||
- .get(&target)
|
||||
|
@ -251,7 +249,7 @@ index c7e63990..77bbb2cd 100644
|
|||
- }
|
||||
-
|
||||
- /// Returns the "musl libdir" for this `target`.
|
||||
- fn musl_libdir(&self, target: Interned<String>) -> Option<PathBuf> {
|
||||
- fn musl_libdir(&self, target: TargetSelection) -> Option<PathBuf> {
|
||||
- let t = self.config.target_config.get(&target)?;
|
||||
- if let libdir @ Some(_) = &t.musl_libdir {
|
||||
- return libdir.clone();
|
||||
|
@ -260,7 +258,7 @@ index c7e63990..77bbb2cd 100644
|
|||
- }
|
||||
-
|
||||
/// Returns the sysroot for the wasi target, if defined
|
||||
fn wasi_root(&self, target: Interned<String>) -> Option<&Path> {
|
||||
fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
|
||||
self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
|
||||
diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
|
||||
index 530e74da..8ec9f046 100644
|
||||
|
@ -297,8 +295,8 @@ index 530e74da..8ec9f046 100644
|
|||
// 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
|
||||
index e294e639..58ae91a9 100644
|
||||
--- a/src/librustc_target/spec/linux_musl_base.rs
|
||||
+++ b/src/librustc_target/spec/linux_musl_base.rs
|
||||
--- a/compiler/rustc_target/src/spec/linux_musl_base.rs
|
||||
+++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
|
||||
@@ -10,10 +10,6 @@
|
||||
// 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());
|
||||
|
@ -310,8 +308,8 @@ index e294e639..58ae91a9 100644
|
|||
// These targets statically link libc by default
|
||||
base.crt_static_default = true;
|
||||
// These targets allow the user to choose between static and dynamic linking.
|
||||
--- a/src/librustc_target/spec/crt_objects.rs.orig 2020-08-07 01:01:58.142394507 +0200
|
||||
+++ b/src/librustc_target/spec/crt_objects.rs 2020-08-07 01:02:25.030392771 +0200
|
||||
--- a/compiler/rustc_target/src/spec/crt_objects.rs.orig 2020-08-07 01:01:58.142394507 +0200
|
||||
+++ b/compiler/rustc_target/src/spec/crt_objects.rs 2020-08-07 01:02:25.030392771 +0200
|
||||
@@ -61,21 +61,6 @@
|
||||
])
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@ Subject: [PATCH 05/15] Prefer libgcc_eh over libunwind on musl
|
|||
|
||||
diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs
|
||||
index a24808b3..a1250889 100644
|
||||
--- a/src/libunwind/build.rs
|
||||
+++ b/src/libunwind/build.rs
|
||||
--- a/library/unwind/build.rs
|
||||
+++ b/library/unwind/build.rs
|
||||
@@ -5,17 +5,14 @@
|
||||
let target = env::var("TARGET").expect("TARGET was not set");
|
||||
|
||||
|
@ -50,8 +50,8 @@ index a24808b3..a1250889 100644
|
|||
}
|
||||
diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs
|
||||
index 18d41be7..17f73d69 100644
|
||||
--- a/src/libunwind/lib.rs
|
||||
+++ b/src/libunwind/lib.rs
|
||||
--- a/library/unwind/src/lib.rs
|
||||
+++ b/library/unwind/src/lib.rs
|
||||
@@ -19,7 +19,7 @@ cfg_if::cfg_if! {
|
||||
}
|
||||
|
||||
|
|
|
@ -73,19 +73,5 @@ index c5c824ac..f3fe047a 100644
|
|||
// ignore-android
|
||||
// ignore-windows
|
||||
// ignore-cloudabi no execve
|
||||
diff --git a/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs b/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs
|
||||
index b28f742a..3ee4ccce 100644
|
||||
--- a/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs
|
||||
+++ b/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs
|
||||
@@ -2,6 +2,8 @@
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
// ignore-emscripten
|
||||
+// ignore-powerpc
|
||||
+// ignore-powerpc64
|
||||
|
||||
// Test that the simd_bitmask intrinsic produces correct results.
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
|
@ -35,12 +35,3 @@ index 23ba93da..dc51b16c 100755
|
|||
|
||||
# Run GDB with the additional arguments that load the pretty printers
|
||||
# Set the environment variable `RUST_GDB` to overwrite the call to a
|
||||
|
||||
--- a/src/etc/lldb_commands
|
||||
+++ b/src/etc/lldb_commands
|
||||
@@ -1,4 +1,4 @@
|
||||
-command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_lookup.py\"
|
||||
+command script import \"$RUSTC_SYSROOT/share/rust/etc/lldb_lookup.py\"
|
||||
type synthetic add -l lldb_lookup.synthetic_lookup -x \".*\" --category Rust
|
||||
type summary add -F lldb_lookup.summary_lookup -e -x -h \"^(alloc::([a-z_]+::)+)String$\" --category Rust
|
||||
type summary add -F lldb_lookup.summary_lookup -e -x -h \"^&str$\" --category Rust
|
||||
|
|
|
@ -9,8 +9,8 @@ Subject: [PATCH 11/15] Dynamically link libc on musl by default
|
|||
|
||||
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
|
||||
--- a/compiler/rustc_target/src/spec/linux_musl_base.rs
|
||||
+++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
|
||||
@@ -1,11 +1,9 @@
|
||||
-use crate::spec::crt_objects::{self, CrtObjectsFallback};
|
||||
use crate::spec::TargetOptions;
|
||||
|
|
|
@ -39,6 +39,7 @@ index 238da24b..ffb05ee7 100644
|
|||
extern {}
|
||||
} else if #[cfg(target_os = "emscripten")] {
|
||||
#[link(name = "c")]
|
||||
index 0b1496af..7f7e85a7 100644
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ Subject: [PATCH 14/15] Void: fix linkage against host/target LLVM in cross
|
|||
|
||||
diff --git a/src/librustc_llvm/build.rs b/src/librustc_llvm/build.rs
|
||||
index 9b4f03b3..d0167838 100644
|
||||
--- a/src/librustc_llvm/build.rs
|
||||
+++ b/src/librustc_llvm/build.rs
|
||||
--- a/compiler/rustc_llvm/build.rs
|
||||
+++ b/compiler/rustc_llvm/build.rs
|
||||
@@ -217,9 +217,11 @@ fn main() {
|
||||
for lib in output(&mut cmd).split_whitespace() {
|
||||
if is_crossed {
|
||||
|
|
|
@ -14,8 +14,8 @@ so at least match the environment we have.
|
|||
|
||||
diff --git a/src/librustc_target/abi/call/powerpc64.rs b/src/librustc_target/abi/call/powerpc64.rs
|
||||
index 93c4e97d..96b02486 100644
|
||||
--- a/src/librustc_target/abi/call/powerpc64.rs
|
||||
+++ b/src/librustc_target/abi/call/powerpc64.rs
|
||||
--- a/compiler/rustc_target/src/abi/call/powerpc64.rs
|
||||
+++ b/compiler/rustc_target/src/abi/call/powerpc64.rs
|
||||
@@ -119,14 +119,7 @@ where
|
||||
Ty: TyLayoutMethods<'a, C> + Copy,
|
||||
C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout + HasTargetSpec,
|
||||
|
@ -34,8 +34,8 @@ index 93c4e97d..96b02486 100644
|
|||
classify_ret(cx, &mut fn_abi.ret, abi);
|
||||
diff --git a/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs b/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs
|
||||
index 5306d905..c63eed85 100644
|
||||
--- a/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs
|
||||
+++ b/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs
|
||||
--- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
|
||||
+++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
|
||||
@@ -1,4 +1,4 @@
|
||||
-use crate::spec::{LinkerFlavor, RelroLevel, Target, TargetOptions, TargetResult};
|
||||
+use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
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
|
||||
@@ -56,6 +56,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");
|
||||
}
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
--- rustc-1.41.0-src/src/libstd/build.rs.orig 2020-02-08 17:05:40.390387794 +0200
|
||||
+++ rustc-1.41.0-src/src/libstd/build.rs 2020-02-08 17:09:46.844426452 +0200
|
||||
@@ -11,6 +11,8 @@
|
||||
--- rustc-1.47.0-src/library/std/build.rs.orig
|
||||
+++ rustc-1.47.0-src/library/std/build.rs
|
||||
@@ -8,6 +8,8 @@
|
||||
println!("cargo:rustc-link-lib=dl");
|
||||
println!("cargo:rustc-link-lib=rt");
|
||||
println!("cargo:rustc-link-lib=pthread");
|
||||
+ } else {
|
||||
println!("cargo:rustc-link-lib=log");
|
||||
println!("cargo:rustc-link-lib=gcc");
|
||||
+ } else if target.contains("musl") {
|
||||
+ println!("cargo:rustc-link-lib=ssp_nonshared");
|
||||
}
|
||||
} else if target.contains("freebsd") {
|
||||
println!("cargo:rustc-link-lib=execinfo");
|
||||
--- rustc-1.44.0-src/src/libunwind/build.rs
|
||||
+++ rustc-1.44.0-src/src/libunwind/build.rs
|
||||
--- rustc-1.44.0-src/library/unwind/build.rs.orig
|
||||
+++ rustc-1.44.0-src/library/unwind/build.rs
|
||||
@@ -12,6 +12,9 @@ fn main() {
|
||||
} else if target.contains("linux") {
|
||||
if !target.contains("android") {
|
||||
|
|
|
@ -3,120 +3,165 @@
|
|||
#
|
||||
# Permission to use rust and cargo trademark is granted.
|
||||
# See: https://github.com/rust-lang/core-team/issues/4
|
||||
pkgname=rust
|
||||
version=1.46.0
|
||||
revision=1
|
||||
_rust_dist_version=1.45.2
|
||||
_cargo_dist_version=0.46.1
|
||||
#
|
||||
# Always make sure custom distfiles used for bootstrap are
|
||||
# uploaded to https://alpha.de.repo.voidlinux.org/distfiles/
|
||||
#
|
||||
pkgname=rust
|
||||
version=1.48.0
|
||||
revision=1
|
||||
_rust_dist_version=1.48.0
|
||||
wrksrc="rustc-${version}-src"
|
||||
hostmakedepends="cmake curl pkg-config python3 tar"
|
||||
makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm10"
|
||||
makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm11"
|
||||
depends="rust-std"
|
||||
short_desc="Safe, concurrent, practical systems language"
|
||||
maintainer="Enno Boland <gottox@voidlinux.org>"
|
||||
license="MIT, Apache-2.0"
|
||||
homepage="https://www.rust-lang.org/"
|
||||
distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
|
||||
checksum="2d6a3b7196db474ba3f37b8f5d50a1ecedff00738d7846840605b42bfc922728"
|
||||
checksum="0e763e6db47d5d6f91583284d2f989eacc49b84794d1443355b85c58d67ae43b"
|
||||
lib32disabled=yes
|
||||
patch_args="-Np1"
|
||||
|
||||
build_options="bindist"
|
||||
desc_option_bindist="Generate tarballs for bootstrap"
|
||||
|
||||
# rust upstream no longer ships cargo-versioned tarballs
|
||||
# need to use the corresponding rust version instead
|
||||
_bootstrap_url="https://static.rust-lang.org/dist"
|
||||
_cargo_dist_version="${_rust_dist_version}"
|
||||
|
||||
# 32-bit gnu ppc needs custom bootstrap because of patches
|
||||
case "$XBPS_MACHINE" in
|
||||
x86_64*|i686|ppc64le) ;;
|
||||
ppc*)
|
||||
# custom bootstrap tarballs still use cargo versioning, so override
|
||||
_bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles"
|
||||
_cargo_dist_version="0.49.0"
|
||||
;;
|
||||
esac
|
||||
|
||||
# always use external binary cargo; this allows us to break
|
||||
# the cargo<->rust cycle that appears when cross-compiling
|
||||
distfiles+=" ${_bootstrap_url}/cargo-${_cargo_dist_version}-${RUST_BUILD}.tar.xz"
|
||||
|
||||
case "$XBPS_MACHINE" in
|
||||
i686)
|
||||
checksum+="
|
||||
1eab76df91e87198632605752d0dd66f3d84b502cbd1f982f6db3d0d8d943cdb"
|
||||
;;
|
||||
x86_64)
|
||||
checksum+="
|
||||
b11d595581e2580c069b5039214e1031a0e4f87ff6490ac39f92f77857e37055"
|
||||
;;
|
||||
x86_64-musl)
|
||||
checksum+="
|
||||
8728cb7515e593f6fcf3c7afba826a92cd227a35b8e936bae892b95482d4fb90"
|
||||
;;
|
||||
ppc64le)
|
||||
checksum+="
|
||||
675321cf812a132ce707261d03aab2f5ff64788ae66b45d03bc281514f5d53ec"
|
||||
;;
|
||||
ppc64le-musl)
|
||||
checksum+="
|
||||
cf02e057f04e40458b63326e443c48924c78fc33dcb6b892643d47feb1496b09"
|
||||
;;
|
||||
ppc64)
|
||||
checksum+="
|
||||
1e7612ea1900b76924429fa04fa2c194f4213167933b481001290dd4fef27939"
|
||||
;;
|
||||
ppc64-musl)
|
||||
checksum+="
|
||||
88ffadd53e79055ba266f1303d502bcf1ef863783b121aa017930cadcd0e398d"
|
||||
;;
|
||||
ppc)
|
||||
checksum+="
|
||||
cacacdec7bfd24345804efdd1bd1682084880c3c6a086bcab85cd1186b6cd230"
|
||||
;;
|
||||
ppc-musl)
|
||||
checksum+="
|
||||
bad4a5d22da3c7548fd440d0d5a0b98e4de9894dedb35bfb58aaa5f141c23adb"
|
||||
;;
|
||||
*) broken="cargo bootstrap binary unavailable for ${XBPS_MACHINE}";;
|
||||
esac
|
||||
|
||||
_bootstrap_dir="stage0-bootstrap"
|
||||
|
||||
# as for the rust compiler, just depend on self when crosscompiling...
|
||||
# this is because if we do that, we can skip stage0 build and considerably
|
||||
# cut down the build time (the local-rebuild property is enabled for cross)
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
hostmakedepends+=" cargo llvm10"
|
||||
hostmakedepends+=" rust llvm11"
|
||||
# These are required for building the buildhost's stage0/1
|
||||
hostmakedepends+=" libffi-devel libxml2-devel ncurses-devel zlib-devel"
|
||||
else
|
||||
_bootstrap_url="https://static.rust-lang.org/dist"
|
||||
|
||||
# 32-bit ppc needs custom bootstrap for now because of patches
|
||||
case "$XBPS_MACHINE" in
|
||||
x86_64*|i686|ppc64le) ;;
|
||||
ppc*) _bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles" ;;
|
||||
*) broken="unsupported host: ${XBPS_MACHINE}" ;;
|
||||
esac
|
||||
|
||||
distfiles+="
|
||||
${_bootstrap_url}/rustc-${_rust_dist_version}-${RUST_BUILD}.tar.xz
|
||||
${_bootstrap_url}/rust-std-${_rust_dist_version}-${RUST_BUILD}.tar.xz
|
||||
${_bootstrap_url}/cargo-${_cargo_dist_version}-${RUST_BUILD}.tar.xz"
|
||||
${_bootstrap_url}/rust-std-${_rust_dist_version}-${RUST_BUILD}.tar.xz"
|
||||
|
||||
# checksums must be specified per arch
|
||||
case "$XBPS_MACHINE" in
|
||||
i686)
|
||||
checksum+="
|
||||
72676b7bb6a6ad056af2ad5459b1ac3992b7a65b823ed7f00d4af72266e0f1ad
|
||||
05474dbec0385c8dcfd940e6f8954d4f8284745a4fbcf57932022b1593829463
|
||||
8931dba1c23405fe630aa4ca2aceaba7de74c21cc03947c757b349d004d6a4d6"
|
||||
c241405350bf6f88224db7040012ce25351b332d6deffec07a9b5a958ab19a28
|
||||
d4ea5ca6f9c8f9092b50c879f1d9a2620486f08020fa4cac227743a19f6e8cdf"
|
||||
;;
|
||||
x86_64)
|
||||
checksum+="
|
||||
0be5c8506fd9317c7d0dc8044b5fef8501caa74f88a9a22be795d68362dc57f6
|
||||
02309322467af8e37256ccf1f064f5233c7fca4423dffde0bd5eb32cde46942a
|
||||
a27eb5d47b520ef2c554605bf789f80652af63531b4f6a1195d61b3dfd0f6e9c"
|
||||
fc4d292a52cbb6b84fb9f065d0d7596064a9b957381d639d5a750d6e2bf02483
|
||||
1c00a6a0dabbf6290728b09f9307d9fa6cc985487f727075c68acd4a600ef3f8"
|
||||
;;
|
||||
x86_64-musl)
|
||||
checksum+="
|
||||
9a971ff29e01243b08f6f3c220ab5d608489637a6b5d81ba2e8a78007901ced0
|
||||
e8081032d53baa129c41c4c2bfb025648ac321c9c809f377110f8a26f7ce1cdb
|
||||
895a3b6928a5bf7b1ac28c339a85ddd078dd719f54245b8d845370baf8255368"
|
||||
50c2904db7794400987487ea364392714830f287f3e596a9f8ea9df748dfa8a3
|
||||
4f485d8800f90898705686b873765a4c0fe909d1127d5b091a01979bc32f01c0"
|
||||
;;
|
||||
ppc64le)
|
||||
checksum+="
|
||||
68af3485558636be870a067d0e1196ee34664de1b6e5e6f68aed926c0906574d
|
||||
0a000c2e047c675bee27c2287b2e03fe21148ead95c35b884846a8dc7c3c162d
|
||||
93354ae5cedaa75d44928d5e232cd9a57a9164cadf47d4a30493c05e60b59b7f"
|
||||
bf06c20e09c66391c19de4319de64621c82787e5e44a40ec25fb565a4c6caf28
|
||||
e42b64c5710d3982f22ed744ea21ef2f0196df908c6a673b6df550904583b1c3"
|
||||
;;
|
||||
ppc64le-musl)
|
||||
checksum+="
|
||||
158338268de72108b35ea7b018d99f08be8e7340996a12dc2f4682e06f148fc5
|
||||
5c1225e6fb029008584f4d1813ddcd1bccce2c329b398a02b3bd6ea4e6d9e128
|
||||
12da677338f860362e00089fe5b67ecd619c0ae4a4ca2bd14e500df32f598f49"
|
||||
f6967f8afe25f6beff65f2e139babc253de2c40edf556f615e380f50b4a31da8
|
||||
96311452bb46a855b7afe5883f619d4b768f14c7a5d5de01e15e146fb05d6d59"
|
||||
;;
|
||||
ppc64)
|
||||
checksum+="
|
||||
d474ecedc0783081fa025742b92c459a12f97d2ffc87a83c143df0fa9f4d7212
|
||||
60e32e91c9da0263f69c2b41ba5aa0953b2026fb11118bd1595db062a8c5fa62
|
||||
eab0c2d96f863e3c87afc46d43c54df6614af333b98ee881278acf56d9bf3fe8"
|
||||
13764a670b15480d1d850cc8ae3576536265e1fcac869c1a8fa72a8ebd059193
|
||||
5ce4b14e8895d995c24d3f8706ea9bb6a3ee153bd8d8cec8d808ad66e62162bc"
|
||||
;;
|
||||
ppc64-musl)
|
||||
checksum+="
|
||||
1eecbc8f719a41c905b85dd3723f09e2999cc468deaf4f127614310f0634931f
|
||||
8abdd395a4448c96e64b881921fc0bba0fdb5da133b1973962018316e8fb5cfa
|
||||
48770d0f7941005c87c0ddf303a7eca2fcff4c56cfdaaf60b5d862dfeee2a59d"
|
||||
6b2485c27be4a3d390e8dd4153381304ec3883eb0d9543835b29e0a471e9d4f0
|
||||
e5e513fe1e660856b4a7b133c99c23468bf781b93c69e7a098f600bcb91ce9bb"
|
||||
;;
|
||||
ppc)
|
||||
checksum+="
|
||||
772db024e310835f3a967f6e5a147564f3633c8173e88516f2484d9f1d914f6b
|
||||
e2c0e48421b0e6da709686e8d2a94852821ad483f1f74f27c48c08d012c917ad
|
||||
034af894e980f642e31d35978d8cbb8839fe9c8f1119083a720a58f7ad7fb881"
|
||||
4ea76c15c7225ab113c391fb7640786decf706e256fb9338e5b0c2763286777c
|
||||
5682d27ffc6f6c1655987e154f5425f9114516e22b7797c9e81bf038ffffad21"
|
||||
;;
|
||||
ppc-musl)
|
||||
checksum+="
|
||||
11d34ff8cca6e76e2b307898bc11858f70e5bdadd2746506aa92923d19e03358
|
||||
5c5c3e917339084230ee56b47a9a51fd4e89c5d7227b32f0636b92edd9031980
|
||||
aac08878b9ce3bf7dff4247e988fdaddeaa410cccc8559f8e7e0fd45d8f2ece5"
|
||||
4147cae868df4e936409331ee9e2d81d47529d05a7a2e045d7f566e09eb4f302
|
||||
20132e5c67a67399e7945ba17d698a6aa1833f87b89bfc8a5a1678d75cfc637d"
|
||||
;;
|
||||
*) broken="rust bootstrap binaries unavailable for ${XBPS_MACHINE}";;
|
||||
esac
|
||||
fi
|
||||
|
||||
post_extract() {
|
||||
mkdir -p "${wrksrc}/${_bootstrap_dir}/bin"
|
||||
if [ -z "$CROSS_BUILD" ]; then
|
||||
mkdir -p "${wrksrc}/${_bootstrap_dir}"
|
||||
../rust-std-${_rust_dist_version}-${RUST_BUILD}/install.sh \
|
||||
--destdir="${wrksrc}/${_bootstrap_dir}" --prefix=/ --disable-ldconfig
|
||||
../rustc-${_rust_dist_version}-${RUST_BUILD}/install.sh \
|
||||
--destdir="${wrksrc}/${_bootstrap_dir}" --prefix=/ --disable-ldconfig
|
||||
# cargo may not be packaged like the rest
|
||||
cp ../cargo-${_cargo_dist_version}-${RUST_BUILD}/cargo/bin/cargo \
|
||||
"${wrksrc}/${_bootstrap_dir}/bin"
|
||||
fi
|
||||
# cargo may not be packaged like the rest
|
||||
cp ../cargo-${_cargo_dist_version}-${RUST_BUILD}/cargo/bin/cargo \
|
||||
"${wrksrc}/${_bootstrap_dir}/bin"
|
||||
}
|
||||
|
||||
# we need this because cargo verifies checksums of all files in vendor
|
||||
|
@ -138,12 +183,10 @@ post_patch() {
|
|||
# clear out all the checksum nonsense of patched vendor crates
|
||||
_clear_vendor_checksums libc
|
||||
_clear_vendor_checksums typenum
|
||||
_clear_vendor_checksums backtrace-sys
|
||||
_clear_vendor_checksums lzma-sys
|
||||
}
|
||||
|
||||
do_configure() {
|
||||
local _rust_root _local_rebuild _use_debug _use_debug_rustc _use_rpath
|
||||
local _cargo_root _rust_root _local_rebuild _use_debug _use_debug_rustc _use_rpath _use_docs
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
_rust_root="/usr"
|
||||
|
@ -153,6 +196,8 @@ do_configure() {
|
|||
_local_rebuild="false"
|
||||
fi
|
||||
|
||||
_cargo_root="${wrksrc}/${_bootstrap_dir}"
|
||||
|
||||
# disable rustc debug info as it bloats up rust-std significantly
|
||||
# set to 1 or 2 if you wish to have debug info for rustc, it won't
|
||||
# link on 32-bit platforms though (too big)
|
||||
|
@ -170,8 +215,10 @@ do_configure() {
|
|||
# packaging but is useful when building bootstrap binaries
|
||||
if [ "$build_option_bindist" ]; then
|
||||
_use_rpath="true"
|
||||
_use_docs="false"
|
||||
else
|
||||
_use_rpath="false"
|
||||
_use_docs="true"
|
||||
fi
|
||||
|
||||
cat > config.toml <<- EOF
|
||||
|
@ -179,7 +226,7 @@ do_configure() {
|
|||
build = "${RUST_BUILD}"
|
||||
host = [ "${RUST_TARGET}" ]
|
||||
target = [ "${RUST_TARGET}" ]
|
||||
cargo = "${_rust_root}/bin/cargo"
|
||||
cargo = "${_cargo_root}/bin/cargo"
|
||||
rustc = "${_rust_root}/bin/rustc"
|
||||
submodules = false
|
||||
python = "python3"
|
||||
|
@ -188,7 +235,7 @@ do_configure() {
|
|||
full-bootstrap = false
|
||||
local-rebuild = ${_local_rebuild}
|
||||
extended = false
|
||||
docs = false
|
||||
docs = ${_use_docs}
|
||||
tools = []
|
||||
[install]
|
||||
prefix = "/usr"
|
||||
|
@ -284,7 +331,9 @@ do_install() {
|
|||
tar xf build/dist/rust-std-${version}-${RUST_TARGET}.tar.gz \
|
||||
-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
|
||||
-C "$DESTDIR/usr/lib" --strip-components=3 --exclude=manifest.in
|
||||
tar xf build/dist/rust-docs-${version}-${RUST_TARGET}.tar.gz \
|
||||
-C "$DESTDIR/usr" --strip-components=2 --exclude=manifest.in
|
||||
|
||||
vlicense COPYRIGHT
|
||||
vlicense LICENSE-APACHE
|
||||
|
@ -298,7 +347,6 @@ do_install() {
|
|||
|
||||
rust-doc_package() {
|
||||
short_desc+=" - documentation"
|
||||
archs=noarch
|
||||
pkg_install() {
|
||||
vmove usr/share/doc
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue