Ok @daniel, I need your help!
ARMv6 has 2 defines in rust
, but neither seem correct for what OpenWrt needs. Here are the defines for the 2 ARMv6 and the arm-muslgnuabihf to give a HF base. You can see it's pretty basic on how it's setup, but I have no idea on the ARMv6 (v7 is pretty well defined in the toolchain already for me to borrow)
armv6_unknown_freebsd
use crate::spec::{Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "armv6-unknown-freebsd-gnueabihf".to_string(),
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
options: TargetOptions {
abi: "eabihf".to_string(),
// FIXME: change env to "gnu" when cfg_target_abi becomes stable
env: "gnueabihf".to_string(),
features: "+v6,+vfp2,-d32".to_string(),
max_atomic_width: Some(64),
mcount: "\u{1}__gnu_mcount_nc".to_string(),
..super::freebsd_base::opts()
},
}
armv6_unknown_netbsd_eabihf
use crate::spec::{Target, TargetOptions};
pub fn target() -> Target {
Target {
llvm_target: "armv6-unknown-netbsdelf-eabihf".to_string(),
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
options: TargetOptions {
abi: "eabihf".to_string(),
// FIXME: remove env when cfg_target_abi becomes stable
env: "eabihf".to_string(),
features: "+v6,+vfp2,-d32".to_string(),
max_atomic_width: Some(64),
mcount: "__mcount".to_string(),
..super::netbsd_base::opts()
},
}
}
arm_unknown_linux_musleabihf
use crate::spec::{Target, TargetOptions};
pub fn target() -> Target {
Target {
// It's important we use "gnueabihf" and not "musleabihf" here. LLVM
// uses it to determine the calling convention and float ABI, and it
// doesn't support the "musleabihf" value.
llvm_target: "arm-unknown-linux-gnueabihf".to_string(),
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
options: TargetOptions {
abi: "eabihf".to_string(),
// Most of these settings are copied from the arm_unknown_linux_gnueabihf
// target.
features: "+strict-align,+v6,+vfp2,-d32".to_string(),
max_atomic_width: Some(64),
mcount: "\u{1}mcount".to_string(),
..super::linux_musl_base::opts()
},
}
}