[fiber] Add support for ARM64 targets#1113
Conversation
0d0a37d to
b9c09e3
Compare
b9c09e3 to
23235c8
Compare
7555fc8 to
3a1c70b
Compare
|
I'll merge this tonight, we can check and fix the RPi ARM64 later. It's not our primary target anyways, but I'd like to have the unit tests pass on my machine again ;-P |
It does not work 😢, because the x86_64 context switching ( DetailsI'll investigate further later this day... |
What is the purpose of this "rpi" target? I don't see any difference, except that it includes the wiringpi GPIO module, which is deprected since 2019 and also broken on Debian bookworm-based Rpi Linux distibutions. I would suggest simply removing the |
Because I'm stupid and I copied the x86_64 file without modifications. 🙈🙈🙈 OMG, I'm getting old… 👴
Yeah, that make sense. We only had GPIO support anyways, so with that gone, there's no difference to |
18ebef2 to
a895cd1
Compare
|
Could you try it again now? @rleh |
|
Now it works on a Aarch64 linux system (Raspberry Pi 4 8GB running Raspbian OS 64-bit)! @salkinium Could you check if it still works on ARM-based MacOS? 😆 |
|
Will do. I also read that GitHub has ARM64 macOS runners, I'll check that out tonight. |
rleh
left a comment
There was a problem hiding this comment.
Thank you a lot for the work @salkinium!
-Os is not properly supported by LLVM for ARM64
3d0462d to
4cce264
Compare
|
Ok, so. GCC on macOS ignores The macOS linker seems to require leading underscores. 🙄 This is also done in the boost asm files. I've added a template switch. Could you test again on Linux? |
Yes, and it works fine!
GCC has a switch Because there is a better option: extern "C" void modm_context_entry() asm("_modm_context_entry");I reverted the template file back to a normal C++ file and implemented the ASM labels instead (see 1e36434), works (still) on arm64 linux. |
|
Yup, that works! Thanks! I'll squash and merge it after the CI passes. |
Co-authored-by: Raphael Lehmann <raphael@rleh.de>
1e36434 to
623a13b
Compare
|
Removing the underscores also works this way! |

I've added a new key to the hosted device files:
archwitharm64andx86_64. Maybe it should beaarch64?-arm64suffix,-x86_64is implicit for backwards compatibility:hosted-linux-arm64hosted-darwin-arm64hosted-rpitarget, as wiringPi is deprecated and thus the target lost its only peripheral.