Note
This cross-compiler suite is now also available on MSYS2 (unofficial) via msys2-cygwin, feel free to check it out if you don't have a Linux install.
This is a makedeb port of arch-cygwin for using the Cygwin cross toolchain on Ubuntu / Debian.
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 the latest x86_64 LTS release of Ubuntu and Debian is supported, if you want to build on other distros and 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/apt/sources.lsit
(note pkgs are currently not signed) and sync the database using apt update
:
deb [trusted=yes] https://github.com/ookiineko-cygport/deb-cygwin/releases/download/snapshot-deb ./
Then you should be able to install packages like this: apt install cygwin-gcc
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 build-essential
, texinfo
, automake
and bison
before proceeding.
Get the makedeb tool, and then simply run makedeb -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 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)