From efde7130e4be3b6aa74a85bfb9d84789084269c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Wed, 7 Dec 2022 16:08:01 +0100 Subject: [PATCH] Expose minimal floating point symbols for x86_64-unknown-none --- src/lib.rs | 1 + src/math.rs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index e7bc61e4c..10b4aafec 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -44,6 +44,7 @@ pub mod int; #[cfg(any( all(target_family = "wasm", target_os = "unknown"), + all(target_arch = "x86_64", target_os = "none"), all(target_arch = "x86_64", target_os = "uefi"), all(target_arch = "arm", target_os = "none"), target_os = "xous", diff --git a/src/math.rs b/src/math.rs index 4ae174891..c64984e9e 100644 --- a/src/math.rs +++ b/src/math.rs @@ -106,10 +106,11 @@ no_mangle! { fn truncf(x: f32) -> f32; } -// only for the thumb*-none-eabi* targets and riscv32*-none-elf targets that lack the floating point instruction set +// only for the thumb*-none-eabi*, riscv32*-none-elf and x86_64-unknown-none targets that lack the floating point instruction set #[cfg(any( all(target_arch = "arm", target_os = "none"), - all(target_arch = "riscv32", not(target_feature = "f"), target_os = "none") + all(target_arch = "riscv32", not(target_feature = "f"), target_os = "none"), + all(target_arch = "x86_64", target_os = "none") ))] no_mangle! { fn fmin(x: f64, y: f64) -> f64;