-
Notifications
You must be signed in to change notification settings - Fork 228
Remove __multc3 #623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove __multc3 #623
Conversation
This C file doesn't seem to be compiled correctly, as it creates a reference to the x86 specific `__builtin_copysignq` on ARM. This intrinsic is unused and unavailable on Windows because it's for complex numbers Rust doesn't support, so it should be fine to remove. The inclusion of the file seems to be the cause of some downstream link errors: rust-lang/rust#125619
This is actually a bug in upstream LLVM that should be fixed there: #if __has_builtin(__builtin_copysignf128)
#define crt_copysignf128(x, y) __builtin_copysignf128((x), (y))
#elif __has_builtin(__builtin_copysignq) || (defined(__GNUC__) && __GNUC__ >= 7)
#define crt_copysignf128(x, y) __builtin_copysignq((x), (y))
#endif The condition is incorrect: on GCC 7+, we should be using either GCC 6 and before simply don't properly support f128. |
Thanks, I was hoping we could fix this just by removing it. I'm surprised that this one slipped through the cracks since any attempt to actually use But if |
The issue only happens when compiler-rt is built with GCC, which happens in our build.rs. This is why it was not caught earlier: compiler-rt is normally only built as part of Clang toolchains and clang will always return true for The best way to fix this would be to send a PR to llvm/llvm-project, and then backport the fix to rust's LLVM fork (rust-lang/llvm-project). |
I'm having trouble recreating the bad object with GCC to make a patch for |
Closing, as I was able to piece enough together to send llvm/llvm-project#93890. Hopefully I get a response. Thanks for the guidance! |
This C file doesn't seem to be compiled correctly, as it creates a reference to the x86 specific
__builtin_copysignq
on ARM. This intrinsic is unused and unavailable on Windows because it's for complex numbers Rust doesn't support, so it should be fine to remove.The inclusion of the file seems to be the cause of some downstream link errors: rust-lang/rust#125619