Skip to content
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

request: add fmodf for x86_64-unknown-uefi #434

Closed
gshep opened this issue Sep 21, 2021 · 3 comments
Closed

request: add fmodf for x86_64-unknown-uefi #434

gshep opened this issue Sep 21, 2021 · 3 comments

Comments

@gshep
Copy link
Contributor

gshep commented Sep 21, 2021

Hello! I tried to use several math crates in a sample for x86_64-unknown-uefi and encountered the following issues:

  1. libm - requires __truncdfsf2. There is already an issue for it = Missing __truncdfsf2 for aarch64-unknown-none-softfloat #327
  2. micromax - requires fmodf. I created an issue in the project's repo (rust-lld: error: undefined symbol: fmodf tarcieri/micromath#95) but the author suggested me to request it here. The build error log can be found there.
  3. https://github.com/nagisa/math.rs - requires both fmodf & __trunsdfsf2.

So I would like fmodf be added to the builtins. Thanks in advance!

@bjorn3
Copy link
Member

bjorn3 commented Sep 21, 2021

fmodf already exists in the libm crate: https://github.com/rust-lang/libm/blob/master/src/math/fmodf.rs It is only included by compiler-builtins on wasm32-unknown-none, baremetal arm and the fortanix sgx environment though:

#[cfg(any(
all(target_arch = "wasm32", target_os = "unknown"),
all(target_arch = "arm", target_os = "none"),
all(target_vendor = "fortanix", target_env = "sgx")
))]
pub mod math;

@gshep
Copy link
Contributor Author

gshep commented Sep 21, 2021

Then I'd like it to be enabled for x86_64-unknown-uefi =)

@Amanieu
Copy link
Member

Amanieu commented Sep 22, 2021

I'd be happy to accept a PR, I think you only need to add a line to that cfg block @bjorn3 linked to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants