diff options
author | Donald Hoskins <grommish@gmail.com> | 2022-07-18 01:07:17 +0000 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2022-09-11 13:16:26 +0200 |
commit | 5bbd4b2038f612218895e2ceb6c80ae80ea8a6b6 (patch) | |
tree | fb57301b720ff425a7c939ca0d15f0e6327bc8b2 /lang/rust_host/patches/14-add_powerpc.patch | |
parent | 29035353ba7e200ea35bb656d5f7b4f8406d5dca (diff) |
rust: Updste to 1.62.0
Diffstat (limited to 'lang/rust_host/patches/14-add_powerpc.patch')
-rw-r--r-- | lang/rust_host/patches/14-add_powerpc.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lang/rust_host/patches/14-add_powerpc.patch b/lang/rust_host/patches/14-add_powerpc.patch new file mode 100644 index 0000000..5ad20d4 --- /dev/null +++ b/lang/rust_host/patches/14-add_powerpc.patch @@ -0,0 +1,29 @@ +--- a/compiler/rustc_target/src/spec/mod.rs ++++ b/compiler/rustc_target/src/spec/mod.rs +@@ -1034,6 +1034,7 @@ supported_targets! { + ("arm-openwrt-linux-muslgnueabihf", arm_openwrt_linux_muslgnueabihf), + ("armv5tej-openwrt-linux-muslgnueabi", armv5tej_openwrt_linux_muslgnueabi), + ("armv6k-openwrt-linux-muslgnueabi", armv6k_openwrt_linux_muslgnueabi), ++ ("powerpc-openwrt-linux-musl", powerpc_openwrt_linux_musl), + } + + /// Warnings encountered when parsing the target `json`. +--- /dev/null ++++ b/compiler/rustc_target/src/spec/powerpc_openwrt_linux_musl.rs +@@ -0,0 +1,16 @@ ++use crate::abi::Endian; ++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: "powerpc-unknown-linux-musl".into(), ++ pointer_width: 32, ++ data_layout: "E-m:e-p:32:32-i64:64-n32".into(), ++ arch: "powerpc".into(), ++ options: TargetOptions { endian: Endian::Big, mcount: "_mcount".into(), ..base }, ++ } ++} |