From e35091a2d0b5fda2045c27ee4facc33f6dd8d486 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Mon, 17 Jun 2024 19:38:55 -0500 Subject: [PATCH] Disable libm on x86 without sse2 In , symbols for the Rust port of libm were made always weakly available. This seems to be causing problems on platforms with ABI issues, as explained at . Disable Rust libm on x86 without sse2 to mitigate this. --- library/compiler-builtins/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/compiler-builtins/src/lib.rs b/library/compiler-builtins/src/lib.rs index 40564178a249..0d207a914bff 100644 --- a/library/compiler-builtins/src/lib.rs +++ b/library/compiler-builtins/src/lib.rs @@ -47,6 +47,9 @@ mod macros; pub mod float; pub mod int; +// Disabled on x86 without sse2 due to ABI issues +// +#[cfg(not(all(target_arch = "x86", not(target_feature = "sse2"))))] pub mod math; pub mod mem;