Skip to content

(unofficial) Cygwin cross-compilers on MSYS2/archlinux

Notifications You must be signed in to change notification settings

ookiineko-cygport/msys2-cygwin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MSYS2 (MinGW) Cygwin

This is a MinGW port of arch-cygwin for using the Cygwin cross toolchain on MSYS2.

Currently, the packages prefixed with mingw-w64- are available to use.

More PKGBUILDs can be adapted for MSYS2 in the future.

Install

Note

Currently only building inside MINGW64 terminal is supported, but you can try to tweak the PKGBUILD files and build under another environment, 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:

[msys2-cygwin]
SigLevel = Optional
Server = https://github.com/ookiineko-cygport/msys2-cygwin/releases/download/snapshot-msys2

Then you should be able to install packages like this: pacman -S mingw-w64-x86_64-cygwin-gcc

Building

Important

Parallel builds might break things sometimes, use a single job to be safe.

You can do this by editing your /etc/makepkg_mingw.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 MSYS2 repository before proceeding.

And then simply run makepkg-mingw -si in a subdirectory in order to build and install that package.

Bootstrapping

When bootstrapping the cross compilers, build and install the following packages one by one, and in this order:

  • mingw-w64-cygwin-binutils
  • mingw-w64-cygwin-default-manifest-bin
  • mingw-w64-cygwin-w32api-headers
  • mingw-w64-cygwin-w32api-runtime-bin
  • mingw-w64-cygwin-bin
  • mingw-w64-cygwin-gcc
  • mingw-w64-cygwin-default-manifest (replaces the -bin one)
  • mingw-w64-cygwin-w32api-runtime (replaces the -bin one)
  • mingw-w64-cygwin (replaces the -bin one; requires mingw-w64-cocom to build)
  • mingw-w64-cygwin-gcc (rebuild to link against our just-built libraries)

After that other packages can be built and installed normally ;)

See also

Cygwin cross compilers on archlinux (unofficial)

Cygwin documentation: Building a cross-compiler

Cygwin cross-compilers on Ubuntu / Debian (unofficial)

Contributing

Please refer to ArchWiki: MinGW package guidelines.

Credits

Special thanks to the following external sources where arch-cygwin took references or borrowed code from (unsorted):

About

(unofficial) Cygwin cross-compilers on MSYS2/archlinux

Resources

Stars

Watchers

Forks

Languages

  • Shell 95.9%
  • Python 2.8%
  • Other 1.3%