From 3426186db7b20a27176e7ce40850cf708424cc30 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 31 Jan 2024 17:37:26 +0100 Subject: [PATCH 1/2] Remove 80-bit builtins entirely It turns out that these also don't build on x86 + MSVC. Rather than fixing up the condition, I'm just deleting them entirely. As far as I know, Rust does not support 80-bit floats and has no plan to support them, so we shouldn't need them. --- build.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/build.rs b/build.rs index 6ad7f7153..8082131ef 100644 --- a/build.rs +++ b/build.rs @@ -296,15 +296,6 @@ mod c { ("__truncdfhf2", "truncdfhf2.c"), ("__truncsfhf2", "truncsfhf2.c"), ]); - - if target_arch == "x86" || target_arch == "x86_64" { - // Only add 80-bit long double sources on x86. - sources.extend(&[ - ("__divxc3", "divxc3.c"), - ("__mulxc3", "mulxc3.c"), - ("__powixf2", "powixf2.c"), - ]); - } } // When compiling in rustbuild (the rust-lang/rust repo) this library From 9e1e3905e2aa102a3c336b9b5b8601e240d680ae Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 2 Feb 2024 10:04:55 +0100 Subject: [PATCH 2/2] Also don't build floatdixf and floatundixf --- build.rs | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/build.rs b/build.rs index 8082131ef..6268fd2ff 100644 --- a/build.rs +++ b/build.rs @@ -347,29 +347,12 @@ mod c { ]); } - if target_env == "msvc" { - if target_arch == "x86_64" { - sources.extend(&[("__floatdixf", "x86_64/floatdixf.c")]); - } - } else { - // None of these seem to be used on x86_64 windows, and they've all - // got the wrong ABI anyway, so we want to avoid them. - if target_os != "windows" { - if target_arch == "x86_64" { - sources.extend(&[ - ("__floatdixf", "x86_64/floatdixf.c"), - ("__floatundixf", "x86_64/floatundixf.S"), - ]); - } - } - + if target_env != "msvc" { if target_arch == "x86" { sources.extend(&[ ("__ashldi3", "i386/ashldi3.S"), ("__ashrdi3", "i386/ashrdi3.S"), ("__divdi3", "i386/divdi3.S"), - ("__floatdixf", "i386/floatdixf.S"), - ("__floatundixf", "i386/floatundixf.S"), ("__lshrdi3", "i386/lshrdi3.S"), ("__moddi3", "i386/moddi3.S"), ("__muldi3", "i386/muldi3.S"),