diff options
Diffstat (limited to 'lang/rust_host/patches/12-add_armv5tej.patch')
-rw-r--r-- | lang/rust_host/patches/12-add_armv5tej.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/lang/rust_host/patches/12-add_armv5tej.patch b/lang/rust_host/patches/12-add_armv5tej.patch new file mode 100644 index 0000000..750d432 --- /dev/null +++ b/lang/rust_host/patches/12-add_armv5tej.patch @@ -0,0 +1,36 @@ +--- /dev/null ++++ b/compiler/rustc_target/src/spec/armv5tej_openwrt_linux_muslgnueabi.rs +@@ -0,0 +1,23 @@ ++use crate::spec::{Target, TargetOptions}; ++ ++pub fn target() -> Target { ++ Target { ++ // FIXME: this comment below does not seem applicable? ++ // It's important we use "gnueabihf" and not "musleabihf" here. LLVM ++ // uses it to determine the calling convention and float ABI, and LLVM ++ // doesn't support the "musleabihf" value. ++ llvm_target: "armv5tej-unknown-linux-gnueabi".into(), ++ pointer_width: 32, ++ data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), ++ arch: "arm".into(), ++ options: TargetOptions { ++ abi: "eabi".into(), ++ // Atomic operations provided by compiler-builtins ++ max_atomic_width: None, ++ atomic_cas: false, ++ mcount: "\u{1}mcount".into(), ++ has_thumb_interworking: true, ++ ..super::linux_musl_base::opts() ++ }, ++ } ++} +--- a/compiler/rustc_target/src/spec/mod.rs ++++ b/compiler/rustc_target/src/spec/mod.rs +@@ -1032,6 +1032,7 @@ supported_targets! { + ("x86_64-openwrt-linux-musl", x86_64_openwrt_linux_musl), + ("arm-openwrt-linux-muslgnueabi", arm_openwrt_linux_muslgnueabi), + ("arm-openwrt-linux-muslgnueabihf", arm_openwrt_linux_muslgnueabihf), ++ ("armv5tej-openwrt-linux-muslgnueabi", armv5tej_openwrt_linux_muslgnueabi), + } + + /// Warnings encountered when parsing the target `json`. |