Note
This cross-compiler suite is now also available on Ubuntu / Debian and MSYS2 (unofficial) via deb-cygwin and msys2-cygwin, feel free to check them out if you don't have an archlinux install.
This is an attempt to get a Cygwin cross toolchain on archlinux.
Currently, this repository contains some experimental PKGBUILDs to build a Cygwin cross compiler.
And possibly more packages (or some build tool wrappers) can be added in the future.
Note
Currently only building on x86_64 archlinux is supported, if you want to build on other architectures, which is untested, you can try to follow the Bootstrapping instructions to build the cross compilers yourself.
Please feel free to open an Issue if you run into any problem.
All packages are precompiled and available for downloading at GitHub Releases,
to use them, add the following lines to the end of your /etc/pacman.conf
(note pkgs are currently not signed) and sync the database using pacman -Syu
:
[arch-cygwin]
SigLevel = Optional
Server = https://github.com/ookiineko/arch-cygwin/releases/download/snapshot
Then you should be able to install packages like this: pacman -S cygwin-gcc cygwin-libiconv cygwin-zlib
Important
Parallel builds might break things sometimes, use a single job to be safe.
You can do this by editing your /etc/makepkg.conf
and remove -jXX
from MAKEFLAGS
(if any).
First, clone this repository using Git and make sure you have installed base-devel
package group from archlinux repository before proceeding.
And then simply run makepkg -si
in a subdirectory in order to build and install that package.
When bootstrapping the cross compilers, build and install the following packages one by one, and in this order:
- cygwin-binutils
- cygwin-default-manifest-bin
- cygwin-w32api-headers
- cygwin-w32api-runtime-bin
- cygwin-bin
- cygwin-gcc
- cygwin-default-manifest (replaces the
-bin
one) - cygwin-w32api-runtime (replaces the
-bin
one) - cygwin (replaces the
-bin
one; requirescocom
to build) - cygwin-gcc (rebuild to link against our just-built libraries)
After that other packages can be built and installed normally ;)
Cygwin documentation: Building a cross-compiler
Cygwin cross-compilers on Ubuntu / Debian (unofficial)
Cygwin cross-compilers on MSYS2 (unofficial)
Please refer to ArchWiki: MinGW package guidelines.
Special thanks to the following external sources where arch-cygwin took references or borrowed code from (unsorted):
-
cygwin-packages (For Cygwin quirks and patches!)
-
MinGW-w64 packages on AUR (For various kinds of wrappers, and packaging rules!)
-
msys2/MINGW-packages (For LLVM build quirks)
-
Fedora Cygwin (For Cygwin quirks when cross compiling)