This is the mail archive of the cygwin-apps mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cygport cross-compiling beta1

As promised, here is my response to the mingw-w64 ITP.

cygport now supports several scenarios:

1) Cygwin-hosted (cross-)compilers, via toolchain.cygclass

This is exclusively for binutils, gcc, and gdb, either Cygwin-native or
any other platform they support.  The attached examples use a one-line
patch to config.rpath to link dynamically with libintl, but do not ship
the actual locale files, relying on the native versions' instead (as
theirs would collide and refuse to relocate, as previously discussed).

All cross-compilers use the default sysroot, /usr/$target/sys-root.
MinGW libgcc and friends are relocated to the sysroot bindir, just as on

2) Cygwin-to-other cross-compiling, via cross.cygclass

Cross-compiling is supported for packages using autotools, cmake, or
hand-written makefiles.  Packages are automatically "installed" into the
sysroot (under $D).  Install commands that have pre-programmed paths,
namely dobin, doinclude, dolib, doicon, doman, domenu, dopkconfig,
dosbin (some of which are new), and their new* equivalents, install
automatically into the sysroot.  Those commands that take absolute
paths, namely dodir, insinto, exeinto, and dosym, make no assumptions
about the sysroot (see how this is used in the cross-libtool examples).
A doelflib command was also added (see the linux bzip2 and zlib

3) Canadian Cross compiling, via canadian-cross.cygclass

While I was at it, I realized that the right combination of
cross.cygclass and toolchain.cygclass would result in a so-called
Canadian cross.  While somewhat outside the normal scope of cygport, it
was too easy to resist.  See the cygwin-* examples.

4) Running cygport from non-Cygwin systems

YA "while I was at it", theoretically it should be possible to use
cygport from another system to cross-compile Cygwin packages.  This has
NOT been tested AT ALL yet, but if someone is looking to experiment I
will welcome their observations.

The changes to cygport are extensive, and I have yet to break them out
into reasonable-sized commits; so they're not on git yet, but I'm
working on it.  It is likely that I broke something along the way, so
I'm expecting to make further changes to restabilize things.

Attached are a cygport beta and a tarball containing several examples
for both linux and the mingw* toolchains.  I have tested the
toolchain with setup.exe, and it works pending a few changes to setup; I
will post separately about that soon.  Unfortunately the mingw-w64 DDK
headers are not complete, so setup cannot be built with them; upstream
appears to be aware of the issue.

For help with bootstrapping, I have placed minimal toolchains for
i686-pc-linux-gnu, i686-pc-mingw32, i686-w64-mingw32, and
x86_64-w64-mingw32 here:

Those "packages" are not final products, as some of them were results
from earlier in the development process; e.g. some are linked statically
with libintl or were built w/o NLS entirely, but they should be useful
for bootstrapping.  In any case, the .cygport files attached here should
take precedence to those included in those source tarballs.



Attachment: cygport-cross-examples.tar.bz2
Description: application/bzip-compressed-tar

Attachment: cygport-0.9.86-1.tar.bz2
Description: application/bzip-compressed-tar

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]