Replies: 7 comments 18 replies
-
You'd need to start with adding Cygwin support to LLVM projects first. The target you are using right now is native Windows target buy you need Cygwin target. There is some support for i686 and x86_64 Cygwin but I don't know if it's still maintained. Starting with x86_64 should be the easiest way to see how much work will it take to build Cygwin with LLVM. Adding AArch64 Cygwin target will need some work but hopefully it's not much. Porting Cygwin for AArch64 will be bigger task though. |
Beta Was this translation helpful? Give feedback.
-
@ZacWalk FWIW Cygwin does not use clang but a custom GCC-based toolchain. And here is the most authoritative answer by the Cygwin project that I found to the question when Cygwin will support Windows/ARM64: https://www.mail-archive.com/cygwin@cygwin.com/msg169879.html
I could imagine that maybe you (or your manager) might be able to do something about the hardware for testing? 😁 |
Beta Was this translation helpful? Give feedback.
-
Thanks for that input. I will spend some time investigating those 2 approaches:
I am still learning about the build. My expectation is that clang's WoARM64 support is a little more battle hardened and might lead to better cross compiling options in future. Windows ARM boxes seem quite slow for builds long term. |
Beta Was this translation helpful? Give feedback.
-
Wasn't there a Fedora repository to cross compile cygwin gcc from Linux? It may help with this porting. |
Beta Was this translation helpful? Give feedback.
-
I have taken some time to try and understand the choices between:
There seems a lot of behavior in the existing GCC toolchain that has been built up over a long period. I assume that would be hard to replicate in clang even if the cygwin-runtime could be built. Does that make it a no-brainer to focus on GCC? Or are there other factors like a desire to move to clang over time? |
Beta Was this translation helpful? Give feedback.
-
Something occurred to me that may be a deal-breaker for a native aarch64 cygwin (or msys2). Dynamicbase (ASLR) is required to be set on arm64. Cygwin relies on deterministic address space layout for its fork emulation, so requires dynamicbase to not be set. Best reference I could find just now was https://learn.microsoft.com/en-us/cpp/build/reference/dynamicbase-use-address-space-layout-randomization?view=msvc-170
|
Beta Was this translation helpful? Give feedback.
-
Another one of my very occasional updates: I have been pulling various parts together to make an experimental GNU toolchain. This allows cross-compiling from Linux to Windows-on-arm64. However, it has some key parts still missing:
I am slowly working on Exception handling and stack unwinding. If I can get that working then this toolchain might become useful. I can't take much credit. I am building on work from several other contributors. |
Beta Was this translation helpful? Give feedback.
-
I would like to help get the BASH shell running natively on 'Windows on ARM64'. I see a key dependency will be the msys2-runtime.
I have been able to build various packages for ARM64 using these instructions. I would like to experiment with building newlib-cygwin for ARM using clang; to evaluate how much work is needed.
I was wondering if anyone had already tried this or had some recommendations for setting up a local build. I hope to be able to bring ARM specific code over from newlib where needed.
FYI - @jeremyd2019 @lazka
Beta Was this translation helpful? Give feedback.
All reactions