-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
FreeBSD arm64/aarch64 support #5499
Comments
This is not currently a supported platform but if you'd like to send a PR to update the code it would be appreciated! |
Nice I will do that. Soon I will have arm64 hardware to further tests instead on relying on freebsd build servers. Thanks |
We probably also need to update the I looked into this a little bit in #5323 but it looks like FreeBSD doesn't yet support the I had a look at what other JIT's are doing:
Maybe FreeBSD has some other syscall that we can use? I'm not too familiar with it. CC: #3310 |
Just to add something, for latest relase (6.0.0), small change is need to make it compile:
This make it compile, but running tests is not possible becuase of denoland/rusty_v8#1094 |
@sec https://github.com/lapce/lapce , FreeBSD port, will be tested on arm64.aarch64 |
👋 Hey, I've tested the above patch in FreeBSD 14.0-CURRENT
I was able to run
I would guess this is due to the missing icache code. The symptoms are fairly similar to what was happening in #4997 for Windows AArch64. Edit: The cranelift test suite passes, which I wouldn't have expected 🤔 Maybe something else is going on here. |
@afonso360 |
- Fix aarch64 build: wasmtime-runtime-1.0.2 crate See: bytecodealliance/wasmtime#5499 PR: 268929 Tested by: Robert Clausecker <[email protected]>
Hello @sec, I have results that it builds on aarch64 and I committed your patch at https://cgit.freebsd.org/ports/commit/?id=75a1d429216aa977d1bf6b1f4a9c5eb4eb474ac8 Should a upstream change be made with this patch? ( Build fails on armv7 FreeBSD 13.1:
This is due to time_t not being a long on armv7. ) |
I have a fix for that armv7 FreeBSD bug here; I'll do a point release of rustix and update Wasmtime. |
Looked into this a bit more, this branch also does the icache clearing. However I'm still getting the same error. I'll try to track this down when I get a chance. |
This fixes compilation on armv7-unknown-freebsd, as reported [here]. [here]: bytecodealliance#5499 (comment)
This fixes compilation on armv7-unknown-freebsd, as reported [here]. [here]: #5499 (comment)
Feature
Add FreeBSD support on arm64/aarch64
Implementation
Add to https://github.com/bytecodealliance/wasmtime/blob/main/crates/runtime/src/traphandlers/unix.rs
I take this code from https://github.com/wasmerio/wasmer/blob/dcfdea76999a/lib/vm/src/trap/traphandlers.rs#L302-L304 but don't know if some change needs to be made.
0.2.5 build log:
https://pkg-status.freebsd.org/ampere3/data/131arm64-default/b02e58aec16f/logs/lapce-0.2.5_1.log
The text was updated successfully, but these errors were encountered: