-
-
Notifications
You must be signed in to change notification settings - Fork 630
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
minGW Windows support in-scope? #30
Comments
You can compile an x86_64-linux-gnu cross compiler toolchain for Windows. But I recommend just running Linux in a virtual machine and using that to compile. Builds actually go faster in a virtual machine on Windows than on Windows itself. It's not possible to support a MinGW toolchain because it uses COFF, which imposes restrictions on things like the length of section names that would otherwise make Actually Portable Executable impossible. The same is true of Mach-O. You have to use an ELF toolchain. It's totally possible to have an ELF toolchain on Windows. It's just prebuilt binaries for such a thing are hard to find online and it's hard to configure a build from scratch to create them. |
Regarding the integrated linker, I'm assuming you're referring to 81ef162 which is discussed further in https://github.com/jart/cosmopolitan/blob/master/third_party/chibicc/README.cosmo An integrated linker would be nice, since the chibicc compiler can be built as an actually portable executable. Keep in mind it's not a replacement for GCC which has decades of development behind it and can generally produce code that's twice as fast. |
There's now a tutorial on the website on how to build Actually Portable Executables on Windows. Static binaries are provided of an x86_64-linux-gnu cross-compiler toolchain which runs on Windows. https://justine.lol/cosmopolitan/windows-compiling.html |
Hi,
Cosmopolitan currently assumes a Linux environment to build ape programs. However, my primary development is on and for Windows. Is minGW support within the scope of this project (assuming global 'minGW' support is even possible)? Apparently gcc on minGW is currently configured exclusively for elf output, so certain assembler directives simply do not exist. Recognizing that beggars cannot be choosers, is there a possibility of more general Clang compiler support, which already supports Windows? Would an integrated linker resolve these issues (I noticed a related remark in a recent commit message)?
Thanks!
The text was updated successfully, but these errors were encountered: