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

Make libm crate work with Motūrus OS #7

Open
lasiotus opened this issue Jan 13, 2024 · 2 comments
Open

Make libm crate work with Motūrus OS #7

lasiotus opened this issue Jan 13, 2024 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@lasiotus
Copy link
Member

As discussed here:

https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/How.20to.20force.20libm.20linking.20for.20custom.20targets.3F

Rust toolchain/stdlib assumes there is a libm (math) library available, which is not the case in Motūrus OS, at least not in the way it is expected. A couple of basic math functions have been copied from Rust's libm crate into moto-runtime, but Rust's libm crate was created specitically, it seems, to serve cases like we have here. So it seems there should be a way to configure Rust toolchain to pick up libm crate.

@lasiotus lasiotus added bug Something isn't working help wanted Extra attention is needed labels Jan 13, 2024
@lasiotus
Copy link
Member Author

More context: this patch: https://github.com/rust-lang/compiler-builtins/pull/248/files added libm support for wasm; we probably need to modify https://github.com/rust-lang/compiler-builtins/blob/master/src/math.rs to add Moturus support (and lib.rs above it).

@lasiotus
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant