-
Notifications
You must be signed in to change notification settings - Fork 98
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
floor(), floorf(), ceil() and ceilf() Don't actually work on no-std (linker error) #258
Comments
What makes it questionable is that LLVM optimizes float ops as if there's no FP environmental flags anyway, so... it shouldn't actually affect anything to just remove all uses of the macro. |
Aren't Can you provide example code to reproduce this issue? |
@Amanieu yes, but they aren't |
|
I also had this problem when compiling to target |
We have also experienced this issue on custom x86_64-based targets for quite a long time. My workaround has just been to write |
Just a heads up - I ran into this message myself quite some time before and went ahead to export all functions in this crate with |
The linker prints out:
undefined symbol: fmodf
andundefined symbol: fmod
. I noticed that if I don't use any of these functions the linker error goes away. I've been trying to figure out why this is happening all day, and finally tracked it down to these functions. I believe the code that generates the code looking for this external symbol is caused by theforce_eval!()
macro invocation. To me it looks like maybe LLVM is trying to optimize based on that and attempting to use the actual libm.It would also be nice if there was some documentation on what
force_eval()!
is for because I can't figure it out.I'm running rustc 1.59.0-nightly (0b42deacc 2021-12-09) cross compiling from Linux (x86) to aarch64.
The text was updated successfully, but these errors were encountered: