@@ -1304,6 +1304,16 @@ impl Build {
1304
1304
if target. starts_with ( "thumbv7m" ) {
1305
1305
cmd. args . push ( "-march=armv7-m" . into ( ) ) ;
1306
1306
}
1307
+ if target. starts_with ( "thumbv8m.base" ) {
1308
+ cmd. args . push ( "-march=armv8-m.base" . into ( ) ) ;
1309
+ }
1310
+ if target. starts_with ( "thumbv8m.main" ) {
1311
+ cmd. args . push ( "-march=armv8-m.main" . into ( ) ) ;
1312
+
1313
+ if target. ends_with ( "eabihf" ) {
1314
+ cmd. args . push ( "-mfpu=fpv5-sp-d16" . into ( ) )
1315
+ }
1316
+ }
1307
1317
if target. starts_with ( "armebv7r" ) | target. starts_with ( "armv7r" ) {
1308
1318
if target. starts_with ( "armeb" ) {
1309
1319
cmd. args . push ( "-mbig-endian" . into ( ) ) ;
@@ -1709,7 +1719,7 @@ impl Build {
1709
1719
} else if self . get_host ( ) ? != target {
1710
1720
// CROSS_COMPILE is of the form: "arm-linux-gnueabi-"
1711
1721
let cc_env = self . getenv ( "CROSS_COMPILE" ) ;
1712
- let cross_compile = cc_env. as_ref ( ) . map ( |s| s. trim_right_matches ( '-' ) ) ;
1722
+ let cross_compile = cc_env. as_ref ( ) . map ( |s| s. trim_end_matches ( '-' ) ) ;
1713
1723
let prefix = cross_compile. or ( match & target[ ..] {
1714
1724
"aarch64-unknown-linux-gnu" => Some ( "aarch64-linux-gnu" ) ,
1715
1725
"aarch64-unknown-linux-musl" => Some ( "aarch64-linux-musl" ) ,
@@ -1758,6 +1768,9 @@ impl Build {
1758
1768
"thumbv7em-none-eabi" => Some ( "arm-none-eabi" ) ,
1759
1769
"thumbv7em-none-eabihf" => Some ( "arm-none-eabi" ) ,
1760
1770
"thumbv7m-none-eabi" => Some ( "arm-none-eabi" ) ,
1771
+ "thumbv8m.base-none-eabi" => Some ( "arm-none-eabi" ) ,
1772
+ "thumbv8m.main-none-eabi" => Some ( "arm-none-eabi" ) ,
1773
+ "thumbv8m.main-none-eabihf" => Some ( "arm-none-eabi" ) ,
1761
1774
"x86_64-pc-windows-gnu" => Some ( "x86_64-w64-mingw32" ) ,
1762
1775
"x86_64-rumprun-netbsd" => Some ( "x86_64-rumprun-netbsd" ) ,
1763
1776
"x86_64-unknown-linux-musl" => Some ( "musl" ) ,
0 commit comments