Skip to content

Commit a20cdff

Browse files
Add tool autodetection for armv7a targets (#479)
1 parent f139bce commit a20cdff

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,6 +1591,14 @@ impl Build {
15911591
cmd.args.push("-mfloat-abi=soft".into());
15921592
}
15931593
}
1594+
if target.starts_with("armv7a") {
1595+
cmd.args.push("-march=armv7-a".into());
1596+
1597+
if target.ends_with("eabihf") {
1598+
// lowest common denominator FPU
1599+
cmd.args.push("-mfpu=vfpv3-d16".into());
1600+
}
1601+
}
15941602
if target.starts_with("riscv32") || target.starts_with("riscv64") {
15951603
// get the 32i/32imac/32imc/64gc/64imac/... part
15961604
let mut parts = target.split('-');
@@ -2044,6 +2052,8 @@ impl Build {
20442052
"sparc64-unknown-linux-gnu" => Some("sparc64-linux-gnu"),
20452053
"sparc64-unknown-netbsd" => Some("sparc64--netbsd"),
20462054
"sparcv9-sun-solaris" => Some("sparcv9-sun-solaris"),
2055+
"armv7a-none-eabi" => Some("arm-none-eabi"),
2056+
"armv7a-none-eabihf" => Some("arm-none-eabi"),
20472057
"armebv7r-none-eabi" => Some("arm-none-eabi"),
20482058
"armebv7r-none-eabihf" => Some("arm-none-eabi"),
20492059
"armv7r-none-eabi" => Some("arm-none-eabi"),

0 commit comments

Comments
 (0)