From 1a1997427d06075021a418a6df25d048b528db00 Mon Sep 17 00:00:00 2001 From: Jesse Rusak Date: Sat, 10 Aug 2024 15:49:08 -0400 Subject: [PATCH 1/2] 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", From 4dffd64b7d7c0a40e6b74b93ff4894442a9c15de Mon Sep 17 00:00:00 2001 From: Alexander Koz Date: Sun, 11 Aug 2024 22:09:40 +0400 Subject: [PATCH 2/2] bump crates --- Cargo.lock | 4 ++-- api/sys/Cargo.toml | 2 +- support/utils/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index db9cd102..babc13bb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4081,7 +4081,7 @@ dependencies = [ [[package]] name = "playdate-build-utils" -version = "0.3.4" +version = "0.3.5" dependencies = [ "dirs", "log", @@ -4241,7 +4241,7 @@ dependencies = [ [[package]] name = "playdate-sys" -version = "0.4.3" +version = "0.4.4" dependencies = [ "arrayvec", "playdate-bindgen", diff --git a/api/sys/Cargo.toml b/api/sys/Cargo.toml index 22c60c60..3a30ff70 100644 --- a/api/sys/Cargo.toml +++ b/api/sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "playdate-sys" -version = "0.4.3" +version = "0.4.4" build = "src/build.rs" readme = "README.md" description = "Low-level Playdate API bindings" diff --git a/support/utils/Cargo.toml b/support/utils/Cargo.toml index 8d94d92c..3456a8cd 100644 --- a/support/utils/Cargo.toml +++ b/support/utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "playdate-build-utils" -version = "0.3.4" +version = "0.3.5" readme = "README.md" description = "Utils that help to build program with Rust and Playdate API" keywords = ["playdate", "utility"]