Thursday, February 17, 2011

Across and Back Again

As you may be aware, last summer I added cross-compiling support to cygport, resulting in a new 0.10 series. The results so far have been quite promising, with cygwin-based cross-toolchains now available for the following targets:

  • MinGW (i686-pc-mingw32), with the basic packages available here pending an ITA, and many more in Ports
  • MinGW-w64 (i686-w64-mingw32 and x86_64-w64-mingw32), already in the distro
  • Linux x86 (i686-pc-linux-gnu) and x64 (x86_64-pc-linux-gnu)
  • Solaris 10 x86 (i386-pc-solaris2.10) and SPARC (sparc-sun-solaris2.10)
  • Solaris 11 x86 (i386-pc-solaris2.11)
  • AVR microcontrollers (avr)
With this improvement to cygport, cross-compiling from Cygwin comes with the ease you would expect from a Linux distribution.

This week, I decided it was time to turn things around and make it easier to cross-compile to Cygwin as well. To that end, I have created a minimal Linux-to-Cygwin cross-compiler toolchain for Fedora Linux. Under my "fedora-cygwin" (sub)project, I have posted .spec files and patches to SourceForge git and RPMs for both ix86 and x86_64 to the File Release area. For now it is necessary to manually download and install the RPMs until I have the chance to figure out how to setup a yum repository.

While these packages are mostly based on the work of the fedora-mingw project, there are important differences. I'll admit that these are my first RPM spec files, so I'll gladly take constructive suggestions for improvement, or better yet, git patches. Furthermore, these have yet to be tested beyond building themselves. If you do find these useful, or discover any problems, please let me know through the Cygwin Ports mailing list for now.