From e7eeaa2bc763c78113cf811f7b26a5dab2b454fe Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Sun, 5 Feb 2023 14:11:22 +0100 Subject: [PATCH] rust: update to 1.68.2 --- ...dlib-and-musl_root-from-musl-targets.patch | 75 ++-- ...e-ELFv2-ABI-on-all-powerpc64-targets.patch | 27 +- ...le-initial-exec-TLS-model-on-powerpc.patch | 9 +- .../patches/0015-initial-ppcle-port.patch | 379 ------------------ srcpkgs/rust/template | 13 +- 5 files changed, 49 insertions(+), 454 deletions(-) delete mode 100644 srcpkgs/rust/patches/0015-initial-ppcle-port.patch diff --git a/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch index c156945b811..1759147c989 100644 --- a/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch +++ b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch @@ -17,14 +17,14 @@ extended by various void contributors to match our musl setup 9 files changed, 3 insertions(+), 181 deletions(-) diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs -index 52ac3622e..f35e5b9d8 100644 +index c126390f5..7aef73d3b 100644 --- a/compiler/rustc_target/src/spec/crt_objects.rs +++ b/compiler/rustc_target/src/spec/crt_objects.rs @@ -63,28 +63,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects { ]) } --pub(super) fn pre_musl_fallback() -> CrtObjects { +-pub(super) fn pre_musl_self_contained() -> CrtObjects { - new(&[ - (LinkOutputKind::DynamicNoPicExe, &["crt1.o", "crti.o", "crtbegin.o"]), - (LinkOutputKind::DynamicPicExe, &["Scrt1.o", "crti.o", "crtbeginS.o"]), @@ -35,7 +35,7 @@ index 52ac3622e..f35e5b9d8 100644 - ]) -} - --pub(super) fn post_musl_fallback() -> CrtObjects { +-pub(super) fn post_musl_self_contained() -> CrtObjects { - new(&[ - (LinkOutputKind::DynamicNoPicExe, &["crtend.o", "crtn.o"]), - (LinkOutputKind::DynamicPicExe, &["crtendS.o", "crtn.o"]), @@ -46,24 +46,24 @@ index 52ac3622e..f35e5b9d8 100644 - ]) -} - - pub(super) fn pre_mingw_fallback() -> CrtObjects { + pub(super) fn pre_mingw_self_contained() -> CrtObjects { new(&[ (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]), diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs -index 207a87ab0..88f807a58 100644 +index 61553e71b..88f807a58 100644 --- a/compiler/rustc_target/src/spec/linux_musl_base.rs +++ b/compiler/rustc_target/src/spec/linux_musl_base.rs @@ -1,16 +1,9 @@ --use crate::spec::crt_objects::{self, CrtObjectsFallback}; +-use crate::spec::crt_objects::{self, LinkSelfContainedDefault}; use crate::spec::TargetOptions; pub fn opts() -> TargetOptions { let mut base = super::linux_base::opts(); base.env = "musl".into(); -- base.pre_link_objects_fallback = crt_objects::pre_musl_fallback(); -- base.post_link_objects_fallback = crt_objects::post_musl_fallback(); -- base.crt_objects_fallback = Some(CrtObjectsFallback::Musl); +- base.pre_link_objects_self_contained = crt_objects::pre_musl_self_contained(); +- base.post_link_objects_self_contained = crt_objects::post_musl_self_contained(); +- base.link_self_contained = LinkSelfContainedDefault::Musl; - - // These targets statically link libc by default - base.crt_static_default = true; @@ -71,11 +71,11 @@ index 207a87ab0..88f807a58 100644 base } diff --git a/config.toml.example b/config.toml.example -index b3284050f..62ac07f87 100644 +index ca54cbd2d..beec9bb04 100644 --- a/config.toml.example +++ b/config.toml.example -@@ -523,14 +523,6 @@ changelog-seen = 2 - # supplementary build information, like distro-specific package versions. +@@ -540,14 +540,6 @@ changelog-seen = 2 + # behavior -- this may lead to miscompilations or other bugs. #description = (string) -# The root location of the musl installation directory. The library directory @@ -90,10 +90,10 @@ index b3284050f..62ac07f87 100644 # 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 -index dca782c29..8eb35ea43 100644 +index 7128d542a..668245f3c 100644 --- a/src/bootstrap/cc_detect.rs +++ b/src/bootstrap/cc_detect.rs -@@ -97,7 +97,7 @@ pub fn find(build: &mut Build) { +@@ -101,7 +101,7 @@ pub fn find(build: &mut Build) { if let Some(cc) = config.and_then(|c| c.cc.as_ref()) { cfg.compiler(cc); } else { @@ -102,7 +102,7 @@ index dca782c29..8eb35ea43 100644 } let compiler = cfg.get_compiler(); -@@ -125,7 +125,7 @@ pub fn find(build: &mut Build) { +@@ -122,7 +122,7 @@ pub fn find(build: &mut Build) { cfg.compiler(cxx); true } else if build.hosts.contains(&target) || build.build == target { @@ -111,7 +111,7 @@ index dca782c29..8eb35ea43 100644 true } else { // Use an auto-detected compiler (or one configured via `CXX_target_triple` env vars). -@@ -161,7 +161,6 @@ fn set_compiler( +@@ -158,7 +158,6 @@ fn set_compiler( compiler: Language, target: TargetSelection, config: Option<&Target>, @@ -119,7 +119,7 @@ index dca782c29..8eb35ea43 100644 ) { match &*target.triple { // When compiling for android we may have the NDK configured in the -@@ -204,26 +203,6 @@ fn set_compiler( +@@ -194,26 +193,6 @@ fn set_compiler( } } @@ -147,10 +147,10 @@ index dca782c29..8eb35ea43 100644 } } diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs -index b4807d1ab..ce483bf6b 100644 +index 0deed3f99..0bddac5d1 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs -@@ -200,39 +200,7 @@ fn copy_self_contained_objects( +@@ -228,39 +228,7 @@ fn copy_self_contained_objects( let mut target_deps = vec![]; // Copies the libc and CRT objects. @@ -191,7 +191,7 @@ index b4807d1ab..ce483bf6b 100644 let srcdir = builder .wasi_root(target) .unwrap_or_else(|| { -@@ -316,15 +284,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car +@@ -344,15 +312,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car .arg("--manifest-path") .arg(builder.src.join("library/test/Cargo.toml")); @@ -208,10 +208,10 @@ index b4807d1ab..ce483bf6b 100644 if let Some(p) = builder.wasi_root(target) { let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap()); diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs -index 146077419..18a764689 100644 +index d8c15c76e..53f95e49b 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs -@@ -186,7 +186,6 @@ pub struct Config { +@@ -200,7 +200,6 @@ pub struct Config { pub missing_tools: bool, // Fallback musl-root for all targets @@ -219,7 +219,7 @@ index 146077419..18a764689 100644 pub prefix: Option, pub sysconfdir: Option, pub datadir: Option, -@@ -400,8 +399,6 @@ pub struct Target { +@@ -440,8 +439,6 @@ pub struct Target { pub sanitizers: Option, pub profiler: Option, pub crt_static: Option, @@ -228,7 +228,7 @@ index 146077419..18a764689 100644 pub wasi_root: Option, pub qemu_rootfs: Option, pub no_std: bool, -@@ -689,7 +686,6 @@ define_config! { +@@ -734,7 +731,6 @@ define_config! { default_linker: Option = "default-linker", channel: Option = "channel", description: Option = "description", @@ -236,7 +236,7 @@ index 146077419..18a764689 100644 rpath: Option = "rpath", verbose_tests: Option = "verbose-tests", optimize_tests: Option = "optimize-tests", -@@ -734,8 +730,6 @@ define_config! { +@@ -781,8 +777,6 @@ define_config! { sanitizers: Option = "sanitizers", profiler: Option = "profiler", crt_static: Option = "crt-static", @@ -245,7 +245,7 @@ index 146077419..18a764689 100644 wasi_root: Option = "wasi-root", qemu_rootfs: Option = "qemu-rootfs", no_std: Option = "no-std", -@@ -1107,7 +1101,6 @@ impl Config { +@@ -1187,7 +1181,6 @@ impl Config { 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; @@ -253,7 +253,7 @@ index 146077419..18a764689 100644 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); -@@ -1164,8 +1157,6 @@ impl Config { +@@ -1251,8 +1244,6 @@ impl Config { target.ranlib = cfg.ranlib.map(PathBuf::from); target.linker = cfg.linker.map(PathBuf::from); target.crt_static = cfg.crt_static; @@ -263,10 +263,10 @@ index 146077419..18a764689 100644 target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from); target.sanitizers = cfg.sanitizers; diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py -index 2fc036082..91737e0ea 100755 +index 6b139decb..a2e19b8f4 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py -@@ -114,34 +114,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk", +@@ -112,34 +112,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk", "aarch64-linux-android NDK standalone path") v("x86_64-linux-android-ndk", "target.x86_64-linux-android.android-ndk", "x86_64-linux-android NDK standalone path") @@ -302,10 +302,10 @@ index 2fc036082..91737e0ea 100755 "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 b603ae90a..0a7012dbd 100644 +index 3ed534523..c7c7a75f0 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs -@@ -1153,25 +1153,6 @@ impl Build { +@@ -1181,25 +1181,6 @@ impl Build { } } @@ -332,7 +332,7 @@ index b603ae90a..0a7012dbd 100644 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 64c5dd7ae..b8f9104ea 100644 +index 8a40b0f64..59e11d304 100644 --- a/src/bootstrap/sanity.rs +++ b/src/bootstrap/sanity.rs @@ -11,7 +11,6 @@ @@ -343,7 +343,7 @@ index 64c5dd7ae..b8f9104ea 100644 use std::path::PathBuf; use std::process::Command; -@@ -190,28 +189,6 @@ than building it. +@@ -205,28 +204,6 @@ than building it. } } @@ -369,9 +369,6 @@ index 64c5dd7ae..b8f9104ea 100644 - } - } - - if need_cmake && target.contains("msvc") { - // There are three builds of cmake on windows: MSVC, MinGW, and - // Cygwin. The Cygwin build does not have generators for Visual --- -2.37.2 - + // Some environments don't want or need these tools, such as when testing Miri. + // FIXME: it would be better to refactor this code to split necessary setup from pure sanity + // checks, and have a regular flag for skipping the latter. Also see diff --git a/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch index 347ee613983..9bff1dbd250 100644 --- a/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch +++ b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch @@ -13,7 +13,7 @@ so at least match the environment we have. 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/compiler/rustc_target/src/abi/call/powerpc64.rs b/compiler/rustc_target/src/abi/call/powerpc64.rs -index c22ef9c8f..932172b2f 100644 +index 359bb8fc0..414c70cea 100644 --- a/compiler/rustc_target/src/abi/call/powerpc64.rs +++ b/compiler/rustc_target/src/abi/call/powerpc64.rs @@ -119,14 +119,7 @@ where @@ -32,28 +32,3 @@ index c22ef9c8f..932172b2f 100644 if !fn_abi.ret.is_ignore() { classify_ret(cx, &mut fn_abi.ret, abi); -diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs -index 24d5d187e..aa594b02e 100644 ---- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs -+++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs -@@ -1,5 +1,5 @@ - use crate::abi::Endian; --use crate::spec::{LinkerFlavor, RelroLevel, Target, TargetOptions}; -+use crate::spec::{LinkerFlavor, Target, TargetOptions}; - - pub fn target() -> Target { - let mut base = super::linux_gnu_base::opts(); -@@ -7,10 +7,6 @@ pub fn target() -> Target { - base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m64".into()); - base.max_atomic_width = Some(64); - -- // ld.so in at least RHEL6 on ppc64 has a bug related to BIND_NOW, so only enable partial RELRO -- // for now. https://github.com/rust-lang/rust/pull/43170#issuecomment-315411474 -- base.relro_level = RelroLevel::Partial; -- - Target { - llvm_target: "powerpc64-unknown-linux-gnu".into(), - pointer_width: 64, --- -2.37.2 - diff --git a/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch index 7b1ba46b1f2..998090a3a59 100644 --- a/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch +++ b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch @@ -9,18 +9,15 @@ Fixes #81334. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs -index 554dd4188..6a02a225c 100644 +index 8b144f146..acfa7cf04 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs -@@ -1844,7 +1844,7 @@ impl<'a> Builder<'a> { +@@ -1856,7 +1856,7 @@ impl<'a> Builder<'a> { // efficient initial-exec TLS model. This doesn't work with `dlopen`, // so we can't use it by default in general, but we can use it for tools // and our own internal libraries. - if !mode.must_support_dlopen() && !target.triple.starts_with("powerpc-") { + if !mode.must_support_dlopen() && !target.triple.starts_with("powerpc-") && !target.triple.starts_with("powerpcle-") { - rustflags.arg("-Ztls-model=initial-exec"); + cargo.env("RUSTC_TLS_MODEL_INITIAL_EXEC", "1"); } --- -2.37.2 - diff --git a/srcpkgs/rust/patches/0015-initial-ppcle-port.patch b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch deleted file mode 100644 index dd6b72e21bc..00000000000 --- a/srcpkgs/rust/patches/0015-initial-ppcle-port.patch +++ /dev/null @@ -1,379 +0,0 @@ -From 2b3b4a11dd75ff43e0f1f12de395d0ce29f8555f Mon Sep 17 00:00:00 2001 -From: Daniel Kolesa -Date: Sat, 3 Jul 2021 21:02:03 +0200 -Subject: [PATCH 15/15] initial ppcle port - ---- - compiler/rustc_middle/src/ty/layout.rs | 5 ++++- - compiler/rustc_target/src/spec/mod.rs | 2 ++ - .../src/spec/powerpcle_unknown_linux_gnu.rs | 15 +++++++++++++++ - .../src/spec/powerpcle_unknown_linux_musl.rs | 15 +++++++++++++++ - src/bootstrap/bootstrap.py | 2 ++ - .../codegen/abi-main-signature-16bit-c-int.rs | 1 + - src/test/codegen/global_asm.rs | 1 + - src/test/codegen/global_asm_include.rs | 1 + - src/test/codegen/global_asm_x2.rs | 1 + - src/test/codegen/repr-transparent-aggregates-1.rs | 1 + - src/test/codegen/repr-transparent-aggregates-2.rs | 1 + - src/test/codegen/stack-probes.rs | 1 + - .../run-make-fulldeps/atomic-lock-free/Makefile | 2 ++ - src/test/ui/abi/stack-probes-lto.rs | 1 + - src/test/ui/abi/stack-probes.rs | 1 + - src/test/ui/target-feature/gate.rs | 1 + - src/test/ui/target-feature/invalid-attribute.rs | 1 + - src/tools/compiletest/src/util.rs | 1 + - vendor/cc/src/lib.rs | 1 + - vendor/target-lexicon/src/targets.rs | 7 +++++++ - vendor/tikv-jemallocator/benches/roundtrip.rs | 3 ++- - vendor/tikv-jemallocator/src/lib.rs | 3 ++- - 22 files changed, 64 insertions(+), 3 deletions(-) - create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs - create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs - -diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs -index 3b05e42a5..66420f507 100644 ---- a/compiler/rustc_middle/src/ty/layout.rs -+++ b/compiler/rustc_middle/src/ty/layout.rs -@@ -3205,6 +3205,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> { - target.os == "linux" && target.arch == "sparc64" && target_env_gnu_like; - let linux_powerpc_gnu_like = - target.os == "linux" && target.arch == "powerpc" && target_env_gnu_like; -+ let linux_powerpcle_gnu_like = -+ target.os == "linux" && target.arch == "powerpcle" && target_env_gnu_like; - use SpecAbi::*; - let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall); - -@@ -3311,7 +3313,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> { - || (!win_x64_gnu - && !linux_s390x_gnu_like - && !linux_sparc64_gnu_like -- && !linux_powerpc_gnu_like) -+ && !linux_powerpc_gnu_like -+ && !linux_powerpcle_gnu_like) - { - arg.mode = PassMode::Ignore; - } -diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs -index da0589cdd..2db403913 100644 ---- a/compiler/rustc_target/src/spec/mod.rs -+++ b/compiler/rustc_target/src/spec/mod.rs -@@ -831,6 +831,8 @@ supported_targets! { - ("powerpc-unknown-linux-gnu", powerpc_unknown_linux_gnu), - ("powerpc-unknown-linux-gnuspe", powerpc_unknown_linux_gnuspe), - ("powerpc-unknown-linux-musl", powerpc_unknown_linux_musl), -+ ("powerpcle-unknown-linux-gnu", powerpcle_unknown_linux_gnu), -+ ("powerpcle-unknown-linux-musl", powerpcle_unknown_linux_musl), - ("powerpc64-unknown-linux-gnu", powerpc64_unknown_linux_gnu), - ("powerpc64-unknown-linux-musl", powerpc64_unknown_linux_musl), - ("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu), -diff --git a/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs -new file mode 100644 -index 000000000..b7148a2fc ---- /dev/null -+++ b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs -@@ -0,0 +1,15 @@ -+use crate::spec::{LinkerFlavor, Target, TargetOptions}; -+ -+pub fn target() -> Target { -+ let mut base = super::linux_gnu_base::opts(); -+ base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".into()); -+ base.max_atomic_width = Some(32); -+ -+ Target { -+ llvm_target: "powerpcle-unknown-linux-gnu".into(), -+ pointer_width: 32, -+ data_layout: "e-m:e-p:32:32-i64:64-n32".into(), -+ arch: "powerpc".into(), -+ options: TargetOptions { mcount: "_mcount".into(), ..base }, -+ } -+} -diff --git a/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs -new file mode 100644 -index 000000000..a826b6e47 ---- /dev/null -+++ b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs -@@ -0,0 +1,15 @@ -+use crate::spec::{LinkerFlavor, Target, TargetOptions}; -+ -+pub fn target() -> Target { -+ let mut base = super::linux_musl_base::opts(); -+ base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".into()); -+ base.max_atomic_width = Some(32); -+ -+ Target { -+ llvm_target: "powerpcle-unknown-linux-musl".into(), -+ pointer_width: 32, -+ data_layout: "e-m:e-p:32:32-i64:64-n32".into(), -+ arch: "powerpc".into(), -+ options: TargetOptions { mcount: "_mcount".into(), ..base }, -+ } -+} -diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py -index 3501fd901..a28f456d3 100644 ---- a/src/bootstrap/bootstrap.py -+++ b/src/bootstrap/bootstrap.py -@@ -339,9 +339,11 @@ def default_build_triple(verbose): - 'i786': 'i686', - 'm68k': 'm68k', - 'powerpc': 'powerpc', -+ 'powerpcle': 'powerpcle', - 'powerpc64': 'powerpc64', - 'powerpc64le': 'powerpc64le', - 'ppc': 'powerpc', -+ 'ppcle': 'powerpcle', - 'ppc64': 'powerpc64', - 'ppc64le': 'powerpc64le', - 'riscv64': 'riscv64gc', -diff --git a/src/test/codegen/abi-main-signature-16bit-c-int.rs b/src/test/codegen/abi-main-signature-16bit-c-int.rs -index 4ed491dfb..82ec7755d 100644 ---- a/src/test/codegen/abi-main-signature-16bit-c-int.rs -+++ b/src/test/codegen/abi-main-signature-16bit-c-int.rs -@@ -9,6 +9,7 @@ - // ignore-mips - // ignore-mips64 - // ignore-powerpc -+// ignore-powerpcle - // ignore-powerpc64 - // ignore-riscv64 - // ignore-s390x -diff --git a/src/test/codegen/global_asm.rs b/src/test/codegen/global_asm.rs -index fab84868f..104d93d01 100644 ---- a/src/test/codegen/global_asm.rs -+++ b/src/test/codegen/global_asm.rs -@@ -12,6 +12,7 @@ - // ignore-powerpc64 - // ignore-powerpc64le - // ignore-powerpc -+// ignore-powerpcle - // ignore-r600 - // ignore-amdgcn - // ignore-sparc -diff --git a/src/test/codegen/global_asm_include.rs b/src/test/codegen/global_asm_include.rs -index 02ee91645..13f303332 100644 ---- a/src/test/codegen/global_asm_include.rs -+++ b/src/test/codegen/global_asm_include.rs -@@ -12,6 +12,7 @@ - // ignore-powerpc64 - // ignore-powerpc64le - // ignore-powerpc -+// ignore-powerpcle - // ignore-r600 - // ignore-amdgcn - // ignore-sparc -diff --git a/src/test/codegen/global_asm_x2.rs b/src/test/codegen/global_asm_x2.rs -index bdcf0ea84..1e2ff8b8d 100644 ---- a/src/test/codegen/global_asm_x2.rs -+++ b/src/test/codegen/global_asm_x2.rs -@@ -12,6 +12,7 @@ - // ignore-powerpc64 - // ignore-powerpc64le - // ignore-powerpc -+// ignore-powerpcle - // ignore-r600 - // ignore-amdgcn - // ignore-sparc -diff --git a/src/test/codegen/repr-transparent-aggregates-1.rs b/src/test/codegen/repr-transparent-aggregates-1.rs -index 9d18c5f03..8e69d2afd 100644 ---- a/src/test/codegen/repr-transparent-aggregates-1.rs -+++ b/src/test/codegen/repr-transparent-aggregates-1.rs -@@ -6,6 +6,7 @@ - // ignore-mips - // ignore-mips64 - // ignore-powerpc -+// ignore-powerpcle - // ignore-powerpc64 - // ignore-riscv64 see codegen/riscv-abi - // ignore-windows -diff --git a/src/test/codegen/repr-transparent-aggregates-2.rs b/src/test/codegen/repr-transparent-aggregates-2.rs -index b68e8e9eb..97c509b1b 100644 ---- a/src/test/codegen/repr-transparent-aggregates-2.rs -+++ b/src/test/codegen/repr-transparent-aggregates-2.rs -@@ -5,6 +5,7 @@ - // ignore-emscripten - // ignore-mips64 - // ignore-powerpc -+// ignore-powerpcle - // ignore-powerpc64 - // ignore-powerpc64le - // ignore-riscv64 see codegen/riscv-abi -diff --git a/src/test/codegen/stack-probes.rs b/src/test/codegen/stack-probes.rs -index 9bd351df3..29073eb56 100644 ---- a/src/test/codegen/stack-probes.rs -+++ b/src/test/codegen/stack-probes.rs -@@ -3,6 +3,7 @@ - // ignore-mips - // ignore-mips64 - // ignore-powerpc -+// ignore-powerpcle - // ignore-powerpc64 - // ignore-powerpc64le - // ignore-riscv64 -diff --git a/src/test/run-make-fulldeps/atomic-lock-free/Makefile b/src/test/run-make-fulldeps/atomic-lock-free/Makefile -index 9e8b4fabf..402d37a45 100644 ---- a/src/test/run-make-fulldeps/atomic-lock-free/Makefile -+++ b/src/test/run-make-fulldeps/atomic-lock-free/Makefile -@@ -36,6 +36,8 @@ ifeq ($(filter powerpc,$(LLVM_COMPONENTS)),powerpc) - nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add - $(RUSTC) --target=powerpc-unknown-linux-gnuspe atomic_lock_free.rs - nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add -+ $(RUSTC) --target=powerpcle-unknown-linux-gnu atomic_lock_free.rs -+ nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add - $(RUSTC) --target=powerpc64-unknown-linux-gnu atomic_lock_free.rs - nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add - $(RUSTC) --target=powerpc64le-unknown-linux-gnu atomic_lock_free.rs -diff --git a/src/test/ui/abi/stack-probes-lto.rs b/src/test/ui/abi/stack-probes-lto.rs -index 90df1f3f5..8c6dda8b8 100644 ---- a/src/test/ui/abi/stack-probes-lto.rs -+++ b/src/test/ui/abi/stack-probes-lto.rs -@@ -4,6 +4,7 @@ - // ignore-mips - // ignore-mips64 - // ignore-powerpc -+// ignore-powerpcle - // ignore-s390x - // ignore-sparc - // ignore-sparc64 -diff --git a/src/test/ui/abi/stack-probes.rs b/src/test/ui/abi/stack-probes.rs -index e998dd0f8..9472e5387 100644 ---- a/src/test/ui/abi/stack-probes.rs -+++ b/src/test/ui/abi/stack-probes.rs -@@ -4,6 +4,7 @@ - // ignore-mips - // ignore-mips64 - // ignore-powerpc -+// ignore-powerpcle - // ignore-s390x - // ignore-sparc - // ignore-sparc64 -diff --git a/src/test/ui/target-feature/gate.rs b/src/test/ui/target-feature/gate.rs -index 2382c98f8..e6fe855d7 100644 ---- a/src/test/ui/target-feature/gate.rs -+++ b/src/test/ui/target-feature/gate.rs -@@ -5,6 +5,7 @@ - // ignore-mips - // ignore-mips64 - // ignore-powerpc -+// ignore-powerpcle - // ignore-powerpc64 - // ignore-powerpc64le - // ignore-riscv64 -diff --git a/src/test/ui/target-feature/invalid-attribute.rs b/src/test/ui/target-feature/invalid-attribute.rs -index ad1b6e96b..122d59a57 100644 ---- a/src/test/ui/target-feature/invalid-attribute.rs -+++ b/src/test/ui/target-feature/invalid-attribute.rs -@@ -5,6 +5,7 @@ - // ignore-mips - // ignore-mips64 - // ignore-powerpc -+// ignore-powerpcle - // ignore-powerpc64 - // ignore-powerpc64le - // ignore-riscv64 -diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs -index 215af347f..a1c7e4c6a 100644 ---- a/src/tools/compiletest/src/util.rs -+++ b/src/tools/compiletest/src/util.rs -@@ -71,6 +71,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[ - ("msp430", "msp430"), - ("nvptx64", "nvptx64"), - ("powerpc", "powerpc"), -+ ("powerpcle", "powerpc"), - ("powerpc64", "powerpc64"), - ("powerpc64le", "powerpc64"), - ("riscv64gc", "riscv64"), -diff --git a/vendor/cc/src/lib.rs b/vendor/cc/src/lib.rs -index e3a2b98b0..0236729fd 100644 ---- a/vendor/cc/src/lib.rs -+++ b/vendor/cc/src/lib.rs -@@ -2594,6 +2594,7 @@ impl Build { - "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"), - "powerpc-unknown-linux-gnuspe" => Some("powerpc-linux-gnuspe"), - "powerpc-unknown-netbsd" => Some("powerpc--netbsd"), -+ "powerpcle-unknown-linux-gnu" => Some("powerpcle-linux-gnu"), - "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"), - "powerpc64le-unknown-linux-gnu" => Some("powerpc64le-linux-gnu"), - "riscv32i-unknown-none-elf" => self.find_working_gnu_prefix(&[ -diff --git a/vendor/target-lexicon/src/targets.rs b/vendor/target-lexicon/src/targets.rs -index 22cc95cc3..46167e34e 100644 ---- a/vendor/target-lexicon/src/targets.rs -+++ b/vendor/target-lexicon/src/targets.rs -@@ -29,6 +29,7 @@ pub enum Architecture { - Msp430, - Nvptx64, - Powerpc, -+ Powerpcle, - Powerpc64, - Powerpc64le, - Riscv32(Riscv32Architecture), -@@ -533,6 +534,7 @@ impl Architecture { - | Mips64(Mips64Architecture::Mipsisa64r6el) - | Msp430 - | Nvptx64 -+ | Powerpcle - | Powerpc64le - | Riscv32(_) - | Riscv64(_) -@@ -574,6 +576,7 @@ impl Architecture { - | M68k - | Mips32(_) - | Powerpc -+ | Powerpcle - | XTensa => Ok(PointerWidth::U32), - AmdGcn - | Bpfeb -@@ -763,6 +766,7 @@ impl fmt::Display for Architecture { - Msp430 => f.write_str("msp430"), - Nvptx64 => f.write_str("nvptx64"), - Powerpc => f.write_str("powerpc"), -+ Powerpcle => f.write_str("powerpcle"), - Powerpc64 => f.write_str("powerpc64"), - Powerpc64le => f.write_str("powerpc64le"), - Riscv32(riscv32) => riscv32.fmt(f), -@@ -943,6 +947,7 @@ impl FromStr for Architecture { - "msp430" => Msp430, - "nvptx64" => Nvptx64, - "powerpc" => Powerpc, -+ "powerpcle" => Powerpcle, - "powerpc64" => Powerpc64, - "powerpc64le" => Powerpc64le, - "s390x" => S390x, -@@ -1445,6 +1450,8 @@ mod tests { - "powerpc-unknown-openbsd", - "powerpc-wrs-vxworks", - "powerpc-wrs-vxworks-spe", -+ "powerpcle-unknown-linux-gnu", -+ "powerpcle-unknown-linux-musl", - "powerpc64-unknown-freebsd", - "powerpc64-unknown-linux-gnu", - "powerpc64-unknown-linux-musl", -diff --git a/vendor/tikv-jemallocator/benches/roundtrip.rs b/vendor/tikv-jemallocator/benches/roundtrip.rs -index 767abe8d4..704bf955a 100644 ---- a/vendor/tikv-jemallocator/benches/roundtrip.rs -+++ b/vendor/tikv-jemallocator/benches/roundtrip.rs -@@ -22,7 +22,8 @@ static A: Jemalloc = Jemalloc; - target_arch = "arm", - target_arch = "mips", - target_arch = "mipsel", -- target_arch = "powerpc" -+ target_arch = "powerpc", -+ target_arch = "powerpcle", - )))] - const MIN_ALIGN: usize = 8; - #[cfg(all(any( -diff --git a/vendor/tikv-jemallocator/src/lib.rs b/vendor/tikv-jemallocator/src/lib.rs -index 4a9397331..4cf47c05d 100644 ---- a/vendor/tikv-jemallocator/src/lib.rs -+++ b/vendor/tikv-jemallocator/src/lib.rs -@@ -46,7 +46,8 @@ use libc::{c_int, c_void}; - target_arch = "arm", - target_arch = "mips", - target_arch = "mipsel", -- target_arch = "powerpc" -+ target_arch = "powerpc", -+ target_arch = "powerpcle", - )))] - const ALIGNOF_MAX_ALIGN_T: usize = 8; - #[cfg(all(any( --- -2.37.2 - diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template index 8e639c48647..1e2e4ffc2e6 100644 --- a/srcpkgs/rust/template +++ b/srcpkgs/rust/template @@ -8,17 +8,17 @@ # uploaded to https://repo-default.voidlinux.org/distfiles/ # pkgname=rust -version=1.64.0 +version=1.68.2 revision=1 hostmakedepends="cmake curl pkg-config python3 tar cargo-bootstrap" -makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm12" +makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm15" depends="rust-std" short_desc="Safe, concurrent, practical systems language" maintainer="Enno Boland " license="MIT, Apache-2.0" homepage="https://www.rust-lang.org/" distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz" -checksum=b3cd9f481e1a2901bf6f3808d30c69cc4ea80d93c4cc4e2ed52258b180381205 +checksum=93339c23f7cd4d0c45db58e18b4c6e16d6070f4277aad9d2492d23294bf32e96 lib32disabled=yes make_check=no # CBA for now @@ -33,13 +33,18 @@ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then fi if [ "$CROSS_BUILD" ]; then - hostmakedepends+=" rust llvm12" + hostmakedepends+=" rust llvm15" # These are required for building the buildhost's stage0/1 hostmakedepends+=" libffi-devel libxml2-devel ncurses-devel zlib-devel" else hostmakedepends+=" rust-bootstrap" fi +# see https://github.com/rust-lang/rust/commit/1db81713f6475bebd0ae689ac7139c53d2843c48 +case "$XBPS_TARGET_MACHINE" in + armv*) makedepends+=" libatomic-devel" ;; +esac + # we need this because cargo verifies checksums of all files in vendor # crates when it builds and gives us no way to override or update the # file sanely... so just clear out the file list