From 1a1997427d06075021a418a6df25d048b528db00 Mon Sep 17 00:00:00 2001 From: Jesse Rusak Date: Sat, 10 Aug 2024 15:49:08 -0400 Subject: [PATCH] Add needed RUSTFLAGS for supporting Rev A hardware --- api/sys/README.md | 1 + cargo/tests/crates/simple/with-cfg/.cargo/config.toml | 1 + support/utils/src/compile.rs | 2 ++ 3 files changed, 4 insertions(+) diff --git a/api/sys/README.md b/api/sys/README.md index 1ecf5117..bb5d672d 100644 --- a/api/sys/README.md +++ b/api/sys/README.md @@ -114,6 +114,7 @@ unsafe extern "C" fn on_update(_: *mut c_void) -> i32 { 1 /* `1` means "OK, cont [target.thumbv7em-none-eabihf] rustflags = [ "-Ctarget-cpu=cortex-m7", + "-Ctarget-feature=-fp64", "-Clink-args=--emit-relocs", "-Crelocation-model=pic", "-Csoft-float=no", diff --git a/cargo/tests/crates/simple/with-cfg/.cargo/config.toml b/cargo/tests/crates/simple/with-cfg/.cargo/config.toml index e8e69aa4..0f801f0f 100644 --- a/cargo/tests/crates/simple/with-cfg/.cargo/config.toml +++ b/cargo/tests/crates/simple/with-cfg/.cargo/config.toml @@ -6,6 +6,7 @@ rustflags = ["-C", "target-cpu=native"] [target.thumbv7em-none-eabihf] rustflags = [ "-Ctarget-cpu=cortex-m7", + "-Ctarget-feature=-fp64", "-Clink-args=--emit-relocs", "-Crelocation-model=pic", "-Csoft-float=no", diff --git a/support/utils/src/compile.rs b/support/utils/src/compile.rs index c0bb456a..5fee016f 100644 --- a/support/utils/src/compile.rs +++ b/support/utils/src/compile.rs @@ -21,6 +21,7 @@ pub const GCC_ARGS_LIB: &[&str] = &["-nostartfiles", pub const RUSTFLAGS_LIB_HOST: &[&str] = &["-Ctarget-cpu=native"]; pub const RUSTFLAGS_LIB_PLAYDATE: &[&str] = &["-Ctarget-cpu=cortex-m7", + "-Ctarget-feature=-fp64", "-Clink-args=--emit-relocs", "-Crelocation-model=pic", "-Csoft-float=no", @@ -32,6 +33,7 @@ pub const RUSTFLAGS_LIB_PLAYDATE: &[&str] = &["-Ctarget-cpu=cortex-m7", /// - `-Clink-arg=-T...link_map.ld` /// - `-L{libs-search-paths}` pub const RUSTFLAGS_BIN_PLAYDATE: &[&str] = &["-Ctarget-cpu=cortex-m7", + "-Ctarget-feature=-fp64", "-Clink-args=--emit-relocs", "-Crelocation-model=pic", "-Csoft-float=no",